Home

Faceting
[Model Visualization and Display]

Collaboration diagram for Faceting:
Declared at <af_enum.hxx>. More...

Classes

class  AF_POINT
 AF_POINT is an element in a circular, doubly linked list, used when approximating a curve with a consecutive series of points. More...
class  af_serializable_mesh
 Provides a base class for meshes which can convert themselves into a form that is immediately digestable by visualization systems. More...
class  align_options
 Interface class for modifying the behavior of api_align. More...
class  ATTRIB_EYE
 Defines the organization attribute class for the Faceter Component. More...
class  ATTRIB_EYE_ATTACHED_MESH
 Defines an attribute to attach facets to an entity as a MESH. More...
class  ATTRIB_EYE_POINTLIST_HEADER
 The ATTRIB_EYE_POINTLIST_HEADER class stores the edge facets between faceter calls. More...
class  box_selector
 Selects all points of a cloud within a box. More...
class  closest_point_selector
 Selects the closest points to a test point from a cloud. More...
class  facet_options
 Interface class for representing user-specified faceting requirements. More...
class  facet_options_expert
 A facet-options class that is appropriate to workflows demanding the maximum control over faceting. More...
class  facet_options_precise
 A facet-options class that is appropriate to workflows demanding precise meshes. More...
class  facet_options_visualization
 A facet-options class that is appropriate to workflows demanding efficient visualization. More...
class  GLOBAL_MESH_MANAGER
 This class provides an example of a mesh manager using the global-indexed protocol. More...
class  INDEXED_MESH
 Shows an example of a mesh that stores indices to a vertex array. More...
class  INDEXED_MESH_MANAGER
 This class provides an example of a mesh manager using the indexed protocol. More...
class  LINKED_MESH
 A LINKED_MESH is a series of points connected by links in a number of ways, in order to facilitate fast processing while creating the facets and using the facets. More...
class  LINKED_MESH_MANAGER
 This class provides an example of a mesh manager using linked data. More...
class  MESH
 Defines a generic base mesh class that can be attached to an entity. More...
class  MESH_MANAGER
 A MESH_MANAGER class directs output of the facet data. More...
class  MESH_NODE
 A MESH_NODE represents the point of coincident vertices of many facets (or one facet). More...
class  MESH_POLYGON
 Represents a series of vertices making a facet. More...
class  mesh_polygon
 Defines an interface to a polygon in a mesh. More...
class  MESH_POLYNODE
 The MESH_POLYNODE represents a point, or vertex, of one facet, It is where the bulk of the information of the facets exist, such as position, parametric parameters, and normal vector. More...
class  nearest_nbrs_selector
 Selects a user specified number of nearest neighbors of a specified point. More...
class  POLYGON
 Defines a POLYGON. More...
class  POLYGON_POINT_MESH
 Defines a collection of polygons. More...
class  POLYGON_POINT_MESH_MANAGER
 Specializes the MESH_MANAGER class when a mesh is maintained as a POLYGON_POINT_MESH. More...
class  POLYGON_VERTEX
 Defines a vertex on a polygon. More...
class  polygon_vertex
 The polygon_vertex class is used to store the data at a polygon vertex. More...
struct  position_distance_pair
 This struct is useful for closet-point and related queries. More...
class  position_distance_pair_set
 Represents an ordered set of position distance pairs. More...
class  PPM_ON_FACE_MESH_MANAGER
 Shows how a MESH-derived mesh is attached to a face. More...
class  REFINEMENT
 Controls the accuracy and types of polygons generated in the faceter. More...
class  SEQUENTIAL_MESH
 A SEQUENTIAL_MESH is the base class for INDEXED_MESH and LINKED_MESH. More...
class  SIMPLE_INDEXED_MESH
 A mesh format that stores indices to a vertex array. More...
class  SIMPLE_INDEXED_MESH_MANAGER
 To show an example of a mesh manager using the indexed protocol. More...
class  slice_selector
 Selects all points within a desired thickness of a plane. More...
class  SPAdouble_vector
 Provides functionality similar to std::vector<double> within ACIS. More...
class  SPAposition_cloud
 SPAposition_cloud is a class for geometrically querying large sets of points. More...
class  SPAposition_cloud_iterator
 SPAposition_cloud_iterator allows you to get the points from a SPAposition_cloud or SPAposition_subcloud object. More...
class  SPAposition_cloud_selector
 SPAposition_cloud objects are organized into subclouds. More...
class  SPAposition_subcloud
 SPAposition_subcloud represents a subset of a SPAposition_cloud. More...
class  SPAposition_vector
 Provides functionality similar to std::vector<SPAposition> within ACIS. More...
class  sphere_selector
 Selects all points within a sphere. More...
class  STL_MESH_MANAGER
 Writes data to an stl formatted file. More...
class  VERTEX_TEMPLATE
 Creates parameter templates. More...

Defines

#define IDX_MESH_APP   0x00494458
 Defines the application identification for the INDEXED_MESH facet data in the ATTRIB_EYE_ATTACHED_MESH attribute attached to a FACE.
#define IDX_MESH_ID   0x00494458
 Defines the user identification for the INDEXED_MESH facet data in the ATTRIB_EYE_ATTACHED_MESH attribute attached to a FACE.
#define SERIAL_MESH_ID   0x00494456
 Defines the user identification for the INDEXED_MESH facet data in the ATTRIB_EYE_ATTACHED_MESH attribute attached to a FACE.
#define UNSET_APP_ID   -1234
 Defined for unsetting the application id of the mesh.
#define UNSET_USER_ID   -5678
 Defined for unsetting the user id of the mesh.

Typedefs

typedef uintptr_t AF_POINT_ID
 The identifier in an AF_POINT is typedefed as an AF_POINT_ID.
typedef uintptr_t MESH_APP_ID
 The id used mainly to search mesh attached to entity thru attribute.
typedef uintptr_t MESH_USER_ID
 Another id used mainly to search mesh attached to entity thru attribute.
typedef void(* polygon_func_fn )(POLYGON *poly, void *SPAptr, int num)
 The function pointer used by apply method to process each polygon.

Enumerations

enum  AF_ADJUST_MODE
 Specifies the adjustment mode. More...
enum  AF_EDGE_DIRECTIVE
 Directive to MESH_MANAGER to reuse or recalculate edge points during faceting. More...
enum  AF_GRID_MODE
 Specifies the grid mode. More...
enum  AF_SURF_MODE
 Specifies the surface mode. More...
enum  AF_TRIANG_MODE
 Specifies triangulation mode. More...
enum  edge_quality_level
 Edge quality options used by facet_options_visualization. More...
enum  face_quality_level
 Face quality options used by facet_options_visualization. More...
enum  MESH_MANAGER_SEARCH_ORDER
 Specifies the search order during mesh output. More...
enum  polygon_type
 Polygon-type options used by facet_options_precise and facet_options_expert. More...
enum  SEQUENTIAL_MESH_TYPES
 Specifies the derived class of the base class SEQUENTIAL_MESH. More...
enum  tolerance_specification_mode
 Enumeration used by facet_options_expert to specify the mode in which the surface tolerance is treated. More...

Functions

logical af_delete_facets (ENTITY *entity, logical keep_mark=FALSE)
 Deletes all facets attached to an entity.
void af_delete_mesh (ENTITY *entity)
 Deletes all meshes attached to an entity.
logical af_find_meshat (const ENTITY *entity, MESH_APP_ID app, MESH_USER_ID uid, ATTRIB_EYE_ATTACHED_MESH *&meshat)
 Finds the mesh attribute attached to an entity.
logical af_query (const ENTITY *entity, MESH_APP_ID app, MESH_USER_ID uid, MESH *&mesh)
 Gets the mesh attached to an entity.
logical af_update (ENTITY *entity, MESH_APP_ID app, MESH_USER_ID uid, MESH *mesh, logical delete_old=TRUE)
 Attaches the mesh to an entity using a mesh attribute.
outcome api_align (ENTITY_LIST const &entities, SPAposition_cloud const &cloud, SPAtransf &trans_moving_points_to_entities, align_options *opts=NULL, AcisOptions *ao=NULL)
 Attempts to compute the transform which best moves the points onto the boundary of the given entities.
outcome api_align (ENTITY_LIST const &entities, int num_points, SPAposition const *points, SPAtransf &trans_moving_points_to_entities, align_options *opts=NULL, AcisOptions *ao=NULL)
 Attempts to compute the transform which best moves the points onto the boundary of the given entities.
