GMOperatorsInterfaces Interface CATICGMHybBoolean
Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.
interface CATICGMHybBoolean
Class defining the operator that performs Boolean operations on two bodies.
This operator operates on the 2D (CATShell), 1D (CATWire) and 0D (CATVertexInVolume)
domains of a CATBody.
It follows the general frame of all operators and satisfies the smart mechanism: the
input bodies are not modified. A new resulting body is created,
possibly sharing data with the input bodies.
- CATICGMHybBoolean is created with the CATCGMCreateTopTrim or CATCGMCreateTopSplit global functions.
It must be
directly released with the Release method after use.
It is not streamable.
- The result is accessed with the GetResult method. If you do not want
to keep the resulting body, use the method to remove it from the geometric factory.
- See also:
- ,
Method Index
- o
GetAmbiguousCells(CATLISTP(CATCell)&)
- Returns the list of ambiguous cells.
- o
GetConfusionCells(CATLISTP(CATCell)&)
- Returns the list of overlapping cells.
- o
GetNbAmbiguousCells()
- Returns the number of ambiguous cells.
- o
GetNbConfusionCells()
- Returns the number of overlapping cells.
- o
GetSelectedCellsByLayDownMode()
- Returns the number of cells kept or removed by using the SetSelectedCellsByLayDownMode method.
- o
GetTangentDesignCells(CATLISTP(CATCell)&)
- Retrieves the list of tangent cells.
- o
GetTangentDesignMode()
- Retrieves the tangent design mode.
- o
IsResultTangentDesign()
- Retrieves the result of the tangent design analysis.
- o
SetSelectedCells(CATLISTP(CATCell)&,CATLISTP(CATCell)&)
- Specifies the cells to be kept and the cells to be removed in the operation.
- o
SetSelectedCellsByLayDownMode(int)
- When the cells specified in the SetSelectedCells method do not
belong to the input bodies, the boolean operation cannot complete.
- o
SetWarningOnTangentDesign(int)
- (De)activates the detection of cells which are tangent to each other.
Methods
o GetAmbiguousCells
public virtual GetAmbiguousCells( | | oListOfCells) |
-
Returns the list of ambiguous cells.
In some cases, the operator is unable to detect which cells
have to be removed. The operation completes, but the generated
body generally contains all the input cells.
When there are ambiguous cells, the application must specify which
cells are to be kept or removed by using the SetSelectedCells methods.
- Parameters:
-
- oListOfCells
- The list of ambiguous cells.
- Returns:
- The number of ambiguous cells.
o GetConfusionCells
public virtual GetConfusionCells( | | oListOfCells) |
-
Returns the list of overlapping cells.
In some cases, the operator is unable to detect which cells
have to be removed. The operation completes, but the generated
body generally contains all the input cells.
When there are overlapping cells, the application must specify which
cells are to be kept or removed by using the SetSelectedCells methods.
- Parameters:
-
- oListOfCells
- The list of overlapping cells.
- Returns:
- The number of overlapping cells.
o GetNbAmbiguousCells
public virtual GetNbAmbiguousCells( | ) |
-
Returns the number of ambiguous cells.
In some cases, the operator is unable to detect which cells
have to be removed. The operation completes, but the generated
body generally contains all the input cells.
When there are ambiguous cells, the application must specify which
cells are to be kept or removed by using the SetSelectedCells methods.
- Returns:
- The number of ambiguous cells.
o GetNbConfusionCells
public virtual GetNbConfusionCells( | ) |
-
Returns the number of overlapping cells.
In some cases, the operator is unable to detect which cells
have to be removed. The operation completes, but the generated
body generally contains all the input cells.
When there are overlapping cells, the application must specify which
cells are to be kept or removed by using the SetSelectedCells methods.
- Returns:
- The number of overlapping cells.
o GetSelectedCellsByLayDownMode
public virtual GetSelectedCellsByLayDownMode( | ) |
-
Returns the number of cells kept or removed by using the SetSelectedCellsByLayDownMode method.
CATICGMHybSplit* pSplitOpe = CATCGMCreateTopSplitShellWithKeepRemove(piGeomFactory,&topdata,ToBeSplit,SplittingBody);
pSplitOpe->SetSelectedCellsByLayDownMode(1);
CATLISTP(CATCell) cellsToRemove ;
CATLISTP(CATCell) cellsToKeep ;
cellsToKeep.Append(listOfVertex[1]);
pSplitOpe->SetSelectedCells(cellsToRemove,cellsToKeep);
pSplitOpe -> Run();
int nbCells = pSplitOpe->GetSelectedCellsByLayDownMode();
- Returns:
- Number of cells kept or removed.
o GetTangentDesignCells
public virtual GetTangentDesignCells( | | oListOfCells) |
-
Retrieves the list of tangent cells.
pIntersectOpe->SetWarningOnTangentDesign(1);
...
pIntersectOpe->Run();
CATBody *pBody = pIntersectOpe->GetResult();
if (pIntersectOpe->IsResultTangentDesign())
{
CATLISTP(CATCell) ListOfCells;
pIntersectOpe->GetTangentDesignCells(ListOfCells);
...
}
- Parameters:
-
- oListOfCells
- The list of tangent cells.
- Returns:
-
- 0: no tangent cells have been detected
- 1: tangent cells have been detected.
o GetTangentDesignMode
public virtual GetTangentDesignMode( | ) |
-
Retrieves the tangent design mode.
- Returns:
-
- 0: the "tangent design" mode is not activated
- 1: the "tangent design" mode is activated.
o IsResultTangentDesign
public virtual IsResultTangentDesign( | ) |
-
Retrieves the result of the tangent design analysis.
- Returns:
-
- 0: no tangent cells have been detected
- 1: tangent cells have been detected.
o SetSelectedCells
public virtual SetSelectedCells( | | iCellsToRemove, |
| | iCellsToKeep) |
-
Specifies the cells to be kept and the cells to be removed in the operation.
At least one of the lists must be filled in.
The operator throws an exception when:
- both lists are empty
- the specified cells do not belong to the input bodies
- some cells to be cut are specified in either list.
A cell to be cut should not be added to any list
- the list contents is not consistent with respect to the sides definition.
For example, if a cell to be removed and a cell to be
kept should not be located on the same side.
More generally, the operator throws when the lists which are specified do not allow the operator to
compute in an unambiguous way the pieces to be kept or removed.
- Parameters:
-
- iCellsToRemove
- The list of cells to be removed.
- iCellsToKeep
- The list of cells to be kept.
o SetSelectedCellsByLayDownMode
public virtual SetSelectedCellsByLayDownMode( | | yes_or_no | = 1) |
-
When the cells specified in the SetSelectedCells method do not
belong to the input bodies, the boolean operation cannot complete.
When the cells specified in the SetSelectedCells methods are vertices,
you can use SetSelectedCellsByLayDownMode to define the side to be kept or removed.
If the vertices are not ON the cells to be kept or removed, the operator
projects them onto the cells to be kept or removed.
This method applies to vertices only.
By default (0), the cells are assumed to belong to the input bodies
and are not "laid down" (projected).
- Parameters:
-
- yes_or_no
-
- 0: the "lay down" mode is not activated
- 1: the "lay down" mode is activated.
o SetWarningOnTangentDesign
public virtual SetWarningOnTangentDesign( | | yes_or_no | = 1) |
-
(De)activates the detection of cells which are tangent to each other.
The tangent cells are retrieved by using the GetTangentDesignCells method.
pIntersectOpe->SetWarningOnTangentDesign(1);
...
pIntersectOpe->Run();
CATBody *pBody = pIntersectOpe->GetResult();
if (pIntersectOpe->IsResultTangentDesign())
{
CATLISTP(CATCell) ListOfCells;
pIntersectOpe->GetTangentDesignCells(ListOfCells);
...
}
- Parameters:
-
- yes_or_no
-
- 0: deactivates the "tangent design" mode
- 1: activates the "tangent design" mode.
This object is included in the file: CATICGMHybBoolean.h
If needed, your Imakefile.mk should include the module: CATGMOperatorsInterfaces
Copyright © 1999-2015, Dassault Systèmes. All rights reserved.