MdlAddSrf2Mdl

(mdlcnvrt.c:793)

Prototype:

  MdlModelStruct *MdlAddSrf2Mdl(const MdlModelStruct *Mdl,
                                const CagdSrfStruct *Srf,
                                int StitchModel)


Description:

Adds the given surface into a model.

Parameters:

Mdl: Model to add Srf to.
Srf: A surface to add to a model. The four boundary curves of Srf are created and added as trimming curves.
StitchModel: TRUE to also stitch model (detect and fuse common edges).


Returned Value:

MdlModelStruct *: New model with Srf merged into Mdl. NULL if error.


See Also:

MdlCnvrtMdl2TrimmedSrfs MdlCnvrtTrimmedSrf2Mdl MdlCnvrtSrf2Mdl

Keywords:




MdlAddTrimmedSrf2Mdl

(mdlcnvrt.c:830)

Prototype:

  MdlModelStruct *MdlAddTrimmedSrf2Mdl(const MdlModelStruct *Mdl,
                                       const TrimSrfStruct *TSrf,
                                       int MergeTCrvsIntoLoops,
                                       int StitchModel)


Description:

Adds the given trimmed surface into a model.

Parameters:

Mdl: Model to add Srf to.
TSrf: A trimmed surface to add to a model.
MergeTCrvsIntoLoops: TRUE to also merge trimming curves in loops into one large loop curve.
StitchModel: TRUE to also stitch model (detect and fuse common edges).


Returned Value:

MdlModelStruct *: New model with TSrf merged into Mdl. NULL if error.


See Also:

MdlCnvrtMdl2TrimmedSrfs MdlCnvrtSrf2Mdl MdlCnvrtTrimmedSrf2Mdl

Keywords:




MdlBoolClassifyNonInterIslands

(mdl2bool.c:1312)

Prototype:

  int MdlBoolClassifyNonInterIslands(MdlModelStruct *Model,
                                     MdlBooleanType BType)


Description:

Classify loops that are isolated from the intersection and hence the inside-propagation of MdlBoolClassifyNonInterTrimSrfs cannot reach them. For each trimming surface do: 1. Go over all unclassified loops and check if inside or outside the classified loops of the model. 2. If inside - include in the model. if outside - purge the loop.

Parameters:

Model: odel in which to classify the unclassified trimming loop.
BType: he Boolean operation applied, resulting in model.


Returned Value:

int: TRUE if some trimming loops was updated, FALSE otherwise.


Keywords:




MdlBoolClassifyNonInterTrimSrfs

(mdl2bool.c:1045)

Prototype:

  int MdlBoolClassifyNonInterTrimSrfs(MdlModelStruct *Model)


Description:

Classify references of trimming curves in trimmed surfaces that are not interested in this Boolean operation. 1. Go over all refs and search for a reference of an old intersection that is classified on one srf side only and propagate to the second srf side. 2. Go over all trimming references in the second srf side and propagated the information. 3. While there are unclassified references go to 1. Note this function will not propagate to (valid) trimming curves that intersection curves are not connected to (island loops inside valid trimming loops - See MdlBoolClassifyNonInterIslands for that).

Parameters:

Model: odel in which to classify the non-intersecting trimming curves.


Returned Value:

int: TRUE if some trimming curve segment was updated, FALSE otherwise.


Keywords:




MdlBoolClassifyTrimSrfLoops

(mdl2bool.c:957)

Prototype:

  int MdlBoolClassifyTrimSrfLoops(MdlTrimSrfStruct *TSrf,
                                  CagdRType Tol,
                                  CagdBType InsideOtherModel)


Description:

Based on the new trimming curves, recreate the trimming loops of this trimmed surface. At this stage we assume the new intersecting curves only exists in the interior domain of trimmed surface (outside intersections were purged away). Further, the old existing trimming curves were split at the locations they intersect with the new intersection curves. The returned TSrf will have the trimming curves organized in loops.

Parameters:

TSrf: A trimmed surface we need to update its trimming loops.
Tol: Tolerance to match end points of trimming curves.
InsideOtherModel: TRUE if we seek the inside of the other model (i.e. intersection operations), FALSE for outside (i.e. subtraction).


Returned Value:

int: TRUE if successful, FALSE otherwise.


Keywords:




MdlBoolCleanInterCrvs

(mdl3bool.c:44)

Prototype:

  void MdlBoolCleanInterCrvs(CagdCrvStruct *Crv, const CagdSrfStruct *Srf)


Description:

Make sure the intersection curve is fully consistent with the surface. Either precisely closed or precisely on the boundary of the surface.

Parameters:

Crv: Intersection curve to clean up.
Srf: where Crv is an intersection (trimming) curve in its domain.


Returned Value:

void


See Also:



Keywords:




MdlBoolCleanRefsToTSrf

(mdl3bool.c:390)

Prototype:

  int MdlBoolCleanRefsToTSrf(MdlModelStruct *Model, MdlTrimSrfStruct *TSrf)


Description:

Cleans references to TSrf in Model. TSrf, if in Model, is NOT affected. Note associated trimming curves of TSrf are removed anf freed.

Parameters:

Model: To clean references to TSrf in, in place.
TSrf: Reference to clean, in Model.


Returned Value:

int: TRUE if found and cleaned, FALSE otherwise.


Keywords:




MdlBoolCleanUnusedTrimCrvRefs

(mdl3bool.c:434)

Prototype:

  int MdlBoolCleanUnusedTrimCrvRefs(MdlModelStruct *Model,
                                    CagdBType OutsideTCrvRefs,
                                    CagdBType UnclassifiedTCrvRefs)


Description:

Clean unused trimming curves in the model - trimming curves that are used by no trimming surface, etc.

Parameters:

Model: To process and clean unused trimming crvs in, in place.
OutsideTCrvRefs: rimming curve that are tagged as !Inside are purged.
UnclassifiedTCrvRefs: Trimming curve that are unclassified are purged.


Returned Value:

int: Number of trimming curve references that were purged.


Keywords:




MdlBoolCleanUnusedTrimCrvsSrfs

(mdl3bool.c:522)

Prototype:

  int MdlBoolCleanUnusedTrimCrvsSrfs(MdlModelStruct *Model)


Description:

Clean unused trimming curves/surfaces in the model - trimming curves that are used by no trimming surface.

Parameters:

Model: To process and clean unused trimming crvs/srfs in, in place.


Returned Value:

int: Number of trimming curves that were purged.


Keywords:




MdlBoolCleanUnusedTrimCrvsSrfs2

(mdl3bool.c:575)

Prototype:

  int MdlBoolCleanUnusedTrimCrvsSrfs2(MdlModelStruct *Model)


Description:

Clean unused trimming curves in the model - trimming curves that are used by no trimming surface.

Parameters:

Model: To process and clean unused trimming crvs in, in place.


Returned Value:

int: Number of trimming curves that were purged.


Keywords:




MdlBoolClipTSrfs2TrimDomain

(mdl3bool.c:678)

Prototype:

  void MdlBoolClipTSrfs2TrimDomain(MdlModelStruct *Model,
                                   CagdBType ExtendSrfDomain)


Description:

Clip the surfaces in the given model to the domain of the trimming curves (+ some epsilon).

Parameters:

Model: To clip its surfaces to their trimmed domain, in place.
ExtendSrfDomain: hether to extend the models's surfaces in the UV domain.


Returned Value:

void


Keywords:




MdlBoolConcatLoops2OneSegRefsList

(mdl2bool.c:793)

Prototype:

  MdlTrimSegRefStruct *MdlBoolConcatLoops2OneSegRefsList(MdlLoopStruct *Loops)


Description:

Concatenate all trimming curve references in given loops into one linear list of trimming curve references.

Parameters:

Loops: To concatenate into one long list of trimming curve references. Concatenation is done in place, destroying Loops.


Returned Value:

MdlTrimSegRefStruct *: The new trimming curve references ;ist.


Keywords:




MdlBoolGenTrimSegs

(mdl3bool.c:333)

Prototype:

  MdlTrimSegStruct *MdlBoolGenTrimSegs(const MvarPolylineStruct *Inters12,
                                       MdlTrimSrfStruct *Srf1,
                                       MdlTrimSrfStruct *Srf2)


Description:

Converts the result of two surfaces intersection into MdlTrimSegStructs.

Parameters:

