SphereROI
From SOFAWiki
Contents |
Description
This engine finds the topological primitives which are inside a given sphere.
Note: SphereROI engine new design is a merge between old design of PrimitivesInSphereROI concerning only vertices and TrianglesInSphereROI. engine which was handling only triangles.
Topological primitives handle are now:
- dofs/vertices - edges - triangles - tetrahedra
Input Data's
- centers
- Center(s) of the sphere(s).
- radii
- Radius(i) of the sphere(s).
- direction
- Edge direction(if edgeAngle > 0).
- normal
- Normal direction of the triangles (if triAngle > 0).
- edgeAngle
- Max angle between the direction of the selected edges and the specified direction.
- triAngle
- Max angle between the normal of the selected triangle and the specified normal direction.
- position/rest_position
- Rest position coordinates of the degrees of freedom
Input topology (those input are not necessary for the :
- edges
- Edge Topology array.
- triangles
- Triangle Topology array.
- tetrahedra
- Tetrahedron Topology array.
Input parameters
Concerning topology Note that those parameters are set to true by default. So it means that as default behaviour, all topological component array will be parse. Set some parameters to false if you just need a part of the information and want to speed-up your simulation.
- computeEdges
- If true, will compute edge list and index list inside the ROI.
- computeTriangles
- If true, will compute triangle list and index list inside the ROI.
- computeTetrahedra
- If true, will compute tetrahedra list and index list inside the ROI.
For display:
- drawSphere
- If true, Draw shpere(s).
- drawPoints
- If true, Draw Points.
- drawEdges
- If true, Draw Edges.
- drawTriangle
- If true, Draw Triangles.
- drawTetrahedra
- If true, Draw Tetrahedra.
- drawSize
- rendering size for box and elements.
Output Data's
- indices
- Indices of the points contained in the ROI.
- edgeIndices
- Indices of the edges contained in the ROI.
- triangleIndices
- Indices of the triangles contained in the ROI.
- tetrahedronIndices
- Indices of the tetrahedra contained in the ROI.
- pointsInROI
- Points contained in the ROI.
- edgesInROI
- Edges contained in the ROI.
- trianglesInROI
- Triangles contained in the ROI.
- tetrahedraInROI
- Tetrahedra contained in the ROI.
Examples
Examples using this engine can be found in :
Sofa/examples/Components/engine/SphereROI.scn
Thus one use can be to define a SphereConstraint:
where the engine is used as follow:
<Node name="Group"> <MechanicalObject name="Volume" /> <SphereROI centers="0 0 0" radii="0.2" drawSphere="1" position="@Volume.rest_position" computeTriangles="0" computeTetrahedra="0" computeEdges="0" name="FixedROI"/> <FixedConstraint indices="@FixedROI.indices" /> </Node>
Other use can be to find the topology:
where the engine is used as follow:
<Node name="Group"> <MechanicalObject template="Vec3d" name="mecaObj" scale3d="10 10 10" restScale="1" /> <TriangleSetTopologyContainer name="Container" /> <SphereROI centers="0 0 1" radii="0.2" drawSphere="1" position="@../Volume.position" drawTriangles="1" drawTetrahedra="1" triangles="@Container.triangles" tetrahedra="@../Container.tetrahedra" name="boxROI"/> </Node>