outcome api_create_refinement (REFINEMENT *&ref, AcisOptions *ao=NULL)
 Creates a refinement.
outcome api_create_vertex_template (int n_tokens, int tokens[], VERTEX_TEMPLATE *&tplate, AcisOptions *ao=NULL)
 This API creates a vertex template.
outcome api_delete_all_AF_POINTs (AF_POINT *first_point, AcisOptions *ao=NULL)
 Delete the linked list of AF_POINTs.
outcome api_delete_entity_facets (ENTITY *ent, logical apply_to_descendents=FALSE, AcisOptions *ao=NULL)
 Deletes facets.
outcome api_entity_point_distance (ENTITY_LIST const &entities, SPAposition_cloud const &cloud, SPAepd_result_list &results, SPAepd_options *opts=NULL, AcisOptions *ao=NULL)
 Finds the closest point on the given entities' boundary for each point in the cloud.
outcome api_entity_point_distance (ENTITY *entity, SPAposition_cloud const &cloud, SPAepd_result_list &results, SPAepd_options *opts=NULL, AcisOptions *ao=NULL)
 Finds the closest point on the given entity's boundary for each point in the cloud.
outcome api_facet_area (ENTITY *entity, double &area, AcisOptions *ao=NULL)
 Returns the area of the facets of entity.
outcome api_facet_curve (const curve &in_curve, const double in_start_param, const double in_end_param, const double in_max_tol, const double in_max_length, const double in_max_angle, int &out_count, AF_POINT *&out_points, AcisOptions *ao=NULL)
 Returns facets that approximate a curve.
outcome api_facet_curve (const curve &in_curve, const double in_start_param, const double in_end_param, const double in_max_tol, const double in_max_length, const double in_max_angle, const int in_max_count, int &out_count, SPAposition **io_points, double **io_params, AcisOptions *ao=NULL)
 Returns facets that approximate a curve.
outcome api_facet_edge (const EDGE *in_EDGE, const double in_max_tol, const double in_max_length, const double in_max_angle, int &out_count, AF_POINT *&out_points, AcisOptions *ao=NULL)
 Returns facets that approximate an edge.
outcome api_facet_edge (const EDGE *in_EDGE, const double in_max_tol, const double in_max_length, const double in_max_angle, const int in_max_count, int &out_count, SPAposition **io_points, double **io_params, AcisOptions *ao=NULL)
 Returns facets that approximate an edge.
outcome api_facet_entities (ENTITY *owner, ENTITY_LIST *entity_list, facet_options *fo=NULL, AcisOptions *ao=NULL)
 Creates facets for a list of entities.
outcome api_facet_entity (ENTITY *entity, facet_options *fo=NULL, AcisOptions *ao=NULL)
 Creates facets for an entity.
outcome api_facet_unfaceted_entities (ENTITY *owner, ENTITY_LIST *entity_list, facet_options *fo=NULL, AcisOptions *ao=NULL)
 Facets unfaceted (unmarked) faces given a list of entities.
outcome api_facet_unfaceted_entity (ENTITY *entity, facet_options *fo=NULL, AcisOptions *ao=NULL)
 Facets unfaceted (unmarked) face(s) of an entity.
outcome api_faceted_face (FACE *face, logical &faceted, AcisOptions *ao=NULL)
 Determines if a face has been faceted or not.
outcome api_fast_find_face (SPAposition const &ray_pos, SPAunit_vector const &ray_dir, BODY *in_body, int &in_count, ENTITY **&in_faces=*(ENTITY ***) NULL_REF, SPAposition *&in_hits=*(SPAposition **) NULL_REF, double *&in_params=*(double **) NULL_REF, AcisOptions *ao=NULL)
 Fires a ray through a body and returns the hits.
outcome api_get_default_refinement (REFINEMENT *&ref, AF_SURF_MODE surftype=AF_SURF_ALL, AcisOptions *ao=NULL)
 Gets the default REFINEMENT associated with a type of surface.
outcome api_get_default_vertex_template (VERTEX_TEMPLATE *&tplate, AcisOptions *ao=NULL)
 Gets the default vertex template.
outcome api_get_entity_refinement (ENTITY *entity, REFINEMENT *&ref, AF_SURF_MODE surftype=AF_SURF_ALL, AcisOptions *ao=NULL)
 Gets the refinement of the given surface type attached to the given entity.
outcome api_get_entity_vertex_template (ENTITY *ent, VERTEX_TEMPLATE *&vt, AcisOptions *ao=NULL)
 Gets the vertex template attached to the entity.
outcome api_get_facet_edge_points (EDGE *edge, SPAposition *&polyline, int &num_pts, AcisOptions *ao=NULL)
 Gets facet points of the given edge generated by the faceter.
outcome api_get_indexed_mesh (ENTITY *entity, INDEXED_MESH *&mesh, AcisOptions *ao=NULL)
 Gets the indexed mesh attached to the entity.
outcome api_get_mesh_manager (MESH_MANAGER *&mm, AcisOptions *ao=NULL)
 Gets the current mesh manager of faceter.
outcome api_get_shell_facets (SHELL *shell, POLYGON_POINT_MESH *&pmesh, logical share_edge_vertices=TRUE, AcisOptions *ao=NULL)
 Obsolete: used only in pre-1-7 Faceting.
outcome api_initialize_faceter ()
 Initializes the faceter library.
outcome api_mark_faceted_faces (logical mark, AcisOptions *ao=NULL)
 Marks faceted faces so that an application may skip re-faceting them later.
outcome api_modify_vertex_template (int n_tokens, int tokens[], VERTEX_TEMPLATE *tplate, AcisOptions *ao=NULL)
 Modifies a vertex template.
outcome api_set_default_refinement (REFINEMENT *ref, AcisOptions *ao=NULL)
 Sets the default REFINEMENT in the faceter.
outcome api_set_default_vertex_template (VERTEX_TEMPLATE *tplate, AcisOptions *ao=NULL)
 Sets the default vertex template in the faceter.
outcome api_set_entity_refinement (ENTITY *ent, REFINEMENT *ref=(REFINEMENT *) NULL, logical apply_to_descendents=FALSE, AcisOptions *ao=NULL)
 Attaches a REFINEMENT to an entity (BODY, LUMP, SHELL, FACE), and optionally its lower topology.
outcome api_set_entity_vertex_template (ENTITY *ent, VERTEX_TEMPLATE *vt, logical apply_to_descendents, AcisOptions *ao=NULL)
 Sets the vertex template on an entity, and optionally its lower topology.
outcome api_set_mesh_manager (MESH_MANAGER *mm, AcisOptions *ao=NULL)
 Sets the current mesh manager of faceter.
outcome api_terminate_faceter ()
 Terminates the faceter library.
logical best_fit_transform (int num_points, SPAposition const *P, SPAposition const *Q, SPAunit_vector const *P_normals, SPAtransf &out_transform)
 This function is for experts only.
logical best_fit_transform (int num_points, SPAposition const *P, SPAposition const *Q, SPAtransf &out_transform)
 This function is for experts only.
int FacetEntity (ENTITY *ent, logical unfacetted_only, int &NumStrips=*(int *) NULL_REF, int &NumSingleTris=*(int *) NULL_REF, unsigned &SizeOfData=*(unsigned *) NULL_REF, facet_options *fo=NULL, AcisOptions *ao=NULL)
 Facets the faces of an entity, producing a SEQUENTIAL_MESH.
SEQUENTIAL_MESHGetSequentialMesh (const ENTITY *ent)
 Gets the SEQUENTIAL_MESH facet data attached to a face.
af_serializable_meshGetSerializableMesh (FACE *f)
 Queries FACE to see if there is an ATTRIB_EYE_ATTACHED_MESH containing an af_serializable_mesh.
SPAposition_cloud read_position_cloud_from_file (const char *file_name)
 Utility for reading csv file or xyz file into a point cloud.
SPAposition_cloud read_position_cloud_from_file (FILE *fp)
 Utility for reading csv file or xyz file into a point cloud.
SPAposition_cloud read_position_cloud_from_stl_file (const char *file_name, double duplicate_resolution)
 Reads the points from an STL file (either binary or text) into a SPAposition_cloud.
void write_position_cloud_to_file (const SPAposition_cloud &cloud, const char *file_name)
 Writes an xyz file from a SPAposition_cloud.
