OpenSCAD dimensions with importing to Carbon Create

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

OpenSCAD dimensions with importing to Carbon Create

rglissmann
Any suggestions on using OpenSCAD to create a SVG for importing to Carbon Create? My issue is getting the dimensions that I expect. When I use OpenSCAD print with Cura my metric dimensions are correct. When I mill my creation with Carbon Create/Motion it is a factor of 2.85x smaller than expected.
Reply | Threaded
Open this post in threaded view
|

Re: OpenSCAD dimensions with importing to Carbon Create

nophead
Which version of OpenSCAD are you using?

The latest snapshot outputs SVGs in mm but I think earlier versions missed out the units and probably defaulted to px.

On 12 July 2017 at 00:28, rglissmann <[hidden email]> wrote:
Any suggestions on using OpenSCAD to create a SVG for importing to Carbon
Create? My issue is getting the dimensions that I expect. When I use
OpenSCAD print with Cura my metric dimensions are correct. When I mill my
creation with Carbon Create/Motion it is a factor of 2.85x smaller than
expected.



--
View this message in context: http://forum.openscad.org/OpenSCAD-dimensions-with-importing-to-Carbon-Create-tp21810.html
Sent from the OpenSCAD mailing list archive at Nabble.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: OpenSCAD dimensions with importing to Carbon Create

rglissmann

V2015.3


On Wed, Jul 12, 2017, 3:12 AM nop head <[hidden email]> wrote:
Which version of OpenSCAD are you using?

The latest snapshot outputs SVGs in mm but I think earlier versions missed out the units and probably defaulted to px.

On 12 July 2017 at 00:28, rglissmann <[hidden email]> wrote:
Any suggestions on using OpenSCAD to create a SVG for importing to Carbon
Create? My issue is getting the dimensions that I expect. When I use
OpenSCAD print with Cura my metric dimensions are correct. When I mill my
creation with Carbon Create/Motion it is a factor of 2.85x smaller than
expected.



--
View this message in context: http://forum.openscad.org/OpenSCAD-dimensions-with-importing-to-Carbon-Create-tp21810.html
Sent from the OpenSCAD mailing list archive at Nabble.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

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

Re: OpenSCAD dimensions with importing to Carbon Create

droftarts
Use a newer version, as it was only fixed last year (2016), see: https://github.com/openscad/openscad/issues/1253

Alternatively, you can edit svg files in a text editor to add the units. Here's a guide I wrote a little while ago, with some extra information.

With SVGs, you have to make sure that the units are specified correctly, or you can get your design scaled to some peculiar sizes. The SVG output of OpenSCAD doesn't include the units, so any program opening it assumes that, rather than using mm, it's specified in pixels (see http://www.w3.org/TR/SVG/coords.html#Units ). Both Illustrator and Qcad use 72dpi to do this conversion (a 100mm line incorrectly interpreted as pixels rather than mm comes out 100 * 25.4 / 72 = 35.278mm), while Inkscape uses 90dpi as per the SVG spec (so a 100mm line comes out 100*25.4/90=28.222mm), so it can seem like you end up with scaled artwork if you don't set the units in the SVG file.

However, it's quite easy to change the units from pixels to mm. Open the SVG output from OpenSCAD in a text editor, and change the document 'width' and 'height' in the first couple of lines from no units to mm. eg, edit:

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="846" height="1025" viewBox="-451 -870 846 1025" xmlns="http://www.w3.org/2000/svg" version="1.1">
<title>OpenSCAD Model</title>
...

to...

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="846mm" height="1025mm" viewBox="-451 -870 846 1025" xmlns="http://www.w3.org/2000/svg" version="1.1">
<title>OpenSCAD Model</title>
...

This should then open the SVG the correct size in the various applications.
Reply | Threaded
Open this post in threaded view
|

Re: OpenSCAD dimensions with importing to Carbon Create

rglissmann
Great. I see a development version 2017.01.20 for Windows. Is this the version I should use?

Thanks

On Wed, Jul 12, 2017 at 8:58 AM droftarts <[hidden email]> wrote:
Use a newer version, as it was only fixed last year (2016), see:
https://github.com/openscad/openscad/issues/1253

Alternatively, you can edit svg files in a text editor to add the units.
Here's a guide I wrote a little while ago, with some extra information.

With SVGs, you have to make sure that the units are specified correctly, or
you can get your design scaled to some peculiar sizes. The SVG output of
OpenSCAD doesn't include the units, so any program opening it assumes that,
rather than using mm, it's specified in pixels (see
http://www.w3.org/TR/SVG/coords.html#Units ). Both Illustrator and Qcad use
72dpi to do this conversion (a 100mm line incorrectly interpreted as pixels
rather than mm comes out 100 * 25.4 / 72 = 35.278mm), while Inkscape uses
90dpi as per the SVG spec (so a 100mm line comes out 100*25.4/90=28.222mm),
so it can seem like you end up with scaled artwork if you don't set the
units in the SVG file.

However, it's quite easy to change the units from pixels to mm. Open the SVG
output from OpenSCAD in a text editor, and change the document 'width' and
'height' in the first couple of lines from no units to mm. eg, edit:

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC &quot;-//W3C//DTD SVG 1.1//EN&quot;
&quot;http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd&quot;>
<svg width="846" height="1025" viewBox="-451 -<a href="tel:(870)%20846-1025" value="+18708461025" target="_blank">870 846 1025"
xmlns="http://www.w3.org/2000/svg" version="1.1">
<title>OpenSCAD Model</title>
...

to...

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC &quot;-//W3C//DTD SVG 1.1//EN&quot;
&quot;http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd&quot;>
<svg width="846mm" height="1025mm" viewBox="-451 -<a href="tel:(870)%20846-1025" value="+18708461025" target="_blank">870 846 1025"
xmlns="http://www.w3.org/2000/svg" version="1.1">
<title>OpenSCAD Model</title>
...

This should then open the SVG the correct size in the various applications.



--
View this message in context: http://forum.openscad.org/OpenSCAD-dimensions-with-importing-to-Carbon-Create-tp21810p21814.html
Sent from the OpenSCAD mailing list archive at Nabble.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: OpenSCAD dimensions with importing to Carbon Create

rglissmann
I used the development version with Carbide Create and everything works! Thanks

On Wed, Jul 12, 2017 at 9:41 AM Randy Glissmann <[hidden email]> wrote:
Great. I see a development version 2017.01.20 for Windows. Is this the version I should use?

Thanks

On Wed, Jul 12, 2017 at 8:58 AM droftarts <[hidden email]> wrote:
Use a newer version, as it was only fixed last year (2016), see:
https://github.com/openscad/openscad/issues/1253

Alternatively, you can edit svg files in a text editor to add the units.
Here's a guide I wrote a little while ago, with some extra information.

With SVGs, you have to make sure that the units are specified correctly, or
you can get your design scaled to some peculiar sizes. The SVG output of
OpenSCAD doesn't include the units, so any program opening it assumes that,
rather than using mm, it's specified in pixels (see
http://www.w3.org/TR/SVG/coords.html#Units ). Both Illustrator and Qcad use
72dpi to do this conversion (a 100mm line incorrectly interpreted as pixels
rather than mm comes out 100 * 25.4 / 72 = 35.278mm), while Inkscape uses
90dpi as per the SVG spec (so a 100mm line comes out 100*25.4/90=28.222mm),
so it can seem like you end up with scaled artwork if you don't set the
units in the SVG file.

However, it's quite easy to change the units from pixels to mm. Open the SVG
output from OpenSCAD in a text editor, and change the document 'width' and
'height' in the first couple of lines from no units to mm. eg, edit:

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC &quot;-//W3C//DTD SVG 1.1//EN&quot;
&quot;http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd&quot;>
<svg width="846" height="1025" viewBox="-451 -<a href="tel:(870)%20846-1025" value="+18708461025" target="_blank">870 846 1025"
xmlns="http://www.w3.org/2000/svg" version="1.1">
<title>OpenSCAD Model</title>
...

to...

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC &quot;-//W3C//DTD SVG 1.1//EN&quot;
&quot;http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd&quot;>
<svg width="846mm" height="1025mm" viewBox="-451 -<a href="tel:(870)%20846-1025" value="+18708461025" target="_blank">870 846 1025"
xmlns="http://www.w3.org/2000/svg" version="1.1">
<title>OpenSCAD Model</title>
...

This should then open the SVG the correct size in the various applications.



--
View this message in context: http://forum.openscad.org/OpenSCAD-dimensions-with-importing-to-Carbon-Create-tp21810p21814.html
Sent from the OpenSCAD mailing list archive at Nabble.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: OpenSCAD dimensions with importing to Carbon Create

Neon22
In reply to this post by droftarts
In inkscape 0.92 - the current one - the default for dpi has changed to
96 to meet the industry standard.
Internally units are in mm. So my extensions seem to be in 1:1 units to
mm. All my old extensions are now the wrong size :(


On 7/13/2017 2:57 AM, droftarts wrote:

> Use a newer version, as it was only fixed last year (2016), see:
> https://github.com/openscad/openscad/issues/1253
>
> Alternatively, you can edit svg files in a text editor to add the units.
> Here's a guide I wrote a little while ago, with some extra information.
>
> With SVGs, you have to make sure that the units are specified correctly, or
> you can get your design scaled to some peculiar sizes. The SVG output of
> OpenSCAD doesn't include the units, so any program opening it assumes that,
> rather than using mm, it's specified in pixels (see
> http://www.w3.org/TR/SVG/coords.html#Units ). Both Illustrator and Qcad use
> 72dpi to do this conversion (a 100mm line incorrectly interpreted as pixels
> rather than mm comes out 100 * 25.4 / 72 = 35.278mm), while Inkscape uses
> 90dpi as per the SVG spec (so a 100mm line comes out 100*25.4/90=28.222mm),
> so it can seem like you end up with scaled artwork if you don't set the
> units in the SVG file.
>
> However, it's quite easy to change the units from pixels to mm. Open the SVG
> output from OpenSCAD in a text editor, and change the document 'width' and
> 'height' in the first couple of lines from no units to mm. eg, edit:
>
> <?xml version="1.0" standalone="no"?>
> <!DOCTYPE svg PUBLIC &quot;-//W3C//DTD SVG 1.1//EN&quot;
> &quot;http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd&quot;>
> <svg width="846" height="1025" viewBox="-451 -870 846 1025"
> xmlns="http://www.w3.org/2000/svg" version="1.1">
> <title>OpenSCAD Model</title>
> ...
>
> to...
>
> <?xml version="1.0" standalone="no"?>
> <!DOCTYPE svg PUBLIC &quot;-//W3C//DTD SVG 1.1//EN&quot;
> &quot;http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd&quot;>
> <svg width="846mm" height="1025mm" viewBox="-451 -870 846 1025"
> xmlns="http://www.w3.org/2000/svg" version="1.1">
> <title>OpenSCAD Model</title>
> ...
>
> This should then open the SVG the correct size in the various applications.
>
>
>
> --
> View this message in context: http://forum.openscad.org/OpenSCAD-dimensions-with-importing-to-Carbon-Create-tp21810p21814.html
> Sent from the OpenSCAD mailing list archive at Nabble.com.
>
> _______________________________________________
> 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