-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[scenes] Fix and update all carving scenes with Geomagic (#7)
* [scenes] Fix and update haptic carving scenes * Add carving against rigid cube * Add scene with Geomagic and burning
- Loading branch information
Showing
10 changed files
with
458 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
<?xml version="1.0" ?> | ||
<Node name="root" dt="0.05" gravity="0 -9 0" > | ||
<VisualStyle displayFlags="hideVisualModels hideBehaviorModels showCollisionModels hideMappings hideForceFields" /> | ||
|
||
<Node name="RequiredPlugins"> | ||
<RequiredPlugin name="Geomagic"/> <!-- Needed to use components [GeomagicDriver] --> | ||
<RequiredPlugin name="Sofa.Component.AnimationLoop"/> <!-- Needed to use components [FreeMotionAnimationLoop] --> | ||
<RequiredPlugin name="Sofa.Component.Collision.Detection.Algorithm"/> <!-- Needed to use components [BVHNarrowPhase, BruteForceBroadPhase, DefaultPipeline] --> | ||
<RequiredPlugin name="Sofa.Component.Collision.Detection.Intersection"/> <!-- Needed to use components [LocalMinDistance] --> | ||
<RequiredPlugin name="Sofa.Component.Collision.Geometry"/> <!-- Needed to use components [LineCollisionModel, PointCollisionModel, TriangleCollisionModel] --> | ||
<RequiredPlugin name="Sofa.Component.Collision.Response.Contact"/> <!-- Needed to use components [DefaultContactManager] --> | ||
<RequiredPlugin name="Sofa.Component.Constraint.Lagrangian.Correction"/> <!-- Needed to use components [LinearSolverConstraintCorrection] --> | ||
<RequiredPlugin name="Sofa.Component.Constraint.Lagrangian.Solver"/> <!-- Needed to use components [LCPConstraintSolver] --> | ||
<RequiredPlugin name="Sofa.Component.Constraint.Projective"/> <!-- Needed to use components [FixedConstraint] --> | ||
<RequiredPlugin name="Sofa.Component.Engine.Select"/> <!-- Needed to use components [BoxROI] --> | ||
<RequiredPlugin name="Sofa.Component.Haptics"/> <!-- Needed to use components [LCPForceFeedback] --> | ||
<RequiredPlugin name="Sofa.Component.IO.Mesh"/> <!-- Needed to use components [MeshOBJLoader] --> | ||
<RequiredPlugin name="Sofa.Component.LinearSolver.Direct"/> <!-- Needed to use components [SparseLDLSolver] --> | ||
<RequiredPlugin name="Sofa.Component.Mapping.Linear"/> <!-- Needed to use components [IdentityMapping] --> | ||
<RequiredPlugin name="Sofa.Component.Mapping.NonLinear"/> <!-- Needed to use components [RigidMapping] --> | ||
<RequiredPlugin name="Sofa.Component.Mass"/> <!-- Needed to use components [DiagonalMass, UniformMass] --> | ||
<RequiredPlugin name="Sofa.Component.ODESolver.Backward"/> <!-- Needed to use components [EulerImplicitSolver] --> | ||
<RequiredPlugin name="Sofa.Component.SolidMechanics.FEM.Elastic"/> <!-- Needed to use components [TetrahedralCorotationalFEMForceField] --> | ||
<RequiredPlugin name="Sofa.Component.SolidMechanics.Spring"/> <!-- Needed to use components [RestShapeSpringsForceField] --> | ||
<RequiredPlugin name="Sofa.Component.StateContainer"/> <!-- Needed to use components [MechanicalObject] --> | ||
<RequiredPlugin name="Sofa.Component.Topology.Container.Constant"/> <!-- Needed to use components [MeshTopology] --> | ||
<RequiredPlugin name="Sofa.Component.Topology.Container.Dynamic"/> <!-- Needed to use components [TetrahedronSetGeometryAlgorithms, TetrahedronSetTopologyContainer, TetrahedronSetTopologyModifier, TriangleSetGeometryAlgorithms, TriangleSetTopologyContainer, TriangleSetTopologyModifier] --> | ||
<RequiredPlugin name="Sofa.Component.Topology.Container.Grid"/> <!-- Needed to use components [RegularGridTopology] --> | ||
<RequiredPlugin name="Sofa.Component.Topology.Mapping"/> <!-- Needed to use components [Hexa2TetraTopologicalMapping, Tetra2TriangleTopologicalMapping] --> | ||
<RequiredPlugin name="Sofa.Component.Visual"/> <!-- Needed to use components [VisualStyle] --> | ||
<RequiredPlugin name="Sofa.GL.Component.Rendering3D"/> <!-- Needed to use components [OglModel] --> | ||
<RequiredPlugin name="InfinyToolkit" /> | ||
</Node> | ||
|
||
<DefaultVisualManagerLoop /> | ||
<FreeMotionAnimationLoop/> | ||
<LCPConstraintSolver tolerance="0.001" maxIt="1000"/> | ||
|
||
<DefaultPipeline name="pipeline" depth="6" verbose="0"/> | ||
<BruteForceBroadPhase/> | ||
<BVHNarrowPhase/> | ||
<DefaultContactManager name="response" response="FrictionContactConstraint" /> | ||
<MinProximityIntersection name="Proximity" alarmDistance="1.0" contactDistance="0.1" /> | ||
|
||
<GeomagicDriver name="GeomagicDevice" deviceName="Default Device" scale="1" drawDeviceFrame="1" | ||
positionBase="0 0 0" orientationBase="0 0.707 0 -0.707" drawDevice="0"/> | ||
<AdvancedCarvingManager active="@GeomagicDevice.button1" refineDistance="1.0" refineCriteria="0.5" carvingDistance="0.1" | ||
carvingWithBurning="0" carvingWithRefinement="0" drawContacts="0"/> | ||
|
||
|
||
<Node name="ToolController"> | ||
<MechanicalObject template="Rigid3" name="DOFs" position="@GeomagicDevice.positionDevice"/> | ||
</Node> | ||
|
||
|
||
<Node name="Hexa2Tetra" > | ||
<RegularGridTopology name="HexaTop" n="7 7 7" min="1 0 3" max="11 10 13" /> | ||
<TetrahedronSetTopologyContainer name="Container" position="@HexaTop.position" /> | ||
<TetrahedronSetTopologyModifier name="Modifier"/> | ||
<Hexa2TetraTopologicalMapping input="@HexaTop" output="@Container" swapping="false" /> | ||
</Node> | ||
|
||
<Node name="Cube"> | ||
<EulerImplicitSolver name="ODE solver" rayleighStiffness="0.05" rayleighMass="1.0" /> | ||
<SparseLDLSolver template="CompressedRowSparseMatrixMat3x3d"/> | ||
<MechanicalObject position="@../Hexa2Tetra/Container.position" name="Volume" /> | ||
|
||
<TetrahedronSetTopologyContainer name="Tetra_topo" src="@../Hexa2Tetra/Container" /> | ||
<TetrahedronSetTopologyModifier name="Modifier" /> | ||
<TetrahedronSetGeometryAlgorithms name="GeomAlgo" template="Vec3d" drawTetrahedra="0" drawScaleTetrahedra="0.8"/> | ||
|
||
<DiagonalMass massDensity="10.0" /> | ||
|
||
<BoxROI name="box" box="-1 -1 -1 12 0 14" drawBoxes="true" /> | ||
<FixedConstraint name="FixedConstraint" indices="@box.indices" activate_projectVelocity="1"/> | ||
|
||
<TetrahedralCorotationalFEMForceField name="CFEM" youngModulus="5000" poissonRatio="0.3" method="large" /> | ||
<LinearSolverConstraintCorrection/> | ||
<Node name="Surface"> | ||
<TriangleSetTopologyContainer name="Container"/> | ||
<TriangleSetTopologyModifier name="Modifier" /> | ||
<TriangleSetGeometryAlgorithms name="GeomAlgo" template="Vec3d" drawTriangles="0"/> | ||
<Tetra2TriangleTopologicalMapping input="@../Tetra_topo" output="@Container" /> | ||
|
||
<TriangleCollisionModel name="triangleCol" tags="CarvingSurface"/> | ||
<LineCollisionModel name="instrumentLine" /> | ||
<PointCollisionModel name="pointCol" tags="CarvingSurface"/> | ||
|
||
<Node name="liver-Visual"> | ||
<OglModel name="Visual" texturename="textures/colorMap.png" /> | ||
<IdentityMapping input="@../../Volume" output="@Visual" /> | ||
</Node> | ||
</Node> | ||
</Node> | ||
|
||
|
||
<Node name="Instrument" > | ||
<EulerImplicitSolver name="ODE solver" rayleighStiffness="0.05" rayleighMass="1.0" /> | ||
<SparseLDLSolver template="CompressedRowSparseMatrixMat3x3d"/> | ||
|
||
<MechanicalObject name="instrumentState" template="Rigid3" tags="GeomagicDevice" position="@../GeomagicDevice.positionBase"/> | ||
<UniformMass name="mass" totalMass="0.1" /> | ||
|
||
<RestShapeSpringsForceField stiffness='1000000' angularStiffness='1000000' external_rest_shape='@../ToolController/DOFs' points='0' external_points='0' /> | ||
<LCPForceFeedback activate="true" forceCoef="0.001"/> | ||
<LinearSolverConstraintCorrection/> | ||
|
||
<Node name="CollisionModel" > | ||
<MeshOBJLoader filename="./mesh/drill_collision.obj" name="loader"/> | ||
<MeshTopology src="@loader" name="InstrumentCollisionModel" /> | ||
<MechanicalObject src="@loader" name="instrumentCollisionState" ry="-180" rz="-90" dz="3.5" dx="0.0" /> | ||
<LineCollisionModel name="instrumentLine" contactStiffness="10" /> | ||
<PointCollisionModel name="instrumentPoint" contactStiffness="10" tags="CarvingTool" /> | ||
<RigidMapping name="MM->CM mapping" input="@instrumentState" output="@instrumentCollisionState" /> | ||
</Node> | ||
</Node> | ||
|
||
</Node> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-26.4817 33.5874 3.80545 | ||
-0.239151 -0.629519 -0.295128 0.6778 |
Oops, something went wrong.