void write_position_cloud_to_file (const SPAposition_cloud &cloud, FILE *fp)
 Writes an xyz file from a SPAposition_cloud.

Detailed Description

Declared at <af_enum.hxx>.

Declared at <vtplate.hxx>.

Declared at <stlmmg.hxx>.

Declared at <SPAposition_cloud.hxx>.

Declared at <SPAepd_result.hxx>.

Declared at <sequential_mesh.hxx>.

Declared at <refine.hxx>.

Declared at <ptlist.hxx>.

Declared at <ppmface.hxx>.

Declared at <ppmeshmg.hxx>.

Declared at <ppm.hxx>.

Declared at <poly_vtx.hxx>.

Declared at <pcloud_selectors.hxx>.

Declared at <meshmg.hxx>.

Declared at <meshat.hxx>.

Declared at <mesh.hxx>.

Declared at <LinkedMeshManager.hxx>.

Declared at <LinkedMesh.hxx>.

Declared at <idx_mm.hxx>.

Declared at <idx_mesh.hxx>.

Declared at <idmeshmg.hxx>.

Declared at <gmeshmg.hxx>.

Declared at <fct_utl.hxx>.

Declared at <facet_options.hxx>.

Declared at <container_utils.hxx>.

Declared at <atteye3d.hxx>.

Declared at <api_align.hxx>.

Declared at <af_serializable_mesh.hxx>.


Define Documentation

#define IDX_MESH_APP   0x00494458

Defines the application identification for the INDEXED_MESH facet data in the ATTRIB_EYE_ATTACHED_MESH attribute attached to a FACE.

The only other MESH and MESH_MANAGER that can use this ID is LINKED_MESH and LINKED_MESH_MANAGER.

include <idx_mesh.hxx>

#define IDX_MESH_ID   0x00494458

Defines the user identification for the INDEXED_MESH facet data in the ATTRIB_EYE_ATTACHED_MESH attribute attached to a FACE.

Currently only one INDEXED_MESH can be attached to a FACE.

include <idx_mesh.hxx>

#define SERIAL_MESH_ID   0x00494456

Defines the user identification for the INDEXED_MESH facet data in the ATTRIB_EYE_ATTACHED_MESH attribute attached to a FACE.

Currently only one INDEXED_MESH can be attached to a FACE.

include <af_serializable_mesh.hxx>

#define UNSET_APP_ID   -1234

Defined for unsetting the application id of the mesh.

#define UNSET_USER_ID   -5678

Defined for unsetting the user id of the mesh.


Typedef Documentation

typedef uintptr_t AF_POINT_ID

The identifier in an AF_POINT is typedefed as an AF_POINT_ID.

typedef uintptr_t MESH_APP_ID

The id used mainly to search mesh attached to entity thru attribute.



Parameters:
MESH_APP_ID unique application id of the mesh.

include <meshmg.hxx>

typedef uintptr_t MESH_USER_ID

Another id used mainly to search mesh attached to entity thru attribute.



Parameters:
MESH_USER_ID unique user id of the mesh.

include <meshmg.hxx>

typedef void(* polygon_func_fn)(POLYGON *poly, void *SPAptr, int num)

The function pointer used by apply method to process each polygon.


Note: User has to implement the function.

Parameters:
poly polygon pointer.
SPAptr pointer to args.
num number of arg.

include <ppm.hxx>


Enumeration Type Documentation

Specifies the adjustment mode.

Parameters:
AF_ADJUST_NONE no adjustments.
AF_ADJUST_NON_GRID smooth vertices not on grid points.
AF_ADJUST_ALL smooth all vertices.

include <refine.hxx>

Directive to MESH_MANAGER to reuse or recalculate edge points during faceting.



Parameters:
AF_EDGE_RECOMPUTE recompute model edge points during faceting.
AF_EDGE_USE_CURRENT_POINTS use the existing points on the MODEL edge which are attached thru attribute.

include <meshmg.hxx>

Specifies the grid mode.

Parameters:
AF_GRID_NONE no grids at all.
AF_GRID_INTERIOR grids in interior.
AF_GRID_TO_EDGES allow grid to divide edges.
AF_GRID_ONE_DIR very much like AF_GRID_INTERIOR, but for spherical faces the nodes are evenly spaced only in the parametric 'U' direction.

include <refine.hxx>

Specifies the surface mode.

Parameters:
AF_SURF_ALL All surfaces.
AF_SURF_REGULAR regular surfaces.
AF_SURF_IRREGULAR irregular surfaces.
AF_SURF_PLANE planes.
AF_SURF_CONE cones.
AF_SURF_SPHERE spheres.
AF_SURF_TORUS Tori.
AF_SURF_SPLINE splines.
AF_SURF_MODE_ARRAY_DIM dimension arrays.

include <af_enum.hxx>

Specifies triangulation mode.

Parameters:
AF_TRIANG_NONE no triangulation.
AF_TRIANG_ALL triangulate everywhere.
AF_TRIANG_FRINGE_1 triangulate against the boundary.
AF_TRIANG_FRINGE_2 triangulate first grid level.
AF_TRIANG_FRINGE_3 triangulate 3 levels of fringe.
AF_TRIANG_FRINGE_4 triangulate 4 levels of fringe.

include <refine.hxx>

Edge quality options used by facet_options_visualization.


Role: Specifies the positional tolerance and angular tolerance when faceting edges. These tolerances are specified as a fraction of the positional and angular tolerances used to facet faces.

Parameters:
medium Edges are to be faceted using the same tolerances as faces.
better Edges are to be faceted using tolerances equal to one half the face tolerances.
best Edges are to be faceted using tolerances equal to one quarter the face tolerances.
other_edge_quality Do not use as an input setting. Only returned by queries.

include <facet_options.hxx>

Face quality options used by facet_options_visualization.


Role: Specifies the surface tolerance and normal tolerance when faceting faces.

Parameters:
coarse The requested surface tolerance is 0.004 times the diagonal of the body's bounding box and the normal tolerance is 40 degrees.
medium_coarse The requested surface tolerance is 0.002 times the diagonal of the body's bounding box and the normal tolerance is 30 degrees.
medium_fine The requested surface tolerance is 0.001 times the diagonal of the body's bounding box and the normal tolerance is 20 degrees.
fine The requested surface tolerance is 0.0005 times the diagonal of the body's bounding box and the normal tolerance is 10 degrees.
other_face_quality Do not use as an input setting. Only returned by queries.

include <facet_options.hxx>

Specifies the search order during mesh output.



Parameters:
MESH_MANAGER_SEARCH_NONE Do not attempt to share edges between successive polygons.
MESH_MANAGER_SEARCH_ALTERNATE Alternately reuse the last and second last. In a mesh of all triangles, this produces a "tristrip."
MESH_MANAGER_SEARCH_REUSE_LAST Always try to reuse the last edge. This emits all polygons around the start node before continuing.
MESH_MANAGER_SEARCH_REUSE_SECOND_LAST Always try to reuse the second to last edge. In a quad mesh, this produces a quad strip. In a triangle mesh it produces all polygons around the second vertex of the first triangle.
MESH_MANAGER_SEARCH_ANY Search for any possible reusable edge.
MESH_MANAGER_SEARCH_TRI_STRIP_FAN Produces triangle fans triangle strips and quad strips simultaneouly in a mesh which contains triangles and/or quads.

include <meshmg.hxx>

Polygon-type options used by facet_options_precise and facet_options_expert.

Parameters:
all_triangles The mesh should consists of triangles only.
triangles_on_fringe_only The mesh should have triangles only on its fringe.
no_triangles_full_grid The mesh should contain no triangles and the grid should be extended to face edges.
no_triangles_quad_tree The mesh should contain no triangles.

include <facet_options.hxx>

Specifies the derived class of the base class SEQUENTIAL_MESH.

Parameters:
INDEXED_MESH_TYPE INDEXED_MESH .
LINKED_MESH_TYPE LINKED_MESH .
UNSPECIFIED_MESH_TYPE creates a sequential mesh of unspecified type.

include <sequential_mesh.hxx>

Enumeration used by facet_options_expert to specify the mode in which the surface tolerance is treated.

Parameters:
af_surface_tolerance_from_refinement The surface tolerance should be read from refinements.
af_surface_tolerance_pure_number The absolute value of the surface tolerance is to be entered.
af_surface_tolerance_relative_to_body_diag The surface tolerance as a fraction of the body diagonal is to be entered.

include <facet_options.hxx>


Function Documentation

