Is there any possibility to get a path out of 2D a module?
Asked the other way round: how do I use 2D objects as paths in scripts like
dotSCAD?
I know I could create my own paths, but this is only for basic elements.
Using e.g. difference or offset it's so handy to use OpenSCAD's functions
and at the other side it becomes so far more difficult to do it myself via
paths..
Am Sa., 19. Sept. 2020 um 21:46 Uhr schrieb D.Pank <dietrich.pank@gmail.com
:
Is there any possibility to get a path out of 2D a module?
Asked the other way round: how do I use 2D objects as paths in scripts
like dotSCAD?
I know I could create my own paths, but this is only for basic elements.
Using e.g. difference or offset it's so handy to use OpenSCAD's functions
and at the other side it becomes so far more difficult to do it myself via
paths..
No, it is impossible to extract information about coordinates from geometry.
If you want to use functions that operate on paths you need to build up the
paths as coordinate lists. Note that the BOSL2 library supports offset and
difference operating on paths, though these are difficult to implement and
may not work for odd cases.
https://github.com/revarbat/BOSL2/wiki/regions.scad
dpa wrote
Is there any possibility to get a path out of 2D a module?
Asked the other way round: how do I use 2D objects as paths in scripts
like
dotSCAD?
I know I could create my own paths, but this is only for basic elements.
Using e.g. difference or offset it's so handy to use OpenSCAD's functions
and at the other side it becomes so far more difficult to do it myself via
paths..
--
Sent from: http://forum.openscad.org/
Am Sa., 19. Sept. 2020 um 22:13 Uhr schrieb adrianv avm4@cornell.edu:
[..]
Note that the BOSL2 library supports offset and
difference operating on paths, though these are difficult to implement and
may not work for odd cases.
Wow, that's a lot!
Now I have to read, read, learn how it works and learn how to use and learn
about the functions and names and it's arguments..
But OK. I asked :)
Thank you
I was wondering if OpenSCAD could merge this PR?
https://github.com/openscad/openscad/pull/3288
Sent from: http://forum.openscad.org/
+1
On Sun, 20 Sep 2020 at 04:11, caterpillar caterpillar@openhome.cc wrote:
I was wondering if OpenSCAD could merge this PR?
https://github.com/openscad/openscad/pull/3288
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
adrianv wrote
No, it is impossible to extract information about coordinates from
geometry.
What about a rendered 2D object?
Something like...
function getPath(renderedObject obj){
if(!isRendered(obj)){
printWarning("Object is not rendered, needs to be wrapped in a
'render()' operation");
return ValuePtr::undefined;
}
Polygon2d *outpoly;
// copy rendered points from obj to outpoly
return(outpoly);
}
--
Sent from: http://forum.openscad.org/