Edge2QuadTopologicalMapping
Special case of mapping where EdgeSetTopology is converted to QuadSetTopology.
Target: Sofa.Component.Topology.Mapping
namespace: sofa::component::topology::mapping
parents:
TopologicalMapping
Data:
Name | Description | Default value |
---|---|---|
name | object name | unnamed |
printLog | if true, emits extra messages at runtime. | 0 |
tags | list of the subsets the objet belongs to | |
bbox | this object bounding box | |
componentState | The state of the component among (Dirty, Valid, Undefined, Loading, Invalid). | Undefined |
listening | if true, handle the events, otherwise ignore the events | 0 |
nbPointsOnEachCircle | Discretization of created circles | |
radius | Radius of created circles in yz plan | 1 |
radiusFocal | If greater than 0., radius in focal axis of created ellipses | 0 |
focalAxis | In case of ellipses | 0 0 1 |
edgeList | list of input edges for the topological mapping: by default, all considered | |
flipNormals | Flip Normal ? (Inverse point order when creating quad) | 0 |
Links:
Name | Description |
---|---|
context | Graph Node containing this object (or BaseContext::getDefault() if no graph is used) |
slaves | Sub-objects used internally by this object |
master | nullptr for regular objects, or master object for which this object is one sub-objects |
input | Input topology to map |
output | Output topology to map |
toQuadContainer | Output container storing Quads |
toQuadModifier | Output modifier handling Quads |
Examples
Component/Topology/Mapping/Edge2QuadTopologicalMapping.scn
<?xml version="1.0" ?>
<Node name="root" dt="0.01" showBoundingTree="0" gravity="0 -9 0">
<Node name="RequiredPlugins">
<RequiredPlugin name="Sofa.Component.Collision.Detection.Algorithm"/> <!-- Needed to use components [BVHNarrowPhase BruteForceBroadPhase CollisionPipeline] -->
<RequiredPlugin name="Sofa.Component.Collision.Detection.Intersection"/> <!-- Needed to use components [MinProximityIntersection] -->
<RequiredPlugin name="Sofa.Component.Collision.Response.Contact"/> <!-- Needed to use components [CollisionResponse] -->
<RequiredPlugin name="Sofa.Component.Constraint.Projective"/> <!-- Needed to use components [FixedProjectiveConstraint] -->
<RequiredPlugin name="Sofa.Component.LinearSolver.Iterative"/> <!-- Needed to use components [CGLinearSolver] -->
<RequiredPlugin name="Sofa.Component.Mapping.Linear"/> <!-- Needed to use components [TubularMapping] -->
<RequiredPlugin name="Sofa.Component.Mass"/> <!-- Needed to use components [UniformMass] -->
<RequiredPlugin name="Sofa.Component.ODESolver.Backward"/> <!-- Needed to use components [EulerImplicitSolver] -->
<RequiredPlugin name="Sofa.Component.SolidMechanics.FEM.Elastic"/> <!-- Needed to use components [BeamFEMForceField] -->
<RequiredPlugin name="Sofa.Component.StateContainer"/> <!-- Needed to use components [MechanicalObject] -->
<RequiredPlugin name="Sofa.Component.Topology.Container.Dynamic"/> <!-- Needed to use components [QuadSetGeometryAlgorithms QuadSetTopologyContainer QuadSetTopologyModifier] -->
<RequiredPlugin name="Sofa.Component.Topology.Container.Grid"/> <!-- Needed to use components [RegularGridTopology] -->
<RequiredPlugin name="Sofa.Component.Topology.Mapping"/> <!-- Needed to use components [Edge2QuadTopologicalMapping] -->
<RequiredPlugin name="Sofa.GL.Component.Rendering3D"/> <!-- Needed to use components [OglModel] -->
</Node>
<DefaultAnimationLoop />
<CollisionPipeline />
<BruteForceBroadPhase/>
<BVHNarrowPhase/>
<CollisionResponse response="PenalityContactForceField" />
<MinProximityIntersection name="Proximity" alarmDistance="0.5" contactDistance="0.02"/>
<Node name="Beam">
<EulerImplicitSolver rayleighStiffness="0.1" rayleighMass="0.1" />
<CGLinearSolver iterations="125" tolerance="1e-16" threshold="1e-16" />
<RegularGridTopology name="MeshLines" nx="100" ny="1" nz="1" xmax="100" xmin="0" ymin="0" ymax="0" zmax="0" zmin="0"/>
<MechanicalObject template="Rigid3" name="BeamDof" />
<FixedProjectiveConstraint name="fix" indices="0" />
<UniformMass totalMass="0.1" />
<BeamFEMForceField name="BeamFEM" radius="1.0" youngModulus="1000" poissonRatio="0.45" />
<Node name="VisuBeam" activated="true">
<OglModel template="Vec3" name="SurfDof" color="0.7 0.7 0.7" />
<QuadSetTopologyContainer name="Container" />
<QuadSetTopologyModifier name="Modifier" />
<QuadSetGeometryAlgorithms name="GeomAlgo" template="Vec3" drawQuads="1"/>
<Edge2QuadTopologicalMapping nbPointsOnEachCircle="10" radius="2" input="@../MeshLines" output="@Container" flipNormals="true"/>
<TubularMapping nbPointsOnEachCircle="10" radius="2" input="@../BeamDof" output="@SurfDof" />
</Node>
</Node>
</Node>
def createScene(rootNode):
root = rootNode.addChild('root', dt="0.01", showBoundingTree="0", gravity="0 -9 0")
RequiredPlugins = root.addChild('RequiredPlugins')
RequiredPlugins.addObject('RequiredPlugin', name="Sofa.Component.Collision.Detection.Algorithm")
RequiredPlugins.addObject('RequiredPlugin', name="Sofa.Component.Collision.Detection.Intersection")
RequiredPlugins.addObject('RequiredPlugin', name="Sofa.Component.Collision.Response.Contact")
RequiredPlugins.addObject('RequiredPlugin', name="Sofa.Component.Constraint.Projective")
RequiredPlugins.addObject('RequiredPlugin', name="Sofa.Component.LinearSolver.Iterative")
RequiredPlugins.addObject('RequiredPlugin', name="Sofa.Component.Mapping.Linear")
RequiredPlugins.addObject('RequiredPlugin', name="Sofa.Component.Mass")
RequiredPlugins.addObject('RequiredPlugin', name="Sofa.Component.ODESolver.Backward")
RequiredPlugins.addObject('RequiredPlugin', name="Sofa.Component.SolidMechanics.FEM.Elastic")
RequiredPlugins.addObject('RequiredPlugin', name="Sofa.Component.StateContainer")
RequiredPlugins.addObject('RequiredPlugin', name="Sofa.Component.Topology.Container.Dynamic")
RequiredPlugins.addObject('RequiredPlugin', name="Sofa.Component.Topology.Container.Grid")
RequiredPlugins.addObject('RequiredPlugin', name="Sofa.Component.Topology.Mapping")
RequiredPlugins.addObject('RequiredPlugin', name="Sofa.GL.Component.Rendering3D")
root.addObject('DefaultAnimationLoop')
root.addObject('CollisionPipeline')
root.addObject('BruteForceBroadPhase')
root.addObject('BVHNarrowPhase')
root.addObject('CollisionResponse', response="PenalityContactForceField")
root.addObject('MinProximityIntersection', name="Proximity", alarmDistance="0.5", contactDistance="0.02")
Beam = root.addChild('Beam')
Beam.addObject('EulerImplicitSolver', rayleighStiffness="0.1", rayleighMass="0.1")
Beam.addObject('CGLinearSolver', iterations="125", tolerance="1e-16", threshold="1e-16")
Beam.addObject('RegularGridTopology', name="MeshLines", nx="100", ny="1", nz="1", xmax="100", xmin="0", ymin="0", ymax="0", zmax="0", zmin="0")
Beam.addObject('MechanicalObject', template="Rigid3", name="BeamDof")
Beam.addObject('FixedProjectiveConstraint', name="fix", indices="0")
Beam.addObject('UniformMass', totalMass="0.1")
Beam.addObject('BeamFEMForceField', name="BeamFEM", radius="1.0", youngModulus="1000", poissonRatio="0.45")
VisuBeam = Beam.addChild('VisuBeam', activated="true")
VisuBeam.addObject('OglModel', template="Vec3", name="SurfDof", color="0.7 0.7 0.7")
VisuBeam.addObject('QuadSetTopologyContainer', name="Container")
VisuBeam.addObject('QuadSetTopologyModifier', name="Modifier")
VisuBeam.addObject('QuadSetGeometryAlgorithms', name="GeomAlgo", template="Vec3", drawQuads="1")
VisuBeam.addObject('Edge2QuadTopologicalMapping', nbPointsOnEachCircle="10", radius="2", input="@../MeshLines", output="@Container", flipNormals="true")
VisuBeam.addObject('TubularMapping', nbPointsOnEachCircle="10", radius="2", input="@../BeamDof", output="@SurfDof")