Efficient generation of many PNG images from command line?

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

Re: Problem with SVG import

OpenSCAD mailing list-2
Because LightBurn laser cutting software supports SVG files, I imported the blade into it and discovered there are two paths coincidental. That may be a factor in your problem?

On Friday, February 5, 2021, 6:02:25 PM EST, Hugo Jackson <[hidden email]> wrote:


Here’s a screen cap of path I manually constructed in inkscape…



It’s supposed to be filled in with no outline and after lots of pulling my hair out I finally discovered that the ‘problem’ is that i created the points in the ‘wrong’ order and the ‘solution' was to “reverse” the direction of the path (Menu: Path/Reverse). That gave me what I was looking for…



However when I import the SVG file into OpenSCAD (RC6) all I’m able to get is the outline and not the filled object. I’ve tried a variety of solutions (importing the original non-reversed path), saving in another format, loading that format, then saving in svg, etc. etc. But no luck, OpenSCAD still gives me this:




Anyone have any ideas, suggestions, thoughts on how to get OpenSCAD to preview/render this properly?

I’ve attached the SVG file as well.


_______________________________________________
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: Problem with SVG import

boxcarmib
Thanks for taking a look. I’ve gone over my steps and even looked at the list of objects that inkscape thinks it has in the file and it’s only one path, so I don’t know where that coincident path may be coming from. very odd.



On Feb 5, 2021, at 3:14 PM, fred via Discuss <[hidden email]> wrote:

Because LightBurn laser cutting software supports SVG files, I imported the blade into it and discovered there are two paths coincidental. That may be a factor in your problem?

On Friday, February 5, 2021, 6:02:25 PM EST, Hugo Jackson <[hidden email]> wrote:


Here’s a screen cap of path I manually constructed in inkscape…



It’s supposed to be filled in with no outline and after lots of pulling my hair out I finally discovered that the ‘problem’ is that i created the points in the ‘wrong’ order and the ‘solution' was to “reverse” the direction of the path (Menu: Path/Reverse). That gave me what I was looking for…



However when I import the SVG file into OpenSCAD (RC6) all I’m able to get is the outline and not the filled object. I’ve tried a variety of solutions (importing the original non-reversed path), saving in another format, loading that format, then saving in svg, etc. etc. But no luck, OpenSCAD still gives me this:




Anyone have any ideas, suggestions, thoughts on how to get OpenSCAD to preview/render this properly?

I’ve attached the SVG file as well.


_______________________________________________
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: Problem with SVG import

tsingi
In reply to this post by OpenSCAD mailing list-2
Because I'm one of the authors of SVG I opened it and looked at it.  There is only one path but it has a break (a move) in it, so it acts like two paths.  For all intents and purposes it is two paths which will affect fill algorithms.

I used to like InkScape but I find it doesn't work as well as it used to.  

This is likely the offending bit: "m 0.002,0.2636698"  A very small relative move that starts a new sub path.

If I just take that out it seems to render the same in Inkscape, it may solve your problem.  Certainly the occurrence of a new sub path seems like something you don't want when a simple outline is required.

I've attached the svg file with that bit removed, hopefully it will work for you.

On Fri, Feb 5, 2021 at 6:15 PM fred via Discuss <[hidden email]> wrote:
Because LightBurn laser cutting software supports SVG files, I imported the blade into it and discovered there are two paths coincidental. That may be a factor in your problem?

On Friday, February 5, 2021, 6:02:25 PM EST, Hugo Jackson <[hidden email]> wrote:


Here’s a screen cap of path I manually constructed in inkscape…



It’s supposed to be filled in with no outline and after lots of pulling my hair out I finally discovered that the ‘problem’ is that i created the points in the ‘wrong’ order and the ‘solution' was to “reverse” the direction of the path (Menu: Path/Reverse). That gave me what I was looking for…



However when I import the SVG file into OpenSCAD (RC6) all I’m able to get is the outline and not the filled object. I’ve tried a variety of solutions (importing the original non-reversed path), saving in another format, loading that format, then saving in svg, etc. etc. But no luck, OpenSCAD still gives me this:




Anyone have any ideas, suggestions, thoughts on how to get OpenSCAD to preview/render this properly?

