Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting maximum width, height and depth of a freeform object 2

Status
Not open for further replies.

treddie

Computer
Dec 17, 2005
417
0
0
US
Hello,

Just wondering if there is a way to get the absolute width, height and depth of a freeform object, in the "world" coordinate system? There is no easy way to find the points on the surface that correspond to the maximum distances. I have looked everywhere for anything that would give me that info like a geometry analysis or just some function that knows what to do. Googling comes up empty, too.

Thanks!
 
Replies continue below

Recommended for you

Seems like the only way to do this is to do a drawing of the model, export that out and import it into something like Illustrator which will give the dimensions of the absolute bounds. Only problem there is that it is not as accurate as Creo. Which is fine I guess, except for really small objects.
 
First, if I knew, I'd tell you, which isn't to say that someone else doesn't know how.

Obtaining those dimensions is an infrequently needed task, so there isn't a lot of demand to do it automatically, and it's a complicated task because the values vary with the coordinate system you are measuring the dimensions in. A similar task is one that finds the orientation and dimensions of the minimum volume shoe-box the part would fit in.

What's annoying is that it should be easy enough, but the easy part is too late in the pipeline. What you are looking for are points with the largest and smallest coordinate values for X, Y, and Z, which are easily determined from the data the software generates to put the graphics on the screen. The problem is that this happens at the hand-off to the graphics system and is not (apparently) available to the Pro/E analysis engine.

The name of the problem you are looking to solve is "minimum bounding box."
 
Thanks for the terms to search, 3DDave. Yes, it is a classic minimum maximum problem for an irregular volume. That could be "easily" solved even before the data gets to the GPU. And far more accurate since the screen is limited to the resolution it is displaying at. Unless you think of the GPU as a set of pipelines to do the calculations (using CUDA or OPenCL), a CPU could do quite well on its own. After all, it only needs to calculate it once...When the minmax function is called.
 
Pro/E will tell you the size of the bounding box. It calculates the diagonal to get the model size for the relative accuracy. It is not related to any Csys ASAIK.

----------------------------------------

The Help for this program was created in Windows Help format, which depends on a feature that isn't included in this version of Windows.
 
Imagine your part is just sphere. It has a location and a radius. Until the geometry is generated to make the sphere shape appear on the screen, there's not a general purpose method to determine the extent of that sphere. You and I can observe, based on a lot of background information, that it is simply twice the radius in each axis direction, but until computers are as observant as people that's not going to work.

The easist is to wait for the software to generate a mesh that represents the surface of the sphere to pass it to the graphics pipeline. It's at that place the coordinates of the mesh edges could be examined, but that is long after the sphere model is made. Since PTC does not have software in place to capture that data as it's being generated, there isn't a method to get that information.

Unfortunately the box that PTC does keep track of is one that envelopes the entire model. Place a point a large distance away and the box ... gotta go ... will continue'
 
Continuing - the box changes size to accommodate all geometry, not just the solid kind, and expands for any number of reasons. For example if a 1000 inch long straight line curve is wrapped around a 1 inch cube, the extents for the resulting object will be 1000 inches in one direction, even though the curve is 'consumed' in the wrap operation.

The Pro/E bounding box is in terms of the default csys. Check the bounding box size for a block that is aligned to the default csys and compare it to the same size block created at 45 degrees to the default csys. Of course, having said that, I'll have to check it, but I can't believe the PTC developers would do anything more sophisticated when the use, to set accuracy, doesn't change much by being more precise. See axis-aligned minimum bounding box, below.

It's also very difficult to determine the general case for minimum bounding box. Again, in the case of the sphere, there are an infinite number of minimum bounding box solutions. They are all the same size, but have different orientations. Which is the correct one?

I was referring to facet generation, with full precision for the OpenGL pipeline, not the bitmap conversion at the end. Pro/E has to convert the abstract representation into 3D coordinate values to develop facets to create the display; values that have no existence in the model. It's a similar operation that is used to calculate silhouettes/horizon lines in drawings, which is why you can create a dimension there.

From Wikipedia

"Axis-aligned minimum bounding box

The axis-aligned minimum bounding box for a given point set is its minimum bounding box subject to the constraint that the edges of the box are parallel to the (Cartesian) coordinate axes. It is simply the Cartesian product of N intervals each of which is defined by the minimal and maximal value of the corresponding coordinate for the points in S.

Axis-aligned minimal bounding boxes are used to an approximate location of an object in question and as a very simple descriptor of its shape. For example, in computational geometry and its applications when it is required to find intersections in the set of objects, the initial check is the intersections between their MBBs. Since it is usually a much less expensive operation than the check of the actual intersection (because it only requires comparisons of coordinates), it allows to quickly exclude from checks the pairs that are far apart.


Arbitrarily oriented minimum bounding box

The arbitrarily oriented minimum bounding box is the minimum bounding box, calculated subject to no constraints as to the orientation of the result. Algorithms exist to find the minimum bounding box of a two-dimensional point set in linear time, while the minimum bounding box of a three-dimensional point set can be found in cubic time."
 
3DDave said:
Until the geometry is generated to make the sphere shape appear on the screen, there's not a general purpose method to determine the extent of that sphere.

I assume you mean that PTC has not included that functionality. In the case of a sphere, the information is available in principal..It is simply its radius for min and max relative to a given csys, as you say. If you specify the csys, out come the min max. If it is some other primitive, then the result is based on the equation of the primitive (the sphere was too, but it is unusually simple). If the feature is a polynomial surface, then again, the extents are based on the equations describing that surface. It seems like a straight forward linear algebra problem, and does not require data prepped for the screen. But as you say, if PTC doesn't include that functionality, then the question is moot.
 
dgallup said:
Pro/E will tell you the size of the bounding box. It calculates the diagonal to get the model size for the relative accuracy.

Where is that information displayed? In many cases it would be possible to reduce the model to only those features that lie within the desired bounding box. So it could be a viable method to use in a lot of instances.
 
What I'm saying is that none of those tell anything about the extent of the model until they are evaluated over their entirety, and that doesn't happen until geometry is generated.** If it was easy it would not attract such attention for algorithm generation.

Pro/E keeps an aligned bounding box that is affected by all geometry - points, curves, surfaces which may not represent the bounding box for the solid model.

It might be INFO>MODEL SIZE (from 2006)
Modelcheck can also report the bounding box, some way.

From 2003:
I dont know if there's a way to do that within the confines of Pro/E features, but there's routines within ProToolkit which return X,Y,Z values of the 2 points you see connected by the line of the bounding box diagonal,, and those XYZ points are orientated to a defined CSYS from within the function call.."

Fishbowl solutions sells a bounding box parameter generator.
Transmagic can also generate bounding box information.

I'd try exporting as STL and importing into Blender. Since it is a mesh based system, Blender already has the coordinates of all the points on the surface and reports the X, Y, and Z extents.

**For example - first feature is a 3 inch sphere. Second feature is a 100x100 rectangular sketch that is used to cut part of the sphere away. It might just make a notch, it might leave a flat, if might intersect and leave a dimple, or it might be positioned 1000 inches away and miss the sphere completely. What are the part extents? For your purposes it will always be less than 3 inches in X, Y, and Z. For computational purposes it will always be larger than that. Until the mesh is generated, you won't know.
 
Ah, OK, I see what you're saying now. It's not as simple as, say, a polynomial surface, because there may be other features interacting with that surface. Where are the extents? I would say, the finished form...which is again, a culmination of everything done to the surface.

I think, if the user was willing to put up with some calculation time, a function could give back a very precise solution. But it would have to iterate a lot to look at, for instance, a 3D stack of 2D mesh crossections, and then go through that to find the extents.
 
Status
Not open for further replies.
Back
Top