Cancel
Showing results for
Did you mean:
Highlighted

# Find the longest dimension of a solid

Creator

Anyone have a good function to find the longest dimension of a solid? I know we can use the bounding box to find the longest dimension along any given axis, but we are looking for the absolute longest measurement NOT along any particular axis known in advance.

Any ideas?

Thanks

Ric Hotchkiss - Principal Methodology Engineer
Design Automation Associates Inc 860-749-3832
rhotchkiss@daasolutions.com

Engineering Software & Services - NX/UG/Unigraphics:
Design Automation: Knowledge Fusion & UG/Open
Check-Mate Validation: Authoring & Customizing
3 REPLIES 3

# Re: Find the longest dimension of a solid

Creator

After thinking this over a bit more and experimenting, I think I might have a solution:

1. Create a bounding sphere passing through the bounding box points

2. Find minimum distance from sphere to body

3. Find the maximum distance between the min distance point on the body and the body

Sound reasonable?

Ric Hotchkiss - Principal Methodology Engineer
Design Automation Associates Inc 860-749-3832
rhotchkiss@daasolutions.com

Engineering Software & Services - NX/UG/Unigraphics:
Design Automation: Knowledge Fusion & UG/Open
Check-Mate Validation: Authoring & Customizing

# Re: Find the longest dimension of a solid

Valued Contributor

Hi

I think a dumb/smart way is to do Measure "Between Objects Sets". For Start Object and and End Object select the same Body. If you put the setting for Distance: Maximum it should give you the maximum measurment.

I tried it on a free form part ( 2x2 cm with 1000 surfaces) and it looks ok.  (I can't show that)

The bottom is one of the NX courses parts

# Re: Find the longest dimension of a solid

Valued Contributor

I found an even easier method:

MeasureDistance maxDst = WrkPrt.MeasureManager.NewDistance(null, MeasureManager.MeasureType.Maximum, bod, bod);

NxSes.ListingWindow.WriteFullline("Maximum Distance is " + maxDst.Value.ToString("F3"));

Ric Hotchkiss
Applications Consultant
rhotchkiss@daasolutions.com

O: 860-749-3832x214
F: 860-749-3842
C: 860-463-8486
Design Automation Associates Inc
68 Bridge Street, Suffield CT 06078
Website: http://www.daassolutions.com

Engineering Software & Engineering Services:
Design Automation, Training & Mentoring
NX, Knowledge Fusion, NX/Open, Checkmate
Mechanical Design, Structural & Thermal Analysis