I’ve attached the SVG file as well.


_______________________________________________
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

hairDryer.svg (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Problem with SVG import

tsingi
On re-reading what Fred said I made another edit, the remainder is coincidental, try this one...

On Fri, Feb 5, 2021 at 8:16 PM Rick <[hidden email]> wrote:
Because I'm one of the authors of SVG I opened it and looked at it.  There is only one path but it has a break (a move) in it, so it acts like two paths.  For all intents and purposes it is two paths which will affect fill algorithms.

I used to like InkScape but I find it doesn't work as well as it used to.  

This is likely the offending bit: "m 0.002,0.2636698"  A very small relative move that starts a new sub path.

If I just take that out it seems to render the same in Inkscape, it may solve your problem.  Certainly the occurrence of a new sub path seems like something you don't want when a simple outline is required.

I've attached the svg file with that bit removed, hopefully it will work for you.

On Fri, Feb 5, 2021 at 6:15 PM fred via Discuss <[hidden email]> wrote:
Because LightBurn laser cutting software supports SVG files, I imported the blade into it and discovered there are two paths coincidental. That may be a factor in your problem?

On Friday, February 5, 2021, 6:02:25 PM EST, Hugo Jackson <[hidden email]> wrote:


Here’s a screen cap of path I manually constructed in inkscape…



It’s supposed to be filled in with no outline and after lots of pulling my hair out I finally discovered that the ‘problem’ is that i created the points in the ‘wrong’ order and the ‘solution' was to “reverse” the direction of the path (Menu: Path/Reverse). That gave me what I was looking for…



However when I import the SVG file into OpenSCAD (RC6) all I’m able to get is the outline and not the filled object. I’ve tried a variety of solutions (importing the original non-reversed path), saving in another format, loading that format, then saving in svg, etc. etc. But no luck, OpenSCAD still gives me this:




Anyone have any ideas, suggestions, thoughts on how to get OpenSCAD to preview/render this properly?

I’ve attached the SVG file as well.


_______________________________________________
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

hairDryerBlade.svg (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Problem with SVG import

boxcarmib
Hey, thanks Rick… the 2nd file you sent works great. Any advice you could offer as to avoiding this in future would be appreciated… I don’t know what I did wrong and I don’t know SVG that I would be able to debug it as you have, so it would be helpful if you were able to point out where the stove is hot so I don’t touch it. :)


> On Feb 5, 2021, at 5:35 PM, Rick <[hidden email]> wrote:
>
> <hairDryerBlade.svg>


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

Re: Problem with SVG import

tsingi
I suppose, try and not edit too much, if you get something that's squirrely, it's a do over.

Kudos to Fred for mentioning the coincident path segments, that forest is hard to see when you're looking at the trees.
Refer to my comment on how I used to like InkScape.  It just seems to do stuff you don't want it to do.  I haven't really used it much in the last decade so it might be better now.
I use SVG a lot but I generate most of it, so it's all squeaky clean.  (or completely broken, which is easy to notice)
This is all too bad because SVG is pretty cool but it's damned hard for the uninitiated to work with.

On Fri, Feb 5, 2021 at 10:17 PM Hugo Jackson <[hidden email]> wrote:
Hey, thanks Rick… the 2nd file you sent works great. Any advice you could offer as to avoiding this in future would be appreciated… I don’t know what I did wrong and I don’t know SVG that I would be able to debug it as you have, so it would be helpful if you were able to point out where the stove is hot so I don’t touch it. :)


> On Feb 5, 2021, at 5:35 PM, Rick <[hidden email]> wrote:
>
> <hairDryerBlade.svg>


_______________________________________________
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: Problem with SVG import

OpenSCAD mailing list-2
In reply to this post by boxcarmib
Opening the SVG file in inkscape 0.92 and setting the fill to none resulted in no visual indications of two paths. I had to ungroup multiple times, then use break apart to provide for two independent paths. Prior to the ungrouping, I was able to use the node tool to pull one of the paths into an offset situation. There appears to be no joined segments, but the two paths present as one until the nodes are moved.

Did you generate this file from a bitmap trace? I use vector magic occasionally and it always creates two identical paths. Perhaps other tracing software does similar.

