Home › Forum › SOFA › Using SOFA › [SOLVED] Is TriangleSetTopologyModifier::removeTrianglesPostProcessing empty ?
Tagged: removeTrianglesPostProcessing
- This topic has 2 replies, 3 voices, and was last updated 10 years ago by
Guillaume.
-
AuthorPosts
-
12 September 2015 at 09:12 #3586
Weng
BlockedSurprisingly, I found the removeTrianglesPostProcessing is an empty function. Why such a basic function has not been implemented…?
Every time I remove a triangle, the isolated vertices will not be removed.void TriangleSetTopologyModifier::removeTrianglesPostProcessing(const sofa::helper::vector< unsigned int >& edgeToBeRemoved, const sofa::helper::vector< unsigned int >& vertexToBeRemoved )
{
(void)vertexToBeRemoved;
(void)edgeToBeRemoved;
}Did I misunderstand the removal of triangles ?
29 September 2015 at 09:21 #3693epernod
BlockedHi,
this is a method dedicated to child class of TriangleSetTopologyModifier.
It was done based on a “template method” design pattern (if my memory is good)
Basically in the method:TriangleSetTopologyModifier::removeTriangles(const sofa::helper::vector<unsigned int> &triangleIds, const bool removeIsolatedEdges, const bool removeIsolatedPoints) removeTrianglesPreconditions(..) // is called and if the preconditions are fulfill then removeTrianglesProcess(triangleIds_filtered ,removeIsolatedEdges, removeIsolatedPoints); // do the job and finally removeTrianglesPostProcessing(edgeToBeRemoved, vertexToBeRemoved); // is called to Arrange the current topology if needed.if
removeIsolatedEdgesandremoveIsolatedPointsare set to true (which are the default value) thenremoveTrianglesProcesswill remove isolated vertices/edges.
removeTrianglesPreconditionsandremoveTrianglesPostProcessinghave to be implemented in child class if you want to do more job around this removal (for example for Manifold Triangulation, where edges on border need to be oriented).Hope I was clear. Do not hesitate if you have more question.
You can check the triangle remove interaction in the scene: Demos/TriangleSurfaceCutting.scn using shift + right clickErik
16 November 2015 at 16:56 #4149Guillaume
KeymasterHi Weng,
Since you didn’t answer back to this topic, I assume your problem is solved.
Please do not hesitate to answer if it’s not.Regards,
Guillaume. -
AuthorPosts
- You must be logged in to reply to this topic.
