[SOLVED] 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!
Post Reply
edpaay
Posts: 4
Joined: Mon Jan 24, 2022 2:25 am

[SOLVED] OpenSCAD

Post by edpaay »

So the documentation shows how to install OpenSCAD but when you try to open an .scad file there is no option to open such. The documentation says it is possible. I have seen some reference to this problem but I have not seen an acknowledgement that this is a bug or any resolution. I am trying to import some files from thingyverse which are .scad files. One I tried to export as a csg file but this obviously did not work well. There were multiple errors and it tried to download DXF files or some thing from github. And the model is completely broken.

This is what was reported multiple times:
19:37:36 downloading https://raw.githubusercontent.com/yorik ... olorMap.py ...
19:37:36 downloading https://raw.githubusercontent.com/yorik ... Objects.py ...
19:37:36 downloading https://raw.githubusercontent.com/yorik ... Library.py ...
19:37:37 downloading https://raw.githubusercontent.com/yorik ... fReader.py ...
19:37:37 DXF libraries not available. Aborting.
19:37:37 opening D:\Temp\fc-06064-185501-000015.dxf...
19:37:37 Traceback (most recent call last):
File "D:\Program Files\FreeCAD 0.19\Mod\OpenSCAD\OpenSCADFeatures.py", line 503, in execute
shape = OpenSCAD.OpenSCADUtils.process_ObjectsViaOpenSCADShape(fp.Document,fp.Children,\
File "D:\Program Files\FreeCAD 0.19\Mod\OpenSCAD\OpenSCADUtils.py", line 604, in process_ObjectsViaOpenSCADShape
return process2D_ObjectsViaOpenSCADShape(children,name,doc)
File "D:\Program Files\FreeCAD 0.19\Mod\OpenSCAD\OpenSCADUtils.py", line 547, in process2D_ObjectsViaOpenSCADShape
face = importDXFface(tmpfilename,None,None)
File "D:\Program Files\FreeCAD 0.19\Mod\OpenSCAD\OpenSCAD2Dgeom.py", line 485, in importDXFface
layers = importDXF.processdxf(doc,filename,False,False) or importDXF.layers
File "D:\Program Files\FreeCAD 0.19\Mod\Draft\importDXF.py", line 2191, in processdxf
drawing = dxfReader.readDXF(filename)
<class 'AttributeError'>: 'NoneType' object has no attribute 'readDXF'
Last edited by Kunda1 on Fri Feb 11, 2022 8:49 pm, edited 1 time in total.
Reason: Added [Solved] to thread title
User avatar
Roy_043
Veteran
Posts: 8456
Joined: Thu Dec 27, 2018 12:28 pm

Re: OpenSCAD

Post by Roy_043 »

You need to set the path to the OpenSCAD executable in the preferences (OpenSCAD_Preferences). And, probably, restart FreeCAD.
User avatar
chennes
Veteran
Posts: 3884
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: OpenSCAD

Post by chennes »

Could you please report your FreeCAD version information (instructions here)? We've been doing a lot of work on the OpenSCAD importer in this development cycle.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
edpaay
Posts: 4
Joined: Mon Jan 24, 2022 2:25 am

Re: OpenSCAD

Post by edpaay »

OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24267 +99 (Git)
Build type: Release
Branch: Branch_0.19.3
Hash: 6530e364184ce05ccff39501e175cf2237e6ee4b
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: English/United States (en_US)
edpaay
Posts: 4
Joined: Mon Jan 24, 2022 2:25 am

Re: OpenSCAD

Post by edpaay »

The openscad path is set to the openscad.exe file...
edpaay
Posts: 4
Joined: Mon Jan 24, 2022 2:25 am

Re: OpenSCAD

Post by edpaay »

Miraculously it seems to work now not sure what changed...
Post Reply