GMOperatorsInterfaces CATICGMTopCleanCrvOperator

Usage: you must use this class as is. You should never derive it.


public class CATICGMTopCleanCrvOperator

Class defining the operator to clean a wire body.

The operator produces a wire topology that is at least (G0) continuous. More over, upon request, it can:

The operator produces a new wire containing at most the same number of edges than the input wire. The correction is controlled by the user. The operator can correct:


Constructor and Destructor Index


o CATICGMTopCleanCrvOperator()
Constructor

Method Index


o GetCellReduction()
Retrieve the current status of cell reduction defined on operator.
o GetContinuityLevel()
Retrieve the current continuity level to improve defined on operator.
o GetDescendantEdge(CATEdge*,CatTopCleanCrvCellStatus&,CATEdge*&)
Retrieves the result edge corresponding to an input edge.
o GetDescendantVertex(CATVertex*,CatTopCleanCrvCellStatus&,CATVertex*&)
Retrieves the result vertex corresponding to an input vertex.
o GetMaxDeformationLocation(CATMathSetOfPoints&,CATMathSetOfPoints&)
Returns the 3D location on the input wire and the 3D location on the output (corrected) wire corresponding to the maximum reached deformation.
o GetMaxReachedDeformation()
Returns the maximum deformation between input and output wires.
o SetApplyMappingOfInitialVertices(int)
Allows the activation of the mapping of the input vertices to the output vertices.
o SetC1ToC2Management(CATTopCleanCrvC1ToC2Management)
Defines the way to treat non-C2 edges.
o SetCellReduction(CATBoolean)
Reduce the number of cells after curvature correction.
o SetConnexityGap(CATLength)
Defines the point continuity criterion for G0 correction.
o SetConnexityMinGap(CATLength)
Defines the point continuity criterion below which the G0 correction is not applied.
o SetContinuityLevel(CATFrFContinuity)
Defines the highest continuity level to achieve on the wire.
o SetCurvatureRatio(double)
Defines the curvature criterion for G2 correction.
o SetEndExtremityContinuityLevel(CATFrFContinuity)
Defines the highest continuity level at the END extremity between the input wire and the result wire.
o SetFixedCells(CATLISTP(CATCell)&)
Defines the set of input edges and vertices that must stay unmodified through the operator.
o SetForceOneEdgeImprovement(CATBoolean)
Combined with cell reduction mode, forces the operator to treat either the one-edge-wire case or any one edge case situated between two unsuppressed vertices.
o SetMaxDeformation(CATLength)
Defines the maximum deformation allowed between the output and input bodies.
o SetMinimumEdgeLength(double,CATBoolean)
Defines the minimum size of an edge to be corrected.
o SetModeODT(char*,char*)
This API should not be used.
o SetPriorityMode(CatTopCleanCrvPriorityMode)
Defines the priority mode of cleaning operations.
o SetShell(CATBody*)
Defines the 2D cleaning mode.
o SetShell(CATBody*,CATBoolean)
Defines the 2D cleaning mode with optional topological wire on shell " LyingOnLink " recovery.
o SetSmartClosure()
To use on Closed Wire with SetCellReduction or SetApplyMappingOfInitialVertices only.
o SetStartExtremityContinuityLevel(CATFrFContinuity)
Defines the highest continuity level at the START extremity between the input wire and the result wire.
o SetTangencyAngle(CATAngle)
Defines the tangency criteria for G1 correction.
o SetTangencyMinAngle(CATAngle)
Defines the tangency criterion below which the G1 correction is not applied.

Constructor and Destructor


o CATICGMTopCleanCrvOperator
public CATICGMTopCleanCrvOperator()
Constructor

Methods


