Does OpenSCAD have the capability to produce simple shape outlines vs a filled-in shape?
I need to create a model that contains multiple concentric circles that I can export as an SVG or DXF file?
If I do:
for (i=[1:1:10]) {
circle(d=I\*10) ;
}
All I see is a 100mm circle. The other 9 are lost under the larger one.
Is such doable in OpenSCAD or must I look for another program?
Mike
If you're willing to consider OpenPythonSCAD:
I've worked up a technique for making arbitrary DXF files:
https://forum.makerforums.info/t/rewriting-gcodepreview-with-python/88617/28
using the library I've been writing:
https://github.com/WillAdams/gcodepreview
haven't done an upload recently, but the current version is in the issue/discussion:
https://github.com/gsohler/openscad/issues/50
William
--
Sphinx of black quartz, judge my vow
https://designinto3d.com/
Primitive shapes are filled in. If you just want the outline, create a difference with a slightly smaller shape.
for (i=[1:1:10])
{
difference()
{
circle(d=i10) ;
offset(-0.1)
circle(d=i10) ;
}
}
Use difference() !
for (i=[1:2:10])
{
difference()
{
circle(d=(i+1)*10) ;
circle(d=(i)*10) ;
}
}
Am 12.12.24 um 16:53 schrieb mike.fraser.1945+osc--- via Discuss:
Does OpenSCAD have the capability to produce simple shape outlines vs
a filled-in shape?
I need to create a model that contains multiple concentric circles
that I can export as an SVG or DXF file?
If //I do:
for (i=[1:1:10]) {
circle(d=I*10) ;
}
All I see is a 100mm circle. The other 9 are lost under the larger one.
Is such doable in OpenSCAD or must I look for another program?
Mike
OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org
On 12/12/2024 7:53 AM, mike.fraser.1945+osc--- via Discuss wrote:
Does OpenSCAD have the capability to produce simple shape outlines vs
a filled-in shape?
No. As others have said, you can make a 2D donut - formally, an annulus
(yes, I had to look it up) - by differencing circles, but that's not an
outline per se.
OpenSCAD has only solid shapes - filled-in polygons in 2D, and filled-in
polyhedra in 3D. (Incomplete polyhedra excepted; they don't really work
with the operators.)
There's a proposal to do various non-solid objects in
OEP7: Mixed Dimension Geometry Support
https://github.com/openscad/openscad/wiki/OEP7%3A-Mixed-Dimension-Geometry-Support
but I don't think it's gotten a lot of attention recently.
What you want is a scripting interface for Inkscape, but I'm not aware
of one.
On 12/12/2024 7:53 AM, mike.fraser.1945+osc--- via Discuss wrote:
What you want is a scripting interface for Inkscape, but I'm not aware of one.
On 12/12/2024 11:42 AM, William F. Adams via Discuss wrote:
On 12/12/2024 7:53 AM, mike.fraser.1945+osc--- via Discuss wrote:
What you want is a scripting interface for Inkscape, but I'm not aware of one.
Cool, thanks!