logical af_delete_facets ( ENTITY entity,
logical  keep_mark = FALSE 
)

Deletes all facets attached to an entity.



Role: Deletes all facets attached to an entity. In addition to meshes, this function deletes the facet information attached to the edges of the entity.

Effect: Changes model.

Parameters:
entity given entity.
keep_mark retain the "mark" on the entity indicating it is faceted.

include <meshat.hxx>

void af_delete_mesh ( ENTITY entity  ) 

Deletes all meshes attached to an entity.



Role: Deletes all meshes attached to an entity.

Effect: Changes model.

Parameters:
entity given entity.

include <meshat.hxx>

logical af_find_meshat ( const ENTITY entity,
MESH_APP_ID  app,
MESH_USER_ID  uid,
ATTRIB_EYE_ATTACHED_MESH *&  meshat 
)

Finds the mesh attribute attached to an entity.



Role: Finds the mesh attribute attached to an entity with the given user id and application id.

Effect: Changes model.

Parameters:
entity given entity.
app application id.
uid user id.
meshat output mesh attribute.

include <meshat.hxx>

logical af_query ( const ENTITY entity,
MESH_APP_ID  app,
MESH_USER_ID  uid,
MESH *&  mesh 
)

Gets the mesh attached to an entity.



Role: Gets the mesh attached to an entity given the application id and user id

Parameters:
entity given entity.
app application id.
uid user id.
mesh mesh attached to the given entity.

include <meshat.hxx>

logical af_update ( ENTITY entity,
MESH_APP_ID  app,
MESH_USER_ID  uid,
MESH mesh,
logical  delete_old = TRUE 
)

Attaches the mesh to an entity using a mesh attribute.



Role: Attaches the mesh to the attribute on the given entity.

If a mesh attribute does not exist, creates and attaches a mesh attribute to the entity.

Effect: Changes model.

Parameters:
entity given entity.
app application id.
uid user id.
mesh faceter's mesh class.
delete_old delete previously attached mesh.

include <meshat.hxx>

outcome api_align ( ENTITY_LIST const &  entities,
SPAposition_cloud const &  cloud,
SPAtransf trans_moving_points_to_entities,
align_options opts = NULL,
AcisOptions ao = NULL 
)

Attempts to compute the transform which best moves the points onto the boundary of the given entities.

This API is intended for workflows where point scan data of an object needs to be put in the same coordinate system as a B-Rep model of the same nominal object.

include <api_align.hxx>

outcome api_align ( ENTITY_LIST const &  entities,
int  num_points,
SPAposition const *  points,
SPAtransf trans_moving_points_to_entities,
align_options opts = NULL,
AcisOptions ao = NULL 
)

Attempts to compute the transform which best moves the points onto the boundary of the given entities.

This API is intended for workflows where point scan data of an object needs to be put in the same coordinate system as a B-Rep model of the same nominal object.

include <api_align.hxx>

outcome api_create_refinement ( REFINEMENT *&  ref,
AcisOptions ao = NULL 
)

Creates a refinement.



Role: This API creates a new refinement. The REFINEMENT is initialized with the default values. The use count of the returned refinement is also incremented. Functions calling this API function will typically need to call the remove method of the returned refinement to decrement its use count when it is no longer needed by the calling function.

Effect: Changes model

Journal: Not Available

Product(s): 3D Viz Exchange, 3D ACIS Modeler

Parameters:
ref new refinement.
ao acis options.

include <af_api.hxx>

outcome api_create_vertex_template ( int  n_tokens,
int  tokens[],
VERTEX_TEMPLATE *&  tplate,
AcisOptions ao = NULL 
)

This API creates a vertex template.



Role: Valid token types (defined in the nodedata.hxx file) and their values are:

POSITION_TOKEN 3D points (always required)
NORMAL_TOKEN normals
COLOR_TOKEN* vertex-color
TRANSPARENCY_TOKEN* degree of transparency at a vertex
TEXTURE_COORDS_TOKEN* s,t coordinates
UV_TOKEN surface parametric coordinates
UV_DERIVS_TOKEN surface parametric derivatives
UV_CHANGE_TOKEN magnitudes of uv derivatives

An asterisk, *, means tokens cannot be generated by the faceter and should be added by the application.

The use count of the returned vertex template is also incremented. Functions calling this API function will typically need to call the remove method of the returned vertex template to decrement its use count when it is no longer needed by the calling function.

Effect: Changes model

Journal: Not Available

Product(s): 3D Viz Exchange, 3D ACIS Modeler

Parameters:
n_tokens number of tokens.
tokens list of tokens.
tplate new vertex template returned.
ao acis options.

include <af_api.hxx>

outcome api_delete_all_AF_POINTs ( AF_POINT first_point,
AcisOptions ao = NULL 
)

Delete the linked list of AF_POINTs.



Role: Free up memory used by the linked list.

Effect:

Journal: Not Available

Product(s): 3D Viz Exchange, 3D ACIS Modeler

Parameters:
first_point Any point in the circular double linked list.
ao acis options.

include <af_api.hxx>

outcome api_delete_entity_facets ( ENTITY ent,
logical  apply_to_descendents = FALSE,
AcisOptions ao = NULL 
)

Deletes facets.



Role: Deletes the facets attached to the given entity and optionally to it's descendents.

Errors: Pointer to given entity must be non-NULL and to a BODY, LUMP, SHELL, or FACE.

Effect: Changes model

Journal: Not Available

Product(s): 3D Viz Exchange, 3D ACIS Modeler

Parameters:
ent faceted entity.
apply_to_descendents delete facets additionally on ent's descendents?
ao acis options.

include <af_api.hxx>

outcome api_entity_point_distance ( ENTITY_LIST const &  entities,
SPAposition_cloud const &  cloud,
SPAepd_result_list &  results,
SPAepd_options *  opts = NULL,
AcisOptions ao = NULL 
)

Finds the closest point on the given entities' boundary for each point in the cloud.

Stores result in SPAepd_result_list object.

include <SPAepd_result.hxx>

outcome api_entity_point_distance ( ENTITY entity,
SPAposition_cloud const &  cloud,
SPAepd_result_list &  results,
SPAepd_options *  opts = NULL,
AcisOptions ao = NULL 
)

Finds the closest point on the given entity's boundary for each point in the cloud.

Stores result in SPAepd_result_list object.

include <SPAepd_result.hxx>

outcome api_facet_area ( ENTITY entity,
double &  area,
AcisOptions ao = NULL 
)

Returns the area of the facets of entity.



Role: Gets the area of the facets currently attached to the entity. The entity must be already faceted for this function to be effective. Any parts of the entity not faceted will be ignored.

Effect: Read-only

Journal: Not Available

Product(s): 3D Viz Exchange, 3D ACIS Modeler

Parameters:
entity Entity for which area needs to be calculated.
area Area of the entity.
ao acis options.

include <af_api.hxx>

outcome api_facet_curve ( const curve in_curve,
const double  in_start_param,
const double  in_end_param,
const double  in_max_tol,
const double  in_max_length,
const double  in_max_angle,
int &  out_count,
AF_POINT *&  out_points,
AcisOptions ao = NULL 
)

Returns facets that approximate a curve.



Role: This API computes a list of points and parameter values that approximate the given curve to within one or more specified tolerances. At least one of the three in_max_ arguments must be non-zero. All three may be non-zero, in which case all three tolerances will be met. The returned outcome will be okay if any points are returned. System warnings are issued if input array sizes are too small or tolerances cannot be met.

This API function is not part of the ACIS Faceter. It is utilizes different functionality. This API function is used primarily with edges that are not faceted by the ACIS Faceter. Edges that bound faces that are faceted by the Faceter will be faceted when the faces are faceted. The facet points on these edges can be obtained using api_get_facet_edge_points.

Effect: Read-only

Journal: Not Available

Product(s): 3D Viz Exchange, 3D ACIS Modeler

