Home › Forum › SOFA › Using SOFA › [SOLVED] Using SOFACarving with OBJ files
Tagged: 64_bits, SOFA_1806, Windows_10
- This topic has 2 replies, 2 voices, and was last updated 5 years, 10 months ago by Anonymous.
-
AuthorPosts
-
26 December 2018 at 12:54 #12685AnonymousInactive
Hi,
I am trying to use the SOFACarving Plugin to cut into a obj model that I have, but it gives the following error:
[WARNING] [CarvingManager(carvingManager1)] CarvingManager: modelSurface not found
I am not sure if it is me who is doing it wrong or the plugin does not work with obj file files.Here is my scn (it is a modified version of the example in the SOFACarving Plugin):
<?xml version="1.0" ?> <Node name="root" dt="0.05" showBoundingTree="0" gravity="0 0 0"> <RequiredPlugin name="Carving" pluginName="SofaCarving" /> <VisualStyle displayFlags="" /> <CollisionPipeline verbose="0" /> <BruteForceDetection name="N2" /> <CollisionResponse response="default" /> <MinProximityIntersection name="Proximity" alarmDistance="0.08" contactDistance="0.05" useSurfaceNormals="false"/> <CollisionGroup /> <CarvingManager active="true"/> <Node name="TT"> <EulerImplicit name="cg_odesolver" printLog="false" rayleighStiffness="0.1" rayleighMass="0.1" /> <CGLinearSolver iterations="25" name="linear solver" tolerance="1.0e-9" threshold="1.0e-9" /> <MeshObjLoader filename="Prostate_02.obj" name="loader" /> <MechanicalObject src="@loader" name="Volume" /> <include href="Objects/TriangleSetTopology.xml" src="@loader" /> <DiagonalMass massDensity="0.5" /> <FixedPlaneConstraint direction="0 0 1" dmin="-0.1" dmax="0.1" /> <FixedConstraint indices="0" /> <TriangleSet /> <Node name="Visu"> <OglModel name="Visual" color="yellow" /> <IdentityMapping input="@../Volume" output="@Visual" /> </Node> </Node> <Node name="Instrument" > <EulerImplicit name="cg_odesolver" printLog="false" /> <CGLinearSolver iterations="25" name="linear solver" tolerance="1.0e-9" threshold="1.0e-9" /> <MechanicalObject template="Rigid" name="instrumentState" tags="Omni" /> <UniformMass template="Rigid" name="mass" totalmass="0.05" /> <LinearMovementConstraint template="Rigid" keyTimes="0 2" movements="-0.2 -0.2 -0.2 0 0 0 0.2 0.2 0.2 0 0 0" /> <Node name="VisualModel" > <OglModel template="ExtVec3f" name="InstrumentVisualModel" fileMesh="mesh/dental_instrument.obj" scale3d="1 1 1" translation="1 2 0" rotation="180 0 150" material="Default Diffuse 1 1 0.2 0.2 1 Ambient 1 0.2 0.04 0.04 1 Specular 0 1 0.2 0.2 1 Emissive 0 1 0.2 0.2 1 Shininess 0 45" /> <RigidMapping template="Rigid,ExtVec3f" name="MM->VM mapping" input="@instrumentState" output="@InstrumentVisualModel" /> </Node> <Node name="CollisionModel" > <MechanicalObject template="Vec3d" name="Particle" position="-0.2 -0.2 -0.2" /> <Point name="ParticleModel" tags="CarvingTool" contactStiffness="2" /> <RigidMapping template="Rigid,Vec3d" name="MM->CM mapping" input="@instrumentState" output="@Particle" /> </Node> </Node> </Node>
Thanks
29 December 2018 at 07:50 #12693BineshBlockedHi @fayad
SofaCarving plugin need model tool and model surface
you must give it model tool and model surface address
model tool and model surface are a collision model
for more details, please see carving manager example in plugin directoryGood Luck
Behnam Binesh
31 December 2018 at 20:29 #12702AnonymousInactiveThanks, will look into that.
-
AuthorPosts
- You must be logged in to reply to this topic.