Compute_Circumcuboid

Functions

HC_BOOLEAN Compute_Circumcuboid (const char *segment, HC_POINT *min, HC_POINT *max)
 Returns points defining a cuboid that circumscribes the geometry within a segment. More...
 
HC_BOOLEAN Compute_Circumcuboid_By_Key (HC_KEY key, HC_POINT *min, HC_POINT *max)
 Similar to Compute_Circumcuboid(), but operates on an object referenced by an HC_KEY. More...
 
HC_BOOLEAN DCompute_Circumcuboid (const char *segment, HC_DPOINT *min, HC_DPOINT *max)
 Similar to Compute_Circumcuboid, but accepts double-precision parameters. More...
 
HC_BOOLEAN DCompute_Circumcuboid_By_Key (HC_KEY key, HC_DPOINT *min, HC_DPOINT *max)
 Similar to Compute_Circumcuboid_By_Key(), but operates on double-precision data. More...
 

Detailed Description

Function Documentation

◆ Compute_Circumcuboid()

HC_BOOLEAN Compute_Circumcuboid ( const char *  segment,
HC_POINT *  min,
HC_POINT *  max 
)

Returns points defining a cuboid that circumscribes the geometry within a segment.

Parameters
segment- Segment name to use for the calculation.
min- The lower-most nearest diagonal point (xmin,ymin,zmin) of the cuboid to encompass the geometry contained within the segment. Returned to user. Passed by reference in all languages.
max- The upper-most distant diagonal point (xmax,ymax,zmax) of the cuboid to encompass the geometry contained within the segment. Returned to user. Passed by reference in all languages.
Returns
success

DETAILS

This function returns the axis-aligned bounding cuboid associated with a database entity. The bounding volume returned is computed on demand—it does not reflect the bounding volume stored at the segment, if any. The routine, Show_Bounding_Cuboid() , can be used for that purpose. The volume returned is expressed in oru.
Compute_Circumcuboid, the standard variant, allows only for segments. The By_Key variant, however, allows for keys that refer to any sort of geometry (in addition to segments). The standard variant allows for the normal wildcards associated with a segment specification.
The By_Key variant will fail if the specified key in variant does not refer to anything valid. The standard variant will fail if the specified segment in the does not match at least one segment, or all matched segments are empty of any geometry.
Transform-dependent geometry (e.g. markers, text) contributes only its insertion point. A reasonable way to handle markers would be to add a small pad to the min and max result. Special handling is needed to account for text, however. HOOPS/MVO (distributed as open source) contains a good example of that special handling (hint: it involves Compute_Text_Extent() ).

NOTES

Temporary geometry created "on the fly" in the midst of I.M. callbacks will never contribute to any bounding volumes. The computed bounding volume will be with respect to geometry that has been inserted into the database.

When called on a large segment tree, this function can become expensive, so use sparingly.

RESTRICTIONS

See also
Compute_Circumsphere, Compute_Coordinates, Compute_Transform, Show_Bounding_Info, Show_Bounding_Cuboid,

◆ Compute_Circumcuboid_By_Key()

HC_BOOLEAN Compute_Circumcuboid_By_Key ( HC_KEY  key,
HC_POINT *  min,
HC_POINT *  max 
)

Similar to Compute_Circumcuboid(), but operates on an object referenced by an HC_KEY.

Parameters
key- Key of the segment used for the calculation.
min- The lower-most nearest diagonal point (xmin, ymin, zmin) of the cuboid to encompass the geometry contained within the segment. Returned to user. Passed by reference in all languages.
max- The upper-most distant diagonal point (xmax, ymax, zmax) of the cuboid to encompass the geometry contained within the segment. Returned to user. Passed by reference in all languages.
Returns
success

DETAILS

No additional details. See Compute_Circumcuboid()

◆ DCompute_Circumcuboid()

HC_BOOLEAN DCompute_Circumcuboid ( const char *  segment,
HC_DPOINT *  min,
HC_DPOINT *  max 
)

Similar to Compute_Circumcuboid, but accepts double-precision parameters.

Parameters
segment- Segment name to use for the calculation.
min- The lower-most nearest diagonal point (xmin, ymin, zmin) of the cuboid to encompass the geometry contained within the segment. Returned to user. Passed by reference in all languages.
max- The upper-most distant diagonal point (xmax, ymax, zmax) of the cuboid to encompass the geometry contained within the segment. Returned to user. Passed by reference in all languages.
Returns
success

◆ DCompute_Circumcuboid_By_Key()

HC_BOOLEAN DCompute_Circumcuboid_By_Key ( HC_KEY  key,
HC_DPOINT *  min,
HC_DPOINT *  max 
)

Similar to Compute_Circumcuboid_By_Key(), but operates on double-precision data.

Parameters
key- Key of the segment used for the calculation.
min- The lower-most nearest diagonal point (xmin, ymin, zmin) of the cuboid to encompass the geometry contained within the segment. Returned to user. Passed by reference in all languages.
max- The upper-most distant diagonal point (xmax, ymax, zmax) of the cuboid to encompass the geometry contained within the segment. Returned to user. Passed by reference in all languages.
Returns
success

DETAILS

No additional details. See Compute_Circumcuboid_By_Key()