discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

help with DXF

J
jon
Sat, May 19, 2018 8:12 PM

Anyone willing to help me get a DXF from InkScape into OpenSCAD,
probably offline from the group?

I took a bit mapped image and used InkScape to create an outline of a lake.

Problem 1: the outline is made of about 12 separate "curves" rather than
1.  When I try to Union, extra lines go all over the place (the Union is
not "smart").

Problem 2: I went to make some minor edits to simplify the shape; and

Problem 3: OpenSCAD keeps telling me that it does not know what a Spline is.

I tried using this approach but failed:

https://repraprip.blogspot.com/2011/05/inkscape-to-openscad-dxf-tutorial.html

I rarely use InkScape at all, so most of this is probably rookie errors

Thanks

Jon

Anyone willing to help me get a DXF from InkScape into OpenSCAD, probably offline from the group? I took a bit mapped image and used InkScape to create an outline of a lake. Problem 1: the outline is made of about 12 separate "curves" rather than 1.  When I try to Union, extra lines go all over the place (the Union is not "smart"). Problem 2: I went to make some minor edits to simplify the shape; and Problem 3: OpenSCAD keeps telling me that it does not know what a Spline is. I tried using this approach but failed: https://repraprip.blogspot.com/2011/05/inkscape-to-openscad-dxf-tutorial.html I rarely use InkScape at all, so most of this is probably rookie errors Thanks Jon
NH
nop head
Sat, May 19, 2018 8:25 PM

The best way to get a polygon from InkScape into OpenSCAD is to use the
OpenSCAD plug-in that generates OpenSCAD polygon code. I think it can be
found in Thingiverse.

On 19 May 2018 at 21:12, jon jon@jonbondy.com wrote:

Anyone willing to help me get a DXF from InkScape into OpenSCAD, probably
offline from the group?

I took a bit mapped image and used InkScape to create an outline of a lake.

Problem 1: the outline is made of about 12 separate "curves" rather than

  1. When I try to Union, extra lines go all over the place (the Union is
    not "smart").

Problem 2: I went to make some minor edits to simplify the shape; and

Problem 3: OpenSCAD keeps telling me that it does not know what a Spline
is.

I tried using this approach but failed:

https://repraprip.blogspot.com/2011/05/inkscape-to-openscad-
dxf-tutorial.html

I rarely use InkScape at all, so most of this is probably rookie errors

Thanks

Jon


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

The best way to get a polygon from InkScape into OpenSCAD is to use the OpenSCAD plug-in that generates OpenSCAD polygon code. I think it can be found in Thingiverse. On 19 May 2018 at 21:12, jon <jon@jonbondy.com> wrote: > Anyone willing to help me get a DXF from InkScape into OpenSCAD, probably > offline from the group? > > I took a bit mapped image and used InkScape to create an outline of a lake. > > Problem 1: the outline is made of about 12 separate "curves" rather than > 1. When I try to Union, extra lines go all over the place (the Union is > not "smart"). > > Problem 2: I went to make some minor edits to simplify the shape; and > > Problem 3: OpenSCAD keeps telling me that it does not know what a Spline > is. > > I tried using this approach but failed: > > https://repraprip.blogspot.com/2011/05/inkscape-to-openscad- > dxf-tutorial.html > > I rarely use InkScape at all, so most of this is probably rookie errors > > Thanks > > Jon > > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
MS
Mark Schafer
Sun, May 20, 2018 12:41 AM

Inkscape to openscad extension.
https://www.thingiverse.com/thing:1065500

Inkscape to openscad extension. https://www.thingiverse.com/thing:1065500
A
arnholm@arnholm.org
Sun, May 20, 2018 7:10 AM

On 2018-05-19 22:12, jon wrote:

Anyone willing to help me get a DXF from InkScape into OpenSCAD,
probably offline from the group?

Where is your DXF?

Carsten Arnholm

On 2018-05-19 22:12, jon wrote: > Anyone willing to help me get a DXF from InkScape into OpenSCAD, > probably offline from the group? Where is your DXF? Carsten Arnholm
C
cbernhardt
Sun, May 20, 2018 11:21 AM

The problem is that SPLINE entity in the DXF file is a proprietary AutoCAD
entity.  Only the control points and some other points used by AutoCAD to
define the SPLINE, are listed in the DXF file.  In AutoCAD (at least in the
old version I am using) you cannot "EXPLODE" a SPLINE entity into line and
arc segments, which OpenSCAD understands.  The best you can do with the DXF
file is to edit it and make a list of the control points.  If you look at
the DXF file you will find a series of numbers something like this:
11
239.6191742034261
21
687.9629630664632
31
0.0
11
400.8514297862043
21
778.7037046965735
31
0.0
The number after the "11" is an X coordinate and the number after the "21"
is a Y coordinate of a control point that was used to create the spline.

In the picture below the blue line is the SPLINE and the red lines connect
the control points.
If you can post a link to the DXF file I will see if I can convert it into a
series of short line segments or an AutoCAD POLYLINE, which OpenSCAD can
use.
http://forum.openscad.org/file/t1309/spline.jpg

--
Sent from: http://forum.openscad.org/

The problem is that SPLINE entity in the DXF file is a proprietary AutoCAD entity. Only the control points and some other points used by AutoCAD to define the SPLINE, are listed in the DXF file. In AutoCAD (at least in the old version I am using) you cannot "EXPLODE" a SPLINE entity into line and arc segments, which OpenSCAD understands. The best you can do with the DXF file is to edit it and make a list of the control points. If you look at the DXF file you will find a series of numbers something like this: 11 239.6191742034261 21 687.9629630664632 31 0.0 11 400.8514297862043 21 778.7037046965735 31 0.0 The number after the "11" is an X coordinate and the number after the "21" is a Y coordinate of a control point that was used to create the spline. In the picture below the blue line is the SPLINE and the red lines connect the control points. If you can post a link to the DXF file I will see if I can convert it into a series of short line segments or an AutoCAD POLYLINE, which OpenSCAD can use. <http://forum.openscad.org/file/t1309/spline.jpg> -- Sent from: http://forum.openscad.org/
J
jon
Sun, May 20, 2018 11:47 AM

Fred helped me.  In the end, he ignored my poorly crafted DXF and
created his own from my bitmap file.

Thank you, Fred!

Jon

On 5/20/2018 3:10 AM, arnholm@arnholm.org wrote:

On 2018-05-19 22:12, jon wrote:

Anyone willing to help me get a DXF from InkScape into OpenSCAD,
probably offline from the group?

Where is your DXF?

Carsten Arnholm

Fred helped me.  In the end, he ignored my poorly crafted DXF and created his own from my bitmap file. Thank you, Fred! Jon On 5/20/2018 3:10 AM, arnholm@arnholm.org wrote: > On 2018-05-19 22:12, jon wrote: >> Anyone willing to help me get a DXF from InkScape into OpenSCAD, >> probably offline from the group? > > Where is your DXF? > > Carsten Arnholm > >
R
Rick
Sun, May 20, 2018 4:23 PM

Yes, the routine needs to break down curves.  SVG input as well.

On Sat, May 19, 2018 at 4:12 PM, jon jon@jonbondy.com wrote:

Anyone willing to help me get a DXF from InkScape into OpenSCAD, probably
offline from the group?

I took a bit mapped image and used InkScape to create an outline of a lake.

Problem 1: the outline is made of about 12 separate "curves" rather than

  1. When I try to Union, extra lines go all over the place (the Union is
    not "smart").

Problem 2: I went to make some minor edits to simplify the shape; and

Problem 3: OpenSCAD keeps telling me that it does not know what a Spline
is.

I tried using this approach but failed:

https://repraprip.blogspot.com/2011/05/inkscape-to-openscad-
dxf-tutorial.html

I rarely use InkScape at all, so most of this is probably rookie errors

Thanks

Jon


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

Yes, the routine needs to break down curves. SVG input as well. On Sat, May 19, 2018 at 4:12 PM, jon <jon@jonbondy.com> wrote: > Anyone willing to help me get a DXF from InkScape into OpenSCAD, probably > offline from the group? > > I took a bit mapped image and used InkScape to create an outline of a lake. > > Problem 1: the outline is made of about 12 separate "curves" rather than > 1. When I try to Union, extra lines go all over the place (the Union is > not "smart"). > > Problem 2: I went to make some minor edits to simplify the shape; and > > Problem 3: OpenSCAD keeps telling me that it does not know what a Spline > is. > > I tried using this approach but failed: > > https://repraprip.blogspot.com/2011/05/inkscape-to-openscad- > dxf-tutorial.html > > I rarely use InkScape at all, so most of this is probably rookie errors > > Thanks > > Jon > > > _______________________________________________ > 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