On Friday, February 5, 2021, 11:27:46 PM EST, Hugo Jackson <[hidden email]> wrote:


Thanks for taking a look. I’ve gone over my steps and even looked at the list of objects that inkscape thinks it has in the file and it’s only one path, so I don’t know where that coincident path may be coming from. very odd.



On Feb 5, 2021, at 3:14 PM, fred via Discuss <[hidden email]> wrote:

Because LightBurn laser cutting software supports SVG files, I imported the blade into it and discovered there are two paths coincidental. That may be a factor in your problem?

On Friday, February 5, 2021, 6:02:25 PM EST, Hugo Jackson <[hidden email]> wrote:


Here’s a screen cap of path I manually constructed in inkscape…



It’s supposed to be filled in with no outline and after lots of pulling my hair out I finally discovered that the ‘problem’ is that i created the points in the ‘wrong’ order and the ‘solution' was to “reverse” the direction of the path (Menu: Path/Reverse). That gave me what I was looking for…



However when I import the SVG file into OpenSCAD (RC6) all I’m able to get is the outline and not the filled object. I’ve tried a variety of solutions (importing the original non-reversed path), saving in another format, loading that format, then saving in svg, etc. etc. But no luck, OpenSCAD still gives me this:




Anyone have any ideas, suggestions, thoughts on how to get OpenSCAD to preview/render this properly?

I’ve attached the SVG file as well.


_______________________________________________
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

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

Re: Problem with SVG import

boxcarmib
Hi Fred…
I created it manually… i.e. i loaded up a photo of the part (a fan blade for a hair dryer actually) and then just dropped points and pulled handles and finished up by clicking on the point I created first.
I presumed my error was in creating the points in a counter-clockwise manner but I guess I must have done something else like, well i don’t know, clicked twice somewhere or something and that created a superfluous point.
I’ve been using Inkscape 1.0.1 as a consequence of Adobe going to a full subscription model and the Mac OS no longer supporting 32 bit apps… I was fairly familiar with Illustrator and am finding Inkscape a little cumbersome, but the price is right. :)


On Feb 6, 2021, at 3:33 AM, fred via Discuss <[hidden email]> wrote:

Opening the SVG file in inkscape 0.92 and setting the fill to none resulted in no visual indications of two paths. I had to ungroup multiple times, then use break apart to provide for two independent paths. Prior to the ungrouping, I was able to use the node tool to pull one of the paths into an offset situation. There appears to be no joined segments, but the two paths present as one until the nodes are moved.

Did you generate this file from a bitmap trace? I use vector magic occasionally and it always creates two identical paths. Perhaps other tracing software does similar.

On Friday, February 5, 2021, 11:27:46 PM EST, Hugo Jackson <[hidden email]> wrote:


Thanks for taking a look. I’ve gone over my steps and even looked at the list of objects that inkscape thinks it has in the file and it’s only one path, so I don’t know where that coincident path may be coming from. very odd.

<Screen Shot 2021-02-05 at 3.34.12 PM.png>

On Feb 5, 2021, at 3:14 PM, fred via Discuss <[hidden email]> wrote:

Because LightBurn laser cutting software supports SVG files, I imported the blade into it and discovered there are two paths coincidental. That may be a factor in your problem?

On Friday, February 5, 2021, 6:02:25 PM EST, Hugo Jackson <[hidden email]> wrote:


Here’s a screen cap of path I manually constructed in inkscape…



It’s supposed to be filled in with no outline and after lots of pulling my hair out I finally discovered that the ‘problem’ is that i created the points in the ‘wrong’ order and the ‘solution' was to “reverse” the direction of the path (Menu: Path/Reverse). That gave me what I was looking for…



However when I import the SVG file into OpenSCAD (RC6) all I’m able to get is the outline and not the filled object. I’ve tried a variety of solutions (importing the original non-reversed path), saving in another format, loading that format, then saving in svg, etc. etc. But no luck, OpenSCAD still gives me this:




Anyone have any ideas, suggestions, thoughts on how to get OpenSCAD to preview/render this properly?

I’ve attached the SVG file as well.


_______________________________________________
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
<Screen Shot 2021-02-05 at 3.34.12 PM.png>_______________________________________________
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
123