-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Propagate Changes in SubsetTopologicalMapping #5127
Comments
Let's isolate the problem. if you remove all the subet topological mapping and only have a simple triangleSetTopology (only keep the hybrid object), does this still happens ? |
Oh now it is even worse. :D Adapted scene plugin_list = [
"MultiThreading", # Needed to use components [ParallelBVHNarrowPhase,ParallelBruteForceBroadPhase]
"Sofa.Component.AnimationLoop", # Needed to use components [FreeMotionAnimationLoop]
"Sofa.Component.Collision.Detection.Algorithm", # Needed to use components [CollisionPipeline]
"Sofa.Component.Collision.Detection.Intersection", # Needed to use components [MinProximityIntersection]
"Sofa.Component.Collision.Geometry", # Needed to use components [TriangleCollisionModel]
"Sofa.Component.Collision.Response.Contact", # Needed to use components [CollisionResponse]
"Sofa.Component.Constraint.Lagrangian.Correction", # Needed to use components [LinearSolverConstraintCorrection]
"Sofa.Component.Constraint.Lagrangian.Solver", # Needed to use components [GenericConstraintSolver]
"Sofa.Component.LinearSolver.Direct", # Needed to use components [SparseLDLSolver]
"Sofa.Component.Mass", # Needed to use components [UniformMass]
"Sofa.Component.ODESolver.Backward", # Needed to use components [EulerImplicitSolver]
"Sofa.Component.SolidMechanics.FEM.Elastic", # Needed to use components [TetrahedralCorotationalFEMForceField]
"Sofa.Component.StateContainer", # Needed to use components [MechanicalObject]
"Sofa.Component.Topology.Container.Dynamic", # Needed to use components [TetrahedronSetTopology]
"Sofa.Component.Visual", # Needed to use components [VisualStyle]
"Sofa.Component.Constraint.Projective", # Needed to use components [FixedProjectiveConstraint]
"Sofa.Component.Engine.Select", # Needed to use components [BoxROI]
"Sofa.Component.Topology.Container.Grid", # Needed to use components [RegularGridTopology]
"Sofa.Component.Mapping.Linear", # Needed to use components [SubsetMapping]
"Sofa.Component.LinearSolver.Iterative", # Needed to use components [CGLinearSolver]
"Sofa.Component.Topology.Mapping", # Needed to use components [Quad2TriangleTopologicalMapping,SubsetT
]
def createScene(root):
for plugin in plugin_list:
root.addObject("RequiredPlugin", name=plugin)
root.gravity = [0.0, -9.81, 0.0]
root.dt = 0.01
root.addObject("FreeMotionAnimationLoop")
root.addObject("VisualStyle", displayFlags=["showForceFields", "showBehaviorModels"])
root.addObject("CollisionPipeline")
root.addObject("ParallelBruteForceBroadPhase")
root.addObject("ParallelBVHNarrowPhase")
root.addObject("MinProximityIntersection", alarmDistance=5.0, contactDistance=1.0)
root.addObject("CollisionResponse", response="FrictionContactConstraint")
root.addObject("GenericConstraintSolver")
scene_node = root.addChild("scene")
topology_node = scene_node.addChild("topology")
topology_node.addObject("RegularGridTopology", nx=5, ny=5, nz=1, xmin=-10.0, xmax=10.0, ymin=-10.0, ymax=10.0, zmin=0.0, zmax=0.0)
topology_node.addObject("TriangleSetTopologyContainer")
topology_node.addObject("TriangleSetTopologyModifier")
topology_node.addObject("Quad2TriangleTopologicalMapping", input="@RegularGridTopology", output="@TriangleSetTopologyContainer")
topology_node.init()
positions = topology_node.RegularGridTopology.position.array()
triangles = topology_node.TriangleSetTopologyContainer.triangles.array()
hybrid_object_node = scene_node.addChild("hybrid_object")
hybrid_object_node.addObject("TriangleSetTopologyContainer", position=positions, triangles=triangles)
hybrid_object_node.addObject("TriangleSetTopologyModifier")
hybrid_object_node.addObject("TriangleSetGeometryAlgorithms")
hybrid_object_node.addObject("EulerImplicitSolver")
hybrid_object_node.addObject("SparseLDLSolver", template="CompressedRowSparseMatrixMat3x3d")
hybrid_object_node.addObject("MechanicalObject", showObject=True)
hybrid_object_node.addObject("TriangleFEMForceField", youngModulus=1000, poissonRatio=0.49)
hybrid_object_node.addObject("BoxROI", box=[-10.0, 9.0, -10.0, 10.0, 10.0, 10.0])
hybrid_object_node.addObject("FixedProjectiveConstraint", indices="@BoxROI.indices")
hybrid_object_node.addObject("UniformMass", totalMass=1.0)
hybrid_object_node.addObject("TriangleCollisionModel")
hybrid_object_node.addObject("LinearSolverConstraintCorrection") segfault-2024-11-21_13.16.41.mp4 |
Ah, but it is actually the Without the topological subset mapping (just hybrid) there are no issues. As you can see, on the right, there is still an edge, that should have been removed, when the triangle was removed. triangle-2024-11-21_13.24.34.mp4 |
Hi @epernod , Cheers, |
Hi @ScheiklP , |
Hi,
while implementing
TETRAHEDRAREMOVED
forSubsetTopologicalMapping
(#5106) I saw a lot of errors in theENDING_EVENT
.This was a bit suspicious, because I just followed the implementation of
TRIANGLESREMOVED
.So I created a dummy scene with only triangles, and used v24.06 of SOFA (so without any of my changes).
Sadly, the error messages also exist there.
And it is not only the message, there is actually something wrong with the topology containers.
Video:
triangleChange-2024-11-19_11.28.51.mp4
Example scene
The text was updated successfully, but these errors were encountered: