Home

Entity Containment
[Model Analysis Functionality]

Collaboration diagram for Entity Containment:
Determine the containment relationship between a point or EDGE and an ENTITY. More...

Classes

class  point_entity_rel
 Relates an APOINT to an ENTITY. More...

Enumerations

enum  point_body_containment
 Specifies whether a point lies inside, outside or on the boundary of the body. More...
enum  point_containment
 Specifies whether a point lies inside, outside or on the boundary of the body. More...
enum  point_face_containment
 Specifies whether a point lies inside, outside, or on a face. More...
enum  sg_point_ent_relation
 Specifies whether a point lies inside, outside, or on the boundary of an entity. More...

Functions

outcome api_edent_rel (EDGE *edge, ENTITY *entity, edge_entity_rel *&rel, AcisOptions *ao=NULL)
 Determines the relationship between a given edge and a given POINT, EDGE, FACE, or BODY.
outcome api_point_in_body (SPAposition const &test_point, BODY *target_body, point_containment &pc, logical use_boxes=TRUE, AcisOptions *ao=NULL)
 Determines whether the given point lies inside,outside,or on the boundary of a given body.
outcome api_point_in_face (SPAposition const &test_point, FACE *test_face, SPAtransf const &face_trans, point_face_containment &cont_answer, SPApar_pos const &test_uv_guess, SPAposition const &prev_point_input, point_face_containment prev_cont, logical use_cache=FALSE, int cache_size=10, AcisOptions *ao=NULL)
 Determines the relationship of a position within a given face's surface.
outcome api_point_in_face (SPAposition const &test_point, FACE *test_face, SPAtransf const &face_trans, point_face_containment &cont_answer, SPApar_pos const &test_uv_guess=*(SPApar_pos *) NULL_REF, logical use_cache=FALSE, int cache_size=10, AcisOptions *ao=NULL)
 Determines the relationship of a position within a given face's surface.
outcome api_ptent_rel (APOINT *point, ENTITY *entity, point_entity_rel *&rel, AcisOptions *ao=NULL)
 Determines the relationship of given point to a given entity (POINT, EDGE, FACE, or BODY).

Detailed Description

Determine the containment relationship between a point or EDGE and an ENTITY.

Declared at <ptinbody.hxx>, SPAintr.

Declared at <ptentrel.hxx>, SPAintr.

Declared at <ptcont.hxx>, SPAintr.

Declared at <intrapi.hxx>, SPAintr.


Enumeration Type Documentation

Specifies whether a point lies inside, outside or on the boundary of the body.


Role: Used by point_in_body().

Parameters:
point_unknown_body unknown.
point_inside_body point lies inside body.
point_boundary_body point lies on the boundary of the body.
point_outside_body point lies outside the body.

include <ptinbody.hxx>

Specifies whether a point lies inside, outside or on the boundary of the body.


Role: Used by api_point_in_body().

Parameters:
point_unknown unknown.
point_inside point lies inside body.
point_boundary point lies on the boundary of the body.
point_outside point lies outside the body.

include <ptcont.hxx>

Specifies whether a point lies inside, outside, or on a face.

Parameters:
point_unknown_face unknown
point_inside_face point lies inside face
point_boundary_face point lies on face
point_outside_face point lies outside face
point_unset_face point has not yet been tested. Not for external use.

include <ptfcenum.hxx>

Specifies whether a point lies inside, outside, or on the boundary of an entity.

Parameters:
point_in_entity point lies inside the entity.
point_on_entity point lies on the boundary of the entity.
point_off_entity point lies outside the entity.

include <ptentrel.hxx>


Function Documentation

outcome api_edent_rel ( EDGE edge,
ENTITY entity,
edge_entity_rel *&  rel,
AcisOptions ao = NULL 
)

Determines the relationship between a given edge and a given POINT, EDGE, FACE, or BODY.



Role: This API determines the relationship between an edge and an entity.

The relationships typically indicate whether the edge lies inside, outside, or on the entity.

Errors: Pointer to edge is NULL or not to an EDGE.  Pointer to entity is NULL.


Effect: Read-only

Journal: Available

Parameters:
edge the given edge.
entity the given entity.
rel the relationship between an edge and an entity.
ao ACIS options.

include <intrapi.hxx>

outcome api_point_in_body ( SPAposition const &  test_point,
BODY target_body,
point_containment pc,
logical  use_boxes = TRUE,
AcisOptions ao = NULL 
)

Determines whether the given point lies inside,outside,or on the boundary of a given body.



Role: This API tests the point (given in global body space) against the body, returning a point_containment value of point_inside, point_outside, point_boundary, or point_unknown.

A call to this API will cause boxes to be computed, causing a model change and the generation of a bulletin board.

If the logical use_boxes is TRUE, bounding boxes will be considered increasing performance when the body is not a void. If there is a chance the body is a void, set to flag to FALSE so classification is correct.

To make the process Read-only, call api_note_state before the call to api_point_in_body. Afterwards, to roll the modeler back to its state prior to api_point_in_body perform:

 DELTA_STATE *ds = NULL
 api_note_state(ds);
 api_change_state(ds);
 api_delete_ds(ds);
Errors: Pointer to body is NULL or not to a BODY.

Effect: Changes model

Journal: Available

