Skip to content

How to use the MR::cutMesh function correctly? #3210

Answered by Grantim
czc98 asked this question in Q&A
Discussion options

You must be logged in to vote

You are right fillContourLeft depends on contour orientation. You can distinguish parts by area for example:

auto rescut = MR::cutMesh(this->mesh, contours).resultCut;
auto onePart = MR::fillContourLeft( this->mesh.topology, rescut );
auto otherPart = this->mesh.topology.getValidFaces() - onePart;

auto& smallerPart =  this->mesh.area( onePart ) < this->mesh.area( otherPart ) ? onePart : otherPart;
this->mesh.deleteFaces( smallerPart );

// eliminate the redundant information
this->mesh.pack();

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@Grantim
Comment options

@czc98
Comment options

@czc98
Comment options

@Grantim
Comment options

Answer selected by czc98
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants