View Issue Details

IDProjectCategoryView StatusLast Update
0002359File formatsGeneralpublic2017-05-05 22:26
Reporterl3iggs Assigned Tokeithsloan52  
PriorityhighSeveritycrashReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSArch Linux 
Summary0002359: OpenSCAD import is broken by lack of support for hull() function
DescriptionOpenSCAD has a function called hull(): https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Transformations#hull

A simple example .scad file using this is:
hull() {
   translate([15,10,0]) circle(10);
   circle(10);
 }

This translates the following .csg content:
group() {
    hull() {
        multmatrix([[1, 0, 0, 15], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) {
            circle($fn = 0, $fa = 12, $fs = 2, r = 10);
        }
        circle($fn = 0, $fa = 12, $fs = 2, r = 10);
    }
}

When opening/importing either of these, FreeCAD enters some sort of endless loop of death while trying to process the input.
Steps To Reproduceopen hullTest.scad (attached)
Additional InformationPlease notify
Keith Sloan <keith@sloan-home.co.uk>
and
Sebastian Hoogen <sebastian@hoogen.de>,
Sebastian Hoogen <sebastian@sebastianhoogen.de>
TagsOpenSCAD
FreeCAD Information

Relationships

related to 0002360 closedkeithsloan52 OpenSCAD import is broken by lack of support for the offset() function 

Activities

l3iggs

2015-12-10 16:10

reporter  

hullTest.scad (62 bytes)

Kunda1

2017-01-13 20:47

administrator   ~0007729

Forum thread: http://forum.freecadweb.org/viewtopic.php?f=10&t=19860

kkremitzki

2017-02-15 06:48

administrator   ~0008306

Confirmed. I open the attached file in OpenSCAD, export to .csg, open in FreeCAD, and get an error:

End processing CSG file
processing circle
successfully exported /tmp/fc-31164-114818-000004.dxf
processing circle001
successfully exported /tmp/fc-31164-114818-000005.dxf
Traceback (most recent call last):
  File "/usr/lib/freecad-daily/Mod/OpenSCAD/OpenSCADFeatures.py", line 455, in execute
    fp.Operation, maxmeshpoints=maxmeshpoints)
  File "/usr/lib/freecad-daily/Mod/OpenSCAD/OpenSCADUtils.py", line 548, in process_ObjectsViaOpenSCADShape
    return process2D_ObjectsViaOpenSCADShape(children,name,doc)
  File "/usr/lib/freecad-daily/Mod/OpenSCAD/OpenSCADUtils.py", line 488, in process2D_ObjectsViaOpenSCADShape
    tmpfilename = callopenscadstring('%s(){%s}' % (Operation,dxfimports),'dxf')
  File "/usr/lib/freecad-daily/Mod/OpenSCAD/OpenSCADUtils.py", line 177, in callopenscadstring
    keepname=True)
  File "/usr/lib/freecad-daily/Mod/OpenSCAD/OpenSCADUtils.py", line 164, in callopenscad
    raise OpenSCADError('OpenSCAD executeable unavailable')
<class 'OpenSCADUtils.OpenSCADError'>: 'OpenSCAD executeable unavailable'

In spite of the error message I do have the OpenSCAD executable.

keithsloan52

2017-04-25 19:36

developer   ~0008759

Works just fine for me.

Maybe kkremitzki has a permissions problem on his/her openscad executable.

There was a fix for hull and 2d objects at https://forum.freecadweb.org/viewtopic.php?f=27&t=18233&p=142918#p142918
hullTest.fcstd (6,537 bytes)

Kunda1

2017-04-25 23:39

administrator   ~0008760

@kkremitzki ping

Kunda1

2017-04-28 12:24

administrator   ~0008797

Resolving unless @kkremitzki needs to reopen.

Kunda1

2017-05-02 14:48

administrator   ~0008856

Last edited: 2017-05-02 14:49

@kkremitzki can we also make keithsloan52 a developer so we can attribute fixes to him?

kkremitzki

2017-05-03 17:25

administrator   ~0008881

@Kunda1 done

Kunda1

2017-05-05 22:26

administrator   ~0008893

Closing

Issue History

Date Modified Username Field Change
2015-12-10 16:10 l3iggs New Issue
2015-12-10 16:10 l3iggs File Added: hullTest.scad
2017-01-13 20:47 Kunda1 Note Added: 0007729
2017-01-16 18:48 Kunda1 Project FreeCAD => File formats
2017-01-16 18:48 Kunda1 Category Bug => General
2017-01-27 03:30 Kunda1 Relationship added related to 0002360
2017-02-15 06:48 kkremitzki Note Added: 0008306
2017-02-15 06:48 kkremitzki Status new => confirmed
2017-04-25 19:36 keithsloan52 File Added: hullTest.fcstd
2017-04-25 19:36 keithsloan52 Note Added: 0008759
2017-04-25 23:39 Kunda1 Note Added: 0008760
2017-04-28 12:24 Kunda1 Status confirmed => resolved
2017-04-28 12:24 Kunda1 Resolution open => fixed
2017-04-28 12:24 Kunda1 Note Added: 0008797
2017-05-02 14:48 Kunda1 Note Added: 0008856
2017-05-02 14:49 Kunda1 Note Edited: 0008856
2017-05-03 17:25 kkremitzki Note Added: 0008881
2017-05-03 19:22 Kunda1 Assigned To => keithsloan52
2017-05-04 10:39 Kunda1 Tag Attached: OpenSCAD
2017-05-05 22:26 Kunda1 Status resolved => closed
2017-05-05 22:26 Kunda1 Note Added: 0008893