GMModelInterfaces Interface CATICGMLengthFromBodyOnWire
Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.
interface CATICGMLengthFromBodyOnWire
Class defining the operator that computes the length between two point bodies.
This operator can be used in two modes.
In BASIC mode, the operation is run at the operator creation. In this mode,
you have to read the resulting distance, and release the operator, as in the following
example:
CATICGMLengthFromBodyOnWire * Op = CATICGMLengthFromBodyOnWire (factory,vertex1,vertex2);
double distance = Op->GetDistance(NULL,NULL);
Op->Release();
If you need specific parameters, use the ADVANCED mode:
- Create the operator ,
- Set parameters,
- Run,
- Get the resulting distance,
- Delete the operator.
Example:
CATICGMLengthFromBodyOnWire * Op = CATICGMLengthFromBodyOnWire (factory,vertex1,vertex2);
Op->SetSupport(Wire); // on a wire
Op->Run();
CATMathPoint Point1, Point2;
double distance = Op->GetDistance(&Point1,&Point2);
Op->Release();
Method Index
- o
GetDistance(CATMathPoint*,CATMathPoint*)
- Returns the computed distance.
- o
Run()
- Runs the operator in ADVANCED mode.
- o
SetEdge(CATEdge*)
- Defines a new edge along which the distance is computed.
- o
SetEdge(CATBody*)
- Defines a new wire body along which the distance is computed.
- o
SetVertices(CATBody*,CATBody*)
- Defines the new vertices between which the distance is computed.
- o
SetVertices(CATVertex*,CATVertex*)
- Defines the new vertices between which the distance is computed.
Methods
o GetDistance
public virtual GetDistance( | | iMathPoint1 | = NULL, |
| | iMathPoint2 | = NULL) |
-
Returns the computed distance.
- Parameters:
-
- iMathPoint1
- A pointer to the mathematical definition of the first point.
If NULL, this argument is not computed.
- iMathPoint2
- A pointer to the mathematical definition of the second point.
If NULL, this argument is not computed.
- Returns:
- The computed distance.
Sample: to retrieve the distance and the mathematical definition of the first point:
CATMathPoint Point1;
double distance = Op->GetDistance(&Point1,NULL);
o Run
-
Runs the operator in ADVANCED mode.
- Returns:
- A diagnosis.
Legal values: 0 if some arguments of the operator are invalid, 1 otherwise.
o SetEdge
public virtual SetEdge( | | iNewEdge) |
-
Defines a new edge along which the distance is computed.
To use in ADVANCED mode.
- Parameters:
-
- iNewEdge
- A pointer to the edge along which the distance is computed.
o SetEdge
public virtual SetEdge( | | iNewEdge) |
-
Defines a new wire body along which the distance is computed.
To use in ADVANCED mode.
- Parameters:
-
- iNewEdge
- A pointer to the wire body along which which the distance is computed.
o SetVertices
public virtual SetVertices( | | iNewVertex1, |
| | iNewVertex2) |
-
Defines the new vertices between which the distance is computed.
To use in ADVANCED mode.
- Parameters:
-
- iNewVertex1
- A pointer to the first vertex.
- iNewVertex2
- A pointer to the second vertex.
o SetVertices
public virtual SetVertices( | | iNewVertex1, |
| | iNewVertex2) |
-
Defines the new vertices between which the distance is computed.
To use in ADVANCED mode.
- Parameters:
-
- iNewVertex1
- A pointer to the first vertex.
- iNewVertex2
- A pointer to the second vertex.
This object is included in the file: CATICGMLengthFromBodyOnWire.h
If needed, your Imakefile.mk should include the module: CATGMModelInterfaces
Copyright © 1999-2015, Dassault Systèmes. All rights reserved.