Missing features after import from 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
ticctech
Posts: 1
Joined: Sat Mar 04, 2017 7:34 pm

Missing features after import from OpenSCAD

Post by ticctech »

Bug, or am I doing something wrong? I import an OpenSCAD file, and some of the features are missing. Interestingly, the missing pieces are in the model hierarchy in FreeCAD, but do not seem to be having the effect they should.

I'm running a Linux FreeCAD I built from git a couple of days ago:

OS: "NAME=Gentoo"
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10384 (Git)
Build type: Unknown
Branch: master
Hash: f560398f30af59b1592ded50d21f5e28363437cf
Python version: 2.7.12
Qt version: 4.8.6
Coin version: 3.1.3
OCC version: 6.9.1.oce-0.18-dev

Procedure:
* Open FreeCAD
* New
* Import extruder-body.scad
No errors are reported. Log says only
>>> import importCSG
>>> importCSG.insert(u"/home/martin/tmp/freecadbug/extruder-body.scad","Unnamed")
>>> Gui.SendMsgToActiveView("ViewFit")
* Save as extruder-body.fcstd
unfortunately, at 7.4MiB, this file is too large to attach to this message. You can find it at
http://pigeonlakeglass.org/wp-content/u ... body.fcstd

In OpenSCAD, it looks like this:
What it looks like in OpenSCAD
What it looks like in OpenSCAD
openscad.jpg (83.78 KiB) Viewed 940 times
In FreeCAD, it looks like this:
What it looks like in FreeCAD
What it looks like in FreeCAD
freecad.jpg (39.92 KiB) Viewed 940 times
As you can see, it's missing some things.
I can't claim to have found *all* of the differences, but the most obvious "missing" elements *are* in the FreeCAD document.
In the model hierarchy, they're all in unions, where the union is then in turn used in a cut. There are things that appear in the outline that are not being drawn.

For instance, difference008>Group002>union005>difference002>union003>Group001>difference001 is there in the outline, and if I make it visible it's there, but it's not visible in its parent Group001 if I make that visible.

Similarly, difference008>Group002>mirrored Matrix_Union001>difference007>union009 does not seem to include the first eleven of the 17 things that it's supposedly unioning.

Help appreciated.
Thanks,
-ticctech
Attachments
extruder-main.scad
A file referenced by the imported file
(12.08 KiB) Downloaded 69 times
extruder-body.scad
The file being imported
(160 Bytes) Downloaded 70 times
keithsloan52
Veteran
Posts: 2756
Joined: Mon Feb 27, 2012 5:31 pm

Re: Missing features after import from OpenSCAD

Post by keithsloan52 »

When I try this on my system I get
extruder-body.FCStd
(849.71 KiB) Downloaded 37 times
Just seems to be missing the six sided cylinder through main block. Don't suppose you could could isolate the cylinder in the scad file and prefix with a # so that a simpler file to debug could be created. The # should cause the part on OpenSCAD to be displayed as a different colour
keithsloan52
Veteran
Posts: 2756
Joined: Mon Feb 27, 2012 5:31 pm

Re: Missing features after import from OpenSCAD

Post by keithsloan52 »

The problem appears to be coincident objects. i.e. the cylinder with six sides that should go through the main body seems to have a height which does not cause it to go all the way through. Playing with cylinder heights I get
extruder-body-2.FCStd
(1013.42 KiB) Downloaded 71 times
Post Reply