Forum Replies Created
-
AuthorPosts
-
HugoKeymaster
No @outtt
The m_mapper variable l.94 in ROIBarycentricMapping.inl is used but not declared in your code. Where does it come from?
Hugo
22 October 2019 at 17:38 in reply to: New approaches to catheter navigation for interventional radiology simulation #14442HugoKeymasterHi @charles
You are talking about a 2006 paper! I was even not done with my studies!
I don’t see the appropriate equations that you mention. Can you indicate me using the linked paper above?
A more recent paper is available here: Interactive simulation of embolization coils: Modeling and experimental validation
Again, this corresponds to the “Catheter and coil simulation” item described online.
Best
Hugo
HugoKeymasterHi @outtt
I got the following error compiling your code:
error: type 'int' cannot be used prior to '::' because it has no members typedef typename T::SPtr SPtr; ^ In file included from ../ROIBarycentricMapping.cpp:2: ../ROIBarycentricMapping.inl:94:4: error: use of undeclared identifier 'm_mapper' m_mapper = m; ^ ../ROIBarycentricMapping.inl:117:6: error: use of undeclared identifier 'm_mapper' if (m_mapper) ^ ../ROIBarycentricMapping.inl:119:3: error: use of undeclared identifier 'm_mapper' m_mapper->setName("mapper"); ^ ../ROIBarycentricMapping.inl:120:18: error: use of undeclared identifier 'm_mapper' this->addSlave(m_mapper.get()); ^ ../ROIBarycentricMapping.inl:121:3: error: use of undeclared identifier 'm_mapper' m_mapper->maskFrom = this->maskFrom; ^ ../ROIBarycentricMapping.inl:122:3: error: use of undeclared identifier 'm_mapper' m_mapper->maskTo = this->maskTo; ^ ../ROIBarycentricMapping.inl:129:2: error: use of undeclared identifier 'topology_from' topology_from = this->fromModel->getContext()->getMeshTopology(); ^ ../ROIBarycentricMapping.inl:130:2: error: use of undeclared identifier 'topology_to' topology_to = this->toModel->getContext()->getMeshTopology(); ^ fatal error: too many errors emitted, stopping now [-ferror-limit=]
Note also that your CMakeLists.txt needs changes to be compiled externally from SOFA:
cmake_minimum_required(VERSION 2.8.12) project(ROIBarycentricMapping) find_package(SofaFramework REQUIRED) find_package(SofaBase REQUIRED) find_package(SofaGeneral REQUIRED) set(HEADER_FILES initPlugin.h ROIBarycentricMapping.h ROIBarycentricMapping.inl ) set(SOURCE_FILES initPlugin.cpp ROIBarycentricMapping.cpp ) add_library(${PROJECT_NAME} SHARED ${HEADER_FILES} ${SOURCE_FILES} ${SCENES_FILES} ${README_FILES}) set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "-DPLUGIN_DATA_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}/\"") set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "-DSOFA_BUILD_ROIBARYCENTRICMAPPING") target_link_libraries(${PROJECT_NAME} SofaCore SofaHelper SofaUserInteraction SofaBaseMechanics SofaEigen2Solver) include_directories("${CMAKE_CURRENT_SOURCE_DIR}/..") install(TARGETS ${PROJECT_NAME} COMPONENT ROIBarycentricMapping_libraries EXPORT ROIBarycentricMappingTargets RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
Cheers
Hugo
HugoKeymasterHi @ma1991
No dumb question here.
When things are misunderstood, it means it can be better explained.You can actually load or export both STL and VTK. So the transformation of one into the other should be not prob.
Hugo
HugoKeymasterHi @ma1991
You have two options: you can either export at begin (exportAtBegin=”1″) or at end (exportAtEnd=”1″)
Note that obj are surface-only format, while vtk is a format for both surface and volume meshed.
Best wishes
Hugo
HugoKeymasterIt seems your BoxROI is huge compared to your object.
Moreover it appears that the box is not including any part (i.e. any indice) of your mesh.Hugo
HugoKeymasterHi @charles,
You can specify to your MechanicalObject (containing the rigid frames) their position and orientation with a quaternion.
I think the ArticulatedSystemMapping is close to what you need but I remember struggling a bit myself using it, but it’s worth having a look (in examples/Components/mapping)Best
Hugo
HugoKeymasterHi @ma1991
Thank you very much for sharing your objectives. It definitely helps our understanding.
Best,
Hugo
HugoKeymasterHi Marwa,
I don’t really understand your issue.
You want to apply a FixedConstraint on your mesh in the simulation, is this what you want ?
Your piece of code is showing the creation of a BoxROI, which is done properly.Best
Hugo
HugoKeymasterHi @lucaam86 and welcome on the SOFA forum!
First of all, thank you very much for making the effort of generating a video and sharing your scene with us. It helps.
Could you also share the mesh with us? if not, could you at least send it to me only so that I can test it.I can already tell you that the issue might come from the numerical parameters that you set (dimensions, stiffness/mass, timestep)/
Best wishes,
Hugo
HugoKeymasterHi Marwa @ma1991
Indeed, your vtu mesh is only a surface and do not include any volumetric element (no tetrahedron). Have a look at the screenshot (crop in the volume of the mesh, only the surface appears):
Best
Hugo
18 October 2019 at 18:59 in reply to: New approaches to catheter navigation for interventional radiology simulation #14416HugoKeymasterHi @charles
Yes I do.
How can I help? Would you be interested in getting access to the related simulation code?If so, you can contact me directly by clicking on “Get This Plugin” on the associated Marketplace item.
Best wishes,
Hugo
HugoKeymasterHi @ma1991
Here the error is clear: the TetrahedronFEMForceField can not work properly without a tetrahedral topology on which to compute the integration of the linear elasticitic constitutive law.
Could you share the generated VTK mesh? I would guess that something went wrong with your meshing step.
Best,
Hugo
18 October 2019 at 18:52 in reply to: [SOLVED] What are the build options in SOFA Dashboard ? #14414HugoKeymasterHi Noura,
is in charge of the continuous integration (CI), he will confirm what I write.
But the options are actually defined in the CI scripts, more precisely in the configure.shLet me know if it helps.
Hugo
HugoKeymasterHi @pguillon
I think what you want to do is to fill the MechanicalObject with the field
position
containing the deformed positions and the fieldrest_position
with the undeformed positions. However, the internal forces computation might depend from the code you are using. Which FEM constitutive model are you using?Hugo
HugoKeymasterHi @agniv
The first concern that I have is that you are mixing two notions of “nodes”.
I would rather name the indices that you want to pass to your constraint:self.constraintIndices
Because
node
is also the graph node..The idea of looking into the force vector was good, I don’t know exactly what makes the values to suddenly jump..
Internal forces resulting from imposed displacement are computed by the mechanical constitutive law. Depending on the FEM mechanical model you are using, you could export in the C++ code the vector resulting from theaddForce()
function.Best
Hugo
HugoKeymasterHi @ma1991
Are you sure of your path?
could you also try doing filename=str(path)+’bunny0.vtu’ ?[ERROR] [MeshVTKLoader] Error while parsing XML
this sounds like something wrong is passed as argument to the MeshVTKLoader and can not be parsed.Best
Hugo
HugoKeymasterHi @charles
I am really sorry for the delay of my reply to your private email. I answered it. We are currently very busy focused on the SOFA Week.
Prices can not be directly provided since authors / institutions owning the codes have different practices. Moreover, prices depend on many parameters like use, domain of use, exclusivity etc.
Let’s continue this discussion per email and I will provide you all appropriate contacts and information.
Best wishes,
Hugo
HugoKeymasterHi @shuo
Let me poke Lekan with the correct forum nickname.
@lakehanne Hitss needs you help. Could you share us how you solved the problem?Best
Hugo
HugoKeymasterHi @pguillon
If I understand correctly, you want to load the two configuration:
– the rest volumetric mesh
– the deformed surface mesh
and use a MeshSpringForceField to fit both and recover the stressed configuration.Is this what you target?
Hugo
HugoKeymasterHi @outtt
You can share with us the simulation case you would like to accelerate. I could give a look at it. I could also give a try using the MOR plugin.
You know that this plugin freshly comes from research and is made open-source. Documentation and support is unfortunately time consuming and researchers dedicate themself on their spare time.
I am willing to help you, let me know how.
Hugo
HugoKeymasterHi @pguillon
Was the approach described in the scene ICPRegistration_MeshSpring.scn fitting your needs though?
You could also have a look at another example: examples/Components/constraint/AffineMovementConstraint.scn
Hugo
HugoKeymasterHi @fleonard
To work with the approach involving the RestShapeSpringForceField, you could simply pass these rest positions to the MechanicalObject at the init (from a loader) like :
<MeshObjLoader name="undeformed" filename="mesh1.obj"/> <MeshObjLoader name="deformed-targetConfiguration" filename="mesh2.obj"/> <MechanicalObject name="Dofs" position="@undeformed.position" rest_position="@deformed-targetConfiguration.position" /> <RestShapeSpringForceField />
Best,
Hugo
HugoKeymasterHi @outtt
I can understand it is hard in the first steps to use a new plugin. You can maybe try to create an issue on the associated GitHub if it’s dev questions. If it is user question, you can post them here. I would poke the authors.
Indeed, coming to the SOFA Week is the perfect time for this. Are you sure not to be able to join us?
Best
Hugo
-
AuthorPosts