Forum Replies Created
-
AuthorPosts
-
7 January 2019 at 23:23 in reply to: Carving into model does not work when using another model #12732BineshBlocked
Dear @fayad
in triangle topology modifier, removing triangles due to removing isolate point and edge,
my idea is set carving model tag to triangle modelBest,
Behnam Binesh
BineshBlockedDear @hkomninos
you can create smart pointer for BoxROI component with below code ::
HEADER FILE#include <sofaEngine/BoxROI> typedef sofa::component::engine::BoxROI<sofa::defaulttype::Vec6dTypes> BoxROI;
CPP FILE
BoxROI::SPtr bROI = sofa::core::objectmodel::New<BoxROI>(); bROI->init();
Best,
Behnam Binesh
5 January 2019 at 09:47 in reply to: [SOLVED] making models move with each other and not separate #12725BineshBlockedDear @fayad
For move all part of instrument you must implement your code for your instrument,
For Example, Forceps Instrument can implement by three part and you must handle Left and Right and tube by Quaternion5 January 2019 at 09:32 in reply to: Carving into model does not work when using another model #12724BineshBlockedDear @fayad
Your scene is incorrect
In instrument node you declare 3 CarvingTool and first CarvingTool is TlineModel so Carving Manager Component find Tline Model as Model Tool.
Carving Manager doesn’t support multiple tool (although i can give you our codes for multiple tools if you needed), so you must select one collision model for model toolBest,
Behnam Binesh
1 January 2019 at 16:34 in reply to: [SOLVED] Textures of model are messed up when using SOFA Carving #12712BineshBlockedDear @zahra
This scene with “Every number of step” equal 0 and “Export at end” true work correctly,
By default, SOFA OBJExporter create obj file in each step and create many files for our mesh, So this is not good and we develop the code and export the mesh in 1 file,
2 address for file name is for our project and in default mode you don’t need to fill 2 address and file name 1 is enough,
Note that this objexporter do not create many files and every thing is in one fileBest,
Behnam Binesh
1 January 2019 at 05:49 in reply to: [SOLVED] Textures of model are messed up when using SOFA Carving #12707BineshBlockedDear @fayad
By default SOFA update UV data in each iteration, first solution is bypass UV update31 December 2018 at 22:02 in reply to: [SOLVED] Textures of model are messed up when using SOFA Carving #12705BineshBlockedDear @fayad
texture file use UV data and when you change the topology, your UV data change and your texture messed upBineshBlockedDear @zahra
Test below scene
Fix filename0 and filename1 Data with your home path directory 🙂<?xml version="1.0"?> <Node name="root" gravity="0 -9.81 0" dt="0.02" > <VisualStyle name="visualStyle1" displayFlags="showForceFields" /> <DefaultPipeline name="CollisionPipeline" verbose="0" /> <BruteForceDetection name="N2" /> <DefaultContactManager name="collision response" response="default" /> <DiscreteIntersection name="discreteIntersection1" /> <Node name="LiverFEM" gravity="0 -9.81 0" > <EulerImplicitSolver name="cg_odesolver" printLog="0" /> <CGLinearSolver template="GraphScattered" name="linear solver" iterations="25" tolerance="1e-09" threshold="1e-09" /> <MeshTopology name="mesh" fileTopology="mesh/liver.msh" /> <MechanicalObject template="Vec3d" name="dofs" position="0 0 0" velocity="0 0 0" force="0 0 0" externalForce="0 0 0" restScale="1" size="1" /> <TetrahedronFEMForceField template="Vec3d" name="FEM" poissonRatio="0.45" youngModulus="50" gatherPt=" " gatherBsize=" " /> <UniformMass template="Vec3d" name="mass" totalmass="1" filename="unused" /> <FixedConstraint template="Vec3d" name="FixedConstraint" indices="3 39 64" /> <Node name="Visu" gravity="0 -9.81 0" > <OglModel template="ExtVec3f" name="VisualModel" fileMesh="mesh/liver-smooth.obj" primitiveType="DEFAULT" blendEquation="GL_FUNC_ADD" sfactor="GL_SRC_ALPHA" dfactor="GL_ONE_MINUS_SRC_ALPHA" /> <BarycentricMapping template="Vec3d,ExtVec3f" name="visual mapping" input="@../dofs" output="@VisualModel" /> <OBJExporter name="oBJExporter1" listening="0" filename0="/home/simedix/E/e1" filename1="/home/simedix/E/e1" exportEveryNumberOfSteps="0" exportAtBegin="0" exportAtEnd="1" /> </Node> </Node> </Node>
BineshBlockedHi @zahra
OOps! Error occurred, 😐
As a rule, there should be no error
Sorry, can you share your error again?BineshBlockedDear @zahra
Our OBJExporter code modified for our project and work correctly
You can download codes from my drop box
https://www.dropbox.com/sh/xsk3cyjtxpz94hl/AADFhHLk4FLGgRsvlApONrTca?dl=0Best,
Behnam Binesh
BineshBlockedBineshBlockedHi @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
BineshBlockedDear @zahra
Every thing is OK and your scene export the mesh correctly
please give us your ObjExporter code files :
ObjExporter.h
ObjExporter.cppBest,
Behnam BineshBineshBlockedHi @zahra
You can export a visual model with ObjExporter Component
Please give us your scene for better answerBest,
Behnam BineshBineshBlockedHi @agatakrason
Yes of course , you can create a node with your mesh and compatible FEM and mass and one of the collision models type like TriangleModel OR SphereModel .6 September 2018 at 12:03 in reply to: [SOLVED] How to give multi-physical properties to one tetrahedron object #11852BineshBlockedHi @suwan
In TetrahedronFEMForcefield, you can use local stiffness factor for each element to get flexible behavior or stifferBest Wishes,
Behnam Binesh
BineshBlockedHello.
I worked on this problem about 3 days and finally found a solution.
I will share my solution soon here.
Thank you for your attention.BineshBlockedHi @fsharifi135
C & C++ compiler cannot be found.
Have you installed visualcppbuildtools ?Best Wishes,
Behnam Binesh
BineshBlocked31 August 2018 at 10:40 in reply to: [SOLVED] Apply a force field on a MechanicalObject constructed by SubsetMultiMapping #11775BineshBlockedHi @ant0nin
I think that “InteractionEllipsoidForceField” is better solution for this problem because this component work with Mechanical Object and no need to topologyBest Wishes,
Behnam BineshBineshBlockedHi @eunkyungbae
HandleTopologyChange in IdentityMapping is correct
1.Solution :: For Compliance Data, set default value for all nodes such as 1 Or ignore it
2.Solution :: For IdentityMapping Please Check This Scene
Mesh file address in mesh loader changed<?xml version="1.0"?> <Node name="Root" dt="0.02" > <Node name="beamsprings" > <EulerImplicitSolver name="eulerImplicitSolver1" rayleighStiffness="0.01" rayleighMass="0.01" /> <CGLinearSolver template="GraphScattered" name="cGLinearSolver1" iterations="20" tolerance="1e-05" threshold="1e-08" /> <MeshGmshLoader name="meshLoader" filename="data/mesh/PointLine10gmesh.msh" edgesGroups=" -1 0 1 -1 1 1 -1 2 1 -1 3 1 -1 4 1 -1 5 1 -1 6 1 -1 7 1 -1 8 1" createSubelements="1" /> <EdgeSetTopologyContainer name="Container" position="@meshLoader.position" edges="@meshLoader.edges" /> <EdgeSetTopologyModifier name="Modifier" /> <EdgeSetTopologyAlgorithms template="Vec3d" name="TopoAlgo" /> <EdgeSetGeometryAlgorithms template="Vec3d" name="GeomAlgo" /> <MechanicalObject template="Vec3d" name="mObject1" position="0 0 0" velocity="0 0 0" force="0 0 0" externalForce="0 0 0" translation="1 0 2" size="1" /> <UniformMass template="Vec3d" name="uniformMass1" mass="1" filename="unused" /> <FixedConstraint template="Vec3d" name="FixedConstraint" indices="0 1" /> <UncoupledConstraintCorrection template="Vec3d" name="uncoupledConstraintCorrection1" /> <TLineModel template="Vec3d" name="tLineModel1" tags="thread GraspingSurface" /> <TPointModel template="Vec3d" name="tPointModel1" /> <Node name="Visual" > <OglModel template="ExtVec3f" name="VisualModel" edges="@Container.edges" material="Default Diffuse 1 0.74902 0.74902 0.74902 1 Ambient 1 0.2 0.2 0.2 1 Specular 0 1 1 1 1 Emissive 0 0 0 0 0 Shininess 0 45 " lineWidth="6" lineSmooth="1" primitiveType="DEFAULT" blendEquation="GL_FUNC_ADD" sfactor="GL_SRC_ALPHA" dfactor="GL_ONE_MINUS_SRC_ALPHA" /> <IdentityMapping template="Vec3d,ExtVec3f" name="identityMap1" input="@.." output="@VisualModel" /> </Node> <MeshSpringForceField template="Vec3d" name="Springs" stiffness="100000" damping="0" linesStiffness="100000" linesDamping="0" trianglesStiffness="100000" trianglesDamping="0" quadsStiffness="100000" quadsDamping="0" tetrahedraStiffness="100000" tetrahedraDamping="0" cubesStiffness="100000" cubesDamping="0" object1="@./" object2="@./" /> </Node> </Node>
Best Wishes,
Behnam Binesh -
AuthorPosts