Generated from: MR::MeshTopology Mesh Topology \\ingroup MeshGroup
None meshlib.mrmeshpy.MeshTopology.__init__ | ( | self | ) |
Implicit default constructor.
None meshlib.mrmeshpy.MeshTopology.__init__ | ( | self, | |
MeshTopology | arg0 ) |
Implicit copy constructor.
bool meshlib.mrmeshpy.MeshTopology.__eq__ | ( | self, | |
MeshTopology | b ) |
compare that two topologies are exactly the same
FaceId meshlib.mrmeshpy.MeshTopology.addFaceId | ( | self | ) |
creates new face-id not associated with any edge yet
None meshlib.mrmeshpy.MeshTopology.addPackedPart | ( | self, | |
MeshTopology | from_, | ||
Id_EdgeTag | toEdgeId, | ||
FaceMap | fmap, | ||
VertMap | vmap ) |
copies topology (from) into this; \\param from edges must be tightly packes without any lone edges, and they are mapped [0, from.edges.size()) -> [toEdgeId, toEdgeId + from.edges.size()); \\param fmap,vmap mapping of vertices and faces if it is given ( from.id -> this.id )
None meshlib.mrmeshpy.MeshTopology.addPart | ( | self, | |
MeshTopology | from_, | ||
FaceMap | outFmap = None, | ||
VertMap | outVmap = None, | ||
WholeEdgeMap | outEmap = None, | ||
bool | rearrangeTriangles = False ) |
appends mesh topology (from) in addition to the current topology: creates new edges, faces, verts; \\param rearrangeTriangles if true then the order of triangles is selected according to the order of their vertices, please call rotateTriangles() first \\param outFmap,outVmap,outEmap (optionally) returns mappings: from.id -> this.id
None meshlib.mrmeshpy.MeshTopology.addPartByFaceMap | ( | self, | |
MeshTopology | from_, | ||
FaceMap | fromFaces, | ||
bool | flipOrientation = False, | ||
std_vector_std_vector_Id_EdgeTag | thisContours = 'std::vector<MR::EdgePath>{}', | ||
std_vector_std_vector_Id_EdgeTag | fromContours = 'std::vector<MR::EdgePath>{}', | ||
PartMapping | map = 'MR::PartMapping{}' ) |
fromFaces contains mapping from this-topology (considering it is empty) to from-topology
None meshlib.mrmeshpy.MeshTopology.addPartByMask | ( | self, | |
MeshTopology | from_, | ||
FaceBitSet | fromFaces, | ||
bool | flipOrientation = False, | ||
std_vector_std_vector_Id_EdgeTag | thisContours = 'std::vector<MR::EdgePath>{}', | ||
std_vector_std_vector_Id_EdgeTag | fromContours = 'std::vector<MR::EdgePath>{}', | ||
PartMapping | map = 'MR::PartMapping{}' ) |
this version has more parameters \\param flipOrientation if true then every from triangle is inverted before adding \\param thisContours contours on this mesh (no left face) that have to be stitched with \\param fromContours contours on from mesh during addition (no left face if flipOrientation otherwise no right face)
None meshlib.mrmeshpy.MeshTopology.addPartByMask | ( | self, | |
MeshTopology | from_, | ||
FaceBitSet | fromFaces, | ||
PartMapping | map ) |
the same but copies only portion of (from) specified by fromFaces,
VertId meshlib.mrmeshpy.MeshTopology.addVertId | ( | self | ) |
creates new vert-id not associated with any edge yet
Id_EdgeTag meshlib.mrmeshpy.MeshTopology.bdEdgeSameLeft | ( | self, | |
Id_EdgeTag | e, | ||
FaceBitSet | region = None ) |
returns the first boundary edge (for given region or for whole mesh if region is nullptr) in counter-clockwise order starting from given edge with the same left; returns invalid edge if no boundary edge is found
Id_EdgeTag meshlib.mrmeshpy.MeshTopology.bdEdgeSameOrigin | ( | self, | |
Id_EdgeTag | e, | ||
FaceBitSet | region = None ) |
returns the first boundary edge (for given region or for whole mesh if region is nullptr) in counter-clockwise order starting from given edge with the same origin; returns invalid edge if no boundary edge is found
Id_EdgeTag meshlib.mrmeshpy.MeshTopology.bdEdgeWithLeft | ( | self, | |
FaceId | f, | ||
FaceBitSet | region = None ) |
returns a boundary edge with given left face considering boundary of given region (or for whole mesh if region is nullptr); returns invalid edge if no boundary edge is found
Id_EdgeTag meshlib.mrmeshpy.MeshTopology.bdEdgeWithOrigin | ( | self, | |
VertId | v, | ||
FaceBitSet | region = None ) |
returns a boundary edge with given vertex in origin considering boundary of given region (or for whole mesh if region is nullptr); returns invalid edge if no boundary edge is found
bool meshlib.mrmeshpy.MeshTopology.buildGridMesh | ( | self, | |
GridSettings | settings, | ||
func_bool_from_float | cb = 'MR::ProgressCallback{}' ) |
constructs triangular grid mesh topology in parallel
bool meshlib.mrmeshpy.MeshTopology.checkValidity | ( | self, | |
func_bool_from_float | cb = 'MR::ProgressCallback{}', | ||
bool | allVerts = True ) |
verifies that all internal data structures are valid; if allVerts=true then checks in addition that all not-lone edges have valid vertices on both ends
Id_EdgeTag meshlib.mrmeshpy.MeshTopology.collapseEdge | ( | self, | |
Id_EdgeTag | e, | ||
func_void_from_Id_EdgeTag_Id_EdgeTag | onEdgeDel ) |
collapses given edge in a vertex and deletes 1) faces: left( e ) and right( e ); 2) edges: e, next( e.sym() ), prev( e.sym() ), and optionally next( e ), prev( e ) if their left and right triangles are deleted; 3) all vertices that lost their last edge; calls onEdgeDel for every deleted edge (del) including given (e); if valid (rem) is given then dest( del ) = dest( rem ) and their origins are in different ends of collapsing edge, (rem) shall take the place of (del) \\return prev( e ) if it is still valid
int meshlib.mrmeshpy.MeshTopology.computeNotLoneUndirectedEdges | ( | self | ) |
computes the number of not-lone (valid) undirected edges
bool meshlib.mrmeshpy.MeshTopology.computeValidsFromEdges | ( | self, | |
func_bool_from_float | cb = 'MR::ProgressCallback{}' ) |
compute 1) numValidVerts_ and validVerts_ from edgePerVertex_ 2) numValidFaces_ and validFaces_ from edgePerFace_ and activates their auto-update
None meshlib.mrmeshpy.MeshTopology.deleteFace | ( | self, | |
FaceId | f, | ||
UndirectedEdgeBitSet | keepEdges = None ) |
deletes the face, also deletes its edges and vertices if they were not shared by other faces ant not in \\param keepFaces
None meshlib.mrmeshpy.MeshTopology.deleteFaces | ( | self, | |
FaceBitSet | fs, | ||
UndirectedEdgeBitSet | keepEdges = None ) |
deletes multiple given faces by calling \\ref deleteFace for each
VertId meshlib.mrmeshpy.MeshTopology.dest | ( | self, | |
Id_EdgeTag | he ) |
returns destination vertex of half-edge
int meshlib.mrmeshpy.MeshTopology.edgeCapacity | ( | self | ) |
returns the number of allocated edge records
Vector_Id_EdgeTag_FaceId meshlib.mrmeshpy.MeshTopology.edgePerFace | ( | self | ) |
for all valid faces this vector contains an edge with that face at left
Vector_Id_EdgeTag_VertId meshlib.mrmeshpy.MeshTopology.edgePerVertex | ( | self | ) |
for all valid vertices this vector contains an edge with the origin there
None meshlib.mrmeshpy.MeshTopology.edgeReserve | ( | self, | |
int | newCapacity ) |
sets the capacity of half-edges vector
int meshlib.mrmeshpy.MeshTopology.edgeSize | ( | self | ) |
returns the number of half-edge records including lone ones
Id_EdgeTag meshlib.mrmeshpy.MeshTopology.edgeWithLeft | ( | self, | |
FaceId | a ) |
returns valid edge if given vertex is present in the mesh
Id_EdgeTag meshlib.mrmeshpy.MeshTopology.edgeWithOrg | ( | self, | |
VertId | a ) |
returns valid edge if given vertex is present in the mesh
None meshlib.mrmeshpy.MeshTopology.excludeLoneEdges | ( | self, | |
UndirectedEdgeBitSet | edges ) |
remove all lone edges from given set
int meshlib.mrmeshpy.MeshTopology.faceCapacity | ( | self | ) |
returns the number of allocated face records
None meshlib.mrmeshpy.MeshTopology.faceReserve | ( | self, | |
int | newCapacity ) |
sets the capacity of faces vector
None meshlib.mrmeshpy.MeshTopology.faceResize | ( | self, | |
int | newSize ) |
explicitly increases the size of faces vector
None meshlib.mrmeshpy.MeshTopology.faceResizeWithReserve | ( | self, | |
int | newSize ) |
explicitly increases the size of faces vector, doubling the current capacity if it was not enough
int meshlib.mrmeshpy.MeshTopology.faceSize | ( | self | ) |
returns the number of face records including invalid ones
EdgeBitSet meshlib.mrmeshpy.MeshTopology.findBoundaryEdges | ( | self | ) |
returns all boundary edges, where each edge does not have valid left face
FaceBitSet meshlib.mrmeshpy.MeshTopology.findBoundaryFaces | ( | self, | |
FaceBitSet | region = None ) |
returns all boundary faces, having at least one boundary edge; \\param region if given then search among faces there otherwise among all valid faces
VertBitSet meshlib.mrmeshpy.MeshTopology.findBoundaryVerts | ( | self, | |
VertBitSet | region = None ) |
returns all boundary vertices, incident to at least one boundary edge; \\param region if given then search among vertices there otherwise among all valid vertices
Id_EdgeTag meshlib.mrmeshpy.MeshTopology.findEdge | ( | self, | |
VertId | o, | ||
VertId | d ) |
finds and returns edge from o to d in the mesh; returns invalid edge otherwise
std_vector_Id_EdgeTag meshlib.mrmeshpy.MeshTopology.findHoleRepresentiveEdges | ( | self | ) |
returns one edge with no valid left face for every boundary in the mesh
UndirectedEdgeBitSet meshlib.mrmeshpy.MeshTopology.findNotLoneUndirectedEdges | ( | self | ) |
finds and returns all not-lone (valid) undirected edges
int meshlib.mrmeshpy.MeshTopology.findNumHoles | ( | self, | |
EdgeBitSet | holeRepresentativeEdges = None ) |
returns the number of hole loops in the mesh; \\param holeRepresentativeEdges optional output of the smallest edge id with no valid left face in every hole
None meshlib.mrmeshpy.MeshTopology.flip | ( | self, | |
FaceBitSet | fs ) |
sets in (fs) all valid faces that were not selected before the call, and resets other bits
None meshlib.mrmeshpy.MeshTopology.flip | ( | self, | |
VertBitSet | vs ) |
sets in (vs) all valid vertices that were not selected before the call, and resets other bits
None meshlib.mrmeshpy.MeshTopology.flipEdge | ( | self, | |
Id_EdgeTag | e ) |
given the edge with left and right triangular faces, which form together a quadrangle, rotates the edge counter-clockwise inside the quadrangle
None meshlib.mrmeshpy.MeshTopology.flipOrientation | ( | self, | |
UndirectedEdgeBitSet | fullComponents = None ) |
flip orientation (normals) of * all mesh elements if \\param fullComponents is nullptr, or * given mesh components in \\param fullComponents. The behavior is undefined if fullComponents is given but there are connected components with some edges included and not-included there.
bool meshlib.mrmeshpy.MeshTopology.fromSameLeftRing | ( | self, | |
Id_EdgeTag | a, | ||
Id_EdgeTag | b ) |
returns true if a and b are both from the same left face ring
bool meshlib.mrmeshpy.MeshTopology.fromSameOriginRing | ( | self, | |
Id_EdgeTag | a, | ||
Id_EdgeTag | b ) |
returns true if a and b are both from the same origin ring
std_vector_std_array_Id_VertTag_3ul meshlib.mrmeshpy.MeshTopology.getAllTriVerts | ( | self | ) |
returns three vertex ids for valid triangles, invalid triangles are skipped
int meshlib.mrmeshpy.MeshTopology.getFaceDegree | ( | self, | |
FaceId | f ) |
returns the number of edges around the given face: 3 for triangular faces, ...
FaceBitSet meshlib.mrmeshpy.MeshTopology.getFaceIds | ( | self, | |
FaceBitSet | region ) |
if region pointer is not null then converts it in reference, otherwise returns all valid faces in the mesh
int meshlib.mrmeshpy.MeshTopology.getLeftDegree | ( | self, | |
Id_EdgeTag | a ) |
returns the number of edges around the left face: 3 for triangular faces, ...
std_vector_Id_EdgeTag meshlib.mrmeshpy.MeshTopology.getLeftRing | ( | self, | |
Id_EdgeTag | e ) |
returns full edge-loop of left face from (e) starting from (e) itself
std_vector_std_vector_Id_EdgeTag meshlib.mrmeshpy.MeshTopology.getLeftRings | ( | self, | |
std_vector_Id_EdgeTag | es ) |
returns full edge-loops of left faces from every edge in (es); each edge-loop will be returned only once even if some faces are represented by more than one edge in (es)
std_array_Id_VertTag_3 meshlib.mrmeshpy.MeshTopology.getLeftTriVerts | ( | self, | |
Id_EdgeTag | a ) |
None meshlib.mrmeshpy.MeshTopology.getLeftTriVerts | ( | self, | |
Id_EdgeTag | a, | ||
std_array_Id_VertTag_3 | v ) |
None meshlib.mrmeshpy.MeshTopology.getLeftTriVerts | ( | self, | |
Id_EdgeTag | a, | ||
VertId | v0, | ||
VertId | v1, | ||
VertId | v2 ) |
gets 3 vertices of the left face ( face-id may not exist, but the shape must be triangular) the vertices are returned in counter-clockwise order if look from mesh outside
int meshlib.mrmeshpy.MeshTopology.getOrgDegree | ( | self, | |
Id_EdgeTag | a ) |
returns the number of edges around the origin vertex, returns 1 for lone edges
FaceBitSet meshlib.mrmeshpy.MeshTopology.getPathLeftFaces | ( | self, | |
std_vector_Id_EdgeTag | path ) |
returns all valid left faces of path edges
FaceBitSet meshlib.mrmeshpy.MeshTopology.getPathRightFaces | ( | self, | |
std_vector_Id_EdgeTag | path ) |
returns all valid right faces of path edges
VertBitSet meshlib.mrmeshpy.MeshTopology.getPathVertices | ( | self, | |
std_vector_Id_EdgeTag | path ) |
returns all vertices incident to path edges
Triangulation meshlib.mrmeshpy.MeshTopology.getTriangulation | ( | self | ) |
returns three vertex ids for valid triangles (which can be accessed by FaceId), vertex ids for invalid triangles are undefined, and shall not be read
None meshlib.mrmeshpy.MeshTopology.getTriEdges | ( | self, | |
FaceId | f, | ||
Id_EdgeTag | e0, | ||
Id_EdgeTag | e1, | ||
Id_EdgeTag | e2 ) |
gets 3 edges of given triangular face, oriented to have it on the left; the edges are returned in counter-clockwise order if look from mesh outside
std_array_Id_VertTag_3 meshlib.mrmeshpy.MeshTopology.getTriVerts | ( | self, | |
FaceId | f ) |
None meshlib.mrmeshpy.MeshTopology.getTriVerts | ( | self, | |
FaceId | f, | ||
std_array_Id_VertTag_3 | v ) |
gets 3 vertices of given triangular face; the vertices are returned in counter-clockwise order if look from mesh outside
FaceBitSet meshlib.mrmeshpy.MeshTopology.getValidFaces | ( | self | ) |
returns cached set of all valid faces
VertBitSet meshlib.mrmeshpy.MeshTopology.getValidVerts | ( | self | ) |
returns cached set of all valid vertices
int meshlib.mrmeshpy.MeshTopology.getVertDegree | ( | self, | |
VertId | v ) |
returns the number of edges around the given vertex
VertBitSet meshlib.mrmeshpy.MeshTopology.getVertIds | ( | self, | |
VertBitSet | region ) |
if region pointer is not null then converts it in reference, otherwise returns all valid vertices in the mesh
bool meshlib.mrmeshpy.MeshTopology.hasEdge | ( | self, | |
Id_EdgeTag | e ) |
returns true if given edge is within valid range and not-lone
bool meshlib.mrmeshpy.MeshTopology.hasFace | ( | self, | |
FaceId | a ) |
returns true if given face is present in the mesh
bool meshlib.mrmeshpy.MeshTopology.hasVert | ( | self, | |
VertId | a ) |
returns true if given vertex is present in the mesh
int meshlib.mrmeshpy.MeshTopology.heapBytes | ( | self | ) |
returns the amount of memory this object occupies on heap
bool meshlib.mrmeshpy.MeshTopology.isBdEdge | ( | self, | |
Id_EdgeTag | e, | ||
FaceBitSet | region = None ) |
return true if given edge is boundary for given region (or for whole mesh if region is nullptr)
bool meshlib.mrmeshpy.MeshTopology.isBdFace | ( | self, | |
FaceId | f, | ||
FaceBitSet | region = None ) |
returns true if given face is on (region) boundary
bool meshlib.mrmeshpy.MeshTopology.isBdVertex | ( | self, | |
VertId | v, | ||
FaceBitSet | region = None ) |
returns true if given vertex is on (region) boundary
bool meshlib.mrmeshpy.MeshTopology.isBdVertexInLeft | ( | self, | |
Id_EdgeTag | e, | ||
FaceBitSet | region = None ) |
returns true if edge's left is on (region) boundary
bool meshlib.mrmeshpy.MeshTopology.isBdVertexInOrg | ( | self, | |
Id_EdgeTag | e, | ||
FaceBitSet | region = None ) |
returns true if edge's origin is on (region) boundary
bool meshlib.mrmeshpy.MeshTopology.isClosed | ( | self, | |
FaceBitSet | region = None ) |
returns true if the mesh (region) does not have any neighboring holes
bool meshlib.mrmeshpy.MeshTopology.isInnerEdge | ( | self, | |
Id_EdgeTag | e, | ||
FaceBitSet | region = None ) |
return true if given edge is inner for given region (or for whole mesh if region is nullptr)
bool meshlib.mrmeshpy.MeshTopology.isInnerOrBdEdge | ( | self, | |
Id_EdgeTag | e, | ||
FaceBitSet | region = None ) |
return true if given edge is inner or boundary for given region (or for whole mesh if region is nullptr), returns false for lone edges
bool meshlib.mrmeshpy.MeshTopology.isInnerOrBdVertex | ( | self, | |
VertId | v, | ||
FaceBitSet | region = None ) |
returns true if one of incident faces of given vertex pertain to given region (or any such face exists if region is nullptr)
bool meshlib.mrmeshpy.MeshTopology.isLeftBdEdge | ( | self, | |
Id_EdgeTag | e, | ||
FaceBitSet | region = None ) |
returns true if left face of given edge belongs to given region (if provided) and right face either does not exist or does not belong
bool meshlib.mrmeshpy.MeshTopology.isLeftInRegion | ( | self, | |
Id_EdgeTag | e, | ||
FaceBitSet | region = None ) |
return true if left face of given edge belongs to region (or just have valid id if region is nullptr)
bool meshlib.mrmeshpy.MeshTopology.isLeftQuad | ( | self, | |
Id_EdgeTag | a ) |
returns true if the cell to the left of a is quadrangular
bool meshlib.mrmeshpy.MeshTopology.isLeftTri | ( | self, | |
Id_EdgeTag | a ) |
returns true if the cell to the left of a is triangular
bool meshlib.mrmeshpy.MeshTopology.isLoneEdge | ( | self, | |
Id_EdgeTag | a ) |
checks whether the edge is disconnected from all other edges and disassociated from all vertices and faces (as if after makeEdge)
Id_EdgeTag meshlib.mrmeshpy.MeshTopology.lastNotLoneEdge | ( | self | ) |
returns last not lone edge id, or invalid id if no such edge exists
FaceId meshlib.mrmeshpy.MeshTopology.lastValidFace | ( | self | ) |
returns last valid face id, or invalid id if no single valid face exists
VertId meshlib.mrmeshpy.MeshTopology.lastValidVert | ( | self | ) |
returns last valid vertex id, or invalid id if no single valid vertex exists
FaceId meshlib.mrmeshpy.MeshTopology.left | ( | self, | |
Id_EdgeTag | he ) |
returns left face of half-edge
Id_EdgeTag meshlib.mrmeshpy.MeshTopology.makeEdge | ( | self | ) |
creates an edge not associated with any vertex or face
Id_EdgeTag meshlib.mrmeshpy.MeshTopology.next | ( | self, | |
Id_EdgeTag | he ) |
next (counter clock wise) half-edge in the origin ring
Id_EdgeTag meshlib.mrmeshpy.MeshTopology.nextLeftBd | ( | self, | |
Id_EdgeTag | e, | ||
FaceBitSet | region = None ) |
given a (region) boundary edge with no right face in given region, returns next boundary edge for the same region: dest(e)==org(res)
int meshlib.mrmeshpy.MeshTopology.numValidFaces | ( | self | ) |
returns the number of valid faces
int meshlib.mrmeshpy.MeshTopology.numValidVerts | ( | self | ) |
returns the number of valid vertices
VertId meshlib.mrmeshpy.MeshTopology.org | ( | self, | |
Id_EdgeTag | he ) |
returns origin vertex of half-edge
None meshlib.mrmeshpy.MeshTopology.pack | ( | self, | |
FaceMap | outFmap = None, | ||
VertMap | outVmap = None, | ||
WholeEdgeMap | outEmap = None, | ||
bool | rearrangeTriangles = False ) |
tightly packs all arrays eliminating lone edges and invalid faces and vertices \\param outFmap,outVmap,outEmap if given returns mappings: old.id -> new.id; \\param rearrangeTriangles if true then calls rotateTriangles() and selects the order of triangles according to the order of their vertices
None meshlib.mrmeshpy.MeshTopology.pack | ( | self, | |
PackMapping | map ) |
tightly packs all arrays eliminating lone edges and invalid faces and vertices; reorder all faces, vertices and edges according to given maps, each containing old id -> new id mapping
None meshlib.mrmeshpy.MeshTopology.packMinMem | ( | self, | |
PackMapping | map ) |
tightly packs all arrays eliminating lone edges and invalid faces and vertices; reorder all faces, vertices and edges according to given maps, each containing old id -> new id mapping; unlike \\ref pack method, this method allocates minimal amount of memory for its operation but works much slower
None meshlib.mrmeshpy.MeshTopology.preferEdges | ( | self, | |
UndirectedEdgeBitSet | stableEdges ) |
for incident vertices and faces of given edges, remember one of them as edgeWithOrg and edgeWithLeft; this is important in parallel algorithms where other edges may change but stable ones will survive
Id_EdgeTag meshlib.mrmeshpy.MeshTopology.prev | ( | self, | |
Id_EdgeTag | he ) |
previous (clock wise) half-edge in the origin ring
Id_EdgeTag meshlib.mrmeshpy.MeshTopology.prevLeftBd | ( | self, | |
Id_EdgeTag | e, | ||
FaceBitSet | region = None ) |
given a (region) boundary edge with no right face in given region, returns previous boundary edge for the same region; dest(res)==org(e)
None meshlib.mrmeshpy.MeshTopology.read | ( | self, | |
typing.Any | s, | ||
func_bool_from_float | callback = 'MR::ProgressCallback{}' ) |
loads from binary stream \\return text of error if any
None meshlib.mrmeshpy.MeshTopology.resizeBeforeParallelAdd | ( | self, | |
int | edgeSize, | ||
int | vertSize, | ||
int | faceSize ) |
These function are for parallel mesh creation from different threads. If you are not sure, do not use them. \\details resizes all internal vectors and sets the numbers of valid elements in preparation for addPackedPart; edges are resized without initialization (so the user must initialize them using addPackedPart)
FaceId meshlib.mrmeshpy.MeshTopology.right | ( | self, | |
Id_EdgeTag | he ) |
returns right face of half-edge
None meshlib.mrmeshpy.MeshTopology.rotateTriangles | ( | self | ) |
for each triangle selects edgeWithLeft with minimal origin vertex
None meshlib.mrmeshpy.MeshTopology.setLeft | ( | self, | |
Id_EdgeTag | a, | ||
FaceId | f ) |
sets new left face to the full left ring including this edge; edgePerFace_ table is updated accordingly
None meshlib.mrmeshpy.MeshTopology.setOrg | ( | self, | |
Id_EdgeTag | a, | ||
VertId | v ) |
sets new origin to the full origin ring including this edge; edgePerVertex_ table is updated accordingly
Id_EdgeTag meshlib.mrmeshpy.MeshTopology.sharedEdge | ( | self, | |
FaceId | l, | ||
FaceId | r ) |
if two valid faces share the same edge then it is found and returned
FaceId meshlib.mrmeshpy.MeshTopology.sharedFace | ( | self, | |
Id_EdgeTag | a, | ||
Id_EdgeTag | b ) |
if two valid edges belong to same valid face then it is found and returned
Id_EdgeTag meshlib.mrmeshpy.MeshTopology.sharedVertInOrg | ( | self, | |
FaceId | l, | ||
FaceId | r ) |
if two valid faces share the same vertex then it is found and returned as Edge with this vertex in origin
Id_EdgeTag meshlib.mrmeshpy.MeshTopology.sharedVertInOrg | ( | self, | |
Id_EdgeTag | a, | ||
Id_EdgeTag | b ) |
if two valid edges share the same vertex then it is found and returned as Edge with this vertex in origin
None meshlib.mrmeshpy.MeshTopology.shrinkToFit | ( | self | ) |
requests the removal of unused capacity
None meshlib.mrmeshpy.MeshTopology.splice | ( | self, | |
Id_EdgeTag | a, | ||
Id_EdgeTag | b ) |
given two half edges do either of two: 1) if a and b were from distinct rings, puts them in one ring; 2) if a and b were from the same ring, puts them in separate rings; the cut in rings in both cases is made after a and b
Id_EdgeTag meshlib.mrmeshpy.MeshTopology.splitEdge | ( | self, | |
Id_EdgeTag | e, | ||
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 have the same face IDs, and the new edge will have new face IDs; 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 meshlib.mrmeshpy.MeshTopology.splitFace | ( | self, | |
FaceId | f, | ||
FaceBitSet | region = None, | ||
phmap_flat_hash_map_Id_FaceTag_Id_FaceTag | new2Old = None ) |
split given triangle on three triangles, introducing new vertex (which is returned) inside original triangle and connecting it to its vertices \\details 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)
None meshlib.mrmeshpy.MeshTopology.stopUpdatingValids | ( | self | ) |
stops updating validVerts(), validFaces(), numValidVerts(), numValidFaces() for parallel processing of mesh parts
int meshlib.mrmeshpy.MeshTopology.undirectedEdgeCapacity | ( | self | ) |
returns the number of allocated undirected edges (pairs of half-edges)
int meshlib.mrmeshpy.MeshTopology.undirectedEdgeSize | ( | self | ) |
returns the number of undirected edges (pairs of half-edges) including lone ones
bool meshlib.mrmeshpy.MeshTopology.updatingValids | ( | self | ) |
returns whether the methods validVerts(), validFaces(), numValidVerts(), numValidFaces() can be called
int meshlib.mrmeshpy.MeshTopology.vertCapacity | ( | self | ) |
returns the number of allocated vert records
None meshlib.mrmeshpy.MeshTopology.vertReserve | ( | self, | |
int | newCapacity ) |
sets the capacity of vertices vector
None meshlib.mrmeshpy.MeshTopology.vertResize | ( | self, | |
int | newSize ) |
explicitly increases the size of vertices vector
None meshlib.mrmeshpy.MeshTopology.vertResizeWithReserve | ( | self, | |
int | newSize ) |
explicitly increases the size of vertices vector, doubling the current capacity if it was not enough
int meshlib.mrmeshpy.MeshTopology.vertSize | ( | self | ) |
returns the number of vertex records including invalid ones
None meshlib.mrmeshpy.MeshTopology.write | ( | self, | |
typing.Any | s ) |
saves in binary stream