The problem sounds simple - get the aligned bounding box of arbitrary 3d solids to get there length (minimum, for extruded
sections say), width and height.
The theory is easy, get the direction/s of the solid, transform it to world, get the bbox and calc the LWH, then transform it back.
There's a catch though that I've yet to see a real solution too - how do you determine these directions accurately (i.e. the 'expected' xyz vectors of the solid) 'without' user interaction. The goal is to be able to iterate the drg and grab the LWH of all solids regardless of orientation to the WCS.
It can't be done with math as it fails, the parameters can change even in the same solid if someone adds another cut or similar modification.
This leaves only 2 options.
1) get the best case bounding box using math and hope it's alright, the only way to make sure it's correct is to present it to the user to decide which way is LWH (this is what MillLister does).
2) add at least one vector (for lengths only if that's all that's required) to the 3d solid at creation time. The best solution I find is to add world point xdata elements, these get transformed with the objects when copied and modified so they're pretty safe.
There's a couple of ways to do this, one would be to trap the extrusion event with a reactor and set the data relative to the current ucs. This only works if the solid's 'section' to extrude is aligned correctly to the ucs at the time though.
The other option is to create the xyz vec's in your code, the user needs to use your tools to create objects, not so bad really considering the benefits of other section data that can also be added.
Another option I thought of was creating a block lib of sections for extrusion, these polylines can have this data already attached which can be transfered to the solid using a home built 'extrusion' method or reactors. As they can be inserted at any angle the xdata is always updated.
Anyway, good luck, it's a good exercise in 3d math that's for sure!