Parameters:
test_point point to test.
target_body body of interest.
pc inside, outside, boundary, unknown returned.
use_boxes Use bounding boxes.
ao ACIS options.

include <intrapi.hxx>

outcome api_point_in_face ( SPAposition const &  test_point,
FACE test_face,
SPAtransf const &  face_trans,
point_face_containment cont_answer,
SPApar_pos const &  test_uv_guess,
SPAposition const &  prev_point_input,
point_face_containment  prev_cont,
logical  use_cache = FALSE,
int  cache_size = 10,
AcisOptions ao = NULL 
)

Determines the relationship of a position within a given face's surface.



Role: This function returns the containment of a given point on the face's surface for a given face. There are four possible outcomes: point_inside_face, point_outside_face, point_boundary_face, and point_unkown_face.

The transformation will be applied only if specified. Typically this is the transformation from the body that contains the face.

The test_uv_guess argument provides additional help by providing a coordinate in parametric space for an initial guess on where the position may lie. This may help to improve the performance.

If a previous position is specified, a containment description must be provided (point_inside_face, point_outside_face, point_boundary_face or point_unkown_face). This position can help find the position containment on the face at a faster rate. It is recomended to use a position that was previously found using this function. If the previous position passed in is a NULL REF it will call the other api_point_in_face function.

If api_point_in_face is called often on the same face, then setting use_cache to TRUE will increase the performance. If api_point_in_face is called with the use_cache set to TRUE an attribute will be attached to the face storing the cached information. If api_point_in_face is called subsequently on a face with the cached attribute information, but the use_cache flag is set to FALSE, the information will be ignored.

Cache size refers to how many levels of cache are used to store and search previously found data. Default is 10.

Limitations: If the input point is not on the face's surface, the behavior of this function is undefined. For performance reasons this is not trapped by the function, so the api will not fail in this situation, but the relationship returned is not meaningful. In particular, the result point_outside_face is not guaranteed to be returned when this function is called with a point not on the face's surface.

Effect: Read-only

Journal: Available

Parameters:
test_point point in question.
test_face face to test point against.
face_trans transformation of the face.
cont_answer relationship found (point_inside_face, point_outside_face, point_boundary_face, and point_unkown_face).
test_uv_guess spline facecase, guess of uv-coordinates of the testpoint.
prev_point_input previous point.
prev_cont previous point's containment.
use_cache use cached entries.
cache_size size of array used to cache interior points.
ao options such as journaling and versioning.

include <intrapi.hxx>

outcome api_point_in_face ( SPAposition const &  test_point,
FACE test_face,
SPAtransf const &  face_trans,
point_face_containment cont_answer,
SPApar_pos const &  test_uv_guess = *(SPApar_pos *) NULL_REF,
logical  use_cache = FALSE,
int  cache_size = 10,
AcisOptions ao = NULL 
)

Determines the relationship of a position within a given face's surface.



Role: This function returns the containment of a given point on the face's surface for a given face. There are four possible outcomes: point_inside_face, point_outside_face, point_boundary_face, and point_unkown_face.

The transformation will be applied only if specified. Typically this is the transformation from the body that contains the face.

The test_uv_guess argument provides additional help by providing a coordinate in parametric space for an initial guess on where the position may lie. This may help to improve the performance.

If a previous position is specified, a containment description must be provided (point_inside_face, point_outside_face, point_boundary_face or point_unkown_face). This position can help find the position containment on the face at a faster rate. It is recomended to use a position that was previously found using this function. If the previous position passed in is a NULL REF it will call the other api_point_in_face function.

If api_point_in_face is called often on the same face, then setting use_cache to TRUE will increase the performance. If api_point_in_face is called with the use_cache set to TRUE an attribute will be attached to the face storing the cached information. If api_point_in_face is called subsequently on a face with the cached attribute information, but the use_cache flag is set to FALSE, the information will be ignored.

Cache size refers to how many levels of cache are used to store and search previously found data. Default is 10.

Limitations: If the input point is not on the face's surface, the behavior of this function is undefined. For performance reasons this is not trapped by the function, so the api will not fail in this situation, but the relationship returned is not meaningful. In particular, the result point_outside_face is not guaranteed to be returned when this function is called with a point not on the face's surface.

Effect: Read-only

Journal: Available

Parameters:
test_point point in question.
test_face face to test point against.
face_trans transformation of the face.
cont_answer relationship found (point_inside_face, point_outside_face, point_boundary_face, and point_unkown_face).
test_uv_guess Spline face case, uv-coordinates guess of the testpoint use cached entries.
use_cache use cached entries.
cache_size size of array used to cache interior points.
ao options such as journaling and versioning.

include <intrapi.hxx>

outcome api_ptent_rel ( APOINT point,
ENTITY entity,
point_entity_rel *&  rel,
AcisOptions ao = NULL 
)

Determines the relationship of given point to a given entity (POINT, EDGE, FACE, or BODY).



Role: This API determines the relationship between a point and an entity. Typically, the relationship indicates whether the given point lies on, inside, or outside of the given entity.

Errors: Pointer to point is NULL or not to an APOINT.  Pointer to entity is NULL.


Effect: Read only

Journal: Not Available

Parameters:
point given point.
entity given entity.
rel relationship between a point and an entity returned.
ao ACIS options.

include <intrapi.hxx>