Static Public Member Functions | |
Mesh | fromFaceSoup (VertCoords vertexCoordinates, std_vector_Id_VertTag verts, Vector_MeshBuilder_VertSpan_FaceId faces, MeshBuilder.BuildSettings settings='{}', func_bool_from_float cb='{}') |
Mesh | fromPointTriples (std_vector_std_array_Vector3_float_3 posTriples, bool duplicateNonManifoldVertices) |
Mesh | fromTriMesh (TriMesh triMesh, MeshBuilder.BuildSettings settings='{}', func_bool_from_float cb='{}') |
Mesh | fromTriangles (VertCoords vertexCoordinates, Triangulation t, MeshBuilder.BuildSettings settings='{}', func_bool_from_float cb='{}') |
Mesh | fromTrianglesDuplicatingNonManifoldVertices (VertCoords vertexCoordinates, Triangulation t, std_vector_MeshBuilder_VertDuplication dups=None, MeshBuilder.BuildSettings settings='{}') |
Static Protected Member Functions | |
_pybind11_conduit_v1_ (*args, **kwargs) | |
Generated from: MR::Mesh This class represents a mesh, including topology (connectivity) information and point coordinates, as well as some caches to accelerate search algorithms \\ingroup MeshGroup
None mrmeshpy.Mesh.__init__ | ( | self | ) |
Implicit default constructor.
None mrmeshpy.Mesh.__init__ | ( | self, | |
Mesh | arg0 ) |
Implicit copy constructor.
bool mrmeshpy.Mesh.__eq__ | ( | self, | |
Mesh | b ) |
compare that two meshes are exactly the same
|
staticprotected |
None mrmeshpy.Mesh.addMesh | ( | self, | |
Mesh | from_, | ||
FaceMap | outFmap = None, | ||
VertMap | outVmap = None, | ||
WholeEdgeMap | outEmap = None, | ||
bool | rearrangeTriangles = False ) |
appends another mesh as separate connected component(s) to this
None mrmeshpy.Mesh.addMeshPart | ( | self, | |
MeshPart | from_, | ||
bool | flipOrientation = False, | ||
std_vector_std_vector_Id_EdgeTag | thisContours = '{}', | ||
std_vector_std_vector_Id_EdgeTag | fromContours = '{}', | ||
PartMapping | map = '{}' ) |
appends whole or part of another mesh to this joining added faces with existed ones along given contours \\param flipOrientation true means that every (from) triangle is inverted before adding
None mrmeshpy.Mesh.addMeshPart | ( | self, | |
MeshPart | from_, | ||
PartMapping | map ) |
appends whole or part of another mesh as separate connected component(s) to this
None mrmeshpy.Mesh.addPart | ( | self, | |
Mesh | from_, | ||
FaceMap | outFmap = None, | ||
VertMap | outVmap = None, | ||
WholeEdgeMap | outEmap = None, | ||
bool | rearrangeTriangles = False ) |
None mrmeshpy.Mesh.addPartByFaceMap | ( | self, | |
Mesh | from_, | ||
FaceMap | fromFaces, | ||
bool | flipOrientation = False, | ||
std_vector_std_vector_Id_EdgeTag | thisContours = '{}', | ||
std_vector_std_vector_Id_EdgeTag | fromContours = '{}', | ||
PartMapping | map = '{}' ) |
fromFaces contains mapping from this-mesh (considering it is empty) to from-mesh
None mrmeshpy.Mesh.addPartByMask | ( | self, | |
Mesh | from_, | ||
FaceBitSet | fromFaces, | ||
bool | flipOrientation = False, | ||
std_vector_std_vector_Id_EdgeTag | thisContours = '{}', | ||
std_vector_std_vector_Id_EdgeTag | fromContours = '{}', | ||
PartMapping | map = '{}' ) |
None mrmeshpy.Mesh.addPartByMask | ( | self, | |
Mesh | from_, | ||
FaceBitSet | fromFaces, | ||
PartMapping | map ) |
creates new point and assigns given position to it
Id_EdgeTag mrmeshpy.Mesh.addSeparateContours | ( | self, | |
std_vector_std_vector_Vector3_float | contours, | ||
AffineXf3f | xf = None ) |
append points to mesh and connect them returns first EdgeId of new edges
Id_EdgeTag mrmeshpy.Mesh.addSeparateEdgeLoop | ( | self, | |
std_vector_Vector3_float | contourPoints ) |
append points to mesh and connect them as closed edge loop returns first EdgeId of new edges
float mrmeshpy.Mesh.area | ( | self, | |
FaceBitSet | fs ) |
computes the area of given face-region
float mrmeshpy.Mesh.area | ( | self, | |
FaceBitSet | fs = None ) |
computes the area of given face-region (or whole mesh)
float mrmeshpy.Mesh.area | ( | self, | |
FaceId | f ) |
returns the area of given face
None mrmeshpy.Mesh.attachEdgeLoopPart | ( | self, | |
Id_EdgeTag | first, | ||
Id_EdgeTag | last, | ||
std_vector_Vector3_float | contourPoints ) |
append points to mesh and connect them to given edges making edge loop first point connects with first edge dest last point connects with last edge org note that first and last edge should have no left face
float mrmeshpy.Mesh.averageEdgeLength | ( | self | ) |
computes average length of an edge in this mesh
float mrmeshpy.Mesh.calcFastWindingNumber | ( | self, | |
Vector3f | pt, | ||
float | beta = 2 ) |
computes generalized winding number in a point (pt), which is * for closed mesh with normals outside: 1 inside, 0 outside; * for planar mesh: 0.5 inside, -0.5 outside; and in general is equal to (portion of solid angle where inside part of mesh is observable) minus (portion of solid angle where outside part of mesh is observable) \\param beta determines the precision of fast approximation: the more the better, recommended value 2 or more
float mrmeshpy.Mesh.circumcircleDiameter | ( | self, | |
FaceId | f ) |
returns circumcircle diameter of given mesh triangle
float mrmeshpy.Mesh.circumcircleDiameterSq | ( | self, | |
FaceId | f ) |
returns squared circumcircle diameter of given mesh triangle
Mesh mrmeshpy.Mesh.cloneRegion | ( | self, | |
FaceBitSet | region, | ||
bool | flipOrientation = False, | ||
PartMapping | map = '{}' ) |
creates new mesh from given triangles of this mesh
Box3f mrmeshpy.Mesh.computeBoundingBox | ( | self, | |
AffineXf3f | toWorld = None ) |
passes through all valid vertices and finds the minimal bounding box containing all of them; if toWorld transformation is given then returns minimal bounding box in world space
Box3f mrmeshpy.Mesh.computeBoundingBox | ( | self, | |
FaceBitSet | region, | ||
AffineXf3f | toWorld = None ) |
passes through all given faces (or whole mesh if region == null) and finds the minimal bounding box containing all of them if toWorld transformation is given then returns minimal bounding box in world space
float mrmeshpy.Mesh.cotan | ( | self, | |
UndirectedEdgeId | ue ) |
computes sum of cotangents of the angle in the left and right triangles opposite to given edge, and returns 0 if left face does not exist
float mrmeshpy.Mesh.dblArea | ( | self, | |
FaceId | f ) |
returns twice the area of given face
float mrmeshpy.Mesh.dblArea | ( | self, | |
VertId | v ) |
computes the length of summed directed double areas of all triangles around given vertex
None mrmeshpy.Mesh.deleteFaces | ( | self, | |
FaceBitSet | fs, | ||
UndirectedEdgeBitSet | keepEdges = None ) |
deletes multiple given faces, also deletes adjacent edges and vertices if they were not shared by remaining faces ant not in \\param keepFaces
Vector3f mrmeshpy.Mesh.destPnt | ( | self, | |
Id_EdgeTag | e ) |
returns coordinates of the edge destination
float mrmeshpy.Mesh.dihedralAngle | ( | self, | |
UndirectedEdgeId | e ) |
given an edge between two triangular faces, computes the dihedral angle between them: 0 if both faces are in the same plane, positive if the faces form convex surface, negative if the faces form concave surface; please consider the usage of faster dihedralAngleSin(e) and dihedralAngleCos(e)
float mrmeshpy.Mesh.dihedralAngleCos | ( | self, | |
UndirectedEdgeId | e ) |
given an edge between two triangular faces, computes cosine of dihedral angle between them: 1 if both faces are in the same plane, 0 if the surface makes right angle turn at the edge, -1 if the faces overlap one another
float mrmeshpy.Mesh.dihedralAngleSin | ( | self, | |
UndirectedEdgeId | e ) |
given an edge between two triangular faces, computes sine of dihedral angle between them: 0 if both faces are in the same plane, positive if the faces form convex surface, negative if the faces form concave surface
Vector3d mrmeshpy.Mesh.dirArea | ( | self, | |
FaceBitSet | fs ) |
computes the sum of directed areas for faces from given region
Vector3d mrmeshpy.Mesh.dirArea | ( | self, | |
FaceBitSet | fs = None ) |
computes the sum of directed areas for faces from given region (or whole mesh)
computes directed double area for a triangular face from its vertices
computes sum of directed double areas of all triangles around given vertex
float mrmeshpy.Mesh.discreteGaussianCurvature | ( | self, | |
VertId | v, | ||
bool_output | outBoundaryVert = None ) |
computes discrete Gaussian curvature (or angle defect) at given vertex, which 0 in inner vertices on planar mesh parts and reaches 2*pi on needle's tip, see http://math.uchicago.edu/~may/REU2015/REUPapers/Upadhyay.pdf optionally returns whether the vertex is on boundary
float mrmeshpy.Mesh.discreteMeanCurvature | ( | self, | |
UndirectedEdgeId | e ) |
computes discrete mean curvature in given edge, measures in length^-1; 0 for planar regions, positive for convex surface, negative for concave surface
float mrmeshpy.Mesh.discreteMeanCurvature | ( | self, | |
VertId | v ) |
computes discrete mean curvature in given vertex, measures in length^-1; 0 for planar regions, positive for convex surface, negative for concave surface
Vector3f mrmeshpy.Mesh.edgeCenter | ( | self, | |
UndirectedEdgeId | e ) |
computes the center of given edge
float mrmeshpy.Mesh.edgeLength | ( | self, | |
UndirectedEdgeId | e ) |
returns Euclidean length of the edge
float mrmeshpy.Mesh.edgeLengthSq | ( | self, | |
UndirectedEdgeId | e ) |
returns squared Euclidean length of the edge (faster to compute than length)
computes coordinates of point given as edge and relative position on it
Vector3f mrmeshpy.Mesh.edgePoint | ( | self, | |
Id_EdgeTag | e, | ||
float | f ) |
returns a point on the edge: origin point for f=0 and destination point for f=1
LineSegm3f mrmeshpy.Mesh.edgeSegment | ( | self, | |
Id_EdgeTag | e ) |
returns line segment of given edge
Vector3f mrmeshpy.Mesh.edgeVector | ( | self, | |
Id_EdgeTag | e ) |
returns vector equal to edge destination point minus edge origin point
Vector3f mrmeshpy.Mesh.findCenterFromBBox | ( | self | ) |
computes bounding box and returns its center
Vector3f mrmeshpy.Mesh.findCenterFromFaces | ( | self | ) |
computes center of mass considering that density of all triangles is the same
Vector3f mrmeshpy.Mesh.findCenterFromPoints | ( | self | ) |
computes average position of all valid mesh vertices
MeshProjectionResult mrmeshpy.Mesh.findClosestPoint | ( | self, | |
Vector3f | point, | ||
float | maxDistSq = 3.4028234663852886e+38, | ||
FaceBitSet | region = None, | ||
AffineXf3f | xf = None ) |
bool mrmeshpy.Mesh.findClosestPoint | ( | self, | |
Vector3f | point, | ||
MeshProjectionResult | res, | ||
float | maxDistSq = 3.4028234663852886e+38, | ||
FaceBitSet | region = None, | ||
AffineXf3f | xf = None ) |
UndirectedEdgeBitSet mrmeshpy.Mesh.findCreaseEdges | ( | self, | |
float | angleFromPlanar ) |
finds all mesh edges where dihedral angle is distinct from planar PI angle on at least given value
VertBitSet mrmeshpy.Mesh.findSpikeVertices | ( | self, | |
float | minSumAngle, | ||
VertBitSet | region = None, | ||
func_bool_from_float | cb = '{}' ) |
returns vertices where the sum of triangle angles is below given threshold
|
static |
construct mesh from vertex coordinates and construct mesh topology from face soup, where each face can have arbitrary degree (not only triangles); all non-triangular faces will be automatically subdivided on triangles
|
static |
construct mesh from point triples; \\param duplicateNonManifoldVertices = false, all coinciding points are given the same VertId in the result; \\param duplicateNonManifoldVertices = true, it tries to avoid non-manifold vertices by creating duplicate vertices with same coordinates
|
static |
construct mesh from vertex coordinates and a set of triangles with given ids
|
static |
construct mesh from vertex coordinates and a set of triangles with given ids; unlike simple fromTriangles() it tries to resolve non-manifold vertices by creating duplicate vertices
|
static |
construct mesh from TriMesh representation
AABBTree mrmeshpy.Mesh.getAABBTree | ( | self | ) |
returns cached aabb-tree for this mesh, creating it if it did not exist in a thread-safe manner
AABBTree mrmeshpy.Mesh.getAABBTreeNotCreate | ( | self | ) |
returns cached aabb-tree for this mesh, but does not create it if it did not exist
AABBTreePoints mrmeshpy.Mesh.getAABBTreePoints | ( | self | ) |
returns cached aabb-tree for points of this mesh, creating it if it did not exist in a thread-safe manner
AABBTreePoints mrmeshpy.Mesh.getAABBTreePointsNotCreate | ( | self | ) |
returns cached aabb-tree for points of this mesh, but does not create it if it did not exist
Box3f mrmeshpy.Mesh.getBoundingBox | ( | self | ) |
returns the bounding box containing all valid vertices (implemented via getAABBTree()) this bounding box is insignificantly bigger that minimal box due to AABB algorithms precision
UndirectedEdgeId mrmeshpy.Mesh.getClosestEdge | ( | self, | |
MeshTriPoint | p ) |
returns one of three face edges, closest to given point
UndirectedEdgeId mrmeshpy.Mesh.getClosestEdge | ( | self, | |
PointOnFace | p ) |
returns one of three face edges, closest to given point
VertId mrmeshpy.Mesh.getClosestVertex | ( | self, | |
MeshTriPoint | p ) |
returns one of three face vertices, closest to given point
VertId mrmeshpy.Mesh.getClosestVertex | ( | self, | |
PointOnFace | p ) |
returns one of three face vertices, closest to given point
Dipoles mrmeshpy.Mesh.getDipoles | ( | self | ) |
returns cached dipoles of aabb-tree nodes for this mesh, creating it if it did not exist in a thread-safe manner
Dipoles mrmeshpy.Mesh.getDipolesNotCreate | ( | self | ) |
returns cached dipoles of aabb-tree nodes for this mesh, but does not create it if it did not exist
std_array_Vector3_float_3 mrmeshpy.Mesh.getLeftTriPoints | ( | self, | |
Id_EdgeTag | e ) |
returns three points of left face of e
None mrmeshpy.Mesh.getLeftTriPoints | ( | self, | |
Id_EdgeTag | e, | ||
Vector3f | v0, | ||
Vector3f | v1, | ||
Vector3f | v2 ) |
returns three points of left face of e
std_array_Vector3_float_3 mrmeshpy.Mesh.getTriPoints | ( | self, | |
FaceId | f ) |
returns three points of given face
returns three points of given face
int mrmeshpy.Mesh.heapBytes | ( | self | ) |
returns the amount of memory this object occupies on heap
Vector3d mrmeshpy.Mesh.holeDirArea | ( | self, | |
Id_EdgeTag | e ) |
computes directed area of the hole specified by one of its edges with no valid left face (left is hole); if the hole is planar then returned vector is orthogonal to the plane pointing outside and its magnitude is equal to hole area
float mrmeshpy.Mesh.holePerimiter | ( | self, | |
Id_EdgeTag | e ) |
computes the perimeter of the hole specified by one of its edges with no valid left face (left is hole)
None mrmeshpy.Mesh.invalidateCaches | ( | self, | |
bool | pointsChanged = True ) |
invalidates caches (aabb-trees) after any change in mesh geometry or topology \\param pointsChanged specifies whether points have changed (otherwise only topology has changed)
bool mrmeshpy.Mesh.isOutside | ( | self, | |
Vector3f | pt, | ||
float | windingNumberThreshold = 0.5, | ||
float | beta = 2 ) |
computes whether a point (pt) is located outside the object surrounded by this mesh using generalized winding number \\param beta determines the precision of winding number computation: the more the better, recommended value 2 or more
bool mrmeshpy.Mesh.isOutsideByProjNorm | ( | self, | |
Vector3f | pt, | ||
MeshProjectionResult | proj, | ||
FaceBitSet | region = None ) |
computes whether a point (pt) is located outside the object surrounded by this mesh using pseudonormal at the closest point to in on mesh (proj); this method works much faster than \\ref isOutside but can return wrong sign if the closest point is located on self-intersecting part of the mesh
float mrmeshpy.Mesh.leftCotan | ( | self, | |
Id_EdgeTag | e ) |
computes cotangent of the angle in the left( e ) triangle opposite to e, and returns 0 if left face does not exist
Vector3f mrmeshpy.Mesh.leftDirDblArea | ( | self, | |
Id_EdgeTag | e ) |
computes directed double area of left triangular face of given edge
Vector3f mrmeshpy.Mesh.leftNormal | ( | self, | |
Id_EdgeTag | e ) |
computes triangular face normal from its vertices
Vector3f mrmeshpy.Mesh.leftTangent | ( | self, | |
Id_EdgeTag | e ) |
computes unit vector that is both orthogonal to given edge and to the normal of its left triangle, the vector is directed inside left triangle
None mrmeshpy.Mesh.mirror | ( | self, | |
Plane3f | plane ) |
reflects the mesh from a given plane
Vector3f mrmeshpy.Mesh.normal | ( | self, | |
MeshTriPoint | p ) |
computes normal in three vertices of p's triangle, then interpolates them using barycentric coordinates and normalizes again; this is the same normal as in rendering with smooth shading
computes normal in a vertex using sum of directed areas of neighboring triangles
Vector3f mrmeshpy.Mesh.orgPnt | ( | self, | |
Id_EdgeTag | e ) |
returns coordinates of the edge origin
None mrmeshpy.Mesh.pack | ( | self, | |
FaceMap | outFmap = None, | ||
VertMap | outVmap = None, | ||
WholeEdgeMap | outEmap = None, | ||
bool | rearrangeTriangles = False ) |
tightly packs all arrays eliminating lone edges and invalid face, verts and points, optionally returns mappings: old.id -> new.id
PackMapping mrmeshpy.Mesh.packOptimally | ( | self, | |
bool | preserveAABBTree, | ||
func_bool_from_float | cb ) |
PackMapping mrmeshpy.Mesh.packOptimally | ( | self, | |
bool | preserveAABBTree = True ) |
packs tightly and rearranges vertices, triangles and edges to put close in space elements in close indices \\param preserveAABBTree whether to keep valid mesh's AABB tree after return (it will take longer to compute and it will occupy more memory)
float mrmeshpy.Mesh.projArea | ( | self, | |
Vector3f | dir, | ||
FaceBitSet | fs ) |
computes the sum of absolute projected area of faces from given region as visible if look from given direction
float mrmeshpy.Mesh.projArea | ( | self, | |
Vector3f | dir, | ||
FaceBitSet | fs = None ) |
computes the sum of absolute projected area of faces from given region (or whole mesh) as visible if look from given direction
MeshProjectionResult mrmeshpy.Mesh.projectPoint | ( | self, | |
Vector3f | point, | ||
float | maxDistSq = 3.4028234663852886e+38, | ||
FaceBitSet | region = None, | ||
AffineXf3f | xf = None ) |
finds the closest mesh point on this mesh (or its region) to given point; \\param point source location to look the closest to \\param maxDistSq search only in the ball with sqrt(maxDistSq) radius around given point, smaller value here increases performance \\param xf is mesh-to-point transformation, if not specified then identity transformation is assumed and works much faster; \\return found closest point including Euclidean coordinates, barycentric coordinates, FaceId and squared distance to point or std::nullopt if no mesh point is found in the ball with sqrt(maxDistSq) radius around given point
bool mrmeshpy.Mesh.projectPoint | ( | self, | |
Vector3f | point, | ||
MeshProjectionResult | res, | ||
float | maxDistSq = 3.4028234663852886e+38, | ||
FaceBitSet | region = None, | ||
AffineXf3f | xf = None ) |
finds the closest mesh point on this mesh (or its region) to given point; \\param point source location to look the closest to \\param res found closest point including Euclidean coordinates, barycentric coordinates, FaceId and squared distance to point \\param maxDistSq search only in the ball with sqrt(maxDistSq) radius around given point, smaller value here increases performance \\param xf is mesh-to-point transformation, if not specified then identity transformation is assumed and works much faster; \\return false if no mesh point is found in the ball with sqrt(maxDistSq) radius around given point
bool mrmeshpy.Mesh.projectPoint | ( | self, | |
Vector3f | point, | ||
PointOnFace | res, | ||
float | maxDistSq = 3.4028234663852886e+38, | ||
FaceBitSet | region = None, | ||
AffineXf3f | xf = None ) |
finds the closest mesh point on this mesh (or its region) to given point; \\param point source location to look the closest to \\param res found closest point including Euclidean coordinates and FaceId \\param maxDistSq search only in the ball with sqrt(maxDistSq) radius around given point, smaller value here increases performance \\param xf is mesh-to-point transformation, if not specified then identity transformation is assumed and works much faster; \\return false if no mesh point is found in the ball with sqrt(maxDistSq) radius around given point
Vector3f mrmeshpy.Mesh.pseudonormal | ( | self, | |
MeshTriPoint | p, | ||
FaceBitSet | region = None ) |
returns pseudonormal in corresponding face/edge/vertex for signed distance calculation as suggested in the article "Signed Distance Computation Using the Angle Weighted Pseudonormal" by J. Andreas Baerentzen and Henrik Aanaes, https://backend.orbit.dtu.dk/ws/portalfiles/portal/3977815/B_rentzen.pdf unlike normal( const MeshTriPoint & p ), this is not a smooth function
Vector3f mrmeshpy.Mesh.pseudonormal | ( | self, | |
UndirectedEdgeId | e, | ||
FaceBitSet | region = None ) |
computes normalized half sum of face normals sharing given edge (only (region) faces will be considered);
Vector3f mrmeshpy.Mesh.pseudonormal | ( | self, | |
VertId | v, | ||
FaceBitSet | region = None ) |
computes angle-weighted sum of normals of incident faces of given vertex (only (region) faces will be considered); the sum is normalized before returning
QuadraticForm3f mrmeshpy.Mesh.quadraticForm | ( | self, | |
VertId | v, | ||
bool | angleWeigted, | ||
FaceBitSet | region = None, | ||
UndirectedEdgeBitSet | creases = None ) |
computes quadratic form in the vertex as the sum of squared distances from 1) planes of adjacent triangles, with the weight equal to the angle of adjacent triangle at this vertex divided on PI in case of angleWeigted=true; 2) lines of adjacent boundary and crease edges
None mrmeshpy.Mesh.shrinkToFit | ( | self | ) |
requests the removal of unused capacity
float mrmeshpy.Mesh.signedDistance | ( | self, | |
Vector3f | pt ) |
given a point (pt) in 3D, computes the closest point on mesh, and \\return signed distance from pt to mesh: positive value - outside mesh, negative - inside mesh; this method can return wrong sign if the closest point is located on self-intersecting part of the mesh
float mrmeshpy.Mesh.signedDistance | ( | self, | |
Vector3f | pt, | ||
float | maxDistSq, | ||
FaceBitSet | region = None ) |
given a point (pt) in 3D, computes the closest point on mesh, and \\return signed distance from pt to mesh: positive value - outside mesh, negative - inside mesh; or std::nullopt if the projection point is not within maxDist; this method can return wrong sign if the closest point is located on self-intersecting part of the mesh
float mrmeshpy.Mesh.signedDistance | ( | self, | |
Vector3f | pt, | ||
MeshProjectionResult | proj, | ||
FaceBitSet | region = None ) |
given a point (pt) in 3D and the closest point to in on mesh (proj), \\return signed distance from pt to mesh: positive value - outside mesh, negative - inside mesh; this method can return wrong sign if the closest point is located on self-intersecting part of the mesh
float mrmeshpy.Mesh.signedDistance | ( | self, | |
Vector3f | pt, | ||
MeshTriPoint | proj, | ||
FaceBitSet | region = None ) |
Id_EdgeTag mrmeshpy.Mesh.splitEdge | ( | self, | |
Id_EdgeTag | e, | ||
FaceBitSet | region = None, | ||
phmap_flat_hash_map_Id_FaceTag_Id_FaceTag | new2Old = None ) |
same, but split given edge on two equal parts
Id_EdgeTag mrmeshpy.Mesh.splitEdge | ( | self, | |
Id_EdgeTag | e, | ||
Vector3f | newVertPos, | ||
FaceBitSet | region = None, | ||
phmap_flat_hash_map_Id_FaceTag_Id_FaceTag | new2Old = None ) |
split given edge on two parts: dest(returned-edge) = org(e) - newly created vertex, org(returned-edge) = org(e-before-split), dest(e) = dest(e-before-split) \\details left and right faces of given edge if valid are also subdivided on two parts each; the split edge will keep both face IDs and their degrees, and the new edge will have new face IDs and new faces are triangular; if left or right faces of the original edge were in the region, then include new parts of these faces in the region \\param new2Old receive mapping from newly appeared triangle to its original triangle (part to full)
VertId mrmeshpy.Mesh.splitFace | ( | self, | |
FaceId | f, | ||
FaceBitSet | region = None, | ||
phmap_flat_hash_map_Id_FaceTag_Id_FaceTag | new2Old = None ) |
same, putting new vertex in the centroid of original triangle
VertId mrmeshpy.Mesh.splitFace | ( | self, | |
FaceId | f, | ||
Vector3f | newVertPos, | ||
FaceBitSet | region = None, | ||
phmap_flat_hash_map_Id_FaceTag_Id_FaceTag | new2Old = None ) |
split given triangle on three triangles, introducing new vertex with given coordinates and connecting it to original triangle vertices; if region is given, then it must include (f) and new faces will be added there as well \\param new2Old receive mapping from newly appeared triangle to its original triangle (part to full)
float mrmeshpy.Mesh.sumAngles | ( | self, | |
VertId | v, | ||
bool_output | outBoundaryVert = None ) |
computes the sum of triangle angles at given vertex; optionally returns whether the vertex is on boundary
EdgePoint mrmeshpy.Mesh.toEdgePoint | ( | self, | |
Id_EdgeTag | e, | ||
Vector3f | p ) |
converts edge and 3d point into edge-point representation
converts vertex into edge-point representation
MeshTriPoint mrmeshpy.Mesh.toTriPoint | ( | self, | |
FaceId | f, | ||
Vector3f | p ) |
converts face id and 3d point into barycentric representation
MeshTriPoint mrmeshpy.Mesh.toTriPoint | ( | self, | |
PointOnFace | p ) |
converts face id and 3d point into barycentric representation
MeshTriPoint mrmeshpy.Mesh.toTriPoint | ( | self, | |
VertId | v ) |
converts vertex into barycentric representation
None mrmeshpy.Mesh.transform | ( | self, | |
AffineXf3f | xf, | ||
VertBitSet | region = None ) |
applies given transformation to specified vertices if region is nullptr, all valid mesh vertices are used
float mrmeshpy.Mesh.triangleAspectRatio | ( | self, | |
FaceId | f ) |
returns aspect ratio of given mesh triangle equal to the ratio of the circum-radius to twice its in-radius
Vector3f mrmeshpy.Mesh.triPoint | ( | self, | |
MeshTriPoint | p ) |
computes coordinates of point given as face and barycentric representation
None mrmeshpy.Mesh.updateCaches | ( | self, | |
VertBitSet | changedVerts ) |
updates existing caches in case of few vertices were changed insignificantly, and topology remained unchanged; it shall be considered as a faster alternative to invalidateCaches() and following rebuild of trees
float mrmeshpy.Mesh.volume | ( | self, | |
FaceBitSet | region = None ) |
returns volume of the object surrounded by given region (or whole mesh if (region) is nullptr); if the region has holes then each hole will be virtually filled by adding triangles for each edge and the hole's geometrical center
None mrmeshpy.Mesh.zeroUnusedPoints | ( | self | ) |
for all points not in topology.getValidVerts() sets coordinates to (0,0,0)