uf_facet.h (²é¿´Ô´´úÂë)
¸ÅÊö
Open API support for FACET.
The subroutines in this chapter provide access to manipulating faceted
models in NX. The creation of faceted (polyhedral) models is
intended primarily for use in visualization and for use in the packaging
components of NX (specifically NX Clearance Analysis).
NOTE: Parts created before NX5 that contain a facet which is part of a
lightweight reference set (or facet reference set), will automatically
be converted during part retrieval in NX5 and beyond. The conversion
will take facets that originally had a subtype of 0 (UF_faceted_model_normal_subtype)
and convert it to a subtype of 3 (UF_faceted_model_jt_body_subtype).
Please be aware of this when cycling thru part files using the object
type and subtype.
The routines in this section allow you to:
. Add a facet to a faceted model.
. Inquire the facet adjacent to a specified edge of a specified facet.
. Inquire the convexity of an edge between two facets.
. Inquire the default faceting parameters.
. Inquire the maximum number of vertices of any facet in the model.
. Determines faceting parameters when given a faceted model which was
generated from (and remains associated with a solid).
. Inquire the faceted model(s) of a specified solid body or face.
. Inquire the number of facets in a model.
. Inquire the vertex normals of the facet with the specified facet id.
. Inquire the parameters of the facet vertices for the specified facet id.
. Inquire the number of vertices in a facet.
. Inquire the plane equation of a facet.
. Inquire the solid model on which a faceted model is based.
. Inquire the convexity of a vertex in a facet.
. Inquire the vertices of the facet with the specified facet id.
. Create an empty faceted model which is not associated with any solid.
. Iterate over the facets in a faceted model.
. Delete a facet from a model.
. Disassociate a faceted model from its generating solid.
. Produce a faceted model from a solid body or face.
. Determine if a specified edge appears in a specified facet.
. Inquire if a facet is convex.
. Inquire if a faceted model is convex.
. Inquire if a faceted model is up to date.
. Indicate that edits to the specified faceted model are now complete.
. Set a facet as being adjacent to another facet along a specified edge.
. Set the default faceting parameters for creating faceted models from
solid bodies and faces.
. Update a faceted model if it was generated from a solid.
. Change the location of a vertex in a facet.
A faceted model consists of a collection of facets each of which is
identified within the model by a facet_id. Each facet has three or more
vertices which (for an N sided facet) are numbered 0 to (N-1), these numbers
are termed vertex_ids. Similarly the edges in a facet are numbered 0 to
(N-1), and the edge I is that between the vertices I and (I+1)modN, these
numbers are termed edge_ids. The vertices of the facet are ordered
anticlockwise when viewed down the facet normal.
Faceted models can be created in one of two ways:
1. By faceting a solid body or a face of a solid body. In this case the
faceted model is associated with the solid object from which it was
generated (unless this link is broken explicitly); if the solid object
is modified then the faceted model is marked as out of date, if the
solid object is deleted then the faceted model is also deleted, and the
faceted model will be displayed only if the solid model is not
available to be displayed (for example, the solid object is not in the
reference set containing the faceted model).
If a faceted model is out of date, then it can be regenerated from its
associated solid object. Note that this will happen in any case when
the part containing the faceted model is saved.
2. By creating an empty faceted model to which facets are then added, and
adjacencies between facets are specified. In this case there is no
association with any solid object.
Both of the above techniques are illustrated in the example program
provided.
The individual facets in an NX faceted model are planar within the the linear
modeling tolerance used by NX. This applies regardless of which of the two
above methods is used to create the faceted model. Similarly, an angular
tolerance is used when the convexity of a vertex in a facet, or between two
facets sharing an edge is computed.
The CAM users can create the facet models that can be used by the Fixed Axis
Surface Contouring and Cavity Milling processor as preprocessing data. Some
of the default faceting parameter values have to change for such use. Once a
facet model is created using this module, it can then be marked for use by
the CAM processors using the module uf_cam_prepro.h
NX faceted models are occurrenceable and can be added to reference sets.
They are usable for visualisation and clearance analysis, but cannot be
dimensioned to, so they are of little use in drafting.
The functions that are described below are divided into the following
sections:
a) Setting and enquiring module parameters
b) Creating and updating faceted models
c) Enquiring data from faceted models