discuss@lists.openscad.org

OpenSCAD general discussion

View all threads

How good is FreeCad's OpenSCAD Workbench?

I
infocean
Sat, Apr 3, 2021 4:18 AM

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
http://forum.openscad.org/file/t3166/Screen_Shot_2021-04-03_at_12.png

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

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 <http://forum.openscad.org/file/t3166/Screen_Shot_2021-04-03_at_12.png> -- Sent from: http://forum.openscad.org/
RW
Ray West
Sat, Apr 3, 2021 10:27 AM

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?

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?
((
(null) (null)
Sat, Apr 3, 2021 5:40 PM

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 raywest@raywest.com 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 discuss-leave@lists.openscad.org

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 <raywest@raywest.com> 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 discuss-leave@lists.openscad.org
DE
David Eccles (gringer)
Sun, Apr 4, 2021 12:00 AM

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:

http://forum.openscad.org/file/t452/channel_turbine_halfSphere_openSCAD.png

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

http://forum.openscad.org/file/t452/channel_turbine_halfSphere_bw.png

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

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: <http://forum.openscad.org/file/t452/channel_turbine_halfSphere_openSCAD.png> And here's the image put through my converter script, with fill and stroke modified in Inkscape to be B+W: <http://forum.openscad.org/file/t452/channel_turbine_halfSphere_bw.png> -- Sent from: http://forum.openscad.org/
((
(null) (null)
Sun, Apr 4, 2021 2:32 AM

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) bioinformatics@gringene.org wrote:

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

https://gitlab.com/gringer/bioinfscripts/-/blob/master/stl2svg.pl 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:

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

Sent from the OpenSCAD mailing list archive http://forum.openscad.org/ at Nabble.com.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

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) <bioinformatics@gringene.org> wrote: > > Just in case it helps, I've created an STL to SVG perl script: > > https://gitlab.com/gringer/bioinfscripts/-/blob/master/stl2svg.pl <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: > > > > And here's the image put through my converter script, with fill and stroke modified in Inkscape to be B+W: > > > Sent from the OpenSCAD mailing list archive <http://forum.openscad.org/> at Nabble.com. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org