AI to DXF or SVG

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

AI to DXF or SVG

jon_bondy
I have an Adobe Illustrator file that I wish to import into OpenSCAD.  I
loaded it into InkScape, and saved it as both SVG and DXF, but neither
file format would import successfully into OpenSCAD (I tried all 3 SVG
variants).  Anyone done this before with better results?  Any
recommendations?

Thanks!

Jon


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: AI to DXF or SVG

William Adams-2
Best way to get vector files I've found is to:

 - save as SVG
 - open in Inkscape

On Thu, Jun 15, 2017 at 3:18 PM, jon <[hidden email]> wrote:
I have an Adobe Illustrator file that I wish to import into OpenSCAD.  I loaded it into InkScape, and saved it as both SVG and DXF, but neither file format would import successfully into OpenSCAD (I tried all 3 SVG variants).  Anyone done this before with better results?  Any recommendations?

Thanks!

Jon


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: AI to DXF or SVG

Whosawhatsis
In reply to this post by jon_bondy
Inkscape always seems to fail for me in one way or another. This works, though: https://www.thingiverse.com/thing:69563



From: jon [hidden email]
Reply: OpenSCAD general discussion [hidden email]
Date: June 15, 2017 at 12:19:34
To: OpenSCAD general discussion [hidden email]
Subject:  [OpenSCAD] AI to DXF or SVG

I have an Adobe Illustrator file that I wish to import into OpenSCAD. I
loaded it into InkScape, and saved it as both SVG and DXF, but neither
file format would import successfully into OpenSCAD (I tried all 3 SVG
variants). Anyone done this before with better results? Any
recommendations?

Thanks!

Jon


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: AI to DXF or SVG

Hypher
In reply to this post by William Adams-2
You can use the attached Illustrator script that I built starting from the work of https://github.com/anonlethal-jerk. It has lots of (hopefully clear) options and will directly generate pretty decent OpenSCAD code with lots of metadata so you can easily work with the result. Just select the shapes you want to export and run the script.

~ Yona

On Jun 15, 2017, at 12:31, William Adams <[hidden email]> wrote:

Best way to get vector files I've found is to:

 - save as SVG
 - open in Inkscape

On Thu, Jun 15, 2017 at 3:18 PM, jon <[hidden email]> wrote:
I have an Adobe Illustrator file that I wish to import into OpenSCAD.  I loaded it into InkScape, and saved it as both SVG and DXF, but neither file format would import successfully into OpenSCAD (I tried all 3 SVG variants).  Anyone done this before with better results?  Any recommendations?

Thanks!

Jon


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

paths_to_scad3.jsx (28K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: AI to DXF or SVG

kintel
Administrator
In reply to this post by jon_bondy
> On Jun 15, 2017, at 15:18, jon <[hidden email]> wrote:
>
> I have an Adobe Illustrator file that I wish to import into OpenSCAD.  I loaded it into InkScape, and saved it as both SVG and DXF, but neither file format would import successfully into OpenSCAD (I tried all 3 SVG variants).  Anyone done this before with better results?  Any recommendations?
>
If you could provide an (as minimal as possible) example of an Illustrator file, and the 3 SVG variants in the form of a Github issue, that would be helpful in terms of debugging and fixing this.

 -Marius


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: AI to DXF or SVG

Neon22
This scad export extension for inkscape works very well.
- nested boundaries, lines, solids, etc
- https://www.thingiverse.com/thing:1065500


On 6/16/2017 11:56 AM, Marius Kintel wrote:

>> On Jun 15, 2017, at 15:18, jon <[hidden email]> wrote:
>>
>> I have an Adobe Illustrator file that I wish to import into OpenSCAD.  I loaded it into InkScape, and saved it as both SVG and DXF, but neither file format would import successfully into OpenSCAD (I tried all 3 SVG variants).  Anyone done this before with better results?  Any recommendations?
>>
> If you could provide an (as minimal as possible) example of an Illustrator file, and the 3 SVG variants in the form of a Github issue, that would be helpful in terms of debugging and fixing this.
>
>   -Marius
>
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
> ---
> This email has been checked for viruses by AVG.
> http://www.avg.com
>
>


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: AI to DXF or SVG

alexgibson
Get the Inkscape plugin:   OpenSCAD DXF output.  Does what it says on the
tin ;)

https://www.thingiverse.com/thing:14221


-----Original Message-----
From: Discuss [mailto:[hidden email]] On Behalf Of Mark
Schafer
Sent: 16 June 2017 01:01
To: [hidden email]
Subject: Re: [OpenSCAD] AI to DXF or SVG

