(trim_lib/trim_gen.c:246)
Prototype:
TrimCrvStruct *TrimCrvCopyList(TrimCrvStruct *TrimCrvList)
Description:
Allocates and copies a list of trimming curve structures.
Parameters:
TrimCrvList: | To be copied.
|
---|
Returned Value:
TrimCrvStruct *: A duplicated list of trimming curves.
|
---|
Keywords:
copy
(trim_lib/trim_gen.c:275)
Prototype:
void TrimCrvFree(TrimCrvStruct *TrimCrv)
Description:
Deallocates a trimming curve structure.
Parameters:
TrimCrv: | trimming curve to free.
|
---|
Returned Value:
Keywords:
allocation
(trim_lib/trim_gen.c:295)
Prototype:
void TrimCrvFreeList(TrimCrvStruct *TrimCrvList)
Description:
Deallocates a list of trimming curve structures.
Parameters:
TrimCrvList: | list of trimming curve to free.
|
---|
Returned Value:
Keywords:
allocation
(trim_lib/trim_gen.c:219)
Prototype:
TrimCrvStruct *TrimCrvCopy(TrimCrvStruct *TrimCrv)
Description:
Duplicates a trimming curve structure.
Parameters:
TrimCrv: | A trimming curve to duplicate.
|
---|
Returned Value:
TrimCrvStruct *: A trimming curve structure.
|
---|
Keywords:
allocation
(trim_lib/trim_gen.c:193)
Prototype:
TrimCrvStruct *TrimCrvNew(TrimCrvSegStruct *TrimCrvSegList)
Description:
Allocates a trimming curve structure.
Parameters:
TrimCrvSegList: | List of trimming curve segments forming the trimming
curve.
|
---|
Returned Value:
TrimCrvStruct *: A trimmig curve.
|
---|
Keywords:
allocation
(trim_lib/trim_gen.c:118)
Prototype:
TrimCrvSegStruct *TrimCrvSegCopyList(TrimCrvSegStruct *TrimCrvSegList)
Description:
Allocates and copies a list of trimming curve segment structures.
Parameters:
TrimCrvSegList: | To be copied.
|
---|
Returned Value:
TrimCrvSegStruct *: A duplicated list of trimming curve segments.
|
---|
Keywords:
copy
(trim_lib/trim_gen.c:147)
Prototype:
void TrimCrvSegFree(TrimCrvSegStruct *TrimCrvSeg)
Description:
Deallocates a trimming curve segment structure.
Parameters:
TrimCrvSeg: | trimming curve segment to free.
|
---|
Returned Value:
Keywords:
allocation
(trim_lib/trim_gen.c:168)
Prototype:
void TrimCrvSegFreeList(TrimCrvSegStruct *TrimCrvSegList)
Description:
Deallocates a list of trimming curve segment structures.
Parameters:
TrimCrvSegList: | list of trimming curve segments to free.
|
---|
Returned Value:
Keywords:
allocation
(trim_lib/trim_gen.c:88)
Prototype:
TrimCrvSegStruct *TrimCrvSegCopy(TrimCrvSegStruct *TrimCrvSeg)
Description:
Duplicates a trimming curve segment structure.
Parameters:
TrimCrvSeg: | trimming curve segment to duplicate.
|
---|
Returned Value:
TrimCrvSegStruct *: A trimming curve segment structure.
|
---|
Keywords:
allocation
(trim_lib/trim_gen.c:29)
Prototype:
TrimCrvSegStruct *TrimCrvSegNew(CagdCrvStruct *UVCrv, CagdCrvStruct *EucCrv)
Description:
Allocates a trimming curve segment structure. Allows periodic and float
end conditions - converts them to open end.
Parameters:
UVCrv: | A UV curve. Must be an E2 curve.
|
---|
EucCrv: | Optional Euclidean curve. Must be an E3 curve.
|
---|
Returned Value:
TrimCrvSegStruct *: A trimming curve segment structure.
|
---|
Keywords:
allocation
(trim_lib/trim_aux.c:357)
Prototype:
CagdPolylineStruct *TrimCrvs2Polylines(TrimSrfStruct *TrimSrf,
CagdBType ParamSpace,
int SamplesPerCurve,
int Optimal)
Description:
Routine to convert the trimming curves of a trimmed surface to polylines.
Polyline are always E3 of CagdPolylineStruct type.
NULL is returned in case of an error, otherwise list of
CagdPolylineStruct.
Parameters:
TrimSrf: | To extract isoparametric curves from.
|
---|
ParamSpace: | TRUE for curves in parameteric space, FALSE of 3D
Euclidean space.
|
---|
SamplesPerCurve: | Fineness control on piecewise linear curve
approximation.
|
---|
Optimal: | Use optimal approximation of isocurves.
|
---|
Returned Value:
CagdPolylineStruct *: List of polylines representing a piecewise linear
approximation of the extracted isoparamteric
curves or NULL is case of an error.
|
---|
Keywords:
trimming curves
(trim_lib/trim_dbg.c:26)
Prototype:
void TrimDbg(void *Obj)
Description:
Prints trimmed surfaces to stderr. Should be linked to programs for
debugging purposes, so trimmed surfaces may be inspected from a debugger.
Parameters:
Obj: | A trimmed surface - to be printed to stderr.
|
---|
Returned Value:
Keywords:
debugging
(trim_lib/trim_err.c:45)
Prototype:
char *TrimDescribeError(TrimFatalErrorType ErrorNum)
Description:
Returns a string describing a the given error. Errors can be raised by
any member of this trim library as well as other users. Raised error will
cause an invokation of TrimFatalError function which decides how to handle
this error. TrimFatalError can for example, invoke this routine with the
error type, print the appropriate message and quit the program.
Parameters:
ErrorNum: | Type of the error that was raised.
|
---|
Returned Value:
char *: A string describing the error type.
|
---|
Keywords:
error handling
(trim_lib/trim_aux.c:393)
Prototype:
CagdCrvStruct *TrimEvalTrimCrvToEuclid(TrimSrfStruct *TrimSrf,
CagdCrvStruct *UVCrv)
Description:
Computes the composed Euclidean curve of TrimSrf(UVCrv).
The resulting curve is either computed using a piecewise linear
approximation or by symbolically composing it onto the surface.
Parameters:
TrimSrf: | To compute the Euclidean UVCrv for.
|
---|
UVCrv: | A curve in the parametric space of TrimSrf.
|
---|
Returned Value:
CagdCrvStruct *: A Euclidean curve in TrimSrf, following UVCrv.
|
---|
Keywords:
(trim_lib/trim_ftl.c:27)
Prototype:
void TrimFatalError(TrimFatalErrorType ErrID)
Description:
Trap Trim_lib errors right here. Provides a default error handler for the
trim library. Gets an error description using TrimDescribeError, prints it
and exit the program using exit.
Parameters:
ErrID: | Error type that was raised.
|
---|
Returned Value:
Keywords:
error handling
(trim_lib/trim_aux.c:292)
Prototype:
CagdCrvStruct *TrimGetTrimmingCurves(TrimSrfStruct *TrimSrf,
CagdBType ParamSpace,
CagdBType EvalEuclid)
Description:
Extracts the trimming curves of the given trimmed surface.
Parameters:
TrimSrf: | Trimmed surface to extract trimming curves from.
|
---|
ParamSpace: | TRUE for curves in parameteric space, FALSE of 3D
Euclidean space.
|
---|
EvalEuclid: | If TRUE and ParamSpace is FALSE, evaluate Euclidean curve
even if one exists.
|
---|
Returned Value:
CagdCrvStruct *: List of trimming curves of TrimSrf.
|
---|
Keywords:
trimming curves
(trim_lib/trim_aux.c:448)
Prototype:
int TrimSetEuclidComposedFromUV(int EuclidComposedFromUV)
Description:
Sets the way Euclidean trimming curves are computed from parametric
trimming curves. Either by symbolic composition (TRUE) or by piecewise
linear approximation of trimming curves (FALSE).
Parameters:
EuclidComposedFromUV: | Do we want symbolic composition for Euclidean
curves, or should we piecewise linear sample the UV trimming
curves.
|
---|
Returned Value:
int: Old value of way of Euclidean curve's computation
|
---|
Keywords:
(trim_lib/iso_crvs.c:507)
Prototype:
int TrimSetTrimCrvLinearApprox(int UVSamplesPerCurve,
int UVSamplesOptimal)
Description:
Sets the tolerances to use when approximating higher order trimming
curves using piecewise linear approximation, for intersection computation.
Parameters:
UVSamplesPerCurve: | Piecewise linear approximation of high order
trimming curves - number of samples per curve.
|
---|
UVSamplesOptimal: | Do we want optimal sampling (see CagdCrv2Polyline).
|
---|
Returned Value:
int: Old number of samples per curve.
|
---|
Keywords:
(trim_lib/iso_crvs.c:114)
Prototype:
CagdCrvStruct *TrimSrf2Curves(TrimSrfStruct *TrimSrf, int NumOfIsocurves[2])
Description:
Routine to extract from a trimmed surface NumOfIsoline isocurve list
in each param. direction.
Iso parametric curves are sampled equally spaced in parametric space.
NULL is returned in case of an error, otherwise list of CagdCrvStruct.
As the isoparametric curves are trimmed according to the trimming curves
the resulting number of curves is arbitrary.
Parameters:
TrimSrf: | To extract isoparametric curves from.
|
---|
NumOfIsocurves: | In each (U or V) direction.
|
---|
Returned Value:
CagdCrvStruct *: List of extracted isoparametric curves. These curves
inherit the order and continuity of the original Srf.
NULL is returned in case of an error.
|
---|
Keywords:
curves
isoparametric curves
(trim_lib/trim2ply.c:56)
Prototype:
CagdPolygonStruct *TrimSrf2Polygons(TrimSrfStruct *TrimSrf,
int FineNess,
CagdBType ComputeNormals,
CagdBType ComputeUV)
Description:
Routine to convert a single trimmed surface to set of triangles
approximating it.
FineNess is a fineness control on result and the larger it is more
triangles may result.
A value of 10 is a good starting value.
NULL is returned in case of an error, otherwise list of CagdPolygonStruct.
Parameters:
Srf: | To approximate into triangles.
|
---|
FineNess: | Control on accuracy, the higher the finer.
|
---|
ComputeNormals: | If TRUE, normal information is also computed.
|
---|
ComputeUV: | If TRUE, UV values are stored and returned as well.
|
---|
Returned Value:
CagdPolygonStruct *: A list of polygons with optional normal and/or
UV parametric information.
NULL is returned in case of an error.
|
---|
Keywords:
polygonization
surface approximation
(trim_lib/iso_crvs.c:76)
Prototype:
CagdPolylineStruct *TrimSrf2Polylines(TrimSrfStruct *TrimSrf,
int NumOfIsocurves[2],
int SamplesPerCurve,
int Optimal)
Description:
Routine to convert a single trimmed surface to NumOfIsolines polylines
in each parametric direction with SamplesPerCurve in each isoparametric
curve.
Polyline are always E3 of CagdPolylineStruct type.
Iso parametric curves are sampled equally spaced in parametric space.
NULL is returned in case of an error, otherwise list of
CagdPolylineStruct. Attempt is made to extract isolines along C1
discontinuities first.
Parameters:
TrimSrf: | To extract isoparametric curves from.
|
---|
NumOfIsocurves: | In each (U or V) direction.
|
---|
SamplesPerCurve: | Fineness control on piecewise linear curve
approximation.
|
---|
Optimal: | Use optimal approximation of isocurves.
|
---|
Returned Value:
CagdPolylineStruct *: List of polylines representing a piecewise linear
approximation of the extracted isoparamteric
curves or NULL is case of an error.
|
---|
Keywords:
isoparametric curves
(trim_lib/trim_gen.c:443)
Prototype:
TrimSrfStruct *TrimSrfCopyList(TrimSrfStruct *TrimSrfList)
Description:
Allocates and copies a list of trimming surface structures.
Parameters:
TrimSrfList: | To be copied.
|
---|
Returned Value:
TrimSrfStruct *: A duplicated list of trimming surfaces.
|
---|
Keywords:
copy
(trim_lib/trim_aux.c:80)
Prototype:
TrimSrfStruct *TrimSrfDegreeRaise(TrimSrfStruct *TrimSrf, CagdSrfDirType Dir)
Description:
Returns a new trimmed surface representing the same surface as TrimSrf but
with its degree raised by one.
Parameters:
TrimSrf: | To raise its degree.
|
---|
Returned Value:
TrimSrfStruct *: A surface with same geometry as Srf but with one
degree higher.
|
---|
Keywords:
degree raising
(trim_lib/trim_gen.c:383)
Prototype:
TrimSrfStruct *TrimSrfNew2(CagdSrfStruct *Srf,
CagdCrvStruct *TrimCrvList,
CagdBType HasTopLvlTrim)
Description:
Constructor for a trimmed surface.
Parameters:
Srf: | Surface to make into a trimmed surface.
|
---|
CagdCrvStruct: | A list of trimming curves, as regular curves.
|
---|
HasTopLvlTrim: | Do we have a top level outer most trimming curve?
|
---|
Returned Value:
TrimSrfStruct *: The trimmed surface.
|
---|
Keywords:
allocation
(trim_lib/trim_gen.c:323)
Prototype:
TrimSrfStruct *TrimSrfNew(CagdSrfStruct *Srf,
TrimCrvStruct *TrimCrvList,
CagdBType HasTopLvlTrim)
Description:
Constructor for a trimmed surface.
Parameters:
Srf: | Surface to make into a trimmed surface.
|
---|
TrimCrvList: | A list of trimming curves.
|
---|
HasTopLvlTrim: | Do we have a top level outer most trimming curve?
|
---|
Returned Value:
TrimSrfStruct *: The trimmed surface.
|
---|
Keywords:
allocation
(trim_lib/trim_aux.c:34)
Prototype:
void TrimSrfDomain(TrimSrfStruct *TrimSrf,
CagdRType *UMin,
CagdRType *UMax,
CagdRType *VMin,
CagdRType *VMax)
Description:
Returns the parametric domain of a trimmed surface.
Parameters:
TrimSrf: | To get its parametric domain.
|
---|
UMin: | Where to put the minimal U domain's boundary.
|
---|
UMax: | Where to put the maximal U domain's boundary.
|
---|
VMin: | Where to put the minimal V domain's boundary.
|
---|
VMax: | Where to put the maximal V domain's boundary.
|
---|
Returned Value:
Keywords:
domain
parametric domain
(trim_lib/trim_aux.c:60)
Prototype:
CagdRType *TrimSrfEval(TrimSrfStruct *TrimSrf, CagdRType u, CagdRType v)
Description:
Given a trimmed surface and parameter values u, v, evaluate the surface at
(u, v).
Parameters:
TrimSrf: | o evaluate at the given parametric location (u, v).
|
---|
u, v: | The parameter values at which TrimSrf is to be evaluated.
|
---|
Returned Value:
CagdRType *: A vector holding all the coefficients of all components
of surface TrimSrf's point type. If, for example, TrimSrf's
point type is P2, the W, X, and Y will be saved in the
first three locations of the returned vector. The first
location (index 0) of the returned vector is reserved for
the rational coefficient W and XYZ always starts at second
location of the returned vector (index 1).
|
---|
Keywords:
evaluation
(trim_lib/trim_gen.c:472)
Prototype:
void TrimSrfFree(TrimSrfStruct *TrimSrf)
Description:
Deallocates a trimmed surface structure.
Parameters:
TrimSrf: | trimmed surface to free.
|
---|
Returned Value:
Keywords:
allocation
(trim_lib/trim_gen.c:493)
Prototype:
void TrimSrfFreeList(TrimSrfStruct *TrimSrfList)
Description:
Deallocates a list of trimmed surface structures.
Parameters:
TrimSrfList: | list of trimmed surface to free.
|
---|
Returned Value:
Keywords:
allocation
(trim_lib/trim_gen.c:560)
Prototype:
void TrimSrfMatTransform(TrimSrfStruct *TrimSrf, CagdMType Mat)
Description:
Transforms, in place, the given TV as specified by homogeneous matrix Mat.
Parameters:
TV: | Trimariate to transform.
|
---|
Mat: | Homogeneous transformation to apply to TV.
|
---|
Returned Value:
Keywords:
Trimariates
(trim_lib/trim_gen.c:415)
Prototype:
TrimSrfStruct *TrimSrfCopy(TrimSrfStruct *TrimSrf)
Description:
Duplicates a trimming surface structure.
Parameters:
TrimSrf: | A trimming surface to duplicate.
|
---|
Returned Value:
TrimSrfStruct *: A trimming surface structure.
|
---|
Keywords:
allocation
(trim_lib/trim_aux.c:177)
Prototype:
TrimSrfStruct *TrimSrfRefineAtParams(TrimSrfStruct *TrimSrf,
CagdSrfDirType Dir,
CagdBType Replace,
CagdRType *t,
int n)
Description:
Given a trimmed surface - refines it at the given n knots as defined by
vector t.
If Replace is TRUE, the values in t replaces current knot vector.
Returns pointer to refined surface (Note a Bezier surface will be
converted into a Bspline surface).
Parameters:
TrimSrf: | To refine.
|
---|
Dir: | Direction of refinement. Either U or V.
|
---|
Replace: | If TRUE, t holds knots in exactly the same length as the
length of the knot vector of Srf and t simply replaces the
knot vector.
|
---|
t: | Vector of knots with length of n.
|
---|
n: | Length of vector t.
|
---|
Returned Value:
TrimSrfStruct *: A refined surface of TrimSrf after insertion of all
the knots as specified by vector t of length n.
|
---|
Keywords:
refinement
subdivision
(trim_lib/trim_aux.c:106)
Prototype:
TrimSrfStruct *TrimSrfRegionFromTrimSrf(TrimSrfStruct *TrimSrf,
CagdRType t1,
CagdRType t2,
CagdSrfDirType Dir)
Description:
Given a trimmed surface - extracts a sub-region within the domain
specified by t1 and t2, in the direction Dir.
Parameters:
TrimSrf: | To extract a sub-region from.
|
---|
t1, t2: | Parametric domain boundaries of sub-region.
|
---|
Dir: | Direction of region extraction. Either U or V.
|
---|
Returned Value:
TrimSrfStruct *: Sub-region extracted from TrimSrf from t1 to t2.
|
---|
Keywords:
regions
subdivision
(trim_lib/trim_aux.c:245)
Prototype:
TrimSrfStruct *TrimSrfReverse2(TrimSrfStruct *TrimSrf)
Description:
Returns a new trimmed surface that is the reversed surface of Srf by
flipping the U and the V directions of the surface, as well as flipping
them in the trimming curves.
See also BspKnotReverse.
Parameters:
Returned Value:
TrimSrfStruct *: Reversed surface of TrimSrf.
|
---|
Keywords:
reverse
(trim_lib/trim_aux.c:199)
Prototype:
TrimSrfStruct *TrimSrfReverse(TrimSrfStruct *TrimSrf)
Description:
Returns a new trimmed surface that is the reversed surface of TrimSrf by
reversing the control mesh and the knot vector (if Bspline surface) of
TrimSrf in the U direction, as well as its trimming curves. See also
CagdSrfReverse and BspKnotReverse.
Parameters:
Returned Value:
TrimSrfStruct *: Reversed surface of TrimSrf.
|
---|
Keywords:
reverse
(trim_lib/trim_sub.c:49)
Prototype:
TrimSrfStruct *TrimSrfSubdivAtParam(TrimSrfStruct *TrimSrf,
CagdRType t,
CagdSrfDirType Dir)
Description:
Given a trimmed surface - subdivides it into two sub-surfaces at given
parametric value t in the given direction Dir.
Returns pointer to a list of two trimmed surfaces, at most. It can very
well may happen that the subdivided surface is completely trimmed out and
hence nothing is returned for it.
Parameters:
TrimSrf: | To subdivide at the prescibed parameter value t.
|
---|
t: | The parameter to subdivide the curve Crv at.
|
---|
Dir: | Direction of subdivision. Either U or V.
|
---|
Returned Value:
TrimSrfStruct *: The subdivided surfaces. Usually two, but can have
only one, if other is totally trimmed away.
|
---|
Keywords:
subdivision
(trim_lib/trim_gen.c:522)
Prototype:
void TrimSrfTransform(TrimSrfStruct *TrimSrf,
CagdRType *Translate,
CagdRType Scale)
Description:
Linearly transforms, in place, given trimmed surface as specified by
Translate and Scale.
Parameters:
TrimSrf: | Trimmed surface to transform.
|
---|
Translate: | Translation factor.
|
---|
Scale: | Scaling factor.
|
---|
Returned Value:
Keywords: