Skip to content

Commit

Permalink
Update scene completDirectNeedleInsertion (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
alxbilger authored Dec 6, 2024
1 parent 622e3c6 commit bac7519
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions examples/python3/wip/completDirectNeedleInsertion.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,28 @@
from splib3.numerics import Quat

sys.path.append('../')
from createFemRegularGrid import createFemCube
from usefulFunctions import BuildCosseratGeometry, AddPointProcess

pluginNameList = 'SofaConstraint SofaDeformable SofaImplicitOdeSolver SofaMeshCollision SofaPreconditioner' \
' SofaGeneralTopology SofaOpenglVisual SofaGeneralRigid SoftRobots SofaSparseSolver' \
' Cosserat SofaBoundaryCondition'
from cosserat.createFemRegularGrid import createFemCube
from cosserat.usefulFunctions import BuildCosseratGeometry, AddPointProcess

pluginNameList = """Cosserat
Sofa.Component.AnimationLoop
Sofa.Component.Collision.Geometry
Sofa.Component.Constraint.Lagrangian.Correction
Sofa.Component.Constraint.Lagrangian.Solver
Sofa.Component.Engine.Select
Sofa.Component.LinearSolver.Direct
Sofa.Component.Mapping.Linear
Sofa.Component.ODESolver.Backward
Sofa.Component.Setting
Sofa.Component.SolidMechanics.FEM.Elastic
Sofa.Component.SolidMechanics.Spring
Sofa.Component.StateContainer
Sofa.Component.Topology.Container.Dynamic
Sofa.Component.Topology.Container.Grid
Sofa.Component.Topology.Mapping
Sofa.Component.Visual
Sofa.GL.Component.Rendering3D
"""


class Animation(Sofa.Core.Controller):
Expand Down Expand Up @@ -82,7 +98,7 @@ def createScene(rootNode):
###############
cableNode = rootNode.addChild('cableNode')
cableNode.addObject('EulerImplicitSolver', firstOrder="0", rayleighStiffness="0.1", rayleighMass='0.1')
cableNode.addObject('SparseLUSolver', name='solver')
cableNode.addObject('EigenSimplicialLDLT', name='solver', template='CompressedRowSparseMatrixd')
cableNode.addObject('GenericConstraintCorrection')

# ###############
Expand Down

0 comments on commit bac7519

Please sign in to comment.