Problem OpenSCAD scad & csg files - PLEASE Add them to this thread - Thanks
Forum rules
and Helpful information
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!
Also, be nice to others! Read the FreeCAD code of conduct!
-
- Veteran
- Posts: 2642
- Joined: Mon Feb 27, 2012 5:31 pm
Problem OpenSCAD scad & csg files - PLEASE Add them to this thread - Thanks
Chris Hennes @chennes is building up a number of test cases for the OpenSCAD workbench.
We also need a central point where people can post problem files.
So if you have any problem scad or csg files that correctly load in OpenSCAD but fail to import correctly, please post and add the files to this thread, Thanks
P.S. If an admin would pin this post that would also be great.
We also need a central point where people can post problem files.
So if you have any problem scad or csg files that correctly load in OpenSCAD but fail to import correctly, please post and add the files to this thread, Thanks
P.S. If an admin would pin this post that would also be great.
Re: Problem OpenSCAD scad & csg files - PLEASE Add them to this thread - Thanks
Pinned, but should be reviewed and pin removed when no longer needed.
Re: Problem OpenSCAD scad & csg files - PLEASE Add them to this thread - Thanks
https://forum.freecadweb.org/viewtopic.php?f=3&t=61831
I have met a potential bug. It seems that linear_extrude is not working correctly in FreeCAD.
A desired model is correctly created but not correctly rendered. A subtracted part is set to be visible.
I have met a potential bug. It seems that linear_extrude is not working correctly in FreeCAD.
A desired model is correctly created but not correctly rendered. A subtracted part is set to be visible.
-
- Veteran
- Posts: 2642
- Joined: Mon Feb 27, 2012 5:31 pm
Re: Problem OpenSCAD scad & csg files - PLEASE Add them to this thread - Thanks
As per the linked thread, it is fixed in FreeCAD 0.20 or if using the alternate importer https://github.com/KeithSloan/OpenSCAD_Alt_Importastrojhgu wrote: ↑Mon Sep 06, 2021 3:29 am https://forum.freecadweb.org/viewtopic.php?f=3&t=61831
I have met a potential bug. It seems that linear_extrude is not working correctly in FreeCAD.
A desired model is correctly created but not correctly rendered. A subtracted part is set to be visible.
Or are you still having problems?
Re: Problem OpenSCAD scad & csg files - PLEASE Add them to this thread - Thanks
Thanks.
I have not yet tested the new version for my nixos repository has not been upgraded.
I have not yet tested the new version for my nixos repository has not been upgraded.
keithsloan52 wrote: ↑Mon Sep 06, 2021 6:58 amAs per the linked thread, it is fixed in FreeCAD 0.20 or if using the alternate importer https://github.com/KeithSloan/OpenSCAD_Alt_Importastrojhgu wrote: ↑Mon Sep 06, 2021 3:29 am https://forum.freecadweb.org/viewtopic.php?f=3&t=61831
I have met a potential bug. It seems that linear_extrude is not working correctly in FreeCAD.
A desired model is correctly created but not correctly rendered. A subtracted part is set to be visible.
Or are you still having problems?
Re: Problem OpenSCAD scad & csg files - PLEASE Add them to this thread - Thanks
Hi,
It seems that an object rotation is not preserved if the object is exported as a polyhedron.
Take look at this example, Body is rotated by 90 deg around X axis:

This happens for placement applied on the shape directly (eg. by Python scripting). Translation is preserved. Edit: tested with another file and translation seems to be applied twice (first time in multmatrix and then directly in polyhedron points coordinates)?
It seems that an object rotation is not preserved if the object is exported as a polyhedron.
Take look at this example, Body is rotated by 90 deg around X axis:

This happens for placement applied on the shape directly (eg. by Python scripting). Translation is preserved. Edit: tested with another file and translation seems to be applied twice (first time in multmatrix and then directly in polyhedron points coordinates)?
Code: Select all
OS: Ubuntu Impish Indri (development branch) (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.20.
Build type: Release
Branch: unknown
Hash: 12d0974525afe812e81ad623f7d915cb1784118e
Python version: 3.9.6
Qt version: 5.15.2
Coin version: 4.0.0
OCC version: 7.5.2
Locale: Polish/Poland (pl_PL)
-
- Veteran
- Posts: 2642
- Joined: Mon Feb 27, 2012 5:31 pm
Re: Problem OpenSCAD scad & csg files - PLEASE Add them to this thread - Thanks
Sorry I am confused.
If I load the scad file into OpenSCAD the long side is on the X axis, same if I import into FreeCAD, what am I missing?
OS: macOS 10.15
Word size of FreeCAD: 64-bit
Version: 0.20.25566 (Git)
Build type: Release
Branch: master
Hash: 8c361dd3fc83840a911da950a845eb9f9342a0b6
Python version: 3.9.6
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.2
Locale: C/Default (C)
Re: Problem OpenSCAD scad & csg files - PLEASE Add them to this thread - Thanks
It is rotated around X on my screenshot. It "lays flat" on the XZ plane in FreeCAD and XY plane in OpenSCAD.keithsloan52 wrote: ↑Sun Sep 19, 2021 9:15 pm
Sorry I am confused.
If I load the scad file into OpenSCAD the long side is on the X axis, same if I import into FreeCAD, what am I missing?
-
- Veteran
- Posts: 2642
- Joined: Mon Feb 27, 2012 5:31 pm
Re: Problem OpenSCAD scad & csg files - PLEASE Add them to this thread - Thanks
Still not getting it.kwahoo wrote: ↑Tue Sep 21, 2021 6:59 pmIt is rotated around X on my screenshot. It "lays flat" on the XZ plane in FreeCAD and XY plane in OpenSCAD.keithsloan52 wrote: ↑Sun Sep 19, 2021 9:15 pm
Sorry I am confused.
If I load the scad file into OpenSCAD the long side is on the X axis, same if I import into FreeCAD, what am I missing?
For me in OpenSCAD the largest surface is in the X-Y plane and has a negative thickness in the Z direction OpenSCAD is version 2021.01
This is what it looks like in FreeCAD with a default cube added.
i.e. Again largest surface in the X-Y plane and negative in the Z direction
Re: Problem OpenSCAD scad & csg files - PLEASE Add them to this thread - Thanks
Ok, It is indeed in the X-Y local plane of Body, but also in the X-Z global plane according the gizmo in the corner. (planes differ, because the Body is rotated)keithsloan52 wrote: ↑Tue Sep 21, 2021 7:54 pm
i.e. Again largest surface in the X-Y plane and negative in the Z direction
This is screenshot with the default cube moved by 50 mm in the Z direction:

So, does the exporter use local (inside the Body) coordinates only? Preserving global coordinates would be very useful for assemblies.