Inters12: The intersection result as polylines in R^4 (the space of both surfaces' domains).
Srf1, Srf2: The two surfaces participated in this intersection computation.


Returned Value:

MdlTrimSegStruct *: List of model trimming segments.


See Also:



Keywords:




MdlBoolImprovedPointsAddPoints

(mdl3bool.c:870)

Prototype:

  void MdlBoolImprovedPointsAddPoints(MdlImprovedPointsCacheStruct **IPCache,
                                      int n,
                                      MdlImprovingPointStruct IPts[4],
                                      MdlImprovingPointStruct OrigIPts[4],
                                      CagdRType ImprovedErrorSqr)


Description:

Update the IPC cache with new (improved) locations, so these n TSrfs are evaluated to the same Euclidean location at these UV locations.

Parameters:

IPCache: The improved points cache to update.
n: Number of UV locations to consider as candidate into the Cache. n is at most 4.
IPts: The n improved locations.
OrigIPts: The n original locations.
ImprovedErrorSqr: Error square after numeric improvement was aimed.


Returned Value:

void


Keywords:




MdlBoolImprovedPointsCacheFree

(mdl3bool.c:1062)

Prototype:

  void MdlBoolImprovedPointsCacheFree(MdlImprovedPointsCacheStruct **IPCache)


Description:

Free the improved points cache.

Parameters:

IPCache: The improved points cache to free.


Returned Value:

void


Keywords:




MdlBoolImprovedPointsCacheInit

(mdl3bool.c:842)

Prototype:

  MdlImprovedPointsCacheStruct *MdlBoolImprovedPointsCacheInit()


Description:

init an improved points cache.

Parameters:

None


Returned Value:

MdlImprovedPointsCacheStruct *: New cache.


Keywords:




MdlBoolImprovedPointsUpdateOldPointsInMdl

(mdl3bool.c:1018)

Prototype:

  int MdlBoolImprovedPointsUpdateOldPointsInMdl(
                                   const MdlImprovedPointsCacheStruct *IPCache,
                                   MdlModelStruct *Mdl)


Description:

Based on the global list of improved points, go over the entire model and update it with all the improved UV locations.

Parameters:

IPCache: The improved points cache.
Mdl: The model to update.


Returned Value:

int: TRUE if successful, FALSE otherwise.


Keywords:




MdlBoolImprovedPointsUpdateOldPointsInSeg

(mdl3bool.c:959)

Prototype:

  int MdlBoolImprovedPointsUpdateOldPointsInSeg(
                                   const MdlImprovedPointsCacheStruct *IPCache,
                                   MdlTrimSegStruct *Seg)


Description:

Based on the global list of improved points, go over the entire model and update it with all the improved UV locations.

Parameters:

IPCache: The improved points cache.
Seg: The trimming segment to update.


Returned Value:

int: TRUE if successful, FALSE otherwise.


Keywords:




MdlBoolIsMdlContainsModel

(mdl3bool.c:764)

Prototype:

  CagdBType MdlBoolIsMdlContainsModel(const MdlModelStruct *Model1,
                                      const MdlModelStruct *Model2)


Description:

Returns if first model is contained inside a second model. The function assumes that the two models do not intersect.

Parameters:

Model1, Model2: The first and second models.


Returned Value:

CagdBType: True iff Model1 is contained inside Model2.


Keywords:




MdlBoolMergeSegRefsIntoLoops

(mdl2bool.c:828)

Prototype:

  MdlLoopStruct *MdlBoolMergeSegRefsIntoLoops(MdlTrimSrfStruct *TSrf,
                                              MdlBooleanType OrigBType,
                                              CagdRType Tol)


Description:

Merges the given list of trimming segments back into loops, in place.

Parameters:

TSrf: Trimmed surface we now update its trimming loops.
OrigBType: Original type of Boolean operation involved.
Tol: Tolerance to match end points of trimming curves.


Returned Value:

MdlLoopStruct *: The newly formed loops of the given surface.


Keywords:




MdlBoolNumerImproveEndPt

(mdl3bool.c:106)

Prototype:

  int MdlBoolNumerImproveEndPt(MdlImprovedPointsCacheStruct **IPCache,
                               MdlTrimSegStruct *Seg1,
                               MdlTrimSegStruct *Seg2,
                               CagdBType Seg1Last,
                               CagdBType Seg2Last)


Description:

Improves numerically a given intersection start/end point in Seg1 and Seg2 that points at the same Euclidean location.

Parameters:

IPCache: The improved points cache to update.
Seg1, Seg2: The two intersecting segments that start/end at the same Euclidean location. Seg2 can be NULL.
Seg1Last, Seg2Last: TRUE for last point in Segment, FALSE for first.


Returned Value:

int: TRUE if improved, FALSE otherwise.


See Also:



Keywords:




MdlBoolOpParamsAlloc

(mdl_gen.c:1537)

Prototype:

  MdlBopsParamsStruct *MdlBoolOpParamsAlloc(
                                      CagdBType PertubrateSecondModel,
                                      CagdBType ExtendUVSrfResult,
                                      IPAttrIDType IntersectedSurfacesAttrID,
                                      MdlIntersectionCBFunc InterCBFunc,
                                      MdlPreIntersectionCBFunc PreInterCBFunc,
                                      MdlPostIntersectionCBFunc PostInterCBFunc)


Description:

Allocates and initializes Model Boolean operations parameters struct. Memory management of User data in the sub-struct SSICBData -> InterCBData is the user's responsibility.

Parameters:

PertubrateSecondModel: Perturb second Model or not.
ExtendUVSrfResult: xtend the result model surfaces in the UV space.
IntersectedSurfacesAttrID: D of integer attribute that will indicate in each surface if it is trimmed as result of the Boolean operation.
InterCBFunc: all back function during the SSI.
PreInterCBFunc: allback function before the SSI.
PostInterCBFunc: allback function after the SSI.


Returned Value:

MdlBopsParamsStruct *: New initialized Boolean operations struct.


Keywords:




MdlBoolOpParamsFree

(mdl_gen.c:1580)

Prototype:

  void MdlBoolOpParamsFree(struct MdlBopsParamsStruct *BopsParams)


Description:

Frees memory of Model Boolean operations parameters struct. Memory management of User data in the sub-struct SSICBData -> InterCBData is the user's responsibility.

Parameters:

BopsParams: Params struct to free.


Returned Value:

void


Keywords:




MdlBoolResetAllTags

(mdl3bool.c:482)

Prototype:

  void MdlBoolResetAllTags(MdlModelStruct *Model)


Description:

Clean all tags from the model.

Parameters:

Model: To process and clean, in place.


Returned Value:

void


Keywords:




MdlBoolSetHandleInterDiscont

(mdl_bool.c:2495)

Prototype:

  int MdlBoolSetHandleInterDiscont(int HandleInterDiscont)


Description:

Controls aim for C^1 discontinuous edges/boundary edges intersections.

Parameters:

HandleInterDiscont: TRUE to aim at handling intersections on boundaries and C^1 discontinuous edges.


Returned Value:

int: Old OutputInterCurveType value.


See Also:

MdlBooleanInterCrv MdlBoolSetOutputInterCrv

Keywords:

Booleans


MdlBoolSetOutputInterCrv

(mdl_bool.c:2436)

Prototype:

  int MdlBoolSetOutputInterCrv(int OutputInterCurve)


Description:

Controls if intersection curves or full Boolean operation is to be performed on input models.

Parameters:

OutputInterCurve: If TRUE only intersection curves are computed. If FALSE, full blown Boolean is applied.


Returned Value:

int: Old OutputInterCurve value.


See Also:

MdlBooleanInterCrv MdlBoolSetOutputInterCrvType

Keywords:

Booleans


MdlBoolSetOutputInterCrvType

(mdl_bool.c:2465)

Prototype:

  int MdlBoolSetOutputInterCrvType(int OutputInterCurveType)


Description:

Controls the type of intersection curves to return.

Parameters:

OutputInterCurveType: 0 for Euclidean space, 1/2 for inter curves in Model1/2.


Returned Value:

int: Old OutputInterCurveType value.


See Also:

MdlBooleanInterCrv MdlBoolSetOutputInterCrv

Keywords:

Booleans


MdlBoolTrimSrfIntersects

(mdl3bool.c:809)

Prototype:

  int MdlBoolTrimSrfIntersects(const MdlTrimSrfStruct *TSrf)


Description:

Returns TRUE if this trimmed surface intersects the other model in this Boolean operation.

Parameters:

TSrf: Trimmed surface to examine if it intersects the other model.


Returned Value:

int: TRUE if intersects, FALSE otherwise


Keywords:




MdlBooleanCut

(mdl_bool.c:2111)

Prototype:

  IPObjectStruct *MdlBooleanCut(const MdlModelStruct *Model1,
                                const MdlModelStruct *Model2,
                                struct MvarSrfSrfInterCacheStruct *SSICache,
                                MdlBopsParamsStruct *BopsParams)


Description:

Computes the Boolean subtraction of two models.

Parameters:

Model1, Model2: The two models to consider.
SSICache: SSI cache to be used and updated, if provided (if not NULL - optional).
BopsParams: Additional parameters and callback functions used in the Boolean operation process.


Returned Value:

IPObjectStruct *: Resulting boolean.


See Also:

MdlBooleanSetTolerances

Keywords:




MdlBooleanInterCrv

(mdl_bool.c:2292)

Prototype:

  CagdCrvStruct *MdlBooleanInterCrv(const MdlModelStruct *Model1,
                                    const MdlModelStruct *Model2,
                                    int InterType,
                                    MdlModelStruct **InterModel,
                                    MdlBopsParamsStruct *BopsParams)


Description:

Computes the intersection curve of two models. If InterModel != NULL, also saves an attribute "trimsrf" with the trimmed surface reference, on the returned UV curves.

Parameters:

Model1, Model2: he two models to consider.
InterType: 0 for Euclidean space, 1/2 for inter curves in Model1/2. 10/11/12 as above but also aims to merge curves into loops.
InterModel: If not NULL, returns here the model so UV locations could be evaluated into E3.
BopsParams: Additional optional parameters and callback functions used in the Boolean operation process. Can be NULL.


Returned Value:

CagdCrvStruct *: Resulting intersection curves.


Keywords:




MdlBooleanIntersection

(mdl_bool.c:2036)

Prototype:

  IPObjectStruct *MdlBooleanIntersection(
                                     const MdlModelStruct *Model1,
                                     const MdlModelStruct *Model2,
                                     struct MvarSrfSrfInterCacheStruct *SSICache,
                                     MdlBopsParamsStruct *BopsParams)


Description:

Computes the Boolean intersection of two models.

Parameters:

Model1, Model2: The two models to consider.
SSICache: SSI cache to be used and updated, if provided (if not NULL - optional).
BopsParams: Additional parameters and callback functions used in the Boolean operation process.


Returned Value:

IPObjectStruct *: Resulting boolean.


See Also:

MdlBooleanSetTolerances

Keywords:




MdlBooleanMerge

(mdl_bool.c:2210)

Prototype:

  IPObjectStruct *MdlBooleanMerge(const MdlModelStruct *Model1,
                                  const MdlModelStruct *Model2,
                                  CagdBType StitchBndries)


Description:

Computes the merge of two models. All surfaces and trimming curves are concatenated together and optionally shared boundaries are stitched together.

Parameters:

Model1, Model2: The two models to consider.
StitchBndries: TRUE to also stitch shared boundaries.


Returned Value:

IPObjectStruct *: Resulting merged model.


See Also:

MdlStitchModel

Keywords:




MdlBooleanMerge2

(mdl_bool.c:2242)

Prototype:

  MdlModelStruct *MdlBooleanMerge2(const MdlModelStruct *Model1,
                                   const MdlModelStruct *Model2,
                                   CagdBType StitchBndries)


Description:

Computes the merge of two models. All surfaces and trimming curves are concatenated together and optionally shared boundaries are stitched together.

Parameters:

Model1, Model2: The two models to consider.
StitchBndries: TRUE to also stitch shared boundaries.


Returned Value:

MdlModelStruct *: Resulting merged model.


See Also:

MdlStitchModel MdlBooleanMerge

Keywords:




MdlBooleanSetClip2Trim

(mdl_bool.c:169)

Prototype:

  CagdBType MdlBooleanSetClip2Trim(CagdBType Clip2Trim)


Description:

Sets the state of allowing to clip the surface to the domain set by the trimming curves.

Parameters:

Clip2Trim: New state of clip surface to trimming curves.


Returned Value:

CagdBType: Old state value.


See Also:

MdlBoolClipTSrfs2TrimDomain

Keywords:




MdlBooleanSetTolerances

(mdl_bool.c:126)

Prototype:

  CagdRType MdlBooleanSetTolerances(CagdRType SubdivTol,
                                    CagdRType NumerTol,
                                    CagdRType TraceTol)


Description:

Sets the tolerances to use in the boolean operations computations.

Parameters:

SubdivTol, NumerTol, TraceTol: See MvarSrfSrfInter.


Returned Value:

CagdRType: The last modified tolerance, between (Trace, Numer, Subdiv).


See Also:



Keywords:




MdlBooleanSubtraction

(mdl_bool.c:2074)

Prototype:

  IPObjectStruct *MdlBooleanSubtraction(
                                     const MdlModelStruct *Model1,
                                     const MdlModelStruct *Model2,
                                     struct MvarSrfSrfInterCacheStruct *SSICache,
                                     MdlBopsParamsStruct *BopsParams)


Description:

Computes the Boolean subtraction of two models.

Parameters:

Model1, Model2: The two models to consider.
SSICache: SSI cache to be used and updated, if provided (if not NULL - optional).
BopsParams: Additional parameters and callback functions used in the Boolean operation process.


Returned Value:

IPObjectStruct *: Resulting boolean.


See Also:

MdlBooleanSetTolerances

Keywords:




MdlBooleanUnion

(mdl_bool.c:1998)

Prototype:

  IPObjectStruct *MdlBooleanUnion(const MdlModelStruct *Model1,
                                  const MdlModelStruct *Model2,
                                  struct MvarSrfSrfInterCacheStruct *SSICache,
                                  MdlBopsParamsStruct *BopsParams)


Description:

Computes the Boolean union of two models.

Parameters:

Model1, Model2: The two models to consider.
SSICache: SSI cache to be used and updated, if provided (if not NULL - optional).
BopsParams: Additional parameters and callback functions used in the Boolean operation process.


Returned Value:

IPObjectStruct *: Resulting boolean.


See Also:

MdlBooleanIntersection

Keywords:




MdlClipModelByPlane

(mdl_bool.c:2776)

Prototype:

  MdlModelStruct *MdlClipModelByPlane(const MdlModelStruct *Mdl,
                                      const IrtPlnType Pln,
                                      MdlBooleanType BoolOp)


Description:

Clips the given model, Mdl, to the portion that is in the positive side of plane Pln.

Parameters:

Mdl: Model to clip against plane Pln.
Pln: Clipping plane.
BoolOp: ne of CUT, INTERSECTION, SUBTRACTION.


Returned Value:

MdlModelStruct *: Portion of Mdl, as a new model, in the positive side of plane Pln. NULL if nothing.


See Also:

MdlClipSrfByPlane MdlClipTrimmedSrfByPlane MdlInterModelByPlane

Keywords:




MdlClipSrfByPlane

(mdl_bool.c:2641)

Prototype:

  TrimSrfStruct *MdlClipSrfByPlane(const CagdSrfStruct *Srf,
                                   const IrtPlnType Pln)


Description:

Clips the given surface, Srf, to the portion that is in the positive side of plane Pln. Intersection is assumed to be a closed loop.

Parameters:

Srf: Surface to clip against plane Pln.
Pln: Clipping plane.


Returned Value:

TrimSrfStruct *: Trimmed surface portion of Srf in the positive side of plane Pln. NULL if nothing.


See Also:

MdlClipModelByPlane MdlClipTrimmedSrfByPlane MdlClipModelByPlane MdlInterModelByPlane

Keywords:




MdlClipTrimmedSrfByPlane

(mdl_bool.c:2673)

Prototype:

  TrimSrfStruct *MdlClipTrimmedSrfByPlane(const TrimSrfStruct *TSrf,
                                          const IrtPlnType Pln)


Description:

Clips the given trimmed surface, TSrf, to the portion that is in the positive side of plane Pln. Intersection is assumed to be a closed loop.

Parameters:

TSrf: Trimmed Surface to clip against plane Pln.
Pln: Clipping plane.


Returned Value:

TrimSrfStruct *: Trimmed surface portion of Srf in the positive side of plane Pln. NULL if nothing. Can be a list of such trimmed surfaces.


See Also:

MdlClipSrfByPlane MdlClipModelByPlane MdlInterModelByPlane

Keywords:




MdlCnvrtMdl2TrimmedSrfs

(mdlcnvrt.c:118)

Prototype:

  TrimSrfStruct *MdlCnvrtMdl2TrimmedSrfs(const MdlModelStruct *Model,
                                         CagdRType TrimCrvStitchTol)


Description:

Converting the model into the list of trimming surfaces. Each trimmed surface is updated with the proper boundary/trimming curves ready for tessellation, so each trimming curve is shared by both surfaces it stitches, preventing black holes.

Parameters:

Model: Model to convert to a list of trimmed surfaces.
TrimCrvStitchTol: If TRUE, process the Euclidean trimming curves as - I. Approximate the trimming curves to piecewise linear curves. II. Make sure the two curves of two surfaces sharing a common, stitching, trimming curves are the same in Euclidean space.


Returned Value:

TrimSrfStruct *: List of trimming surfaces.


See Also:

TrimCrvSegNew TrimCrvNew TrimsrfNew MdlExtractUVCrv MdlCnvrtSrf2Mdl MdlCnvrtTrimmedSrf2Mdl MdlCnvrtMdls2TrimmedSrfs

Keywords:




MdlCnvrtMdls2TrimmedSrfs

(mdlcnvrt.c:77)

Prototype:

  TrimSrfStruct *MdlCnvrtMdls2TrimmedSrfs(const MdlModelStruct *Models,
                                          CagdRType TrimCrvStitchTol)


Description:

Converting a list of models into the list of trimming surfaces. Each trimmed surface is updated with the proper boundary/trimming curves ready for tessellation, so each trimming curve is shared by both surfaces it stitches, preventing black holes.

Parameters:

Models: list of models to convert to a list of trimmed surfaces.
TrimCrvStitchTol: If not zero, process the Euclidean trimming curves as - I. Approximate the trimming curves to piecewise linear curves. II. Make sure the two curves of two surfaces sharing a common, stitching, trimming curves are the same in Euclidean space.


Returned Value:

TrimSrfStruct *: List of trimming surfaces.


See Also:

TrimCrvSegNew TrimCrvNew TrimsrfNew MdlExtractUVCrv MdlCnvrtSrf2Mdl MdlCnvrtTrimmedSrf2Mdl MdlCnvrtMdl2TrimmedSrfs

Keywords:




MdlCnvrtSrf2Mdl

(mdlcnvrt.c:612)

Prototype:

  MdlModelStruct *MdlCnvrtSrf2Mdl(const CagdSrfStruct *Srf, int StitchModel)


Description:

Converting the given surface into a model.

Parameters:

Srf: A surface to convert to a model.
StitchModel: TRUE to also stitch the model. This is need as a final step once all surfaces were added.


Returned Value:

MdlModelStruct *: A model.


See Also:

MdlCnvrtMdl2TrimmedSrfs MdlCnvrtTrimmedSrf2Mdl MdlCnvrtSrfs2Mdls

Keywords:




MdlCnvrtSrfs2Mdls

(mdlcnvrt.c:578)

Prototype:

  MdlModelStruct *MdlCnvrtSrfs2Mdls(const CagdSrfStruct *Srfs, int StitchModel)


Description:

Converting the given linked list of surfaces into models.

Parameters:

Srfs: A linked list of surfaces to convert to models.
StitchModel: TRUE to also stitch the model. This is need as a final step once all surfaces were added.


Returned Value:

MdlModelStruct *: models.


See Also:

MdlCnvrtMdl2TrimmedSrfs MdlCnvrtTrimmedSrf2Mdl MdlCnvrtSrf2Mdl

Keywords:




MdlCnvrtTrimmedSrf2Mdl

(mdlcnvrt.c:672)

Prototype:

  MdlModelStruct *MdlCnvrtTrimmedSrf2Mdl(const TrimSrfStruct *TSrf,
                                         int MergeTCrvsIntoLoops)


Description:

Converting the given trimmed surface into a model.

Parameters:

TSrf: A trimmed surface to convert to a model.
MergeTCrvsIntoLoops: TRUE to also merge trimming curves in loops into one large loop curve.


Returned Value:

MdlModelStruct *: A model.


See Also:

MdlCnvrtMdl2TrimmedSrfs MdlCnvrtSrf2Mdl MdlCnvrtTrimmedSrfs2Mdls

Keywords:




MdlCnvrtTrimmedSrfs2Mdl

(mdlcnvrt.c:752)

Prototype:

  MdlModelStruct *MdlCnvrtTrimmedSrfs2Mdl(const TrimSrfStruct *TSrfs,
                                          int MergeTCrvsIntoLoops,
                                          int StitchMdl)


Description:

Converting the given linked list of trimmed surfaces into one model.

Parameters:

TSrfs: A linked list of trimmed surfaces to convert to models.
MergeTCrvsIntoLoops: TRUE to also merge trimming curves in loops into one large loop curve.
StitchMdl: True to also apply stitching on the model, merging trimming curves that are the name (in Euclidean space).


Returned Value:

MdlModelStruct *: Converted Model or NULL if error.


See Also:

MdlCnvrtMdl2TrimmedSrfs MdlCnvrtSrf2Mdl MdlCnvrtTrimmedSrf2Mdl MdlCnvrtTrimmedSrfs2Mdls

Keywords:




MdlCnvrtTrimmedSrfs2Mdls

(mdlcnvrt.c:637)

Prototype:

  MdlModelStruct *MdlCnvrtTrimmedSrfs2Mdls(const TrimSrfStruct *TSrfs,
                                           int MergeTCrvsIntoLoops)


Description:

Converting the given linked list of n trimmed surfaces into n models.

Parameters:

TSrfs: A linked list of trimmed surfaces to convert to models.
MergeTCrvsIntoLoops: TRUE to also merge trimming curves in loops into one large loop curve.


Returned Value:

MdlModelStruct *: Converted models.


See Also:

MdlCnvrtMdl2TrimmedSrfs MdlCnvrtSrf2Mdl MdlCnvrtTrimmedSrf2Mdl

Keywords:




MdlCreateCubeSpherePrim

(mdl_prim.c:1063)

Prototype:

  int MdlCreateCubeSpherePrim(int CubeTopoSphere)


Description:

Select to create sphere using cube-topology, if TRUE.

Parameters:

CubeTopoSphere: TRUE to construct spheres using cube-topology.


Returned Value:

int: Old value setting.


Keywords:




MdlDbg

(mdl_dbg.c:36)

Prototype:

  void MdlDbg(void *Obj)


Description:

Prints model objects to stderr. Should be linked to programs for debugging purposes, so model objects may be inspected from a debugger.

Parameters:

Obj: A model object - to be printed to stderr.


Returned Value:

void


Keywords:

debugging


MdlDbg2

(mdl_dbg.c:67)

Prototype:

  void MdlDbg2(void *Obj)


Description:

Prints model information to stderr. Should be linked to programs for debugging purposes, so model objects may be inspected from a debugger.

Parameters:

Obj: A model object - to be printed to stderr.


Returned Value:

void


Keywords:

debugging


MdlDbgBoolImprovedPointsCacheReport

(mdl3bool.c:922)

Prototype:

  void MdlDbgBoolImprovedPointsCacheReport(
                                    const MdlImprovedPointsCacheStruct *IPCache)


Description:

Report on the improved points cache.

Parameters:

IPCache: The improved points cache to report to stderr.


Returned Value:

void


Keywords:




MdlDbgDsp

(mdl_dbg.c:111)

Prototype:

  void MdlDbgDsp(void *Obj, CagdRType Trans, int Clear)


Description:

Display an entire model object by drawing all tensor product surfaces and their trimming curves. Should be linked to programs for debugging purposes, so model objects may be inspected from a debugger. Trimming curves will be colored as follows:
1. Green - for trimming curves that are in the output set.
2. Yellow - for undetermined trimming curves.
3. Magenta - for trimming curves that will be purged.


Parameters:

Obj: A model object - to be displayed.
Trans: Amount to translate each surface in the surface center normal direction.
Clear: TRUE to first clear the display device.


Returned Value:

void


Keywords:

debugging


MdlDbgDsp2

(mdl_dbg.c:232)

Prototype:

  void MdlDbgDsp2(void *Obj, CagdRType Trans, int Clear)


Description:


Display an entire model object by drawing all trimming curves in Euclidean space after mapping them through their tensor product surfaces. N Should be linked to programs for debugging purposes, so model objects may be inspected from a debugger.

Parameters:

Obj: A model object - to be displayed.
Trans: Amount to translate each surface in the surface center normal direction.
Clear: TRUE to first clear the display device.


Returned Value:

void


Keywords:

debugging


MdlDbgMC

(mdl_dbg.c:376)

Prototype:

  int MdlDbgMC(const MdlModelStruct *Mdl, int Format)


Description:

Debug routine to dump to stderr/display the UV trimming curves of all surfaces in a given model.

Parameters:

Mdl: To dump to stderr/display all its trimming curves in UV space, for each surface.
Format: 0 to write it to stderr all data, 1 to write it to stderr but only end points of trimming curves. 9 to display the data in a display device. 10 same as 9 but to also clear first.


Returned Value:

int: TRUE if successful, FALSE otherwise.


Keywords:

debugging.


MdlDbgRC

(mdl_dbg.c:481)

Prototype:

  int MdlDbgRC(const MdlTrimSegRefStruct *Refs, int Format)


Description:

Debug routine to dump the UV trimming curves in the given ref. list.

Parameters:

Refs: To dump its trimming curves in UV space.
Format: 0 to write it to stderr all data, 1 to write it to stderr but only end points of trimming curves. 9 to display the data in a display device. 10 same as 9 but to also clear first.


Returned Value:

int: TRUE if successful, FALSE otherwise.


Keywords:

debugging.


MdlDbgRC2

(mdl_dbg.c:517)

Prototype:

  int MdlDbgRC2(const MdlTrimSegRefStruct *Refs,
                const MdlTrimSrfStruct *TSrf,
                int Format)


Description:

Debug routine to dump the UV trimming curves in the given ref. list.

Parameters:

Refs: To dump its trimming curves in UV space.
TSrf: Trimmed surface these references should list (and its trimming curves).
Format: 0 to write it to stderr all data, 1 to write it to stderr but only end points of trimming curves. 9 to display the data in a display device. 10 same as 9 but to also clear first.


Returned Value:

int: TRUE if successful, FALSE otherwise.


Keywords:

debugging.


MdlDbgSC

(mdl_dbg.c:449)

Prototype:

  int MdlDbgSC(const MdlTrimSrfStruct *TSrf, int Format)


Description:

Debug routine to dump the UV trimming curves of a given surface.

Parameters:

TSrf: To dump its trimming curves in UV space.
Format: 0 to write it to stderr all data, 1 to write it to stderr but only end points of trimming curves. 9 to display the data in a display device. 10 same as 9 but to also clear first.


Returned Value:

int: TRUE if successful, FALSE otherwise.


Keywords:

debugging.


MdlDbgTC

(mdl_dbg.c:422)

Prototype:

  int MdlDbgTC(const MdlTrimSegStruct *TSegs,
               const MdlTrimSrfStruct *TSrf,
               int Format)


Description:

Debug routine to dump to stderr/display the UV trimming curves of the list of trimming curves.

Parameters:

TSegs: To dump to stderr/display all its trimming curves in UV space.
TSrf: If not NULL - dump/display only its trimming curves.
Format: 0 to write it to stderr all data, 1 to write it to stderr but only end points of trimming curves. 9 to display the data in a display device. 10 same as 9 but to also clear first.


Returned Value:

int: TRUE if successful, FALSE otherwise.


Keywords:

debugging.


MdlDbgVsl

(mdl_dbg.c:1617)

Prototype:

  void MdlDbgVsl(const MdlModelStruct *Model,
                 CagdBType TCrvs,
                 CagdBType TSrfs,
                 CagdBType Srfs)


Description:

Debug routine to verify consistency of a model, visually. Same as MdlDebugVisual but send the geometry directly to a display device.

Parameters:

Model: To verify.
TCrvs: TRUE to dump the trimming curves. FALSE to ignore. will be colored green if shared by two different surfaces, and color red if shared by one.
TSrfs: TRUE to dump the trimmed surfaces. FALSE to ignore.
Srfs: TRUE to dump the tensor product surfaces. FALSE to ignore.


Returned Value:

void


Keywords:

debugging.


MdlDebugHandleTCrvLoops

(mdl_dbg.c:553)

Prototype:

  int MdlDebugHandleTCrvLoops(const MdlTrimSrfStruct *TSrf,
                              const MdlLoopStruct *Loops,
                              const CagdPType Trans,
                              int Display,
                              int TrimEndPts)


Description:

Debug routine to dump the UV trimming curve loops.

Parameters:

TSrf: To dump its trimming loops in UV space. Can be NULL.
Loops: To dump as trimming curves in UV space.
Trans: To translate all the curves.
Display: TRUE to display the data, FALSE to write it to stdout.
TrimEndPts: TRUE to dump only the trimming curves' end points.


Returned Value:

int: TRUE if successful, FALSE otherwise.


Keywords:

debugging.


MdlDebugHandleTSrfCrvs

(mdl_dbg.c:596)

Prototype:

  int MdlDebugHandleTSrfCrvs(const MdlTrimSegStruct *TCrvs,
                             const MdlTrimSrfStruct *TSrf,
                             const CagdPType Trans,
                             int Display,
                             int TrimEndPts)


Description:

Debug routine to dump a list of trimming curves.

Parameters:

TCrvs: List of trimming curves to dump.
TSrf: If not NULL - dump only its trimming curves.
Trans: To translate all the curves. Can be NULL.
Display: RUE to display the data, FALSE to write it to stdout.
TrimEndPts: TRUE to dump only the trimming curves' end points.


Returned Value:

int: TRUE if successful, FALSE otherwise.


Keywords:

debugging.


MdlDebugHandleTSrfRefCrvs

(mdl_dbg.c:754)

Prototype:

  int MdlDebugHandleTSrfRefCrvs(const MdlTrimSegRefStruct *Refs,
                                const MdlTrimSrfStruct *TSrf,
                                const CagdPType Trans,
                                int Loop,
                                int Display,
                                int TrimEndPts)


Description:

Debug routine to dump a list of refs to trimming curves.

Parameters:

Refs: List of references to trimming curves to dump.
TSrf: If not NULL - dump only its trimming curves.
Trans: To translate all the curves. Can be NULL.
Loop: Unique loop index.
Display: RUE to display the data, FALSE to write it to stdout.
TrimEndPts: TRUE to dump only the trimming curves' end points.


Returned Value:

int: TRUE if successful, FALSE otherwise.


Keywords:

debugging.


MdlDebugVerify

(mdl_dbg.c:1326)

Prototype:

  int MdlDebugVerify(const MdlModelStruct *Model, int Complete, int TestLoops)


Description:

Debug routine to verify consistency of a model, using default tolerances.

Parameters:

Model: To verify.
Complete: TRUE if the model is indeed complete and all back pointers should be set at this time.
TestLoops: TRUE to also verify that each loop is indeed a loop.


Returned Value:

int: TRUE if successful, FALSE otherwise.


Keywords:

debugging.


MdlDebugVerifyEps

(mdl_dbg.c:1360)

Prototype:

  int MdlDebugVerifyEps(const MdlModelStruct *Model,
                        int Complete,
                        int TestLoops,
                        CagdRType TCrvTol,
                        CagdRType UVVertexTol,
                        CagdRType VertexTol)


Description:

Debug routine to verify consistency of a model.

Parameters:

Model: To verify.
Complete: TRUE if the model is indeed complete and all back pointers should be set at this time.
TestLoops: TRUE to also verify that each loop is indeed a loop.
TCrvTol: The tolerance for comparing trimming curves.
UVVertexTol: The tolerance for comparing the end points of trimming curves in UV-space.
VertexTol: The tolerance for comparing the end points of trimming curves in Euclidean space.


Returned Value:

int: TRUE if successful, FALSE otherwise.


Keywords:

debugging.


MdlDebugVerifyTrimSeg

(mdl_dbg.c:1005)

Prototype:

  int MdlDebugVerifyTrimSeg(const MdlTrimSegStruct *TSeg, int VerifyBackPtrs)


Description:

Debug routine to verify consistency of a trimming curve segment, using default tolerances.

Parameters:

TSeg: To verify.
VerifyBackPtrs: TRUE to also verify the two references to this segment and that they are referencing it in reverse order.


Returned Value:

int: TRUE if successful, FALSE otherwise.


Keywords:

debugging.


MdlDebugVerifyTrimSegEps

(mdl_dbg.c:1029)

Prototype:

  int MdlDebugVerifyTrimSegEps(const MdlTrimSegStruct *TSeg,
                               int VerifyBackPtrs,
                               CagdRType TCrvTol)


Description:

Debug routine to verify consistency of a trimming curve segment.

Parameters:

TSeg: To verify.
VerifyBackPtrs: TRUE to also verify the two references to this segment and that they are referencing it in reverse order.
TCrvTol: The tolerance for comparing trimming curves.


Returned Value:

int: TRUE if successful, FALSE otherwise.


Keywords:

debugging.


MdlDebugVerifyTrimSegsArcLen

(mdl_dbg.c:1171)

Prototype:

  int MdlDebugVerifyTrimSegsArcLen(const MdlTrimSegStruct *TSegs)


Description:

Debug routine to verify arc length of list of trimming curve segments.

Parameters:

TSegs: To verify.


Returned Value:

int: TRUE if successful, FALSE otherwise.


Keywords:

debugging.


MdlDebugVerifyTrimSrf

(mdl_dbg.c:1210)

Prototype:

  int MdlDebugVerifyTrimSrf(const MdlTrimSrfStruct *MdlTrimSrf,
                            int Complete,
                            int TestLoops)


Description:

Debug routine to verify consistency of a model.

Parameters:

MdlTrimSrf: To verify.
Complete: TRUE if the model is indeed complete and all back pointers should be set at this time.
TestLoops: TRUE to also verify that each loop is indeed a loop.


Returned Value:

int: TRUE if successful, FALSE otherwise.


Keywords:

debugging.


MdlDebugVerifyTrimSrfEps

(mdl_dbg.c:1239)

Prototype:

  int MdlDebugVerifyTrimSrfEps(const MdlTrimSrfStruct *MdlTrimSrf,
                               int Complete,
                               int TestLoops,
                               CagdRType TCrvTol,
                               CagdRType UVVertexTol)


Description:

Debug routine to verify consistency of a model.

Parameters:

MdlTrimSrf: To verify.
Complete: TRUE if the model is indeed complete and all back pointers should be set at this time.
TestLoops: TRUE to also verify that each loop is indeed a loop.
TCrvTol: Tolerance to use on trimming curve segments.
UVVertexTol: olerance to use in merging curves into loops.


Returned Value:

int: TRUE if successful, FALSE otherwise.


Keywords:

debugging.


MdlDebugVisual

(mdl_dbg.c:1460)

Prototype:

  IPObjectStruct *MdlDebugVisual(const MdlModelStruct *Model,
                                 CagdBType TCrvs,
                                 CagdBType TSrfs,
                                 CagdBType Srfs)


Description:

Debug routine to verify consistency of a model, visually.

Parameters:

Model: To verify.
TCrvs: TRUE to dump the trimming curves. FALSE to ignore. will be colored green if shared by two different surfaces, and color red if shared by one.
TSrfs: TRUE to dump the trimmed surfaces. FALSE to ignore.
Srfs: TRUE to dump the tensor product surfaces. FALSE to ignore.


Returned Value:

IPObjectStruct *: A list object holding the different extracted entities of the model.


Keywords:

debugging.


MdlDebugWriteTrimSegs

(mdl_dbg.c:952)

Prototype:

  int MdlDebugWriteTrimSegs(const MdlTrimSegStruct *TSegs,
                            const MdlTrimSrfStruct *TSrf,
                            const CagdPType Trans)


Description:

Debug routine to dump a list of UV trimming curves model.

Parameters:

TSegs: To dump all its trimming curves in the list.
TSrf: If not NULL - dump only its trimming curves.
Trans: To translate all the curves. Can be NULL.


Returned Value:

int: TRUE if successful, FALSE otherwise.


Keywords:

debugging.


MdlDescribeError

(mdl_err.c:50)

Prototype:

  const char *MdlDescribeError(MdlFatalErrorType ErrorNum)


Description:

Returns a string describing a the given error. Errors can be raised by any member of this mdl library as well as other users. Raised error will cause an invokation of MdlFatalError function which decides how to handle this error. MdlFatalError 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:

const char *: A string describing the error type.


Keywords:

error handling


MdlDivideTrimCrv

(mdl_aux.c:252)

Prototype:

  MdlTrimSegStruct *MdlDivideTrimCrv(MdlTrimSegStruct *Seg,
                                     const CagdPtStruct *Pts,
                                     int Idx,
                                     CagdRType Eps,
                                     int *Proximity)


Description:

Subdivides the given segment at the specified parameters values.

Parameters:

Seg: Trimming segment to divide. Seg will return, in place, the first curve in the divided set.
Pts: Parameters at which to split.
Idx: Index of parameter in Pts points: 0 for X, 1 for Y, etc.
Eps: parameter closer than Eps to boundary or other parameters are ignored.
Proximity: roximity bit set to end points - see CagdCrvSubdivAtParams2.


Returned Value:

MdlTrimSegStruct *: The rest of the divided segments.


See Also:

CagdCrvSubdivAtParams2

Keywords:

allocation


MdlEnsureMdlTrimCrvsPrecision

(mdl_aux.c:506)

Prototype:

  void MdlEnsureMdlTrimCrvsPrecision(MdlModelStruct *Mdl)


Description:

Ensure adjacent trimming curves have the precise same end points.

Parameters:

Mdl: To ensure the precision of its trimming curves.


Returned Value:

void


See Also:

MdlEnsureTSrfTrimCrvsPrecision MdlEnsureTSrfTrimLoopPrecision

Keywords:




MdlEnsureTSrfTrimCrvsPrecision

(mdl_aux.c:533)

Prototype:

  void MdlEnsureTSrfTrimCrvsPrecision(MdlTrimSrfStruct *MdlTrimSrf)


Description:

Ensure adjacent trimming curves have the precise same end points.

Parameters:

MdlTrimSrf: To ensure the precision of its trimming curves.


Returned Value:

void


See Also:

MdlEnsureMdlTrimCrvsPrecision MdlEnsureTSrfTrimLoopPrecision

Keywords:




MdlEnsureTSrfTrimLoopPrecision

(mdl_aux.c:563)

Prototype:

  int MdlEnsureTSrfTrimLoopPrecision(MdlLoopStruct *Loop,
                                     MdlTrimSrfStruct *MdlTrimSrf,
                                     CagdRType Tol)


Description:

Ensure adjacent trimming curves have the precise same end points.

Parameters:

Loop: To ensure the precision of its trimming curves.
MdlTrimSrf: To ensure the precision of its trimming curves in Loop.
Tol: Tolerance to require to validate this loop.


Returned Value:

int: TRUE if precise, FALSE if imprecise beyond tolerance Tol.


See Also:

MdlEnsureMdlTrimCrvsPrecision MdlEnsureMdlTrimCrvsPrecision

Keywords:




MdlExportTrimmingCurves

(mdl_dbg.c:1673)

Prototype:

  void MdlExportTrimmingCurves(MdlTrimSrfStruct *MdlTrimSrf,
                               MdlTrimSegStruct *NewSegs,
                               const char *Path)


Description:

Exports old and new trimming curves with of a given trimmed surface in R3 to files in the specified path.

Parameters:

MdlTrimSrf: The trimmed surface
NewSegs: New trimming segments.
Path: Output path.


Returned Value:

void


Keywords:




MdlExtractUVCrv

(mdlcnvrt.c:860)

Prototype:

  CagdCrvStruct *MdlExtractUVCrv(const MdlTrimSrfStruct *MdlSrf,
                                 const MdlTrimSegStruct *MdlSeg)


Description:

Extracting the UV curve from MdlTrimSegStruct depending on the position of the current model surface.

Parameters:

MdlSrf: odel's trimming surface.
MdlSeg: odel's trimming curve segment.


Returned Value:

CagdCrvStruct *: Extracted UV curve.


Keywords:




MdlFatalError

(mdl_ftl.c:56)

Prototype:

  void MdlFatalError(MdlFatalErrorType ErrID)


Description:

Trap Mdl_lib errors right here. Provides a default error handler for the mdl library. Gets an error description using MdlDescribeError, prints it and exit the program using exit.

Parameters:

ErrID: Error type that was raised.


Returned Value:

void


Keywords:

error handling


MdlFilterOutCrvs

(mdl_aux.c:37)

Prototype:

  MdlTrimSegStruct *MdlFilterOutCrvs(MdlTrimSegStruct *TSegs)


Description:

Examines the given list of curve segments in TSrf domain if inside or not, against its trimming surfaces.

Parameters:

TSegs: Curve segments to examine if inside both its trimmed surfaces.


Returned Value:

MdlTrimSegStruct *: Filtered (inside) list of TSegs (in its trim. srfs).


Keywords:




MdlGetLoopSegIndex

(mdl_ptch.c:134)

Prototype:

  IritIntPtrSizeType MdlGetLoopSegIndex(const MdlTrimSegRefStruct *TrimSeg,
                                        const MdlTrimSegStruct *TrimSegList)


Description:

Returns the index of TrimSeg in TrimSegList, first index is 1. Index is going to be negative if the Reversed flag is on.

Parameters:

TrimSeg: To search in TrimSegList for its index.
TrimSegList: List of trimming curve segments.


Returned Value:

IritIntPtrSizeType: Index in list, or zero if not found. This is a special integer of a size of a pointer.


See Also:

MdlGetSrfIndex

Keywords:




MdlGetModelTrimSegRef

(mdl_prim.c:223)

Prototype:

  int MdlGetModelTrimSegRef(const MdlModelStruct *Mdl,
                            const MdlTrimSegStruct *TSeg,
                            MdlTrimSegRefStruct **TSegRef1,
                            MdlTrimSrfStruct **TSrf1,
                            MdlTrimSegRefStruct **TSegRef2,
                            MdlTrimSrfStruct **TSrf2)


Description:

Fetches the up to two trim curve segments references to TSeg in Model.

Parameters:

Mdl: In which to find to to two trim curve segments references to.
TSeg: Trimming curve segment to seek references to.
TSegRef1: Where to place the first reference found.
TSrf1: The trimmed surface of the first reference.
TSegRef2: Where to place the second reference found.
TSrf2: The trimmed surface of the second reference.


Returned Value:

int: Number of references found.


See Also:

MdlGetSrfTrimSegRef

Keywords:




MdlGetOtherSegRef

(mdl_gen.c:1184)

Prototype:

  MdlTrimSegRefStruct *MdlGetOtherSegRef(const MdlTrimSegRefStruct *SegRef,
                                         const MdlTrimSrfStruct *TSrf)


Description:

Find the second reference to the given reference of a trimming curve, if any.

Parameters:

SegRef: Reference to trimming curve segment we seek the second reference, if exist.
TSrf: Trimmed surface SegRef belongs to.


Returned Value:

MdlTrimSegRefStruct *: The second reference ot NULL if none.


See Also:

MdlGetOtherSegRef2

Keywords:




MdlGetOtherSegRef2

(mdl_gen.c:1216)

Prototype:

  MdlTrimSegRefStruct *MdlGetOtherSegRef2(const MdlTrimSegRefStruct *SegRef,
                                          const MdlTrimSrfStruct *TSrf,
                                          MdlTrimSrfStruct **OtherTSrf,
                                          MdlLoopStruct **OtherLoop)


Description:

Find the second reference to the given reference of a trimming curve if any. Same as MdlGetOtherSegRef but returns more info.

Parameters:

SegRef: Reference to trimming curve segment we seek the second reference ,if exist.
TSrf: Trimmed surface SegRef belongs to.
OtherTSrf: The other trimmed surface holding other ref., if any.
OtherLoop: The other loop holding other ref., if any.


Returned Value:

MdlTrimSegRefStruct *: The second reference ot NULL if none.


See Also:

MdlGetOtherSegRef

Keywords:




MdlGetSrfIndex

(mdl_ptch.c:168)

Prototype:

  IritIntPtrSizeType MdlGetSrfIndex(const MdlTrimSrfStruct *Srf,
                                    const MdlTrimSrfStruct *TrimSrfList)


Description:

Returns the index of an Srf in TrimSrfList, first index is 1.

Parameters:

Srf: To search in TrimSrfList for its index.
TrimSrfList: List of surfaces.


Returned Value:

IritIntPtrSizeType: Index in list, or zero if not found. This is a special integer of a size of a pointer.


See Also:

MdlGetLoopSegIndex

Keywords:




MdlGetSrfTrimSegRef

(mdl_prim.c:267)

Prototype:

  MdlTrimSegRefStruct *MdlGetSrfTrimSegRef(const MdlTrimSrfStruct *TSrf,
                                           const MdlTrimSegStruct *TSeg)


Description:

Find the reference to TSeg in TSrf.

Parameters:

TSrf: Trimmed surface to search the trimming segment reference in.
TSeg: The segment to seek the trimmed curve reference for.


Returned Value:

MdlTrimSegRefStruct *: Reference if found, NULL otherwise.


See Also:

MdlGetModelTrimSegRef

Keywords:




MdlGetTrimmingCurves

(mdl_prim.c:310)

Prototype:

  CagdCrvStruct *MdlGetTrimmingCurves(const MdlTrimSrfStruct *TrimSrf,
                                      CagdBType MergeLoops,
                                      CagdBType ParamSpace,
                                      CagdBType EvalEuclid)


Description:

Extracts the trimming curves of the given model's trimmed surface.

Parameters:

TrimSrf: Trimmed surface to extract trimming curves from.
MergeLoops: TRUE to merge loops into a single curve.
ParamSpace: TRUE for curves in parametric space, FALSE for 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.


See Also:

TrimGetTrimmingCurves TrimGetTrimmingCurves2

Keywords:

trimming curves


MdlGetTrimmingCurvesEndPts

(mdl_aux.c:825)

Prototype:

  CagdPType *MdlGetTrimmingCurvesEndPts(MdlModelStruct *Mdl, int *N)


Description:

Derives a list of all trimming curves start/terminating points. Aim is made to get unique points (so shared vertices by several trimming curves will show up once). As a side effect, all trimming curve segments in Mdl will be tagged with the index into the point list, as "StartVertex" and "TrmntVrtx" attributes.

Parameters:

Mdl: Model to process.
N: Will be updated with length of the return list (number of points where 3N is number of real values returned).


Returned Value:

CagdPType *: A vector of 3N real values holding the N points, allocated dynamically.


See Also:



Keywords:




MdlGetUVEpsInsideTSrf

(mdl2bool.c:1193)

Prototype:

  int MdlGetUVEpsInsideTSrf(MdlTrimSrfStruct *TSrf, CagdUVType UVInside)


Description:

Find a point epsilon inside the valid domain of TSrf by moving a small amount in a direction prescribed by an adjacent surface to TSrf.

Parameters:

TSrf: to find a point inside it.
UVInside: Will be updated by the computed inside location.


Returned Value:

int: TRUE if successful, FALSE otherwise.


Keywords:




MdlGetUVLocationInLoop

(mdl_aux.c:417)

Prototype:

  int MdlGetUVLocationInLoop(const MdlLoopStruct *L,
                             const MdlTrimSrfStruct *TSrf,
                             CagdUVType UV)


Description:

Fetches one UV value from the give loop L in surface TSrf.

Parameters:

L: Loop to fetch UV value from.
TSrf: Surface to fetch UV value for.
UV: Computed UV value.


Returned Value:

int: TRUE if successful, FALSE otherwise.


Keywords:




MdlInterModelByPlane

(mdl_bool.c:2734)

Prototype:

  CagdCrvStruct *MdlInterModelByPlane(const MdlModelStruct *Mdl,
                                      const IrtPlnType Pln)


Description:

intersects the given model, Mdl, with Plan Pln.

Parameters:

Mdl: Model to intersect against plane Pln.
Pln: intersecting plane.


Returned Value:

CagdCrvStruct *: Intersection curves or NULL if none.


See Also:

MdlClipSrfByPlane MdlClipTrimmedSrfByPlane MdlClipModelByPlane MvarSrfSrfInter UserCntrSrfWithPlane MdlInterSrfByPlane

Keywords:




MdlInterSrfByPlane

(mdl_bool.c:2585)

Prototype:

  CagdCrvStruct *MdlInterSrfByPlane(const CagdSrfStruct *Srf,
                                    const IrtPlnType Pln)


Description:

intersects the given surface, Srf, with Plan Pln.

Parameters:

Srf: Surface to intersect against plane Pln.
Pln: intersecting plane.


Returned Value:

CagdCrvStruct *: Intersection curves or NULL if none.


See Also:

MdlClipSrfByPlane MdlClipTrimmedSrfByPlane MdlClipModelByPlane MvarSrfSrfInter UserCntrSrfWithPlane MdlInterModelByPlane

Keywords:




MdlIsLoopNested

(mdl_aux.c:463)

Prototype:

  int MdlIsLoopNested(const MdlLoopStruct *L, const MdlTrimSrfStruct *TSrf)


Description:

Checks if the given loops is completely disjoint with respect to the other loops.

Parameters:

L: Loop to test if disjoint with respect to trimming loops in TSrf.
TSrf: Surface to examine its trimming loops against loop L.


Returned Value:

int: 0 if disjoint, 1 if L contains a loop of TSrf, 2 if L is contained in a loop of TSrf, in a valid domain.


See Also:



Keywords:




MdlIsPointInsideModel

(mdl_aux.c:702)

Prototype:

  CagdBType MdlIsPointInsideModel(const CagdVType Pnt, const MdlModelStruct *Mdl)


Description:

Checks if a given points lies inside a given Model. Several rays starting from the point are fired, and the number of intersection points with the model is examined, if the number is odd then the point is outside the model, and inside otherwise.

Parameters:

Pnt: Point to examined.
Mdl: The model.


Returned Value:

CagdBType: TRUE if the point lies inside the model, and FALSE otherwise.


See Also:

TrimSrfIntersectRay MdlIsPointInsideTrimLoop MdlIsPointInsideTrimSrf

Keywords:




MdlIsPointInsideTrimLoop

(mdl_aux.c:375)

Prototype:

  int MdlIsPointInsideTrimLoop(const MdlTrimSrfStruct *TSrf,
                               const MdlLoopStruct *Loop,
                               CagdUVType UV)


Description:

Returns TRUE if the given UV value is inside the domain prescribed by the trimming loop.

Parameters:

TSrf: The owner of these trimming curves.
Loop: Trimming loop to consider.
UV: Parametric location.


Returned Value:

int: Number of intersection. Even means outside.


See Also:

TrimIsPointInsideTrimUVCrv TrimIsPointInsideTrimSrf TrimIsPointInsideTrimCrvs MdlIsPointInsideTrimSrf

Keywords:

inclusion


MdlIsPointInsideTrimSrf

(mdl_aux.c:341)

Prototype:

  CagdBType MdlIsPointInsideTrimSrf(const MdlTrimSrfStruct *TSrf,
                                    CagdUVType UV)


Description:

Returns TRUE if the given UV value is inside the domain prescribed by the trimming curves of TSrf.

Parameters:

TSrf: Trimming curves to consider.
UV: Parametric location.


Returned Value:

CagdBType: TRUE if inside, FALSE otherwise.


See Also:

TrimIsPointInsideTrimUVCrv TrimIsPointInsideTrimSrf TrimIsPointInsideTrimCrvs MdlIsPointInsideTrimLoop

Keywords:

inclusion


MdlLoopCopy

(mdl_gen.c:435)

Prototype:

  MdlLoopStruct *MdlLoopCopy(const MdlLoopStruct *MdlLoop,
                             const MdlTrimSegStruct *TrimSegList)


Description:

Duplicates a trimming surface structure.

Parameters:

MdlLoop: A trimming surface to duplicate.
TrimSegList: The original trimmed segments.


Returned Value:

MdlLoopStruct *: A trimming surface structure.


Keywords:

allocation


MdlLoopCopyList

(mdl_gen.c:463)

Prototype:

  MdlLoopStruct *MdlLoopCopyList(const MdlLoopStruct *MdlLoopList,
                                 const MdlTrimSegStruct *TrimSegList)


Description:

Allocates and copies a list of Loops structures.

Parameters:

MdlLoopList: o be copied.
TrimSegList: The original trimmed segments.


Returned Value:

MdlLoopStruct *: A duplicated list of Loops.


Keywords:

copy


MdlLoopFree

(mdl_gen.c:131)

Prototype:

  void MdlLoopFree(MdlLoopStruct *MdlLoop)


Description:

Deallocates a Model Loop structure.

Parameters:

MdlLoop: A loop to free.


Returned Value:

void


Keywords:

allocation


MdlLoopFreeList

(mdl_gen.c:151)

Prototype:

  void MdlLoopFreeList(MdlLoopStruct *MdlLoopList)


Description:

Deallocates a Model Loop List structure.

Parameters:

MdlLoopList: list of loops to free.


Returned Value:

void


Keywords:

allocation


MdlLoopNew

(mdl_gen.c:884)

Prototype:

  MdlLoopStruct *MdlLoopNew(MdlTrimSegRefStruct *MdlTrimSegRefList)


Description:

Allocates a model loop structure.

Parameters:

MdlTrimSegRefList: List of model loops forming the trimming loop.


Returned Value:

MdlLoopStruct *: A model loop.


Keywords:

allocation


MdlModelBBox

(mdl_bbox.c:30)

Prototype:

  CagdBBoxStruct *MdlModelBBox(const MdlModelStruct *Mdl, CagdBBoxStruct *BBox)


Description:

Computes a bounding box for a freeform model.

Parameters:

Mdl: A model to compute a bounding box for.
BBox: Where bounding information is to be saved.


Returned Value:

CagdBBoxStruct *: BBox.


See Also:

MdlModelListBBox CagdCrvListBBox CagdSrfBBox GMBBSetBBoxPrecise MdlModelTSrfTCrvsBBox

Keywords:

bbox bounding box


MdlModelCopy

(mdl_gen.c:555)

Prototype:

  MdlModelStruct *MdlModelCopy(const MdlModelStruct *Model)


Description:

Duplicates a Model structure.

Parameters:

Model: A Model to duplicate.


Returned Value:

MdlModelStruct *: A Model structure.


Keywords:

allocation


MdlModelCopyList

(mdl_gen.c:590)

Prototype:

  MdlModelStruct *MdlModelCopyList(const MdlModelStruct *ModelList)


Description:

Allocates and copies a list of Model structures.

Parameters:

ModelList: To be copied.


Returned Value:

MdlModelStruct *: A duplicated list of trimming surfaces.


Keywords:

copy


MdlModelFree

(mdl_gen.c:220)

Prototype:

  void MdlModelFree(MdlModelStruct *Model)


Description:

Deallocates a Model structure.

Parameters:

Model: Model to free.


Returned Value:

void


Keywords:

allocation


MdlModelFreeList

(mdl_gen.c:241)

Prototype:

  void MdlModelFreeList(MdlModelStruct *Model)


Description:

Deallocates a list of Model structures.

Parameters:

Model: list of trimmed surface to free.


Returned Value:

void


Keywords:

allocation


MdlModelIsClosed

(mdl_aux.c:759)

Prototype:

  int MdlModelIsClosed(const MdlModelStruct *Model)


Description:

Checks if a model is closed. A model is closed if all its trimming curves are shared by two surfaces.

Parameters:

Model: Model to example if it is closed.


Returned Value:

int: TRUE if closed, FALSE otherwise.


Keywords:




MdlModelListBBox

(mdl_bbox.c:82)

Prototype:

  CagdBBoxStruct *MdlModelListBBox(const MdlModelStruct *Mdls,
                                   CagdBBoxStruct *BBox)


Description:

Computes a bounding box for freeform models.

Parameters:

Mdls: List of models to compute a bounding box for.
BBox: Where bounding information is to be saved.


Returned Value:

CagdBBoxStruct *: BBox.


See Also:

MdlModelBBox CagdCrvListBBox CagdSrfBBox GMBBSetBBoxPrecise MdlModelTSrfTCrvsBBox

Keywords:

bbox bounding box


MdlModelMatTransform

(mdl_gen.c:1410)

Prototype:

  void MdlModelMatTransform(MdlModelStruct *Model, CagdMType Mat)


Description:

Transforms, in place, the given model as specified by homogeneous matrix Mat.

Parameters:

Model: Model to transform.
Mat: Homogeneous transformation to apply to TV.


Returned Value:

void


Keywords:

models


MdlModelNegate

(mdl_bool.c:2524)

Prototype:

  MdlModelStruct *MdlModelNegate(const MdlModelStruct *Model)


Description:

Computes the inside out (negation of the given model as a new model.

Parameters:

Model: The model to negate.


Returned Value:

MdlModelStruct *: Resulting negation.


See Also:



Keywords:




MdlModelNew

(mdl_gen.c:1274)

Prototype:

  MdlModelStruct *MdlModelNew(CagdSrfStruct *Srf,
                              CagdCrvStruct **LoopList,
                              int NumLoops,
                              CagdBType HasTopLvlTrim)


Description:

Constructor for a Model.

Parameters:

Srf: The original surface to be made into a model. Used in place.
LoopList: A vector of trimming loops (lists of curves). Used in place.
NumLoops: Size of vector LoopList.
HasTopLvlTrim: If FALSE, add outer loops boundary.


Returned Value:

MdlModelStruct *: The Model.


Keywords:

Allocation


MdlModelNew2

(mdl_gen.c:1343)

Prototype:

  MdlModelStruct *MdlModelNew2(MdlTrimSrfStruct *TrimSrfs,
                               MdlTrimSegStruct *TrimSegs)


Description:

Constructor for a Model. No attempt is mode to verify the consistency of the given data and proper pointers between the different data strcutres.

Parameters:

TrimSrfs: Trimming surfaces. Used in place.
TrimSegs: A list of trimming segments. Used in place.


Returned Value:

MdlModelStruct *: The construct Model.


See Also:

MdlModelNew MdlPatchTrimmingSegPointers

Keywords:

Allocation


MdlModelTSrfTCrvsBBox

(mdl_bbox.c:116)

Prototype:

  CagdBBoxStruct *MdlModelTSrfTCrvsBBox(const MdlTrimSrfStruct *TSrf,
                                        CagdBBoxStruct *BBox)


Description:

Computes a bounding box for the trimming curves of one trimmed srf.

Parameters:

TSrf: A trimmed surfaces to compute a bbox for its trimming curves.
BBox: Where bounding information is to be saved.


Returned Value:

CagdBBoxStruct *: BBox.


See Also:

MdlModelListBBox CagdCrvListBBox CagdSrfBBox GMBBSetBBoxPrecise

Keywords:

bbox bounding box


MdlModelTransform

(mdl_gen.c:1375)

Prototype:

  void MdlModelTransform(MdlModelStruct *Model,
                         const CagdRType *Translate,
                         CagdRType Scale)


Description:

Linearly transforms, in place, given model as specified by Translate and Scale.

Parameters:

Model: Model to transform.
Translate: Translation factor.
Scale: Scaling factor.


Returned Value:

void


Keywords:

models


MdlModelsSame

(mdl_gen.c:1454)

Prototype:

  CagdBType MdlModelsSame(const MdlModelStruct *Model1,
                          const MdlModelStruct *Model2,
                          CagdRType Eps)


Description:

Compare the two models for similarity.

Parameters:

Model1, Model2: The two trivariates to compare.
Eps: Tolerance of equality.


Returned Value:

CagdBType: TRUE if trivariates are the same, FALSE otherwise.


See Also:

CagdSrfsSame CagdCrvsSame MvarMVsSame

Keywords:




MdlNewLoop

(mdl_gen.c:1035)

Prototype:

  MdlLoopStruct *MdlNewLoop(CagdCrvStruct *LoopCrvs)


Description:

Creates a new loop from a list of curves forming a loop.

Parameters:

LoopCrvs: The given list of curves, used in place.


Returned Value:

MdlLoopStruct *: The created Loop.


See Also:

MdlModelNew MdlTrimSrfNew2

Keywords:

Allocation


MdlPatchTrimmingSegPointers

(mdl_ptch.c:39)

Prototype:

  void MdlPatchTrimmingSegPointers(MdlModelStruct *Model)


Description:

Patches a model to have proper (back) pointers between the different data structures. The assumtions are that all reference and back pointers are set as indices into the proper lists: 1. Every reference to a surface, is given as its index in the Model's TrimSrfList trimmed surfaces' list. 2. Every reference to a trimming segment, is given as its index in the Model's TrimSegList or trimming segments' list. All lists are indexed starting from 1, 0 denotes an error.

Parameters:

Model: To back patch its pointer.


Returned Value:

void


See Also:

MdlModelNew MdlModelNew2 MdlReadModelFromFile

Keywords:




MdlPrimBox

(mdl_prim.c:702)

Prototype:

  MdlModelStruct *MdlPrimBox(CagdRType MinX,
                             CagdRType MinY,
                             CagdRType MinZ,
                             CagdRType MaxX,
                             CagdRType MaxY,
                             CagdRType MaxZ)


Description:

A model constructor of a box, parallel to main axes.

Parameters:

MinX, MinY, MinZ: Minimum range of box model.
MaxX, MaxY, MaxZ: Maximum range of box model.


Returned Value:

MdlModelStruct *: Constructed box model, as a set of bilinear surfaces.


See Also:

agdPrimBoxSrf

Keywords:




MdlPrimCone

(mdl_prim.c:874)

Prototype:

  MdlModelStruct *MdlPrimCone(const CagdVType Center,
                              CagdRType Radius,
                              CagdRType Height,
                              CagdBType Rational,
                              CagdPrimCapsType Caps)


Description:

A model constructor of a cone, centered at Center, radii of Radius, and height of Height. Axis of cone is Z axis.

Parameters:

Center: Of constructed cone (center of its base).
Radius: Of constructed cone's base.
Height: Of constructed cone.
Rational: If TRUE exact ration cone is created. If FALSE an approximated integral cone is created.
Caps: Do we want caps (top and/or bottom) for the cone?


Returned Value:

MdlModelStruct *: Constructed cone model.


See Also:

CagdPrimConeSrf MdlStitchSelfSrfPrims

Keywords:




MdlPrimCone2

(mdl_prim.c:842)

Prototype:

  MdlModelStruct *MdlPrimCone2(const CagdVType Center,
                               CagdRType MajorRadius,
                               CagdRType MinorRadius,
                               CagdRType Height,
                               CagdBType Rational,
                               CagdPrimCapsType Caps)


Description:

A model constructor of a truncated cone, centered at Center and radii of MajorRadius and MinorRadius. A MinorRadius of zero would construct a regular cone. Otherwise, a truncated cone. Axis of cone is Z axis.

Parameters:

Center: Of constructed cone (center of its base).
MajorRadius: Of constructed cone.
MinorRadius: Of constructed cone.
Height: Of constructed cone.
Rational: If TRUE exact ration cone is created. If FALSE an approximated integral cone is created.
Caps: Do we want caps (top and/or bottom) for the cone?


Returned Value:

MdlModelStruct *: Constructed truncated cone model.


See Also:

CagdPrimCone2Srf MdlStitchSelfSrfPrims

Keywords:




MdlPrimCylinder

(mdl_prim.c:905)

Prototype:

  MdlModelStruct *MdlPrimCylinder(const CagdVType Center,
                                  CagdRType Radius,
                                  CagdRType Height,
                                  CagdBType Rational,
                                  CagdPrimCapsType Caps)


Description:

A model constructor of a Cylinder, centered at Center, radii of Radius, and height of Height. Axis of cylinder is Z axis.

Parameters:

Center: Of constructed Cylinder (center of its base).
Radius: Of constructed Cylinder.
Height: Of constructed Cylinder.
Rational: If TRUE exact ration sphere is created. If FALSE an approximated integral surface is created.
Caps: Do we want caps (top and/or bottom) for the cone?


Returned Value:

MdlModelStruct *: Constructed cylinder model.


See Also:

CagdPrimCylinderSrf MdlStitchSelfSrfPrims

Keywords:




MdlPrimListOfSrfs2Model

(mdl_prim.c:610)

Prototype:

  MdlModelStruct *MdlPrimListOfSrfs2Model(CagdSrfStruct *Srfs,
                                          int *n,
                                          int StitchModel)


Description:

A model constructor from a list of surfaces.

Parameters:

Srfs: List of surfaces to convert to one model, in place. If Srfs contains one surface only, it is tested for being closed in either U or V and divided into two accordingly, before forming the model.
n: Optional parameter to be set with number of boundary edges that were stitched. Can be NULL to be ignored.
StitchModel: TRUE to also aim to stitch adjacent surfaces, in the end.


Returned Value:

MdlModelStruct *: Constructed model.


See Also:

MdlStitchSelfSrfPrims

Keywords:




MdlPrimPlane

(mdl_prim.c:539)

Prototype:

  MdlModelStruct *MdlPrimPlane(CagdRType MinX,
                               CagdRType MinY,
                               CagdRType MaxX,
                               CagdRType MaxY,
                               CagdRType ZLevel)


Description:

A model constructor of a plane, parallel to XY plane at level Zlevel.

Parameters:

MinX, MinY: Minimum XY coordinates of plane.
MaxX, MaxY: Maximum XY coordinates of plane.
ZLevel: Z level of plane, parallel to the XY plane.


Returned Value:

MdlModelStruct *: Constructed plane model, as a bilinear surface.


See Also:

CagdPrimPlaneSrf MdlPrimPlaneSrfOrderLen

Keywords:




MdlPrimPlaneSrfOrderLen

(mdl_prim.c:575)

Prototype:

  MdlModelStruct *MdlPrimPlaneSrfOrderLen(CagdRType MinX,
                                          CagdRType MinY,
                                          CagdRType MaxX,
                                          CagdRType MaxY,
                                          CagdRType ZLevel,
                                          int Order,
                                          int Len)


Description:

A model constructor of a plane, parallel to XY plane at level Zlevel.

Parameters:

MinX, MinY: Minimum XY coordinates of plane.
MaxX, MaxY: Maximum XY coordinates of plane.
ZLevel: Z level of plane, parallel to the XY plane.
Order: Order of plane surface that is requested.
Len: Number of control points (via refinement).


Returned Value:

MdlModelStruct *: Constructed plane model, as a bi-Order surface.


See Also:

agdPrimPlaneSrfOrderLen MdlPrimPlane

Keywords:




MdlPrimSphere

(mdl_prim.c:747)

Prototype:

  MdlModelStruct *MdlPrimSphere(const CagdVType Center,
                                CagdRType Radius,
                                CagdBType Rational)


Description:

A model constructor of a sphere, centered at Center and radius Radius.

Parameters:

Center: of constructed sphere.
Radius: of constructed sphere.
Rational: f TRUE exact ration sphere is created. If FALSE an approximated integral surface is created.


Returned Value:

MdlModelStruct *: Constructed sphere model.


See Also:

CagdPrimSphereSrf MdlStitchSelfSrfPrims MdlCreateCubeSpherePrim

Keywords:




MdlPrimTorus

(mdl_prim.c:799)

Prototype:

  MdlModelStruct *MdlPrimTorus(const CagdVType Center,
                               CagdRType MajorRadius,
                               CagdRType MinorRadius,
                               CagdBType Rational)


Description:

A model constructor of a torus, centered at Center and radii of MajorRadius and MinorRadius.

Parameters:

Center: Of constructed torus.
MajorRadius: Of constructed torus.
MinorRadius: Of constructed torus.
Rational: If TRUE exact ration sphere is created. If FALSE an approximated integral surface is created.


Returned Value:

MdlModelStruct *: Constructed torus model.


See Also:

CagdPrimTorusSrf MdlStitchSelfSrfPrims

Keywords:




MdlPrintLoop

(mdl_dbg.c:1756)

Prototype:

  void MdlPrintLoop(MdlLoopStruct *Loop, const char *FileName)


Description:

Saves a given trimming loop in R3 to a specified file.

Parameters:

Loop: The trimming loop
FileName: utput file name.


Returned Value:

void


Keywords:




MdlRemovEucTrimCrvs

(mdlcnvrt.c:888)

Prototype:

  void MdlRemovEucTrimCrvs(MdlModelStruct *Mdl)


Description:

Remove the Euclidean curves from the trimming curves in the given data.

Parameters:

Mdl: A model to remove all Euclidean trimming curves from.


Returned Value:

void


See Also:

TrimRemovEucTrimCrvs

Keywords:




MdlSetFatalErrorFunc

(mdl_ftl.c:28)

Prototype:

  MdlSetErrorFuncType MdlSetFatalErrorFunc(MdlSetErrorFuncType ErrorFunc)


Description:

Sets the error function to be used by Mdl_lib.

Parameters:

ErrorFunc: New error function to use.


Returned Value:

MdlSetErrorFuncType: Old error function reference.


Keywords:

error handling


MdlSplitDisjointComponents

(mdl_cc.c:172)

Prototype:

  MdlModelStruct *MdlSplitDisjointComponents(const MdlModelStruct *Mdl)


Description:

Splits a given model into disconnected components, each component as a new model.

Parameters:

Mdl: The model.


Returned Value:

MdlModelStruct *: List of models, each model contains a component.


Keywords:




MdlSplitTrimCrv

(mdl_aux.c:190)

Prototype:

  int MdlSplitTrimCrv(MdlTrimSegStruct *Seg,
                      const CagdPtStruct *Pts,
                      int Idx,
                      CagdRType Eps,
                      int *Proximity)


Description:

Subdivides the given segment at the specified parameter values. This amounts to: 1. Dividing all curves in Seg and chaining the pieces after Seg. 2. Updating the references in SrfFirst and SrfNext that points to Seg, to now point to all new pieces, in the right order, as can be reversed.

Parameters:

Seg: Trimming segment to split, in place.
Pts: Parameters at which to split.
Idx: Index of parameter in Pts points: 0 for X, 1 for Y, etc.
Eps: parameter closer than Eps to boundary or other parameters are ignored.
Proximity: roximity bit set to end points - see CagdCrvSubdivAtParams2.


Returned Value:

int: TRUE if successful, FALSE otherwise.


Keywords:

allocation


MdlStitchModel

(mdl_prim.c:409)

Prototype:

  int MdlStitchModel(MdlModelStruct *Mdl,
                     CagdBType BackProjTest,
                     CagdRType StitchTol)


Description:

Scans the given model for trimming curves that could be stitched together. A pair of trimming curves can be stitched together if they have the same Euclidean representation and they now have no neighbors. Two trimming curves are considered with "same Euclidean representation" if their end points are the same upto given tolerance (should probably do somewhat better here).

Parameters:

Mdl: Model to seek trimming curves to stitch together, in place.
BackProjTest: If TRUE, then use back-projection to match the curve segments. If FALSE, compare the middle points of the curves to stitch.
StitchTol: Tolerance to use in stitching two trimmed curves as one.


Returned Value:

int: Number of trimming curves stitched together, in place.


See Also:

MdlBooleanMerge VMdlStitchMdlModel

Keywords:




MdlStitchSelfSrfPrims

(mdl_prim.c:1039)

Prototype:

  int MdlStitchSelfSrfPrims(int Stitch)


Description:

Set if different boundaries on the same primitive surface are to be stitched as well or not.

Parameters:

Stitch: TRUE to stitch different boundaries of same surface.


Returned Value:

int: Old value setting.


Keywords:




MdlTrimSegCopy

(mdl_gen.c:269)

Prototype:

  MdlTrimSegStruct *MdlTrimSegCopy(const MdlTrimSegStruct *MdlTrimSeg,
                                   const MdlTrimSrfStruct *TrimSrfList)


Description:

Duplicates a trimming segments structure. The reference pointers to the (upto) two surfaces are replaced with the indices of the surfaces in TrimSrfList.

Parameters:

MdlTrimSeg: A trimming segment to duplicate.
TrimSrfList: The original trimmed surfaces.


Returned Value:

MdlTrimSegStruct *: A trimming segment structure.


Keywords:

allocation


MdlTrimSegCopyList

(mdl_gen.c:333)

Prototype:

  MdlTrimSegStruct *MdlTrimSegCopyList(const MdlTrimSegStruct *MdlTrimSegList,
                                       const MdlTrimSrfStruct *TrimSrfList)


Description:

Allocates and copies a list of trimming segment structures. The reference pointers to the (upto) two surfaces are replaced with the indices of the surfaces in TrimSrfList.

Parameters:

MdlTrimSegList: To be copied.
TrimSrfList: The original trimmed surfaces.


Returned Value:

MdlTrimSegStruct *: A duplicated list of trimming segments.


Keywords:

copy


MdlTrimSegFree

(mdl_gen.c:42)

Prototype:

  void MdlTrimSegFree(MdlTrimSegStruct *MTSeg)


Description:

Deallocates a Model Trimming Segments structure.

Parameters:

MTSeg: A Trimming Segment to free.


Returned Value:

void


Keywords:

allocation


MdlTrimSegFreeList

(mdl_gen.c:64)

Prototype:

  void MdlTrimSegFreeList(MdlTrimSegStruct *MTSegList)


Description:

Deallocates a Model Trimming Segments List structure.

Parameters:

MTSegList: A Trimming Segment List to free.


Returned Value:

void


Keywords:

allocation


MdlTrimSegNew

(mdl_gen.c:633)

Prototype:

  MdlTrimSegStruct *MdlTrimSegNew(CagdCrvStruct *UVCrv1,
                                  CagdCrvStruct *UVCrv2,
                                  CagdCrvStruct *EucCrv1,
                                  MdlTrimSrfStruct *SrfFirst,
                                  MdlTrimSrfStruct *SrfSecond)


Description:

Allocates a model trimming segment structure. Allows periodic and float end conditions - converts them to open end.

Parameters:

UVCrv1: A UV curve for SrfFirst. Must be an E2 curve. Used in place.
UVCrv2: A UV curve for SrfSecond. Must be an E2 curve. Used in place. Can be NULL.
EucCrv1: Optional Euclidean curve for SrfFirst. Must be an E3 curve. Used in place. Can be NULL.
SrfFirst: First surface of the segment. Can be NULL.
SrfSecond: Second surface of the segment. Can be NULL.


Returned Value:

MdlTrimSegStruct *: A model trimming segment structure.


Keywords:

allocation


MdlTrimSegRefCopy

(mdl_gen.c:369)

Prototype:

  MdlTrimSegRefStruct *MdlTrimSegRefCopy(const MdlTrimSegRefStruct *MTSegRefList,
                                         const MdlTrimSegStruct *TrimSegList)


Description:

Duplicates a trimming segment reference structure. The reference pointer to the trimming segment is replaced with the index of trimming segment in TrimSegList.

Parameters:

MTSegRefList: A trimming curve segment reference to duplicate.
TrimSegList: The original trimmed segments.


Returned Value:

MdlTrimSegRefStruct *: A trimming segment reference structure.


Keywords:

allocation


MdlTrimSegRefCopyList

(mdl_gen.c:403)

Prototype:

  MdlTrimSegRefStruct *MdlTrimSegRefCopyList(const MdlTrimSegRefStruct *MTSegRefList,
                                             const MdlTrimSegStruct *TrimSegList)


Description:

Allocates and copies a list of trimming segment reference structures. The reference pointer to the trimming segment is replaced with the index of trimming segment in TrimSegList.

Parameters:

MTSegRefList: To be copied.
TrimSegList: The original trimmed segments.


Returned Value:

MdlTrimSegRefStruct *: A duplicated list of trimming segments.


Keywords:

copy


MdlTrimSegRefFree

(mdl_gen.c:88)

Prototype:

  void MdlTrimSegRefFree(MdlTrimSegRefStruct *MTSegRef)


Description:

Deallocates a Model Trimming Segment Reference structure.

Parameters:

MTSegRef: Segments Reference to free.


Returned Value:

void


Keywords:

allocation


MdlTrimSegRefFreeList

(mdl_gen.c:107)

Prototype:

  void MdlTrimSegRefFreeList(MdlTrimSegRefStruct *MTSegRefList)


Description:

Deallocates a Model Trimming Segment Reference List structure.

Parameters:

MTSegRefList: list of loops to free.


Returned Value:

void


Keywords:

allocation


MdlTrimSegRefNew

(mdl_gen.c:782)

Prototype:

  MdlTrimSegRefStruct *MdlTrimSegRefNew(MdlTrimSegStruct *MdlTrimSeg)


Description:

Allocates a model trimming segment reference structure.

Parameters:

MdlTrimSeg: List of model trimming segments forming the trimming curve.


Returned Value:

MdlTrimSegRefStruct *: A trimmig curve.


Keywords:

allocation


MdlTrimSegRefRemove

(mdl_gen.c:814)

Prototype:

  int MdlTrimSegRefRemove(const MdlTrimSegStruct *TSeg,
                          MdlTrimSegRefStruct **TSegRefList,
                          int FreeRef)


Description:

Remove TSegRef from TSegRefList. TSeg is not deleted.

Parameters:

TSeg: Trimmed Segment to remove references to it from list.
TSegRefList: List to remove TSegRef From.
FreeRef: TRUE to also free this reference, if found.


Returned Value:

int: TRUE if reference found and removed, FALSE otherwise.


Keywords:




MdlTrimSegRefRemove2

(mdl_gen.c:861)

Prototype:

  int MdlTrimSegRefRemove2(const MdlTrimSegStruct *TSeg,
                           MdlLoopStruct *Loops,
                           int FreeRef)


Description:

Remove TSeg from Loops. TSeg is not deleted.

Parameters:

TSeg: Trimmed Segment to remove references to it from list.
Loops: List of loops to find TSeg in and remove it.
FreeRef: TRUE to also free this reference, if found.


Returned Value:

int: TRUE if reference found and removed, FALSE otherwise.


Keywords:




MdlTrimSegRemove

(mdl_gen.c:717)

Prototype:

  int MdlTrimSegRemove(const MdlTrimSegStruct *TSeg, MdlTrimSegStruct **TSegList)


Description:

Removes TSeg from SegList. TSeg is not freed.

Parameters:

TSeg: Trim segment to remove from list.
TSegList: List to remove TSeg from.


Returned Value:

int: TRUE if removed, FALSE otherwise.


Keywords:




MdlTrimSegRemove2

(mdl_gen.c:753)

Prototype:

  int MdlTrimSegRemove2(MdlTrimSegStruct *TSeg, MdlModelStruct *Mdl)


Description:

Removes TSeg from Mdl. TSeg is freed and all references to it are removed as well.

Parameters:

TSeg: Trim segment to remove from Mdl.
Mdl: Model to remove TSegFrom.


Returned Value:

int: TRUE if removed, FALSE otherwise.


Keywords:




MdlTrimSrfChainTrimSegs

(mdl_gen.c:1132)

Prototype:

  MdlTrimSegStruct *MdlTrimSrfChainTrimSegs(MdlTrimSrfStruct *TSrfs)


Description:

Go over all trimmed surface in the model and chain all trimming curve segments into one large linked list, a pointer to which is returned. This function is typically invoked on a newly created model where the trimmed surfaces are already created but the TrimSegList of the model is not derived yet.

Parameters:

TSrfs: The trimmed surfaces in the model. Used in place.


Returned Value:

MdlTrimSegStruct *: A pointer to a linked list of all trimming curve segmented in TSrfs, chained in place.


Keywords:

allocation


MdlTrimSrfCopy

(mdl_gen.c:494)

Prototype:

  MdlTrimSrfStruct *MdlTrimSrfCopy(const MdlTrimSrfStruct *MdlTrimSrf,
                                   const MdlTrimSegStruct *TrimSegList)


Description:

Duplicates a trimming surface structure.

Parameters:

MdlTrimSrf: A trimming surface to duplicate.
TrimSegList: The original trimmed segments.


Returned Value:

MdlTrimSrfStruct *: A trimming surface structure.


Keywords:

allocation


MdlTrimSrfCopyList

(mdl_gen.c:524)

Prototype:

  MdlTrimSrfStruct *MdlTrimSrfCopyList(const MdlTrimSrfStruct *MdlTrimSrfList,
                                       const MdlTrimSegStruct *TrimSegList)


Description:

Allocates and copies a list of trimming surface structures.

Parameters:

MdlTrimSrfList: To be copied.
TrimSegList: The original trimmed segments.


Returned Value:

MdlTrimSrfStruct *: A duplicated list of trimming surfaces.


Keywords:

copy


MdlTrimSrfFree

(mdl_gen.c:175)

Prototype:

  void MdlTrimSrfFree(MdlTrimSrfStruct *TrimSrf)


Description:

Deallocates a Model Trimming Surface structure.

Parameters:

TrimSrf: A surface to free.


Returned Value:

void


Keywords:

allocation


MdlTrimSrfFreeList

(mdl_gen.c:196)

Prototype:

  void MdlTrimSrfFreeList(MdlTrimSrfStruct *MdlTrimSrfList)


Description:

Deallocates a Model Trimming Surface List structure.

Parameters:

MdlTrimSrfList: list of trimming curve to free.


Returned Value:

void


Keywords:

allocation


MdlTrimSrfNew

(mdl_gen.c:916)

Prototype:

  MdlTrimSrfStruct *MdlTrimSrfNew(CagdSrfStruct *Srf,
                                  MdlLoopStruct *LoopList,
                                  CagdBType HasTopLvlTrim,
                                  CagdBType UpdateBackTSrfPtrs)


Description:

Constructor for a model trimmed surface.

Parameters:

Srf: Surface to make into a trimmed surface. In place.
LoopList: An optional list of loops. Used in place.
HasTopLvlTrim: Do we have a top level outer most trimming curve?
UpdateBackTSrfPtrs: TRUE to also update back pointers from trimming curves to the trimmed surface.


Returned Value:

MdlTrimSrfStruct *: The trimmed surface.


Keywords:

allocation


MdlTrimSrfNew2

(mdl_gen.c:1093)

Prototype:

  MdlTrimSrfStruct *MdlTrimSrfNew2(CagdSrfStruct *Srf,
                                   CagdCrvStruct **LoopList,
                                   int NumLoops,
                                   CagdBType HasTopLvlTrim)


Description:

Constructor for a model trimmed surface.

Parameters:

Srf: The original surface to be trimmed. Used in place.
LoopList: An array of trimming loops. Used in place.
NumLoops: The number of the loops (LoopList array length)
HasTopLvlTrim: If FALSE, add outer loops boundary.


Returned Value:

MdlTrimSrfStruct *: The trimmed surface.


Keywords:

allocation


MdlTwoTrimSegsSameEndPts

(mdl_prim.c:47)

Prototype:

  int MdlTwoTrimSegsSameEndPts(const MdlTrimSegStruct *TSeg1,
                               const MdlTrimSegStruct *TSeg2,
                               CagdBType BackProjTest,
                               CagdRType Tol)


Description:

Compare two given trimming curve segments for similarity in Euclidean space. Comparison is made at the end pts and then mid pt or back proj.

Parameters:

TSeg1, TSeg2: The two segments to compare.
BackProjTest: If TRUE, then use back-projection to match the curve segments. If FALSE, compare the middle points of the curves.
Tol: Tolerance of comparison of end points.


Returned Value:

int: 0 if not the same Euclidean representation, 1 if same and start and end points match, -1 if same but reversed, -9 if singular.


Keywords: