 |
PK_MESH_make_surf_trimmed |
|
PK_ERROR_code_t PK_MESH_make_surf_trimmed
(
--- received arguments ---
PK_MESH_t mesh, --- mesh
const PK_MESH_make_surf_trimmed_o_t *options, --- option structure
--- returned arguments ---
PK_SURF_t *const surf, --- surface
PK_LOGICAL_t *const sense, --- which side of surface
PK_SURF_trim_data_t *const trim_data --- trim data
)
This function makes a trimmed surface from the given 'mesh'.
Specific Errors:
PK_ERROR_cant_get_surf (SERIOUS) Failed to fit a surface to
a mesh. This may mean that
the mesh is too complex
for the function to handle
with the given tolerances.
PK_ERROR_cant_parameterise_mesh (MILD) A continuous
parameterisation for the
input 'mesh' cannot be
computed.
PK_ERROR_bad_mvx_normals (MILD) The mesh has non-unique
normals at one or more
mvertices.
This function creates a trimmed surface which conforms to the provided
'mesh' within the specified tolerances.
Options are provided to control the fitting tolerance and whether
or not to use the mesh vertex normals as constraints in the fitting.
The output of this function is a single trimmed surface.
A description of a single trimmed surface is comprised of a
PK_SURF_t, a PK_LOGICAL_t representing the sense of the surface,
and trimming information held in a PK_SURF_trim_data_t structure.
The surface that is fitted to the mesh is returned in 'surf'.
The 'sense' argument indicates whether 'surf's normal points in the same
direction (PK_LOGICAL_true) or opposite to (PK_LOGICAL_false) the 'mesh'
normal.
'trim_data' returns the trimming information. The 'spcurves' field of
'trim_data' is described here. For further information on 'trim_data' see
documentation for PK_SURF_trim_data_t.
'spcurves' consists of an array of SP-curves which describe the boundary
loops of the trimmed surface. Where it is
appropriate to do so Parasolid will place the outer boundary
loop of the trimmed surface at the head of the list of loops.
An example of where this is not appropriate is a trimmed
surface on a sphere, in this case it is sometimes hard
to distinguish between outer boundaries and holes.
Each returned component of a trimming loop is
g1-continuous in 3-space.
Where an SP-curve is to represent a 3-space curve
identified as a line of constant surface parameter the
SP-curve description of it will be in the form of a
linear B-spline.
Note: if 'n_spcurves'>0 then `trim_set[n_spcurves-1]' says how many trim sets
there are.
Note: the function does not support creating periodic B-surfaces.
If the output from PK_MESH_make_surf_trimmed is to be passed into
PK_SURF_make_sheet_trimmed in order to create a sheet whose orientation
agrees with the input 'mesh' then the application should pass 'surf' and
'trim_data' directly to PK_SURF_make_sheet_trimmed and if the value of
'sense' is PK_LOGICAL_false, PK_BODY_reverse_orientation must be
applied to the result.