This scad export extension for inkscape works very well.
- nested boundaries, lines, solids, etc
- https://www.thingiverse.com/thing:1065500


On 6/16/2017 11:56 AM, Marius Kintel wrote:
>> On Jun 15, 2017, at 15:18, jon <[hidden email]> wrote:
>>
>> I have an Adobe Illustrator file that I wish to import into OpenSCAD.  I
loaded it into InkScape, and saved it as both SVG and DXF, but neither file
format would import successfully into OpenSCAD (I tried all 3 SVG variants).
Anyone done this before with better results?  Any recommendations?
>>
> If you could provide an (as minimal as possible) example of an Illustrator
file, and the 3 SVG variants in the form of a Github issue, that would be
helpful in terms of debugging and fixing this.

>
>   -Marius
>
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
> ---
> This email has been checked for viruses by AVG.
> http://www.avg.com
>
>


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: AI to DXF or SVG

algotruneman
In reply to this post by Neon22
On 06/15/2017 08:01 PM, Mark Schafer wrote:
> This scad export extension for inkscape works very well.
> - nested boundaries, lines, solids, etc
> - https://www.thingiverse.com/thing:1065500
I second this recommendation. Good results for many polygons.


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: AI to DXF or SVG

Greg Frost
I have had good success just by saving as Dxf without any plugin. The key is to first select all points, and if you have any curves, insert enough extra points so that the curves are adequately represented, and then just convert all segments to straight lines. If all you have is straight lines, Inkscape's native dxf save seems to work.

> On 16 Jun 2017, at 11:41 pm, Algot Runeman <[hidden email]> wrote:
>
>> On 06/15/2017 08:01 PM, Mark Schafer wrote:
>> This scad export extension for inkscape works very well.
>> - nested boundaries, lines, solids, etc
>> - https://www.thingiverse.com/thing:1065500
> I second this recommendation. Good results for many polygons.
>
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: AI to DXF or SVG

daaron
In reply to this post by Hypher
I know this thread is a couple of years old, but I just tried the
paths_to_scad3.jsx Illustrator script, and it was a breeze. No need to
install Inkscape (which I find very clunky) - instead just move the JSX file
to the *Adobe Illustrator CS6⁩ ▸ ⁨Presets⁩ ▸ ⁨en_US⁩ ▸ ⁨Scripts⁩* folder.
Then, select the paths you want to export, and select *File ▸ ⁨Scripts ▸
⁨paths_to_scad3*. Super easy, and the results are terrific.

Tip: if you have line art, select *Object ▸ ⁨Path ▸ ⁨Outline Stroke* to
create outline paths that work beautifully with the script. You don't even
need to use linear_extrude in scad!

Thanks!



Hypher wrote
> You can use the attached Illustrator script that I built...
>
> paths_to_scad3.jsx (28K)
> &lt;http://forum.openscad.org/attachment/21701/0/paths_to_scad3.jsx&gt;





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

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: AI to DXF or SVG

fred_dot_u
@daaron
I've located and installed the script you've suggested. It's certainly a
simple process and appears on my scripts list from the AI menu system.

The first time I tested it, I didn't use the Object/Path/Outline Stroke
sequence, but the primitives I created are probably paths anyway. The second
time, after re-reading your post, I followed the above sequence.

In both cases, the results are the same, a 1mm preview and a 0mm tall
render. I had to use linear_extrude() to create a solid.

I had to add a call to the (in this example) module octagon(); to generate
anything as there's no generation that's clear to me. I am far from a
proficient OpenSCAD user, however.

Am I missing something?



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

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: AI to DXF or SVG

daaron
Hey Fred, my bad - it is, of course, a 2D object and needs linear_extrude()
to make it 3D. Don't know what I was thinking ;)

And yes, the exported code is effectively a library; you need to add the
line indicated at the top of the generated comments (or "use" it from
another file) to generate the shape.



fred_dot_u wrote
> In both cases, the results are the same, a 1mm preview and a 0mm tall
> render. I had to use linear_extrude() to create a solid.





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

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: AI to DXF or SVG

fred_dot_u
Even though some have expressed dissatisfaction with Inkscape, I've been
using the Inkscape extension Paths to OpenSCAD for some time. It also needs
a bit of a massage when one has nested shapes, as all the shapes become
polyhedral codes. It's a straight-forward task to identify which ones should
be holes and which ones should be not-holes, then perform a difference as
appropriate.

I didn't play around with the AI plug-in to see how it handles holes, but
that will be attached to my list of experiments in the near future. If it's
easier than the above sequence, I have a new useful technique.



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

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org