Abnormally parse openscad codes

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
astrojhgu
Posts: 7
Joined: Tue May 19, 2020 8:54 am

Abnormally parse openscad codes

Post by astrojhgu »

I tried to create a part in FreeCAD by using following openscad code, but the created object is abnormal.

Code: Select all

difference(){
	cube(100,center=true);
	for(dx=[-30,0,30]){
		for(dy=[-30,0,30]){
			translate([dx,dy,0]){
			linear_extrude(100){
    				circle(10);
			}
                }
        }
    }
}

In openscad, the (noramally) rended object is
openscad.png
openscad.png (37.08 KiB) Viewed 828 times
In freecad the abnormally rended object is
freecad.png
freecad.png (23.85 KiB) Viewed 828 times
If I replace the linear extrude with a cylinder then FreeCAD works normally.

Well it seems that FreeCAD correctly created the desired object, but some subtracted parts are set to be visible incorrectly.

Is this a bug?

The version of my FreeCAD is 0.19.
Bance
Veteran
Posts: 4255
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: Abnormally parse openscad codes

Post by Bance »

TheMarkster
Veteran
Posts: 5513
Joined: Thu Apr 05, 2018 1:53 am

Re: Abnormally parse openscad codes

Post by TheMarkster »

It worked for me in 0.20. Perhaps the bug has already been fixed.
Snip macro screenshot-22710f.png
Snip macro screenshot-22710f.png (61.01 KiB) Viewed 775 times
OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.25541 (Git)
Build type: Release
Branch: master
Hash: ca043dcb6d20d70b8e24d75e810683214eecc5d4
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)
keithsloan52
Veteran
Posts: 2764
Joined: Mon Feb 27, 2012 5:31 pm

Re: Abnormally parse openscad codes

Post by keithsloan52 »

Can confirm a problem with FreeCAD 0.19.1 but works with Alternate Importer https://github.com/KeithSloan/OpenSCAD_Alt_Import
or a recent version of FreeCAD 0.20.
Post Reply