o GetCellReduction
public virtual GetCellReduction()
Retrieve the current status of cell reduction defined on operator.
Returns:
The current cell reduction status.
o GetContinuityLevel
public virtual GetContinuityLevel()
Retrieve the current continuity level to improve defined on operator.
Returns:
The current continuity level.
o GetDescendantEdge
public virtual GetDescendantEdge( iInputEdge,
oInputEdgeStatus,
oOutputEdge)
Retrieves the result edge corresponding to an input edge.
Parameters:
iInputEdge
The pointer to the edge of the input wire.
oInputEdgeStatus
The status of the input edge.
oOutputEdge
The pointer to the corresponding edge in the result wire. oOutputEdge is NULL if oInputEdgeStatus equals CatTopCleanCrvCellDeleted, not null otherwise.
Returns:
Not null if iInputEdge is not an edge of the input wire or if edge descendance is not available. Edge descendance is not available if has been required.
o GetDescendantVertex
public virtual GetDescendantVertex( iInputVertex,
oInputVertexStatus,
oOutputVertex)
Retrieves the result vertex corresponding to an input vertex.
Parameters:
iInputVertex
The pointer to the vertex of the input wire.
oInputVertexStatus
The status of the input vertex.
oOutputVertex
The pointer to the corresponding vertex in the result wire . oOutputVertex is NULL if oInputVertexStatus equals CatTopCleanCrvCellDeleted, not null else.
Returns:
Not null if iInputVertex is not a vertex of the input wire.
o GetMaxDeformationLocation
public virtual GetMaxDeformationLocation( oInputLocation,
oOutputLocation)
Returns the 3D location on the input wire and the 3D location on the output (corrected) wire corresponding to the maximum reached deformation. These locations are 3D points computed from the curve geometry of edges. The distance between these two points corresponds to the maximum reached deformation (see GetMaxReachedDeformation). This method must be called after the Run method, otherwise a not null value is returned (error).
Parameters:
oInputLocation
Point on the input wire.
oOutputLocation
Point on the output wire.
Returns:
Integer not null in case of error.
o GetMaxReachedDeformation
public virtual GetMaxReachedDeformation()
Returns the maximum deformation between input and output wires.
This method must be called after the Run method. If the priority mode is CatTopCleanCrvDeformation and if the and maximum deformation that is reached is greater than the maximum authorized deformation ( ), a NULL body is returned by the GetResult method.
o SetApplyMappingOfInitialVertices
public virtual SetApplyMappingOfInitialVertices( const iApplyMapping= 0)
Allows the activation of the mapping of the input vertices to the output vertices.
Parameters:
iApplyMapping
If TRUE AND SetContinuityLevel(CATFrFCurvatureCont) AND SetLocalOptimization(TRUE) AND SetCellReduction(FALSE) the mapping could be activated then the quality of the wire is very similar to the quality obtained when the SetCellReduction is set to TRUE (Smoother result) but the vertices are kept.
After deletion of small edges the position of the remained vertices are saved with their global curvilinear adimensional param (eg Pos(Vi)=Total_Length_From_The_Starting_Extremity_To_Vi/Total_Length_Of_Wire) then a a global smoothing is applyied on a reduced wire and the vertices are reinserted at New_Pos(Vi)=Pos(Vi)*New_Total_Length_Of_Wire.
Returns:
Not null in case of error.
o SetC1ToC2Management
public virtual SetC1ToC2Management( iC1ToC2Managment)
Defines the way to treat non-C2 edges.
Parameters:
iC1ToC2Managment
By default the value is CATTopCleanCrvDefaultC1ToC2Management
Legal values:
CATTopCleanCrvNoC1ToC2Management
No special treatment would be applied
CATTopCleanCrvDefaultC1ToC2Management
Edges that need a modification and that are not C2 continuous would be C2 continous in the result.
CATTopCleanCrvAllCurvesC1ToC2Management
All non-C2-continuous Edges would be C2 continous in the result.
Returns:
Not null in case of error.
o SetCellReduction
public virtual SetCellReduction( iCellReduction)
Reduce the number of cells after curvature correction.
Parameters:
iCellReduction
iCellReduction = TRUE to concatenate all the result edges sharing vertices that are G2 continuous. If is CellReduction is required it is recommanded for better stability to use it in CATFrFCurvatureCont correction mode.
Returns:
Not null in case of error.
o SetConnexityGap
public virtual SetConnexityGap( iConnexityGap)
Defines the point continuity criterion for G0 correction.
Parameters:
iConnexityGap
The G0 continuity criterion, set by default to the factory resolution. This applies to vertices connecting edges. All point discontinuity gaps less than this criterion are corrected to be set to the standard G0 gap.
Returns:
Not null in case of error.
o SetConnexityMinGap
public virtual SetConnexityMinGap( iConnexityMinGap)
Defines the point continuity criterion below which the G0 correction is not applied.
Parameters:
iConnexityMinGap
The G0 continuity criterion minimum, set by default to 0. If the distance between two consecutives Edges < iConnexityMinGap, then G0 correction is not applied. Default value : 0.
            +---------------+-------------------------------+------------------> G0 Gap
            0        iConnexityMinGap                iConnexityGap
 Correction  :     NO                     YES                        NO 