Parameters:
in_curve Input curve to approximate with linear facets
in_start_param Input argument. Starting parameter of in_curve.
in_end_param Input argument. Ending parameter of in_curve. If less than in_start_param the two are reversed.
in_max_tol Input argument. The desired maximum distance between the approximating facets and the real curve. If zero, this is ignored and in_max_length and/or in_max_angle is used. If non-zero, should be greater than SPAresabs.
in_max_length Input argument. The desired maximum length of each facet (the max distance between facet points). If zero, this is ignored and in_max_tol and/or in_max_angle is used. If non-zero, should be greater than SPAresabs.
in_max_angle Input argument. The desired maximum angle, in degrees, between the tangents of the two endpoints of any facet. If zero, this is ignored and in_max_tol and/or in_max_length is used. To be considered non-zero, should be greater than 1.
out_count Output argument. Number of points needed to meet tolerances.
out_points Output argument. Linked list of facets. This points to the first point of the generated facets. This is a circular double linked list, so one can get to the end of the list using AF_POINT::next(REVERSE), and then traverse the list backwards, if needed. It is the responsibility of the user to free memory used by this linked list at the appropriate time using api_delete_all_AF_POINTs().
ao Input argument. Set to version 12 for old behavior.

include <af_api.hxx>

outcome api_facet_curve ( const curve in_curve,
const double  in_start_param,
const double  in_end_param,
const double  in_max_tol,
const double  in_max_length,
const double  in_max_angle,
const int  in_max_count,
int &  out_count,
SPAposition **  io_points,
double **  io_params,
AcisOptions ao = NULL 
)

Returns facets that approximate a curve.



Role: This API computes a list of points and parameter values that approximate the given curve to within one or more specified tolerances. At least one of the three in_max_ arguments must be non-zero. All three may be non-zero, in which case all three tolerances will be met. The returned outcome will be okay if any points are returned. System warnings are issued if input array sizes are too small or tolerances cannot be met.

This API function is not part of the ACIS Faceter. It is utilizes different functionality. This API function is used primarily with edges that are not faceted by the ACIS Faceter. Edges that bound faces that are faceted by the Faceter will be faceted when the faces are faceted. The facet points on these edges can be obtained using api_get_facet_edge_points.

Effect: Read-only

Journal: Not Available

Product(s): 3D Viz Exchange, 3D ACIS Modeler

Parameters:
in_curve Input curve to approximate with linear facets
in_start_param Input argument. Starting parameter of in_curve.
in_end_param Input argument. Ending parameter of in_curve. If less than in_start_param the two are reversed.
in_max_tol Input argument. The desired maximum distance between the approximating facets and the real curve. If zero, this is ignored and in_max_length and/or in_max_angle is used. If non-zero, should be greater than SPAresabs.
in_max_length Input argument. The desired maximum length of each facet (the max distance between facet points). If zero, this is ignored and in_max_tol and/or in_max_angle is used. If non-zero, should be greater than SPAresabs.
in_max_angle Input argument. The desired maximum angle, in degrees, between the tangents of the two endpoints of any facet. If zero, this is ignored and in_max_tol and/or in_max_length is used. To be considered non-zero, should be greater than 1.
in_max_count Input argument. Max number of points and parameters to generate (the size of the io_points array). If io_points or io_params are non-zero, must be <= size of smallest non-zero array. Otherwise it is ignored.
out_count Output argument. Number of points needed to meet tolerances. May be greater than in_max_count.
io_points On input, a preallocated array or zero. On output, facet points on curve. If zero, no points will be generated (assuming the caller wants just t-values). If pointing to zero, this API will allocate space to contain exactly out_count facet points. If pointing to non-zero, this API will assume that the array is big enough to contain in_max_count facet points. If this space is not enough (less than out_count), then only the first in_max_count points are returned. It is the responsibility of the user to free this memory using ACIS_DELETE [].
io_params On input, a pre-allocated array or zero. On output, parameters (t-values) of facet points on curve. If zero, no points will be generated (assuming the caller wants just 3D points). If pointing to zero, this API will allocate space to contain exactly out_count parameters. If pointing to non-zero, this API will assume that the array is big enough to contain in_max_count parameters. If this space is not enough (less than out_count), then only the first in_max_count parameters are returned. It is the responsibility of the user to free this memory using ACIS_DELETE [] STD_CAST.
ao Input argument. Set to version 12 for old behavior.

include <af_api.hxx>

outcome api_facet_edge ( const EDGE in_EDGE,
const double  in_max_tol,
const double  in_max_length,
const double  in_max_angle,
int &  out_count,
AF_POINT *&  out_points,
AcisOptions ao = NULL 
)

Returns facets that approximate an edge.



Role: This API computes a list of points and parameter values that approximate the given edge to within one or more specified tolerances. At least one of the three in_max_ arguments must be non-zero. All three may be non-zero, in which case all three tolerances will be met. The returned outcome will be okay if any points are returned. System warnings are issued if input array sizes are too small or tolerances cannot be met.

This API function is not part of the ACIS Faceter. It is utilizes different functionality. This API function is used primarily with edges that are not faceted by the ACIS Faceter. Edges that bound faces that are faceted by the Faceter will be faceted when the faces are faceted. The facet points on these edges can be obtained using api_get_facet_edge_points.

Effect: Read-only

Journal: Not Available

Product(s): 3D Viz Exchange, 3D ACIS Modeler

Parameters:
in_EDGE Input EDGE to approximate with linear facets
in_max_tol Input argument. The desired maximum distance between the approximating facets and the real curve. If zero, this is ignored and in_max_length and/or in_max_angle is used. If non-zero, should be greater than SPAresabs.
in_max_length Input argument. The desired maximum length of each facet (the max distance between facet points). If zero, this is ignored and in_max_tol and/or in_max_angle is used. If non-zero, should be greater than SPAresabs.
in_max_angle Input argument. The desired maximum angle, in degrees, between the tangents of the two endpoints of any facet. If zero, this is ignored and in_max_tol and/or in_max_length is used. To be considered non-zero, should be greater than 1.
out_count Output argument. Number of points needed to meet tolerances.
out_points Output argument. Linked list of facets. This points to the first point of the generated facets. This is a circular double linked list, so one can get to the end of the list using AF_POINT::next(REVERSE), and then traverse the list backwards, if needed. It is the responsibility of the user to free memory used by this linked list at the appropriate time using api_delete_all_AF_POINTs().
ao Input argument. Set to version 12 for old behavior.

include <af_api.hxx>

outcome api_facet_edge ( const EDGE in_EDGE,
const double  in_max_tol,
const double  in_max_length,
const double  in_max_angle,
const int  in_max_count,
int &  out_count,
SPAposition **  io_points,
double **  io_params,
AcisOptions ao = NULL 
)

Returns facets that approximate an edge.



Role: This API computes a list of points and parameter values that approximate the given edge to within one or more specified tolerances. At least one of the three in_max_ arguments must be non-zero. All three may be non-zero, in which case all three tolerances will be met. The returned outcome will be okay if any points are returned. System warnings are issued if input array sizes are too small or tolerances cannot be met.

This API function is not part of the ACIS Faceter. It is utilizes different functionality. This API function is used primarily with edges that are not faceted by the ACIS Faceter. Edges that bound faces that are faceted by the Faceter will be faceted when the faces are faceted. The facet points on these edges can be obtained using api_get_facet_edge_points.

Effect: Read-only

Journal: Not Available

Product(s): 3D Viz Exchange, 3D ACIS Modeler

Parameters:
in_EDGE Input EDGE to approximate with linear facets
in_max_tol Input argument. The desired maximum distance between the approximating facets and the real curve. If zero, this is ignored and in_max_length and/or in_max_angle is used. If non-zero, should be greater than SPAresabs.
in_max_length Input argument. The desired maximum length of each facet (the max distance between facet points). If zero, this is ignored and in_max_tol and/or in_max_angle is used. If non-zero, should be greater than SPAresabs.
in_max_angle Input argument. The desired maximum angle, in degrees, between the tangents of the two endpoints of any facet. If zero, this is ignored and in_max_tol and/or in_max_length is used. To be considered non-zero, should be greater than 1.
in_max_count Input argument. Max number of points and parameters to generate (the size of the io_points array). If io_points or io_params are non-zero, must be <= size of smallest non-zero array. Otherwise it is ignored.
out_count Output argument. Number of points needed to meet tolerances. May be greater than in_max_count.
io_points On input, a pre-allocated array or zero. On output, facet points on the edge. If zero, no points will be generated (assuming the caller wants just t-values). If pointing to zero, this API will allocate space to contain exactly out_count facet points. If pointing to non-zero, this API will assume that the array is big enough to contain in_max_countfacet points. If this space is not enough (less than out_count), then only the first in_max_countpoints are returned. It is the responsibility of the user to free this memory using ACIS_DELETE [].
io_params On input, a preallocated array or zero. On output, parameters (t-values) of facet points on the edge. If zero, no points will be generated (assuming the caller wants just 3D points). If pointing to zero, this API will allocate space to contain exactly out_count parameters. If pointing to non-zero, this API will assume that the array is big enough to contain in_max_countparameters. If this space is not enough (less than out_count), then only the first in_max_countparameters are returned. It is the responsibility of the user to free this memory using ACIS_DELETE [] STD_CAST.
ao Input argument. Set to version 12 for old behavior.

