[FIXED] Ticket #4451: cant open Openscad file *.scad

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
Kunda1
Veteran
Posts: 13443
Joined: Thu Jan 05, 2017 9:03 pm

[FIXED] Ticket #4451: cant open Openscad file *.scad

Post by Kunda1 »

Discussion thread for issue #4451: cant open Openscad file *.scad
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
jmaustpc
Veteran
Posts: 11211
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Ticket #4451: cant open Openscad file *.scad

Post by jmaustpc »

From the ticket
if i try open some scad files with operation hull it will not successfully ended but traceback is
keithsloan52 wrote:ping
Hi Keith, I wonder if you would be interested in looking at this? No pressure, just thought you might. :)

JIm
User avatar
sgrogan
Veteran
Posts: 6501
Joined: Wed Oct 22, 2014 5:02 pm

Re: Ticket #4451: cant open Openscad file *.scad

Post by sgrogan »

Kunda1 wrote: Thu Oct 15, 2020 5:54 pm Discussion thread for issue #4451: cant open Openscad file *.scad
jmaustpc wrote: Thu Oct 15, 2020 9:12 pm Hi Keith, I wonder if you would be interested in looking at this? No pressure, just thought you might.
Anyone have a test .scad file where this fails.
The current https://github.com/FreeCAD/FreeCAD/blam ... es.py#L502 import looks like a new style "namespace" import but the OpenSCAD WB hasn't been ported to this style.
The reporter's fix appears valid, but I don't have a .scad file using "hull" to test.
"fight the good fight"
jmaustpc
Veteran
Posts: 11211
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Ticket #4451: cant open Openscad file *.scad

Post by jmaustpc »

sgrogan wrote: Thu Oct 15, 2020 9:48 pm
Kunda1 wrote: Thu Oct 15, 2020 5:54 pm Discussion thread for issue #4451: cant open Openscad file *.scad
jmaustpc wrote: Thu Oct 15, 2020 9:12 pm Hi Keith, I wonder if you would be interested in looking at this? No pressure, just thought you might.
Anyone have a test .scad file where this fails.
The current https://github.com/FreeCAD/FreeCAD/blam ... es.py#L502 import looks like a new style "namespace" import but the OpenSCAD WB hasn't been ported to this style.
The reporter's fix appears valid, but I don't have a .scad file using "hull" to test.
Is this one suitable? It was attached to the ticket, I think you would have noticed so I suspect isn't suitable? :)

I downloaded it and then attached it to this post.
hull.scad
(68 Bytes) Downloaded 40 times
Jim
keithsloan52
Veteran
Posts: 2710
Joined: Mon Feb 27, 2012 5:31 pm

Re: Ticket #4451: cant open Openscad file *.scad

Post by keithsloan52 »

sgrogan wrote: Thu Oct 15, 2020 9:48 pm
Kunda1 wrote: Thu Oct 15, 2020 5:54 pm Discussion thread for issue #4451: cant open Openscad file *.scad
jmaustpc wrote: Thu Oct 15, 2020 9:12 pm Hi Keith, I wonder if you would be interested in looking at this? No pressure, just thought you might.
Anyone have a test .scad file where this fails.
The current https://github.com/FreeCAD/FreeCAD/blam ... es.py#L502 import looks like a new style "namespace" import but the OpenSCAD WB hasn't been ported to this style.
The reporter's fix appears valid, but I don't have a .scad file using "hull" to test.
I have a new style namespace version of the OpenSCAD WB in my GitHub repro ( Now made private) and it appears OpenSCADFeatures.py got contaminated with some code from it, sorry about that.
keithsloan52
Veteran
Posts: 2710
Joined: Mon Feb 27, 2012 5:31 pm

Re: Ticket #4451: cant open Openscad file *.scad

Post by keithsloan52 »

sgrogan wrote: Thu Oct 15, 2020 9:48 pm
Kunda1 wrote: Thu Oct 15, 2020 5:54 pm Discussion thread for issue #4451: cant open Openscad file *.scad
jmaustpc wrote: Thu Oct 15, 2020 9:12 pm Hi Keith, I wonder if you would be interested in looking at this? No pressure, just thought you might.
Anyone have a test .scad file where this fails.
The current https://github.com/FreeCAD/FreeCAD/blam ... es.py#L502 import looks like a new style "namespace" import but the OpenSCAD WB hasn't been ported to this style.
The reporter's fix appears valid, but I don't have a .scad file using "hull" to test.
I have a new style namespace version of the OpenSCAD WB in my GitHub repro ( Now made private) and it appears OpenSCADFeatures.py got contaminated with some code from it, sorry about that.
raymw
Posts: 81
Joined: Fri Sep 25, 2020 4:06 pm
Location: UK

Re: Ticket #4451: cant open Openscad file *.scad

Post by raymw »

Hi, Importing the hull.scad file, I get this
19:52:00 Traceback (most recent call last):
File "C:\Users\Ray\freecad19\FreeCAD_0.19.22284-Win-Conda_vc14.x-x86_64\Mod\OpenSCAD\OpenSCADFeatures.py", line 502, in execute
import Part, freecad.OpenSCAD.OpenSCADUtils
<class 'ModuleNotFoundError'>: No module named 'freecad.OpenSCAD'
I get the same for importing a minkowski

Code: Select all

$fn =50;
minkowski() {
    cube([10, 10, 1]);
	cylinder(1);
 }
All the main components cube/sphere/cylinder are imported OK, but the fiddly bits seem to fail. (I find it quicker to rough out the shape in openscad, import to freecad for filleting and otherwise finish, and export as stl. Exporting back to openscad for further editing is very iffy.
Best Wishes, Ray
User avatar
sgrogan
Veteran
Posts: 6501
Joined: Wed Oct 22, 2014 5:02 pm

Re: Ticket #4451: cant open Openscad file *.scad

Post by sgrogan »

keithsloan52 wrote: Fri Oct 16, 2020 8:09 am I have a new style namespace version of the OpenSCAD WB in my GitHub repro ( Now made private) and it appears OpenSCADFeatures.py got contaminated with some code from it, sorry about that.
Are you going to make a pull request. I can if you don't have time.
"fight the good fight"
keithsloan52
Veteran
Posts: 2710
Joined: Mon Feb 27, 2012 5:31 pm

Re: Ticket #4451: cant open Openscad file *.scad

Post by keithsloan52 »

sgrogan wrote: Fri Oct 16, 2020 7:19 pm
keithsloan52 wrote: Fri Oct 16, 2020 8:09 am I have a new style namespace version of the OpenSCAD WB in my GitHub repro ( Now made private) and it appears OpenSCADFeatures.py got contaminated with some code from it, sorry about that.
Are you going to make a pull request. I can if you don't have time.
Have a lot on my plate at the moment, eldest daughter passed her due date etc etc, so if you could do it that would be great.
User avatar
sgrogan
Veteran
Posts: 6501
Joined: Wed Oct 22, 2014 5:02 pm

Re: Ticket #4451: cant open Openscad file *.scad

Post by sgrogan »

keithsloan52 wrote: Fri Oct 16, 2020 8:26 pm Have a lot on my plate at the moment, eldest daughter passed her due date etc etc
Good luck and best wishes!
pull/3971
"fight the good fight"
Post Reply