How good is FreeCad's OpenSCAD Workbench?

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

How good is FreeCad's OpenSCAD Workbench?

OpenSCAD mailing list-2
Hi,

I am working on a rotating machine and to able to make black and white images for a patent application I am trying to open it in FreeCad and use its TechDraw Workbench.  When I do that FreeCad show a messed up version of my .scad file.  See attached image /left is OpenSCAD, right is FreeCad /.

Before I sign up for FreeCad User Group, - and potentially bark under the wrong tree -, I am wondering if I need to do something else in OpenSCAD to make the import by FreeCad correct.  

Thanks ahead,
Infocean

Screen_Shot_2021-04-03_at_12.png

Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: How good is FreeCad's OpenSCAD Workbench?

mondo

On 03/04/2021 05:18, infocean via Discuss wrote:
> I am working on a rotating machine and to able to make black and white
> images for a patent application I am trying to open it in FreeCad and
> use its TechDraw Workbench.

That happens, post on their forum at your peril. XD. If you just want
black and white images, is it good enough to paste your png's into Irfan
vierwe, say, and play with the colour depth?

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: How good is FreeCad's OpenSCAD Workbench?

OpenSCAD mailing list-2
Hi Ray,

Not good enough.  I tried that with Preview, ImageJ, and the few others, but when you wanted the eliminate the grayscale the image contrast went out the window.

My recent thinking is to bring the normal png into Inkscape as a layer and draw over it like in older time with white translucent tracing paper over a normal paper drawing.  It will be a pain, but I see no other easier alternatives.

Well, the FreeCad import reported the following warnings :

Warning: Token ‘DOT’ defined, but not used
Warning: Token ‘WORD’ defined, but not used
Warning: There are 2 unused tokens

When in OpeSCAD I do an F5 renderings, there is no warning.  But when I do an F6 rendering, then I get this warning: WARNING: Object may not be a valid 2-manifold and may need repair! 

Question is what is the technique to debug these kind of warnings.  Would be nice to through a line number or God forbid the offending source code into the warning.

Thanks a lot,
Infocean

On Apr 3, 2021, at 6:27 AM, Ray West <[hidden email]> wrote:


On 03/04/2021 05:18, infocean via Discuss wrote:
I am working on a rotating machine and to able to make black and white images for a patent application I am trying to open it in FreeCad and use its TechDraw Workbench.

That happens, post on their forum at your peril. XD. If you just want black and white images, is it good enough to paste your png's into Irfan vierwe, say, and play with the colour depth?

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]


_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: How good is FreeCad's OpenSCAD Workbench?

David Eccles (gringer)
Just in case it helps, I've created an STL to SVG perl script:

https://gitlab.com/gringer/bioinfscripts/-/blob/master/stl2svg.pl

This converts the triangle / polygon mesh from an STL file into SVG paths, shading them based on their angle away from the Z axis, and displaying in Z order based on the centre point of each polygon.

usage: ./stl2svg.pl <input.stl>[:#colour]

Some cleanup may be required due to triangles where the centre point doesn't match the ideal print order.

To simplify the code, it assumes that the viewpoint is from directly above, with no perspective transformations (i.e. looking from [0, 0, Inf]). If you want a different angle, you'll need to pre-rotate the model before creating the STL file.

Here's an example image from OpenSCAD:

Channel turbine, OpenSCAD model

And here's the image put through my converter script, with fill and stroke modified in Inkscape to be B+W:

Channel turbine, STL model

Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: How good is FreeCad's OpenSCAD Workbench?

OpenSCAD mailing list-2
Hi David,

Looks like I have perl 5 on my machine, so tomorrow I will give it a try.

Thanks a lot,
Infocean

On Apr 3, 2021, at 8:00 PM, David Eccles (gringer) <[hidden email]> wrote:

Just in case it helps, I've created an STL to SVG perl script:

https://gitlab.com/gringer/bioinfscripts/-/blob/master/stl2svg.pl

This converts the triangle / polygon mesh from an STL file into SVG paths, shading them based on their angle away from the Z axis, and displaying in Z order based on the centre point of each polygon.

usage: ./stl2svg.pl <input.stl>[:#colour]

Some cleanup may be required due to triangles where the centre point doesn't match the ideal print order.

To simplify the code, it assumes that the viewpoint is from directly above, with no perspective transformations (i.e. looking from [0, 0, Inf]). If you want a different angle, you'll need to pre-rotate the model before creating the STL file.

Here's an example image from OpenSCAD:

Channel turbine, OpenSCAD model

And here's the image put through my converter script, with fill and stroke modified in Inkscape to be B+W:

Channel turbine, STL model

Sent from the OpenSCAD mailing list archive at Nabble.com.
_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]


_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]