I am trying to debug a problem with FreeCAD import of an OpenSCAD file.
see https://forum.freecadweb.org/viewtopic.php?f=3&t=28119&p=228042#p228042
https://forum.freecadweb.org/viewtopic.php?f=3&t=28119&p=228042#p228042
for full details.
One problem seems to be that I have a dxf file with a circle, displays as
circle in LibreCAD.
If in OpenSCAD I import it with
import(file = "file1.dxf");
OpenSCAD creates it as an 8 sided polygon.
Now I understand that OpenSCAD does not do circles just polygons, but my
question is there a way to control the number of elements of an imported dxf
file given there is no $fn involved with an import. Or am I stuck with a
default of 8.
--
Sent from: http://forum.openscad.org/
On 04/16/2018 03:50 PM, KeithSloan52 wrote:
...given there is no $fn involved with an import.
There is the wrong assumption. The import module, and
specifically also the DXF import does use $fa/$fs/$fn
to convert curves to polygons.
Try import("circle.dxf", $fn = 3); and you will even
end up with a triangle instead of a circle.
ciao,
Torsten.
If I try import("circle.dxf", $fn = 12);
I get a 12 sided polygon, but if I try import("circle.dxf", $fn = 0);
It defaults back to 8 sided.
--
Sent from: http://forum.openscad.org/
On Apr 21, 2018, at 3:46 PM, KeithSloan52 keith@sloan-home.co.uk wrote:
If I try import("circle.dxf", $fn = 12);
I get a 12 sided polygon, but if I try import("circle.dxf", $fn = 0);
It defaults back to 8 sided.
That’s correct; $fn=0 disables $fn and it falls back to calculating the number of sides using $fs and $fa.
-Marius
Just a guess, but $fn=0; means no faces, not legal? Going to a default
value seems like proper behaviour in that case.
On Sat, Apr 21, 2018 at 3:46 PM, KeithSloan52 keith@sloan-home.co.uk
wrote:
If I try import("circle.dxf", $fn = 12);
I get a 12 sided polygon, but if I try import("circle.dxf", $fn = 0);
It defaults back to 8 sided.
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
"Rumors of my death have been greatly exaggerated."
-- Jesus Christ
Or that.
On Sat, Apr 21, 2018 at 3:50 PM, Marius Kintel marius@kintel.net wrote:
On Apr 21, 2018, at 3:46 PM, KeithSloan52 keith@sloan-home.co.uk
wrote:
If I try import("circle.dxf", $fn = 12);
I get a 12 sided polygon, but if I try import("circle.dxf", $fn = 0);
It defaults back to 8 sided.
That’s correct; $fn=0 disables $fn and it falls back to calculating the
number of sides using $fs and $fa.
-Marius
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
"Rumors of my death have been greatly exaggerated."
-- Jesus Christ