Perform a boolean geometric operation between two solids, and modify the original solid to represent the result.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since: 2012
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- solid0
- Type: Autodesk.Revit.DBSolid
The original solid object. This object cannot be obtained directly from a Revit element. This means that IsElementGeometry cannot be true.
- solid1
- Type: Autodesk.Revit.DBSolid
The second solid object. A copy will be taken of the input object, so any solid whether obtained from a Revit element or not would be accepted.
- booleanType
- Type: Autodesk.Revit.DBBooleanOperationsType
boolean operation type.
Remarks
This operation modifies the original input Geometry objects.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.ExceptionsArgumentException | Thrown when the original solid object is the geometry of the Revit model. |
Autodesk.Revit.ExceptionsArgumentNullException | A non-optional argument was NULL |
Autodesk.Revit.ExceptionsInvalidOperationException | Failed to perform the Boolean operation for the two solids. This may be due to geometric inaccuracies in the solids, such as slightly misaligned faces or edges. If so, eliminating the inaccuracies by making sure the solids are accurately aligned may solve the problem. This also may be due to one or both solids having complexities such as more than two faces geometrically meeting along a single edge, or two coincident edges, etc. Eliminating such conditions, or performing a sequence of Boolean operations in an order that avoids such conditions, may solve the problem." |