problems with OpenSCAD

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: problems with OpenSCAD

Post by jmaustpc »

jon_bondy wrote:OS: Windows
Word size of OS: 64-bit
Word size of FreeCAD: 32-bit
Version: 0.16.6704 (Git)
There is a newer FreeCAD 0.16.7706 with some bug fix back ports for Win64,
jon_bondy
Posts: 9
Joined: Sat Jul 30, 2016 12:06 pm

Re: problems with OpenSCAD

Post by jon_bondy »

Thanks for your help!
keithsloan52
Veteran
Posts: 2764
Joined: Mon Feb 27, 2012 5:31 pm

Re: problems with OpenSCAD

Post by keithsloan52 »

Okay I have done some more debugging

The CSG circle commands cause dxf files to be created.
Hull causes openscad to be executed with hull(){import(file = "fc-05088-493039-000001.dxf"); import(file = "fc-05088-493039-000002.dxf");} where the the two dxf files are as per the circle statements.
Then there is an attempt at importing the dxf file that openscad creates.

The problem occurs in OpenSCAD2Dgeom.py in function importDXFface at the statement
layers = importDXF.processdxf(doc,filename) or importDXF.layers

The importDXF.processdxf does not complete but causes the execute function of the class CGALFeature to be re- executed.
Note: CGALFeature is in the python execution stack. So things just loop creating dxf files and calling openscad to perform a hull request.

So I conclude that the problem is in the dxf library. I am not sure if Yorik maintains the library any more.
I will send him a pm.

Don't think I can progress any more.
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: problems with OpenSCAD

Post by yorik »

could you guys isolate/attach here the dxf file that causes problems?
keithsloan52
Veteran
Posts: 2764
Joined: Mon Feb 27, 2012 5:31 pm

Re: problems with OpenSCAD

Post by keithsloan52 »

yorik wrote:could you guys isolate/attach here the dxf file that causes problems?
fc-06245-164729-000003.dxf
(1.5 KiB) Downloaded 92 times
Sent a link to dropbox in a pm
jon_bondy
Posts: 9
Joined: Sat Jul 30, 2016 12:06 pm

Re: problems with OpenSCAD

Post by jon_bondy »

I started with 0.16; it was much worse, at least for this particular (OpenSCAD) issue
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: problems with OpenSCAD

Post by yorik »

Thanks Keith! Will have a look...
jon_bondy
Posts: 9
Joined: Sat Jul 30, 2016 12:06 pm

Re: problems with OpenSCAD

Post by jon_bondy »

I wonder if the DXF files are being created, but in a location that OpenSCAD cannot find (or does not use by default) on my system.

Jon
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: problems with OpenSCAD

Post by NormandC »

Jon,

In one other case on Windows, I found that the DXF libraries would stop being downloaded again and again only if the Macro path was set to C:/Users/jon/AppData/Roaming/FreeCAD rather than C:/Users/jon/AppData/Roaming/FreeCAD/Macro.

Maybe you could try that.
keithsloan52
Veteran
Posts: 2764
Joined: Mon Feb 27, 2012 5:31 pm

Re: problems with OpenSCAD

Post by keithsloan52 »

Okay I found where the looping is occurring. Its happening because of a doc,recompute at line 1490 in ImportDXF.py which is in /usr/lib/freecad/Mod/Draft.

I am not sure why it is causing a problem and am in discussion with yorik who is the module owner.

Anyway if I comment out the recompute I can load the CSG file
Hull Test For FreeCAD.csg
(1020 Bytes) Downloaded 96 times
Hull_Test_For_FreeCAD.fcstd
(34.34 KiB) Downloaded 91 times
Post Reply