discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Algorithm for fitting to a bounding box

M
MichaelAtOz
Mon, Dec 5, 2016 9:53 PM

I'm doing battle with Shapeways...

Having to rotate a model to fit a smaller bounding box of the polisher
[which has no orientation consequences], but thus having the model not
optimised for the larger printing box, with possible steps in the
flat/vertical etc...

Has anyone come across any theoretical techniques to fit a object to a
bounding box, presumably optimising maximum cross sections of both.

I'd like them to think outside the box.


Admin - PM me if you need anything, or if I've done something stupid...

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. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/  time is running out!

View this message in context: http://forum.openscad.org/Algorithm-for-fitting-to-a-bounding-box-tp19483.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

I'm doing battle with Shapeways... Having to rotate a model to fit a smaller bounding box of the polisher [which has no orientation consequences], but thus having the model not optimised for the larger printing box, with possible steps in the flat/vertical etc... Has anyone come across any theoretical techniques to fit a object to a bounding box, presumably optimising maximum cross sections of both. I'd like them to think outside the box. ----- Admin - PM me if you need anything, or if I've done something stupid... 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. Obviously inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out! -- View this message in context: http://forum.openscad.org/Algorithm-for-fitting-to-a-bounding-box-tp19483.html Sent from the OpenSCAD mailing list archive at Nabble.com.
N
Neon22
Tue, Dec 6, 2016 12:05 AM

It could be that what you want is an OBB Oriented bounding box. ??
You could run a series of random fits to try to find the smallest one by
sampling.

more info :

http://www.computational-geometry.org/mailing-lists/compgeom-announce/2003-September/000813.html

--
View this message in context: http://forum.openscad.org/Algorithm-for-fitting-to-a-bounding-box-tp19483p19484.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

It could be that what you want is an OBB Oriented bounding box. ?? You could run a series of random fits to try to find the smallest one by sampling. more info : - http://www.gamedev.net/topic/320675-how-to-create-oriented-bounding-box/ - http://clb.demon.fi/minobb/minobb.html (PDF) - http://www.computational-geometry.org/mailing-lists/compgeom-announce/2003-September/000813.html -- View this message in context: http://forum.openscad.org/Algorithm-for-fitting-to-a-bounding-box-tp19483p19484.html Sent from the OpenSCAD mailing list archive at Nabble.com.
AC
Alan Cox
Tue, Dec 6, 2016 12:15 AM

On Mon, 5 Dec 2016 14:53:20 -0700 (MST)
MichaelAtOz oz.at.michael@gmail.com wrote:

I'm doing battle with Shapeways...

Having to rotate a model to fit a smaller bounding box of the polisher
[which has no orientation consequences], but thus having the model not
optimised for the larger printing box, with possible steps in the
flat/vertical etc...

Has anyone come across any theoretical techniques to fit a object to a
bounding box, presumably optimising maximum cross sections of both.

I'd like them to think outside the box.

Before you go down that road test how the shapeways tools respond - last
time I played that game the Shapeways tools were too stupid to align the
object diagonally to fit the polisher but smart enough to keep realigning
them wrongly. I ended up having to print the items with other stuff in
the same STL in order to stop them ****ing it up.

Alan

On Mon, 5 Dec 2016 14:53:20 -0700 (MST) MichaelAtOz <oz.at.michael@gmail.com> wrote: > I'm doing battle with Shapeways... > > Having to rotate a model to fit a smaller bounding box of the polisher > [which has no orientation consequences], but thus having the model not > optimised for the larger printing box, with possible steps in the > flat/vertical etc... > > Has anyone come across any theoretical techniques to fit a object to a > bounding box, presumably optimising maximum cross sections of both. > > I'd like them to think outside the box. Before you go down that road test how the shapeways tools respond - last time I played that game the Shapeways tools were too stupid to align the object diagonally to fit the polisher but smart enough to keep realigning them wrongly. I ended up having to print the items with other stuff in the same STL in order to stop them ****ing it up. Alan
M
MichaelAtOz
Tue, Dec 6, 2016 2:03 AM

Alan Cox wrote

too stupid to align the object diagonally to fit the polisher but smart
enough to keep realigning
them wrongly. I ended up having to print the items with other stuff in
the same STL in order to stop them ****ing it up.

Now you mention it, I had that problem some time ago.
They have fixed up the "smart enough" bit, it doesn't seem to realign ATM.
Perhaps they had the right concept back then, but realign AFTER confirming
it fits...

What I'm trying to suggest to them is to be more flexible in the polisher
BB, preferably doing something smart, like a OBB - thanks Neon, or otherwise
letting the designer rotate it in their 3D tools to show it fits.

The model is 199x46x29 and at 45° Z just exceeds the 150x150 (by ~4mm)
So I did 35° Y and it easily fits 150x150x150.

I then asked if they would realign for the actual printing;
"let us know your order number so we can add a note in our system with the
print orientation request...though that this isn't a guarantee though we can
have the model printed as that"

Trouble is, this is for other people to order, not a good look asking a
customer to ask Shapeways to reorient your design...


Admin - PM me if you need anything, or if I've done something stupid...

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. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/  time is running out!

View this message in context: http://forum.openscad.org/Algorithm-for-fitting-to-a-bounding-box-tp19483p19486.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Alan Cox wrote > too stupid to align the object diagonally to fit the polisher but smart > enough to keep realigning > them wrongly. I ended up having to print the items with other stuff in > the same STL in order to stop them ****ing it up. Now you mention it, I had that problem some time ago. They have fixed up the "smart enough" bit, it doesn't seem to realign ATM. Perhaps they had the right concept back then, but realign AFTER confirming it fits... What I'm trying to suggest to them is to be more flexible in the polisher BB, preferably doing something smart, like a OBB - thanks Neon, or otherwise letting the designer rotate it in their 3D tools to show it fits. The model is 199x46x29 and at 45° Z just exceeds the 150x150 (by ~4mm) So I did 35° Y and it easily fits 150x150x150. I then asked if they would realign for the actual printing; "let us know your order number so we can add a note in our system with the print orientation request...though that this isn't a guarantee though we can have the model printed as that" Trouble is, this is for other people to order, not a good look asking a customer to ask Shapeways to reorient your design... ----- Admin - PM me if you need anything, or if I've done something stupid... 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. Obviously inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out! -- View this message in context: http://forum.openscad.org/Algorithm-for-fitting-to-a-bounding-box-tp19483p19486.html Sent from the OpenSCAD mailing list archive at Nabble.com.