Specifically a 2D one, but any object would be good.
A
--
View this message in context: http://forum.openscad.org/Is-there-a-way-to-get-the-points-from-an-object-tp11267.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
I don't believe so, not programmatically in a .scad, you could export to stl
and look in the stl. or dxf??
Unless specifically shown otherwise above, my contribution is in the Public Domain; To the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. This work is published globally via the internet. :) Inclusion of works of previous authors is not included in the above.
View this message in context: http://forum.openscad.org/Is-there-a-way-to-get-the-points-from-an-object-tp11267p11269.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
If your going to do that, have a look at dxf_dim() etc
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/General (down the
bottom). I have never used it.
Unless specifically shown otherwise above, my contribution is in the Public Domain; To the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. This work is published globally via the internet. :) Inclusion of works of previous authors is not included in the above.
View this message in context: http://forum.openscad.org/Is-there-a-way-to-get-the-points-from-an-object-tp11267p11271.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
If you need access to the points of a 2d (or 3d) object than write your own
routines that create e.g. the points of a circle and write your own
plotting routine as well.
Somewhat like this:
fn=16;
// create 2d vector shape: circle
function circv(r=1,fn=32)=
[for(i=[0:fn-1])
[rcos(360i/fn),rsin(360i/fn)]
];
// create 2d vector shape: star
function starv(r1=1,r2=2,fn=32)=
[for(i=[0:(2*fn-1)])
(i%2==0)?
[r1cos(180i/fn),r1sin(180i/fn)]:
[r2cos(180i/fn),r2sin(180i/fn)]
];
// display a 2d vector shape
module dispv(v){
indi=[[for(i=[0:len(v)-1])i]];
polygon(points=v,paths=indi);
}
v0=starv(10,20,fn);
dispv(v0);
echo("circle",v0);
v1=circv(10,fn);
translate([40,0,0])dispv(v1);
echo("star",v1);
2015-01-28 4:55 GMT+01:00 MichaelAtOz oz.at.michael@gmail.com:
If your going to do that, have a look at dxf_dim() etc
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/General (down the
bottom). I have never used it.
Unless specifically shown otherwise above, my contribution is in the
Public Domain; To the extent possible under law, I have waived all
copyright and related or neighbouring rights to this work. This work is
published globally via the internet. :) Inclusion of works of previous
authors is not included in the above.
View this message in context:
http://forum.openscad.org/Is-there-a-way-to-get-the-points-from-an-object-tp11267p11271.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
stempeldergeschichte@googlemail.com karsten@rohrbach.de
P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.
P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.
Enjoy!
See also:
o https://github.com/openscad/scad-utils/blob/master/shapes.scad
o https://github.com/openscad/openscad/issues/630
-Marius