GMOperatorsInterfaces Interface CATICGMDistancePointBody
Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.
interface CATICGMDistancePointBody
Class defining the operator for finding the minimum distance between
a CATMathPoint
and a CATBody
.
To use the operator:
- Create it with the
CATCGMCreateDistancePointBody
global function, giving the CATBody
as input,
- Call SetPoint method with a CATMathPoint,
- Run the operator,
- Retrieve the results with the GetResult... methods
Method Index
- o
GetPoint(CATMathPoint&)
- Get the input point.
- o
GetResultCell()
- Get the result
CATCell
.
- o
GetResultDistance()
- Get the result distance.
- o
GetResultMathPoint(CATMathPoint&)
- Get the result
CATMathPoint
.
- o
GetResultPoint()
- Get the result
CATPoint
.
- o
GetSignMode()
- Get the sign mode.
- o
Run()
- Runs this operator.
- o
SetPoint(CATMathPoint&)
- Set the input point.
- o
SetSignMode(CATDistanceSignMode)
- Define the sign mode.
Methods
o GetPoint
-
Get the input point.
- Parameters:
-
- oPoint
- The point (that has been set using SetPoint method) from which the minimum
distance to the given body is to be found
o GetResultCell
public virtual CATCell * GetResultCell( | )const = 0 |
-
Get the result
CATCell
.
- Description:
- Returns the
CATCell in given body on which the result point lies (calculated by the operator in the last run). This
CATCell can be
CATFace,
CATEdge or
CATVertex. It can also be
CATVolume, if the sign mode is
CATDistanceSignModeZero
and if the point is found to be inside the volume.
- Returns:
- The cell in the given body on which the result point lies.
o GetResultDistance
public virtual double GetResultDistance( | )const = 0 |
-
Get the result distance.
- Description:
- Returns the minimum distance between the given point and body calculated by the operator in the last run.
- If the sign mode is
CATDistanceSignModeSigned
, then result distance
may be negative. If it is negative, then it means that the point is inside the body and
the absolute value gives the minimum distance of the point from the shell of the body.
- If the sign mode is
CATDistanceSignModeZero
, and if the point is inside
the body, then result distance value is returned is zero.
- If the sign mode is
CATDistanceSignModeUnsigned
, and if the point is inside
the body, then result distance value is always non-negative and is equal to the distance of
the point from the shell of the body.
- Returns:
- Result distance between the point and the body.
o GetResultMathPoint
public virtual void GetResultMathPoint( | CATMathPoint& | oMathPoint) const = 0 |
-
Get the result
CATMathPoint
.
- Description:
- Returns the result
CATMathPoint on the given body (calculated by the operator in the last run).
- Parameters:
-
- oPoint
- The result
CATMathPoint on the given body.
o GetResultPoint
public virtual CATPoint * GetResultPoint( | )const = 0 |
-
Get the result
CATPoint
.
- Description:
- Returns the result
CATPoint on the given body calculated by the operator in the last run.
- Returns:
- The result
CATPoint on the given body. This gives the result in the context of the result cell.
- If the result cell is a
CATFace, then the returned
CATPoint will be of type
CATPointOnSurface
- If the result cell is a
CATEdge, then the returned
CATPoint will be of type
CATPointOnCurve
- If the result cell is a
CATVertex, then the returned
CATPoint will be of type
CATCartesianPoint
- If the result cell is a
CATVolume, then the returned
CATPoint will be of type
CATCartesianPoint
Note: The returned
CATPoint is created in the same container as the given
CATBody and it is owned by the caller. A new point is created each time this method is called. After use, call the
CATICGMContainer.Remove method.
o GetSignMode
-
Get the sign mode.
CATDistanceSignModeDefault
is interpreted as CATDistanceSignModeSigned
.
See the documentation of
CATDistanceSignMode to know more about the different sign modes
- Returns:
- Sign mode defined in the operator
- See also:
- CATDistanceSignMode
o Run
public virtual int Run( | )= 0 |
-
Runs this operator.
Note: You must call SetPoint before Run.
- Returns:
- 0 if the operator runs successfully and 1 otherwise.
o SetPoint
-
Set the input point.
Note: If you want to find the distance of more than one points from the same body,
then to get better performance, you can call SetPoint and Run as many times on
the same operator, rather than creating a new operator every time for each point.
- Parameters:
-
- iPoint
- The point from which the minimum distance to the given body is to be found
o SetSignMode
-
Define the sign mode. The default is "Signed" mode.
CATDistanceSignModeDefault
is interpreted as CATDistanceSignModeSigned
.
See the documentation of
CATDistanceSignMode to know more about the different sign modes available and their meanings.
- Parameters:
-
- iSignMode
- Sign mode to be defined
- See also:
- CATDistanceSignMode
This object is included in the file: CATICGMDistancePointBody.h
If needed, your Imakefile.mk should include the module: CATGMOperatorsInterfaces
Copyright © 1999-2015, Dassault Systèmes. All rights reserved.