KeithSloan / GDML

FreeCAD GDML Workbench - AddonManager Installable
Other
49 stars 16 forks source link

Solved: Tessellating stl geometry #71

Open aminetec opened 2 years ago

aminetec commented 2 years ago

Greetings,

I imported the included stl geometry and tried the tessellate selected object option but nothing happened.

compare80.stl.txt brain.FCStd.txt

KeithSloan commented 2 years ago

You have to activate the workbench and open a new file which creates the GDML structure. Import the STL, then use the Mesh 2 Tess icon. i.e. Select compare80 Mesh in Tree View then click on icon.

Mesh2Tess

FreeCAD structure needs to look like. You can drag things around in Tree View Structure

This is the Tessellated object in FreeCAD InFreeCAD

The is the file exported as GDML ( You need to remove the txt -used as github does not allow gdml Compare80-worldVOL.gdml.txt

Screenshot of object loaded into Geant4 Loaded_in_Geant4

Thanks for the issue I will look at changing MeshTess so that there is less to do with creating the structure.

KeithSloan commented 2 years ago

Number of questions 1) The file is titled brain, is this like a section of a brain and do you have a number that you need to load into Geant4? 2) What sort of material will you be specifying? 3) Would being able to specify a materials using Geometry from Text help https://geant4.web.cern.ch/sites/geant4.web.cern.ch/files/geant4/collaboration/working_groups/geom… 4) Not tested in a while but a OBJ files can have Quad & Tri Faces the same as GDML Tessellated object, the workbench should offer the facility to go straight to a Tessellated Object if you try and import an OBJ file, would you like to see STL files handled the same. Could you have just as easily created the file as OBJ rather than STL? Thanks

aminetec commented 2 years ago

Thank your for your response, it worked perfectly Yes I have 8 sections of a brain as separate stl files I'm using the material G4_A-150_TISSUE