discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Sorting a vector of points

L
lar3ry
Wed, Dec 30, 2020 8:49 PM

adrianv wrote

I think that "x> or y>" was a terse restatement of lexicographic sort,
meaning that you apply the compound condition, not one condition or the
other one.

OK. I took it as meaning single axes, and I was thinking that this could
produce a bounding box.

<quote.
I'm not sure what you want the bounding box of.  If you have a point set you
can get its bounding box.  If you're doing operations to the point set that
give you a new point set you would calculate the bounding box from the final
results.  Note that it is possible to compute a bounding box geometrically.
(BOSL2 has a module that does this.)  I'm not sure how fast it is, though.
</quote>

Not sure what you mean by a "point set". I'm definitely a novice in this
area.

I'd like a bounding box of the final object or objects, but after preview.
So an ideal result would be to be able to echo nMin, nMax, (where n is an
axis), and/or the length of the objects axes.

It's easy enough to do with a program run against an ASCII stl, but it would
be nice if it could be done in OpenSCAD.

Barring that, a center parameter for import() would be nice. That's mostly
what I would use a bounding box for.

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

adrianv wrote > I think that "x> or y>" was a terse restatement of lexicographic sort, > meaning that you apply the compound condition, not one condition or the > other one. OK. I took it as meaning single axes, and I was thinking that this could produce a bounding box. <quote. I'm not sure what you want the bounding box of. If you have a point set you can get its bounding box. If you're doing operations to the point set that give you a new point set you would calculate the bounding box from the final results. Note that it is possible to compute a bounding box geometrically. (BOSL2 has a module that does this.) I'm not sure how fast it is, though. &lt;/quote> Not sure what you mean by a "point set". I'm definitely a novice in this area. I'd like a bounding box of the final object or objects, but after preview. So an ideal result would be to be able to echo nMin, nMax, (where n is an axis), and/or the length of the objects axes. It's easy enough to do with a program run against an ASCII stl, but it would be nice if it could be done in OpenSCAD. Barring that, a center parameter for import() would be nice. That's mostly what I would use a bounding box for. -- Sent from: http://forum.openscad.org/