KeithSloan / GDML

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

GDML objects and boolean operations #37

Closed mat-Sc closed 3 years ago

mat-Sc commented 3 years ago

First of all I commend you on the excellent workbench,

KeithSloan commented 3 years ago

Any chance you could save the FreeCAD file and export GDML file and then upload both. Thanks in anticipation.

mat-Sc commented 3 years ago

Any chance you could save the FreeCAD file and export GDML file and then upload both. Thanks in anticipation.

Hi, thanks for the replay.

I'm trying to model an HPGe detector, so far I did get the detector to export and open in Geant4 but as a meshed geometry, considering my limited computational resources doing sims with meshed geos take a considerable execution time.

I think my issue is that my union solid has a shapes property instead of the base and tool properties, like the union solid found inside the samples folder.

Your assistance is much appreciated. (I'm running FreeCAD 0.19 in both Ubuntu 16.04, and OpenSUSE LeapFrog 15.4)

myUnion sampleUnion Screenshot_2021-03-13_18-30-55

HPGe01.gdml.txt

KeithSloan commented 3 years ago

Okay I see the problem here. To deal with copies of volumes I hide GDML objects Placements and you set the Placement in the Part ( Equivalent of Physical Volume ). With booleans the Placement of the Tool is with respect to the Base. I have to have a think about dealing with Booleans when user created.

KeithSloan commented 3 years ago

Okay : Some progress

There is now a branch booleans. i.e. in your installed repro in Mod/GDML directory run git fetch booleans git checkout booleans On my test file if I select the LV's in the correct order Tube then Box and click on the GDML BoolUnion ( Current icon with an X ) it will create a new volume with a Union.

Have not tried an export but at present you would have to delete the LV-Box and LV-Tube. Also currently does not work if you select the LV's in the wrong order.

I will try and find some time to do more work on it, but may have to wait till next weekend.

File I am testing with https://www.dropbox.com/s/kfwn3xx0jut337o/BooleanTest.FCStd?dl=0

mat-Sc commented 3 years ago

Okay, I'll be trying your suggestions in the meantime

KeithSloan commented 3 years ago

Hopefully now fixed - Please let me know if not.