Get object dimensions and store them in a list

I want to write a script that gets an objects max length,width and height. What would be the best way of going about this?

Cheers,

Tom

There are a few such scripts out there - that would be a place to start, I suppose.
You’ll need to write some kind of solver that can iterate through several attempts.

One such method is discussed here (first google hit):

Hello Tom,

thanks to @Helvetosaur I have that object_info script, but I´m wondering as well how to integrate the export of dimension via Bounding Box (see Wish: Show "Autodim" ESC-ish?) for 3D Objects?
object_info_incl_curves.py (1.1 KB)

-Fabian

Hello,
Can you be more precise as to what exactly you are looking to export?

Hello Helvetosaur,

thank for your question - I´ll try to be more precise: it would be a great help to export the dimensions
(lenght, width, height) of the bounding box of less complicated 3d objects into a csv like object_info_incl_curves.py did, or to integrate the dimensions export within.

Here is a basic script that exports selected objects’ name (if any), layer, and world x,y,z bounding box dimensions to a .csv file.

Edit - added meshes to exportable objects in addition to curves, surfaces and polysurfaces.

ExportObjBBData.py (1.2 KB)

2 Likes

Great, thank you very much, Helvetosaur (in combination with autolabel, it´s perfect)!
I´ll post the final result, when it´s finished this or next week.
Is there any possibility to change the decimal export from “.” to “,” - not so important?
Fabian

Here is a version that exports the columns separated by semicolons and the decimal values by commas (as per typical non-US csv file formatting).

ExportObjBBDataComma.py (1.4 KB)

1 Like

Adding the ability to count as-similar sized objects for a schedule would be really useful. There are times where getting a count is easy if you’re using blocks — but if you’re not using blocks, then to be able to export a count along with the info that Mitch’s script does, would be nice.

Or migh you already have that handy, @Helvetosaur? :smirk:

Thank you very much, I´m very sorry for the delay. The result is still in process;)
Greetings f