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
Posts: 8687
Joined: Thu Jan 05, 2017 9:03 pm

Ticket #4451: cant open Openscad file *.scad

Postby Kunda1 » Thu Oct 15, 2020 5:54 pm

Discussion thread for issue #4451: cant open Openscad file *.scad
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
jmaustpc
Posts: 10358
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

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

Postby jmaustpc » Thu Oct 15, 2020 9:12 pm

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
Posts: 6158
Joined: Wed Oct 22, 2014 5:02 pm

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

Postby sgrogan » 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.
"fight the good fight"
jmaustpc
Posts: 10358
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

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

Postby jmaustpc » Fri Oct 16, 2020 3:16 am

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 9 times
Jim
keithsloan52
Posts: 1450
Joined: Mon Feb 27, 2012 5:31 pm

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

Postby keithsloan52 » Fri Oct 16, 2020 8:09 am

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
Posts: 1450
Joined: Mon Feb 27, 2012 5:31 pm

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

Postby keithsloan52 » Fri Oct 16, 2020 8:09 am

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: 40
Joined: Fri Sep 25, 2020 4:06 pm
Location: UK

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

Postby raymw » Fri Oct 16, 2020 7:14 pm

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
Posts: 6158
Joined: Wed Oct 22, 2014 5:02 pm

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

Postby sgrogan » 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.
"fight the good fight"
keithsloan52
Posts: 1450
Joined: Mon Feb 27, 2012 5:31 pm

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

Postby keithsloan52 » Fri Oct 16, 2020 8:26 pm

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
Posts: 6158
Joined: Wed Oct 22, 2014 5:02 pm

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

Postby sgrogan » Sat Oct 17, 2020 9:44 am

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"