KeithSloan / GDML

FreeCAD GDML Workbench - AddonManager Installable
Other
56 stars 17 forks source link

Could not export old FreeCAD project... #148

Open porosev opened 3 weeks ago

porosev commented 3 weeks ago

Hello all,

I decided to memorize how to create GDML file from FreeCAD project and tried to export the old trivial project, but it failed with message "GDMLBox" has no the attribute "Type". Something changed in the latest version of GDML Workbench???

In attachment I have put the screenshot of the message and my stupid project.

Sincerely Yours, Vyacheslav

Screenshot_1 TelescopeIdeal.zip

KeithSloan commented 3 weeks ago

Was the project created with FC 0.21.2?

There is a regression in FC 0.21.2 where for PartFeaturePython Objects the Type is no longer stored in Proxy, i,e, Proxy.Type but in just Type.

If you load your document into say FC 1.0 RC2 it will prompt that the doc needs a recompute and for me exports okay. TelescopeIdea.zip

porosev commented 3 weeks ago

WIth FC 1.0 RC2 I got another error :(( Screenshot_1

KeithSloan commented 3 weeks ago

Is this the same file as TelescopeIdea?

The zip file I posted, I loaded your file into FC 1.0 RC and it prompted for recompute and the file in my zip is the recomputed one. What happens if you try it.

The zip also contains the export gdml file.

When you openend your file with FC 1.0 RC 2, did it suggest a recompute?

I am on Mac

OS: macOS 14.4 Word size of FreeCAD: 64-bit Version: 1.0.0RC2.38806 (Git) Build type: Release Branch: (HEAD detached at 1.0rc2) Hash: 3d63fc6c2f665a8d5e6468845a419bcac80756c7 Python 3.11.9, Qt 5.15.13, Coin 4.0.3, Vtk 9.2.6, OCC 7.7.2 Locale: C/Default (C) Stylesheet/Theme/QtStyle: unset/unset/Qt default Installed mods:

I assume you are on Windows

KeithSloan commented 3 weeks ago

Not that it helps your particular situation but here is the log of loadng the export gdml file into geant4 and screen shot.

Maybe check you have the latest version of the workbench

geantOut.txt Image 01-11-2024 at 11 40

porosev commented 3 weeks ago

Yes, it is the same project as I uploaded at the beginning... I have tried to export my project under Ubuntu with FC 1.0 RC2 as under Windows but it reports the same problem. and, Yes, it prompted for recomputation....

So, You are lucky under MacOS!

Screenshot from 2024-11-01 18-11-17

KeithSloan commented 3 weeks ago

Please check your version of exportGDML.py with this one exportGDML.py.txt

porosev commented 3 weeks ago

I am sorry, but a result is exactly the same.

Screenshot_1 Screenshot_2

KeithSloan commented 3 weeks ago

What is the difference between screenshot_1.jpg and screenshot_2.jpg?

screenshot_2.jpg - looks correct, have you checked the file created D:/1/TelescopeIdea-world.gdml

Your screenshots are of the python console and the second one shows no errors and an export to the file.

porosev commented 3 weeks ago

I just switched on the GDML option : "Print debug information in the Console" to check if something new will be show in the Python console... but nothing interesting happened

and I see the same errors as with my old project as with your converted copy in TelescopoIdea.zip

KeithSloan commented 3 weeks ago

Are you able to try a branch?

If yes try branch symmetric - we know it still has bugs which we are in the process of addressing but you may do better with it.

porosev commented 3 weeks ago

I have checked few versions and I have found that the old version "cutTube" can export my stupid project without errors... but the all newer ones failed.

Screenshot_good_cutTube

Is it OK that gmsh is shown in dependencies? Screenshot_dependencies

KeithSloan commented 3 weeks ago

If you wish to use the Gmsh facilities in the workbench - Gmsh and Gmsh Min then the workbench needs the gmsh python library, you also have to make the gmsh shared library available to FreeCAD see details in the README

The Gmsh facilities in workbench use facilities available via the python library which are different from the API parts of Gmsh that Mesh and FEM use.

If you don't use the Gmsh facilities in the Toolbar, you can skip gmsh.

KeithSloan commented 3 weeks ago

Another user reported a very similar problem and they resolved it by restarting their PC. You might try restarting FreeCAD or thw workbench.