include <af_api.hxx>

outcome api_facet_entities ( ENTITY owner,
ENTITY_LIST entity_list,
facet_options fo = NULL,
AcisOptions ao = NULL 
)

Creates facets for a list of entities.



Role: This API function provides a way to facet more than one entity at a time. Note: all entities in the given entity list must be owned by the given owner.

The typical use of this function is to incrementally facet the faces of a body, when a list of modified or new faces are passed to be faceted. For more information on incremental faceting, refer to the Technical Article on Incremental Faceting.

The behavior of the Faceter is specified by the facet_options object. The default behavior, if a facet_options object is not specified, is to use a Visualization Facet Options object. For more information on using facet_options objects, refer to the Technical Article on Facet Options.

The facets are passed on to the current MESH_MANAGER, which appropriately directs the data. For example, it may display the facets, output them to a file, or attach them to a face. For more information on mesh managers, refer to the Technical Article on Mesh Managers.

Errors: Owner entity must be non-NULL and to a BODY, LUMP or SHELL. entity_list must be non-NULL and non-empty. All entity pointers in entity_list must be non-NULL and to a BODY, LUMP, SHELL, or FACE.

Effect: Changes model

Journal: Available

Product(s): 3D Viz Exchange, 3D ACIS Modeler

Parameters:
owner owning entity.
entity_list entities to facet.
fo instance of a facet_options object, specifying how to facet the entities.
ao acis options.
See also:
api_facet_entity, api_facet_entities, api_facet_unfaceted_entity, api_facet_unfaceted_entities

include <af_api.hxx>

outcome api_facet_entity ( ENTITY entity,
facet_options fo = NULL,
AcisOptions ao = NULL 
)

Creates facets for an entity.



Role: This API function facets the given entity (and sub-entities). The behavior of the Faceter may be specified by the facet_options object. The default behavior, if a facet_options object is not specified, is to use a Visualization Facet Options object. For more information on using facet_options objects, refer to the Technical Article on Facet Options. Alternatively, the behavior of the Faceter may be specified using REFINEMENT objects. For more information on using refinements, refer to the Technical Article on Refinements.

The facets are passed on to the current MESH_MANAGER, which appropriately directs the data. For example, it may display the facets, output them to a file, or attach them to a face. For more information on mesh managers, refer to the Technical Article on Mesh Managers.

Errors: Pointer to given entity must be non-NULL and to a BODY, LUMP, SHELL, or FACE.

Effect: Changes model

Journal: Available

Product(s): 3D Viz Exchange, 3D ACIS Modeler

Parameters:
entity entity to facet.
fo instance of a facet_options object, specifying how to facet the entities.
ao acis options.
See also:
api_facet_entity, api_facet_entities, api_facet_unfaceted_entity, api_facet_unfaceted_entities

include <af_api.hxx>

outcome api_facet_unfaceted_entities ( ENTITY owner,
ENTITY_LIST entity_list,
facet_options fo = NULL,
AcisOptions ao = NULL 
)

Facets unfaceted (unmarked) faces given a list of entities.



Role: This API function provides a way to facet more than one unfaceted entity at a time. Note: the entities in the given entity list should all be owned by the given owner.

This API facets faces that were not faceted previously; i.e., not marked with a faceted attribute. Marked faces are assumed to have been faceted previously. If facet data is attached to the face it will remain there.

The behavior of the Faceter is specified by the facet_options object. The default behavior, if a facet_options object is not specified, is to use a Visualization Facet Options object. For more information on using facet_options objects, refer to the Technical Article on Facet Options.

Errors: Owner entity must be non-NULL and to a BODY, LUMP or SHELL. entity_list must be non-NULL and non-empty. All entity pointers in entity_list must be non-NULL and to a BODY, LUMP, SHELL, or FACE.

Effect: Changes model

Journal: Available

Product(s): 3D Viz Exchange, 3D ACIS Modeler

Parameters:
owner owning entity.
entity_list entities to facet.
fo instance of a facet_options object, specifying how to facet the entities.
ao acis options.
See also:
api_facet_entity, api_facet_entities, api_facet_unfaceted_entity, api_facet_unfaceted_entities, api_mark_faceted_faces

include <af_api.hxx>

outcome api_facet_unfaceted_entity ( ENTITY entity,
facet_options fo = NULL,
AcisOptions ao = NULL 
)

Facets unfaceted (unmarked) face(s) of an entity.



Role: This API function facets the face(s) of the given entity if they have not been faceted already. Marked faces are assumed to have been faceted previously. If facet data is attached to a face it will remain there.

The behavior of the Faceter is specified by the facet_options object. The default behavior, if a facet_options object is not specified, is to use a Visualization Facet Options object. For more information on using facet_options objects, refer to the Technical Article on Facet Options.

Errors: Pointer to given entity must be non-NULL and to a BODY, LUMP, SHELL, or FACE.

Effect: Changes model

Journal: Available

Product(s): 3D Viz Exchange, 3D ACIS Modeler

Parameters:
entity entity to facet.
fo instance of a facet_options object, specifying how to facet the entities.
ao acis options.
See also:
api_facet_entity, api_facet_entities, api_facet_unfaceted_entity, api_facet_unfaceted_entities, api_mark_faceted_faces

include <af_api.hxx>

outcome api_faceted_face ( FACE face,
logical &  faceted,
AcisOptions ao = NULL 
)

Determines if a face has been faceted or not.



Role: The face is checked to see if a mesh has been attached as an attribute. Thus, if the mesh manager does not store its polygons as a mesh on the face, this function will always return a negative answer.

Errors: Pointer to face is NULL or not to a FACE.

Effect: Read-only

Journal: Not Available

Product(s): 3D Viz Exchange, 3D ACIS Modeler

Parameters:
face face to be examined.
faceted returns TRUE if the face has been faceted.
ao acis options.

include <af_api.hxx>

outcome api_fast_find_face ( SPAposition const &  ray_pos,
SPAunit_vector const &  ray_dir,
BODY in_body,
int &  in_count,
ENTITY **&  in_faces = *(ENTITY ***) NULL_REF,
SPAposition *&  in_hits = *(SPAposition **) NULL_REF,
double *&  in_params = *(double **) NULL_REF,
AcisOptions ao = NULL 
)

Fires a ray through a body and returns the hits.



Role: ray_pos defines the start point of the ray, and ray_dir defines the direction of the ray.

The number of hits (the intersections between the ray and a face) is retuned in in_count. For each hit, the API returns the face intersected in in_faces, the position of the hit in in_hits, and the distance along the ray of the hit in in_params.

The body must be faceted prior to calling this function.

The results of this function are accurate only to within the facet tolerance. If more accurate results are needed api_raytest_body or api_raytest_ents should be used; these two functions may also be faster for analytic surfaces.

Effect: Read-only

Journal: Available

Product(s): 3D Viz Exchange, 3D ACIS Modeler

Parameters:
ray_pos ray start point.
ray_dir ray direction.
in_body target body.
in_count number of hits.
in_faces entities hit; default is none.
in_hits positions hit; default is none.
in_params ray parameters of the hit.
ao acis options.

include <af_api.hxx>

outcome api_get_default_refinement ( REFINEMENT *&  ref,
AF_SURF_MODE  surftype = AF_SURF_ALL,
AcisOptions ao = NULL 
)

Gets the default REFINEMENT associated with a type of surface.



Role: A REFINEMENT is always returned. If a REFINEMENT specific to the surface type is not available, one that is associated with a more general type is returned. The surface type may be one of:

AF_SURF_ALL = all surfaces
AF_SURF_REGULAR = plane, cone, sphere, torus
AF_SURF_IRREGULAR = spline
AF_SURF_PLANE = plane
AF_SURF_CONE = cone
AF_SURF_SPHERE = sphere
AF_SURF_TORUS = torus
AF_SURF_SPLINE = spline

If the surface type is not specified, it is set to AF_SURF_ALL.

The use count of the returned refinement is incremented. Functions calling this API function will typically need to call the remove method of the returned refinement to decrement its use count when it is no longer needed by the calling function.

