#include <MRCMisc/exports.h>
#include <stdbool.h>
Go to the source code of this file.
◆ MR_MeshTopology
◆ MR_std_vector_int32_t
◆ MR_std_vector_MR_EdgeTri
◆ MR_std_vector_MR_OneMeshContour
◆ MR_std_vector_MR_VarEdgeTri
◆ MR_std_vector_std_vector_MR_VarEdgeTri
◆ MR_detectLoneContours()
Detects contours that fully lay inside one triangle if ignoreOpen
then do not mark non-closed contours as lone, even if they really are returns they indices in contours Generated from function MR::detectLoneContours
. Parameter contours
can not be null. It is a single object. Parameter ignoreOpen
has a default argument: false
, pass a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_std_vector_int32_t_Destroy()
to free it when you're done using it.
◆ MR_isClosed_std_vector_MR_VarEdgeTri()
returns true if contour is closed Generated from function MR::isClosed
. Parameter contour
can not be null. It is a single object.
◆ MR_orderIntersectionContours()
Combines unordered input intersections (and flips orientation of intersected edges from mesh B) into ordered oriented contours with the properties:
- Each contour is a. either closed (then its first and last elements are equal), b. or open (then its first and last intersected edges are boundary edges).
- Next intersection in a contour is located to the left of the current intersected edge: a. if the current and next intersected triangles are the same, then next intersected edge is either next( curr.edge ) or prev( curr.edge.sym() ).sym(), b. otherwise next intersected triangle is left( curr.edge ) and next intersected edge is one of the edges having the current intersected triangle to the right.
- Orientation of intersected edges in each pair of (intersected edge, intersected triangle): a. the intersected edge of mesh A is directed from negative half-space of the intersected triangle from mesh B to its positive half-space, b. the intersected edge of mesh B is directed from positive half-space of the intersected triangle from mesh A to its negative half-space.
- Orientation of contours: a. left of contours on mesh A is inside of mesh B (consequence of 3a), b. right of contours on mesh B is inside of mesh A (consequence of 3b). Generated from function
MR::orderIntersectionContours
. Parameter topologyA
can not be null. It is a single object. Parameter topologyB
can not be null. It is a single object. Parameter intersections
can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_vector_std_vector_MR_VarEdgeTri_Destroy()
to free it when you're done using it.
◆ MR_orderSelfIntersectionContours()
Combines unordered input self-intersections (and flips orientation of some intersected edges) into ordered oriented contours with the properties:
- Each contour is a. either closed (then its first and last elements are equal), b. or open if terminal intersection is on mesh boundary or if self-intersection terminates in a vertex.
- Next intersection in a contour is located to the left of the current intersected edge: a. if the current and next intersected triangles are the same, then next intersected edge is either next( curr.edge ) or prev( curr.edge.sym() ).sym(), b. otherwise next intersected triangle is left( curr.edge ) and next intersected edge is one of the edges having the current intersected triangle to the right.
- Orientation of intersected edges in each pair of (intersected edge, intersected triangle): a. isEdgeATriB() = true: the intersected edge is directed from negative half-space of the intersected triangle to its positive half-space, b. isEdgeATriB() = false: the intersected edge is directed from positive half-space of the intersected triangle to its negative half-space.
- Contours [2*i] and [2*i+1] a. have equal lengths and pass via the same intersections but in opposite order, b. each intersection is present in two contours with different values of isEdgeATriB() flag, and opposite directions of the intersected edge.
- Orientation of contours: a. first element of even (0,2,...) contours has isEdgeATriB() = true, left of even contours goes inside (consequence of 3a), b. first element of odd (1,3,...) contours has isEdgeATriB() = false, right of odd contours goes inside (consequence of 3b). Generated from function
MR::orderSelfIntersectionContours
. Parameter topology
can not be null. It is a single object. Parameter intersections
can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_vector_std_vector_MR_VarEdgeTri_Destroy()
to free it when you're done using it.
◆ MR_removeLoneContours()
Removes contours that fully lay inside one triangle from the contours if ignoreOpen
then do not consider non-closed contours as lone, even if they really are Generated from function MR::removeLoneContours
. Parameter contours
can not be null. It is a single object. Parameter ignoreOpen
has a default argument: false
, pass a null pointer to use it.
◆ MR_removeLoneDegeneratedContours()
Removes contours with zero area (do not remove if contour is handle on topology) edgesTopology - topology on which contours are represented with edges faceContours - lone contours represented by faces (all intersections are in same mesh A face) edgeContours - lone contours represented by edges (all intersections are in mesh B edges, edgesTopology: meshB.topology) Generated from function MR::removeLoneDegeneratedContours
. Parameter edgesTopology
can not be null. It is a single object. Parameter faceContours
can not be null. It is a single object. Parameter edgeContours
can not be null. It is a single object.