- This topic has 2 replies, 3 voices, and was last updated 9 years ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Home › Forum › SOFA › Using SOFA › [SOLVED] Is TriangleSetTopologyModifier::removeTrianglesPostProcessing empty ?
Tagged: removeTrianglesPostProcessing
Surprisingly, 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 ?
Hi,
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 removeIsolatedEdges
and removeIsolatedPoints
are set to true (which are the default value) then removeTrianglesProcess
will remove isolated vertices/edges.
removeTrianglesPreconditions
and removeTrianglesPostProcessing
have 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 click
Erik
Hi 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.
WARNING
The forum has been moved to GitHub Discussions.
Old topics and replies are kept here as an archive.