Effect: Read-only

Journal: Not Available

Product(s): 3D Viz Exchange, 3D ACIS Modeler

Parameters:
ref default refinement.
surftype surface type of refinement (optional).
ao acis options.

include <af_api.hxx>

outcome api_get_default_vertex_template ( VERTEX_TEMPLATE *&  tplate,
AcisOptions ao = NULL 
)

Gets the default vertex template.

If none exists, a NULL value is returned.

Effect: Read-only

Journal: Not Available

Product(s): 3D Viz Exchange, 3D ACIS Modeler

Parameters:
tplate default vertex template returned.
ao acis options.

include <af_api.hxx>

outcome api_get_entity_refinement ( ENTITY entity,
REFINEMENT *&  ref,
AF_SURF_MODE  surftype = AF_SURF_ALL,
AcisOptions ao = NULL 
)

Gets the refinement of the given surface type attached to the given entity.



Role: If no refinement with the given surface type is found, a NULL value is returned. The surface type may be one of:

AF_SURF_ALL = all surfaces
AF_SURF_REGULAR = plane, cone, sphere, torus
AF_SURF_IRREGULAR = spline
AF_SURF_PLANE = plane
AF_SURF_CONE = cone
AF_SURF_SPHERE = sphere
AF_SURF_TORUS = torus
AF_SURF_SPLINE = spline

If surface type is not specified, it is set to AF_SURF_ALL.

The use count of the returned refinement is incremented. Functions calling this API function will typically need to call the remove method of the returned refinement to decrement its use count when it is no longer needed by the calling function.

Errors: Pointer to given entity must be non-NULL and to a BODY, LUMP, SHELL, or FACE.

Effect: Read-only

Journal: Available

Product(s): 3D Viz Exchange, 3D ACIS Modeler

Parameters:
entity entity to examine.
ref refinement returned.
surftype surface type of refinement (optional).
ao acis options.

include <af_api.hxx>

outcome api_get_entity_vertex_template ( ENTITY ent,
VERTEX_TEMPLATE *&  vt,
AcisOptions ao = NULL 
)

Gets the vertex template attached to the entity.



Role: Gets the vertex template attached to the entity. If not found, a NULL value is returned.

The use count of the returned vertex template is incremented. Functions calling this API function will typically need to call the remove method of the returned vertex template to decrement its use count when it is no longer needed by the calling function.

Errors: Pointer to given entity must be non-NULL and to a BODY, LUMP, SHELL, or FACE.

Effect: Read-only

Journal: Not Available

Product(s): 3D Viz Exchange, 3D ACIS Modeler

Parameters:
entity entity to examine.
vt vertex template returned.
ao acis options.
See also:
api_get_entity_vertex_template, api_set_entity_vertex_template

include <af_api.hxx>

outcome api_get_facet_edge_points ( EDGE edge,
SPAposition *&  polyline,
int &  num_pts,
AcisOptions ao = NULL 
)

Gets facet points of the given edge generated by the faceter.



Role: This API gets the facet points of the edge, if they have been generated by the faceter. If the corresponding faces have not been faceted, then it returns a NULL polyline array pointer.

Effect: Read-only

Journal: Available

Product(s): 3D Viz Exchange, 3D ACIS Modeler

Parameters:
edge edge entity.
polyline array of positions.
num_pts number of elements in array.
ao acis options.

include <af_api.hxx>

outcome api_get_indexed_mesh ( ENTITY entity,
INDEXED_MESH *&  mesh,
AcisOptions ao = NULL 
)

Gets the indexed mesh attached to the entity.



Role: If an indexed mesh is not attached to the entity, a NULL value is returned.

Errors: Pointer to entity is NULL or not to a BODY, LUMP, SHELL, or FACE.

Effect: Read-only

Journal: Not Available

Product(s): 3D Viz Exchange, 3D ACIS Modeler

Parameters:
entity entity to examine.
mesh indexed mesh found.
ao acis options.

include <af_api.hxx>

outcome api_get_mesh_manager ( MESH_MANAGER *&  mm,
AcisOptions ao = NULL 
)

Gets the current mesh manager of faceter.



Role: Returns the current mesh manager of the faceter. If the mesh manager has been set to NULL, a NULL value will be returned.

Effect: Read-only

Journal: Not Available

Product(s): 3D Viz Exchange, 3D ACIS Modeler

Parameters:
mm current mesh returned.
ao acis options.

include <af_api.hxx>

outcome api_get_shell_facets ( SHELL shell,
POLYGON_POINT_MESH *&  pmesh,
logical  share_edge_vertices = TRUE,
AcisOptions ao = NULL 
)

Obsolete: used only in pre-1-7 Faceting.



Role: This API gets the facets from all faceted faces within a shell and returns them as a single POLYGON_POINT_MESH. The faceted faces must have the same vertex template.

Errors: Pointer to shell is NULL or not to a SHELL. Inconsistent vertex templates.

Limitations: Pre-1.7 compatibility only.

Effect: Read-only

Journal: Not Available

Product(s): 3D Viz Exchange, 3D ACIS Modeler

Parameters:
shell shell to examine.
pmesh mesh collected.
share_edge_vertices share edge vertices returned.
ao acis options.

include <af_api.hxx>

outcome api_initialize_faceter (  ) 

Initializes the faceter library.



Role: This API initializes the faceter with some default refinements that produces only triangles and quadrilaterals. A mesh manager is required to direct the facet data generated by the faceter.

Effect: System routine

Journal: Not Available

Product(s): 3D Viz Exchange, 3D ACIS Modeler

include <af_api.hxx>

outcome api_mark_faceted_faces ( logical  mark,
AcisOptions ao = NULL 
)

Marks faceted faces so that an application may skip re-faceting them later.



Role: When this API is called with a TRUE argument all subsequent faceting operations will mark faceted faces with a mark showing that the face has been faceted. That is done by attaching an attribute to the faceted face. That attribute is lost when the face is engaged in a merging, splitting, or transformation operation.
A call to this function affects all subsequent faceting operations. To ignore marking after initiating it, this API function must be called with FALSE argument.

Effect: Changes model

Journal: Not Available

Product(s): 3D Viz Exchange, 3D ACIS Modeler

Parameters:
mark flag to add or ignore marks.
ao acis options.

include <af_api.hxx>

outcome api_modify_vertex_template ( int  n_tokens,
int  tokens[],
VERTEX_TEMPLATE tplate,
AcisOptions ao = NULL 
)

Modifies a vertex template.

The valid token types are:

POSITION_TOKEN (0) = 3D points (always required)
NORMAL_TOKEN (1) = normals
COLOR_TOKEN (2*) = vertex color

Errors: Pointer to vertex template must be non-NULL and to a VERTEX_TEMPLATE.

Effect: Changes model

Journal: Not Available

Product(s): 3D Viz Exchange, 3D ACIS Modeler

Parameters:
n_tokens number of tokens in the array.
tokens array of tokens.
tplate vertex template modified.
ao acis options.

include <af_api.hxx>

outcome api_set_default_refinement ( REFINEMENT ref,
AcisOptions ao = NULL 
)

Sets the default REFINEMENT in the faceter.



Role: If the refinement is NULL, it will default to the default refinement created by api_initialise_faceter.

When you create a refinement and pass it to api_set_default_refinement, ACIS takes ownership of that refinement object, including responsibility for its deletion. More specifically, the use count of the given refinement is incremented. If another default refinement has the same surface type, its use count will be decremented.

Errors: Pointer to given refinement, if non-NULL, must be a REFINEMENT.

Effect: Changes model

Journal: Available

Product(s): 3D Viz Exchange, 3D ACIS Modeler

Parameters:
ref default refinement to set.
ao acis options.

include <af_api.hxx>

outcome api_set_default_vertex_template ( VERTEX_TEMPLATE tplate,
AcisOptions ao = NULL 
)

Sets the default vertex template in the faceter.

If the vertex template is NULL, it will use the default settings in the faceter.

The use count of the given vertex template is incremented when it is made the default. If another default vertex template exists, its use count will be decremented.

Errors: Pointer to vertex template, if non-NULL, must be a VERTEX_TEMPLATE.

Effect: Changes model

Journal: Not Available

Product(s): 3D Viz Exchange, 3D ACIS Modeler

Parameters:
tplate default vertex template.
ao acis options.

include <af_api.hxx>

