stlib.physics.constraints¶
Templates for external constraints.
Content
FixedBox ([applyTo, atPositions, name, …]) |
Constraint a set of degree of freedom to be at a fixed position. |
PartiallyFixedBox ([attachedTo, box, …]) |
Constraint a set of degree of freedom to be at a fixed position. |
SubTopology ([attachedTo, containerLink, …]) |
Args: |
stlib.physics.constraints.FixedBox¶
-
stlib.physics.constraints.
FixedBox
(applyTo=None, atPositions=[-1.0, -1.0, -1.0, 1.0, 1.0, 1.0], name='FixedBox', doVisualization=False, position=None, constraintStrength='1e12', doRecomputeDuringSimulation=False)[source]¶ Constraint a set of degree of freedom to be at a fixed position.
- Args:
applyTo (Sofa.Node): Node where the constraint will be applyied
atPosition (vec6f): Specify min/max points of the font.
name (str): Set the name of the FixedBox constraint.
doVisualization (bool): Control whether or not we display the boxes.
Structure:
Node : { name : "fixedbox", BoxROI, RestShapeSpringsFroceField }
stlib.physics.constraints.PartiallyFixedBox¶
-
stlib.physics.constraints.
PartiallyFixedBox
(attachedTo=None, box=[-1.0, -1.0, -1.0, 1.0, 1.0, 1.0], fixedAxis=[1, 1, 1], name='PartiallyFixedBox', drawBoxes=False, fixAll=False, doUpdate=False)[source]¶ Constraint a set of degree of freedom to be at a fixed position.
- Args:
attachedTo (Sofa.Node): Node where the constraint will be applyied
box (vec6f): Specify min/max points of the font.
fixedAxis (vec3bool): Specify which axis should be fixed (x,y,z)
name (str): Set the name of the FixedBox constraint.
drawBoxes (bool): Control whether or not we display the boxes.
fixAll (bool): If true will apply the partial fixed to all the points.
doUpdate (bool): If true
Structure:
Node : { name : "fixedbox", BoxROI, PartialFixedConstraint }
stlib.physics.constraints.SubTopology¶
-
stlib.physics.constraints.
SubTopology
(attachedTo=None, containerLink=None, boxRoiLink=None, linkType='tetrahedron', name='modelSubTopo', poissonRatio=0.3, youngModulus=18000)[source]¶ Args:
attachedTo (Sofa.Node): Where the node is created.
containerLink (str): path to container with the dataField to link, ie: ‘@../container.position’
boxRoiLink (str): path to boxRoi with the dataField to link,
- linkType (str): indicate of which type is the subTopo,
- ei: ‘triangle’ -> TriangleSetTopologyContainer & TriangleFEMForceField
name (str): name of the child node
youngModulus (float): The young modulus.
poissonRatio (float): The poisson parameter.
- Structure:
Node : { name : "modelSubTopo", TetrahedronSetTopologyContainer, TetrahedronFEMForceField }