Returns:
Not null in case of error.
o SetContinuityLevel
public virtual SetContinuityLevel( iContinuityLevel)
Defines the highest continuity level to achieve on the wire.
Parameters:
iContinuityLevel
The continuity level, set by default to CATFrFTangentCont for tangency continuity.
Legal values:
CATFrFPointCont
To limit the continuity correction to point continuity correction
CATFrFTangentCont
To limit the continuity correction to tangency continuity correction
CATFrFCurvatureCont
To limit the continuity correction to curvature continuity correction.
A given continuity order can be reached only if its inferior continuity levels are also reached, according to the continuity correction parameters defined by SetConnexityGap, SetTangencyAngle, SetCurvatureRatio, SetConnexityMinGap,SetTangencyMinAngle.
Returns:
Not null in case of error.
o SetCurvatureRatio
public virtual SetCurvatureRatio( iCurvatureRatio)
Defines the curvature criterion for G2 correction.
Parameters:
iCurvatureRatio
The curvature ratio in ]0..1], set by default to 0.98. Let C1 and C2 be the curvature vectors to edges E1, E2 incident to vertex V. Let R = |C1 - C2 | / max (|C1|,|C2|) be the curvature vector ratio. If R is greater than (1-iCurvatureRatio)/iCurvatureRatio, G2 continuity will be corrected to the standard G2 value. The more a vertex V is G2 continuous, the more iCurvatureRatio is near 1. The less a vertex V is G2 continuous, the more iCurvatureRatio is near 0 (excluded). Give a value near of 0 to try to make G2 all vertices, near 1 to only correct vertices that are already quite G2. To be G2 corrected, vertex V must be G1 in the input wire, or must have been corrected in G1 by the cleaning process.
Returns:
Not null in case of error.
o SetEndExtremityContinuityLevel
public virtual SetEndExtremityContinuityLevel( iEndContLevel)
Defines the highest continuity level at the END extremity between the input wire and the result wire.
Parameters:
iEndContLevel
The continuity level, set by default to CATFrFCurvatureCont for curvature continuity.
Legal values:
CATFrFPointCont
To limit the continuity to point continuity
CATFrFTangentCont
To limit the continuity to tangency continuity
CATFrFCurvatureCont
To limit the continuity to curvature continuity.
Returns:
Not null in case of error.
o SetFixedCells
public virtual SetFixedCells( const iFixedCells)
Defines the set of input edges and vertices that must stay unmodified through the operator. The list only contains edges and/or vertices of the input wire. An error is send if not. These cells will be reproduced as the same as they are in the input wire, and their underlying geometry will not be modified.
Returns:
Not null in case of error.
o SetForceOneEdgeImprovement
public virtual SetForceOneEdgeImprovement( iEnable)
Combined with cell reduction mode, forces the operator to treat either the one-edge-wire case or any one edge case situated between two unsuppressed vertices. In the case of an one-edge-wire, the result wire is by default exactly the same as the input.
Parameters:
iEnable
By default FALSE.
Legal values: TRUE Forces the operator to treat one edge if cell reduction is activated : a smoothing based on absolute wire length is applied. FALSE If there is only one edge in the wire or for cases with one edge between two vertices, nothing is done.
Returns:
Not null in case of error.
o SetMaxDeformation
public virtual SetMaxDeformation( iMaxDeformation)
Defines the maximum deformation allowed between the output and input bodies.
Parameters:
iMaxDeformation
The deformation value, set by default to 0.001. This parameter will be used only when working in CatTopCleanCrvDeformation priority mode.
Returns:
Not null in case of error.
o SetMinimumEdgeLength
public virtual SetMinimumEdgeLength( iMinEdgeLength,
iAbsoluteMinEdgeLength= TRUE)
Defines the minimum size of an edge to be corrected.
Parameters:
iMinimumEdgeLength
The minimum edge length to be kept, set by default to 10 * Factory resolution. All edges which length is less than iAbsoluteMinEdgeLength are removed.
iAbsoluteMinEdgeLength
Legal values: TRUE if iMinimumEdgeLength is the absolute wire length, FALSE the iMinEdgeLength is understood as a percentile of the total wire length. In this case if the wire as a total length Lall edges of length l are considered as small edges if and only if l<=iMinEdgeLength*L.
Returns:
Not null in case of error.
o SetModeODT
public virtual SetModeODT( iScenarioNameStr,
iInputFileNameStr)
This API should not be used.
o SetPriorityMode
public virtual SetPriorityMode( iMode)
Defines the priority mode of cleaning operations.
Parameters:
iMode
The mode value. By default, it is set CatTopCleanCrvContinuity.
Legal values:
CatTopCleanCrvContinuity
No Limitation of the deformation.
CatTopCleanCrvDeformation
To limit the deformation (see also SetMaxDeformation).
Note : For a better quality result it is recommanded to use the CatTopCleanCrvDeformation and not the default mode.
Returns:
Not null in case of error.
o SetShell
public virtual SetShell( iShellBody)
Defines the 2D cleaning mode.
Parameters:
iShellBody
The shell body on which the wire is cleaned. The topological wire on shell " LyingOnLink " must exist. That is a warranty the wire edges to clean are geometrically represented on the iShellBody faces.
Returns:
Not null if iShellBody is a NULL pointer.
An error is thrown if iShellBody is not made of a single shell.
An error is thrown if the wire on shell " LyingOnLink " does not exist.
o SetShell
public virtual SetShell( iShellBody,
iLyingOnLinkRecovery)
Defines the 2D cleaning mode with optional topological wire on shell " LyingOnLink " recovery.
Parameters:
iShellBody
The shell body on which the wire is cleaned.
iLyingOnLinkRecovery
On TRUE, enables the recovery of the topological wire on shell " LyingOnLink " if absent. In this case, the wire edges to clean must be geometrically represented on the iShellBody faces. On FALSE, the topological wire on shell " LyingOnLink " must exist.
Returns:
Not null if iShellBody is a NULL pointer.
An error is thrown if iShellBody is not made of a single shell.
An error is thrown if the wire edges are not geometrically represented on the iShellBody faces when recovery option is enabled (TRUE).
o SetSmartClosure
public virtual SetSmartClosure()
To use on Closed Wire with SetCellReduction or SetApplyMappingOfInitialVertices only. This allow the CATICGMTopCleanCrvOperator to modify where is the Closure Vertex of the wire. Note : by default the operator does not change where is the closure vertex.
Parameters:
iVertex
Legal values: NULL (Default) the operator automatically choose a closure vertex with the following preferences.
If SetShell is used (2D Clean) the closure vertex will be at a transition between two faces.
the closure vertex will be at a vertex that will not be G0 after clean.
the closure vertex will be at a vertex that will not be G1 after clean.
the closure vertex will be at a vertex that will not be G2 after clean.
Returns:
Not null in case of error.
o SetStartExtremityContinuityLevel
public virtual SetStartExtremityContinuityLevel( iStartContLevel)
Defines the highest continuity level at the START extremity between the input wire and the result wire.
Parameters:
iStartContLevel
The continuity level, set by default to CATFrFCurvatureCont for curvature continuity.
Legal values:
CATFrFPointCont
To limit the continuity to point continuity
CATFrFTangentCont
To limit the continuity to tangency continuity
CATFrFCurvatureCont
To limit the continuity to curvature continuity.
Returns:
Not null in case of error.
o SetTangencyAngle
public virtual SetTangencyAngle( iTangencyAngle)
Defines the tangency criteria for G1 correction.
Parameters:
iTangencyAngle
The tangence angle in degrees, set by default to 0.5 degree. iTangencyAngle is the upper value under which a tangency correction (G1) will be performed. Let T1 and T2 be the tangents to the edges E1, E2 incident to vertex V. If |T1-T2| is less than iTangencyAngle, it will be corrected to the standard G1 value. To be G1 corrected, vertex V must be G0 in the input wire, or must have been corrected in G0 by the cleaning process.
Returns:
Not null in case of error.
o SetTangencyMinAngle
public virtual SetTangencyMinAngle( iTangencyMinAngle)
Defines the tangency criterion below which the G1 correction is not applied.
Parameters:
iTangencyMinAngle
The tangence angle minimum in degrees, set by default to 0 degree. If |T1,T2| < iTangencyMinAngle, then G1 correction is not applied.
        +---------------+-------------------------------+------------------> G1 Gap
        0         iTangencyMinAngle                iTangencyAngle
 Correction  :     NO                     YES                        NO      

This object is included in the file: CATICGMTopCleanCrvOperator.h
If needed, your Imakefile.mk should include the module: CATGMOperatorsInterfaces

Copyright © 1999-2015, Dassault Systèmes. All rights reserved.