outcome api_set_entity_refinement ( ENTITY ent,
REFINEMENT ref = (REFINEMENT *) NULL,
logical  apply_to_descendents = FALSE,
AcisOptions ao = NULL 
)

Attaches a REFINEMENT to an entity (BODY, LUMP, SHELL, FACE), and optionally its lower topology.



Role: This API attaches a REFINEMENT to an ENTITY and (if apply_to_descend is TRUE) all of its descendents (possibly lumps, shells, and faces). If the REFINEMENT is NULL, all the REFINEMENTs are removed from the entity and (if apply_to_descend is TRUE) all of its descendents.

The use count of the given refinement is incremented when it is attached to an entity. If another refinement of the same surface type is attached to an entity, its use count will be decremented when it is detached.

Errors: Pointer to given entity must be non-NULL and to a BODY, LUMP, SHELL, or FACE. Pointer to given refinement, if non-NULL, must be a REFINEMENT.

Effect: Changes model

Journal: Available

Product(s): 3D Viz Exchange, 3D ACIS Modeler

Parameters:
ent entity to attach refinement.
ref refinement to attach.
apply_to_descendents attach the refinement additionally to the entity's descendents?
ao acis options.

include <af_api.hxx>

outcome api_set_entity_vertex_template ( ENTITY ent,
VERTEX_TEMPLATE vt,
logical  apply_to_descendents,
AcisOptions ao = NULL 
)

Sets the vertex template on an entity, and optionally its lower topology.



Role: This API attaches a vertex template to an entity and (if apply_to_descend is TRUE) all of its descendents (possibly lumps, shells, and faces). If the vertex template is NULL, all the vertex templates are removed from the entity and (if apply_to_descend is TRUE) all of its descendents.

The use count of the given vertex template is incremented when it is attached to an entity. If another vertex template is attached to an entity, its use count will be decremented when it is detached.

Errors: Pointer to given entity must be non-NULL and to a BODY, LUMP, SHELL, or FACE. Pointer to given vertex template, if non-NULL, must be a VERTEX_TEMPLATE.

Effect: Changes model

Journal: Not Available

Product(s): 3D Viz Exchange, 3D ACIS Modeler

Parameters:
entity entity to examine.
vt vertex template to set.
apply_to_descendents attach the vertex template additionally to the entity's descendents?
ao acis options.
See also:
api_get_entity_vertex_template, api_set_entity_vertex_template

include <af_api.hxx>

outcome api_set_mesh_manager ( MESH_MANAGER mm,
AcisOptions ao = NULL 
)

Sets the current mesh manager of faceter.



Role: Set the current mesh manager in the faceter. A mesh manager is required to direct the facet data generated in the faceter. If it is set to NULL, no output will be provided. For additional information on mesh managers refer to the Technical Article Mesh Managers.

Errors: Pointer to mesh manager, if non-NULL, must be a MESH_MANAGER or a class derived from MESH_MANAGER.

Effect: Changes mesh manager used for faceting.

Journal: Not Available

Product(s): 3D Viz Exchange, 3D ACIS Modeler

Parameters:
mm mesh manager to set.
ao acis options.

include <af_api.hxx>

outcome api_terminate_faceter (  ) 

Terminates the faceter library.



Role: This API terminates the faceter and free its internal data. Further calls made to the faceter may cause unpredictable problems.

Effect: System Routine

Journal: Not Available

Product(s): 3D Viz Exchange, 3D ACIS Modeler

include <af_api.hxx>

logical best_fit_transform ( int  num_points,
SPAposition const *  P,
SPAposition const *  Q,
SPAunit_vector const *  P_normals,
SPAtransf out_transform 
)

This function is for experts only.

It returns the approximate least squares transform which best takes Q onto P in the sense that sum_i((P[i] - Q[i]*out_transform)P_normals[i])^2 is minimal. The equations for solving this least squares problem are nonlinear. This function returns a solution based on a linearizing approximation. The approximation error goes to zero as the transform approaches the identity. When using noisy data, the caller is responsible for checking the transform we get from this is reasonable. If this gives an unreliable answer try using the other signature of best_fit_transform.

The return value is 1 if everything is ok and 0 otherwise. This function will not throw.

include <api_align.hxx>

logical best_fit_transform ( int  num_points,
SPAposition const *  P,
SPAposition const *  Q,
SPAtransf out_transform 
)

This function is for experts only.

It returns the least squares transform which best takes Q onto P in the sense that sum_i(P[i] - Q[i]*out_transform).len_sq() is minimal.

The return value is 1 if everything is ok and 0 otherwise. This function will not throw.

include <api_align.hxx>

int FacetEntity ( ENTITY ent,
logical  unfacetted_only,
int &  NumStrips = *(int *) NULL_REF,
int &  NumSingleTris = *(int *) NULL_REF,
unsigned &  SizeOfData = *(unsigned *) NULL_REF,
facet_options fo = NULL,
AcisOptions ao = NULL 
)

Facets the faces of an entity, producing a SEQUENTIAL_MESH.



Role: Facets the input entity using the appropriate api_facet_ function. This function provides a quick and easy way to facet entities, using one of two common mesh managers. If the global option mesh_manager_opt is set to "linked", a LINKED_MESH_MANAGER is used. Otherwise, an INDEXED_MESH_MANAGER is used. The default for the mesh_manager_opt option is "indexed". These mesh managers attach facet data to faces using attributes. This facet data may be retrieved using the function GetSequentialMesh. Returns the number of facets generated.

The behavior of the Faceter is specified by the facet_options object. For more information on using facet_options objects, refer to the Technical Article on Facet Options.

The preferred interface is to call api_set_mesh_manager (specifying any valid MESH_MANAGER) and then call api_facet_entity. This allows applications to set the mesh manager to any valid mesh manager.

Effect: Attaches facet data to the faces of the input entity.

Journal: Not Available

Parameters:
ent Input entity containing the faces to facet.
unfacetted_only Input argument. Set to TRUE if you wish to skip facetting faces that already have facet data attached.
NumStrips Optional output variable, used internally by Spatial.
NumSingleTris Optional output variable, used internally by Spatial.
SizeOfData Optional output variable, used internally by Spatial.
fo instance of a facet_options object, specifying how to facet the faces.
ao ACIS options.

include <fct_utl.hxx>

SEQUENTIAL_MESH* GetSequentialMesh ( const ENTITY ent  ) 

Gets the SEQUENTIAL_MESH facet data attached to a face.



Role: Usually used after calling the function FacetEntity . Retrieves the facet data created by FacetEntity .

Effect: Read only

Journal: Not Available

Parameters:
ent Input face that should have SEQUENTIAL_MESH facet data attached to it. This will be one of the following derived classes: INDEXED_MESH or LINKED_MESH .

include <fct_utl.hxx>

af_serializable_mesh* GetSerializableMesh ( FACE f  ) 

Queries FACE to see if there is an ATTRIB_EYE_ATTACHED_MESH containing an af_serializable_mesh.

SPAposition_cloud read_position_cloud_from_file ( const char *  file_name  ) 

Utility for reading csv file or xyz file into a point cloud.

The csv file or xyz file must be a text file for this function to read it. Each row in the input file must have the format

double double double or double,double,double

include <SPAposition_cloud.hxx>

SPAposition_cloud read_position_cloud_from_file ( FILE *  fp  ) 

Utility for reading csv file or xyz file into a point cloud.

The csv file or xyz file must be a text file for this function to read it. Each row in the input file must have the format

double double double or double,double,double

include <SPAposition_cloud.hxx>

SPAposition_cloud read_position_cloud_from_stl_file ( const char *  file_name,
double  duplicate_resolution 
)

Reads the points from an STL file (either binary or text) into a SPAposition_cloud.

It also removes any duplicate vertices (where vertices are duplicated if one is within duplicate_resolution of the other ). The exact cloud output depends on the order the files are read in, but is guaranteed to have no points within duplicate_resolution of each other.

include <SPAposition_cloud.hxx>

void write_position_cloud_to_file ( const SPAposition_cloud cloud,
const char *  file_name 
)

Writes an xyz file from a SPAposition_cloud.

Note that the round trip of loading a cloud using read_position_cloud_from_file and this function will reorder the points.

include <SPAposition_cloud.hxx>

void write_position_cloud_to_file ( const SPAposition_cloud cloud,
FILE *  fp 
)

Writes an xyz file from a SPAposition_cloud.

Note that the round trip of loading a cloud using read_position_cloud_from_file and this function will reorder the points.

include <SPAposition_cloud.hxx>