Open CASCADE Technology
6.8.0
|
Computes the intersection of two shapes or geometries. Geometries can be surfaces of planes. Geometries are converted to faces When a geometry has been converted to topology the created shape can be found using the methods Shape1 and Shape2 inherited from the class BooleanOperation. The result (Shape() method) is a compound containing edges built on intersection curves. By default, the section is performed immediatly in class constructors, with default values : More...
#include <BRepAlgoAPI_Section.hxx>
Public Member Functions | |
BRepAlgoAPI_Section (const TopoDS_Shape &S1, const TopoDS_Shape &S2, const BOPAlgo_PaveFiller &aDSF, const Standard_Boolean PerformNow=Standard_True) | |
virtual | ~BRepAlgoAPI_Section () |
BRepAlgoAPI_Section (const TopoDS_Shape &Sh1, const TopoDS_Shape &Sh2, const Standard_Boolean PerformNow=Standard_True) | |
see upper More... | |
BRepAlgoAPI_Section (const TopoDS_Shape &Sh, const gp_Pln &Pl, const Standard_Boolean PerformNow=Standard_True) | |
see upper More... | |
BRepAlgoAPI_Section (const TopoDS_Shape &Sh, const Handle< Geom_Surface > &Sf, const Standard_Boolean PerformNow=Standard_True) | |
see upper More... | |
BRepAlgoAPI_Section (const Handle< Geom_Surface > &Sf, const TopoDS_Shape &Sh, const Standard_Boolean PerformNow=Standard_True) | |
see upper More... | |
BRepAlgoAPI_Section (const Handle< Geom_Surface > &Sf1, const Handle< Geom_Surface > &Sf2, const Standard_Boolean PerformNow=Standard_True) | |
This and the above classes construct a framework for computing the section lines of: More... | |
void | Init1 (const TopoDS_Shape &S1) |
initialize first part More... | |
void | Init1 (const gp_Pln &Pl) |
initialize first part More... | |
void | Init1 (const Handle< Geom_Surface > &Sf) |
initialize first part More... | |
void | Init2 (const TopoDS_Shape &S2) |
initialize second part More... | |
void | Init2 (const gp_Pln &Pl) |
initialize second part More... | |
void | Init2 (const Handle< Geom_Surface > &Sf) |
Reinitializes the first and the second parts on which this algorithm is going to perform the intersection computation. This is done with either: the surface Sf, the plane Pl or the shape Sh. You use the function Build to construct the result. More... | |
void | Approximation (const Standard_Boolean B) |
Defines an option for computation of further intersections. This computation will be performed by the function Build in this framework. By default, the underlying 3D geometry attached to each elementary edge of the result of a computed intersection is: More... | |
void | ComputePCurveOn1 (const Standard_Boolean B) |
Indicates if the Pcurve must be (or not) performed on first part. More... | |
void | ComputePCurveOn2 (const Standard_Boolean B) |
Define options for the computation of further intersections, which will be performed by the function Build in this framework. By default, no parametric 2D curve (pcurve) is defined for the elementary edges of the result. If ComputePCurve1 equals true, further computations performed in this framework with the function Build will attach an additional pcurve in the parametric space of the first shape to the constructed edges. If ComputePCurve2 equals true, the additional pcurve will be attached to the constructed edges in the parametric space of the second shape. These two functions may be used together. More... | |
void | Build () |
Performs the computation of section lines between two parts defined at the time of construction of this framework or reinitialized with the Init1 and Init2 functions. The constructed shape will be returned by the function Shape. This is a compound object composed of edges. These intersection edges may be built: More... | |
Standard_Boolean | HasAncestorFaceOn1 (const TopoDS_Shape &E, TopoDS_Shape &F) const |
get the face of the first part giving section edge <E>. Returns True on the 3 following conditions : 1/ <E> is an edge returned by the Shape() method. 2/ First part of section performed is a shape. 3/ <E> is built on a intersection curve (i.e <E> is not the result of common edges) When False, F remains untouched. More... | |
Standard_Boolean | HasAncestorFaceOn2 (const TopoDS_Shape &E, TopoDS_Shape &F) const |
Identifies the ancestor faces of the intersection edge E resulting from the last computation performed in this framework, that is, the faces of the two original shapes on which the edge E lies: More... | |
![]() | |
void | SetOperation (const BOPAlgo_Operation anOp) |
Sets the type of Boolean operation to perform It can be BOPAlgo_SECTION BOPAlgo_COMMON BOPAlgo_FUSE BOPAlgo_CUT BOPAlgo_CUT21. More... | |
const TopoDS_Shape & | Shape1 () const |
Returns the first shape involved in this Boolean operation. More... | |
const TopoDS_Shape & | Shape2 () const |
Returns the second shape involved in this Boolean operation. More... | |
BOPAlgo_Operation | Operation () const |
Returns the type of Boolean Operation that has been performed. More... | |
Standard_Boolean | FuseEdges () const |
Returns the flag of edge refining. More... | |
void | RefineEdges () |
Fuse C1 edges. More... | |
Standard_Boolean | BuilderCanWork () const |
Standard_Integer | ErrorStatus () const |
Returns the error status of operation. 0 - Ok 1 - The Object is created but Nothing is Done 2 - Null source shapes is not allowed 3 - Check types of the arguments 4 - Can not allocate memory for the DSFiller 5 - The Builder can not work with such types of arguments 6 - Unknown operation is not allowed 7 - Can not allocate memory for the Builder
More... | |
virtual const TopTools_ListOfShape & | Modified (const TopoDS_Shape &aS) |
Returns the list of shapes modified from the shape <S>. More... | |
virtual Standard_Boolean | IsDeleted (const TopoDS_Shape &aS) |
Returns true if the shape S has been deleted. The result shape of the operation does not contain the shape S. More... | |
virtual const TopTools_ListOfShape & | Generated (const TopoDS_Shape &S) |
Returns the list of shapes generated from the shape <S>. For use in BRepNaming. More... | |
virtual Standard_Boolean | HasModified () const |
Returns true if there is at least one modified shape. For use in BRepNaming. More... | |
virtual Standard_Boolean | HasGenerated () const |
Returns true if there is at least one generated shape. For use in BRepNaming. More... | |
virtual Standard_Boolean | HasDeleted () const |
Returns true if there is at least one deleted shape. For use in BRepNaming. More... | |
void | Destroy () |
virtual | ~BRepAlgoAPI_BooleanOperation () |
const TopTools_ListOfShape & | SectionEdges () |
Returns a list of section edges. The edges represent the result of intersection between arguments of Boolean Operation. They are computed during operation execution. More... | |
![]() | |
virtual void | Delete () |
virtual | ~BRepBuilderAPI_MakeShape () |
const TopoDS_Shape & | Shape () const |
Returns a shape built by the shape construction algorithm. Raises exception StdFail_NotDone if the shape was not built. More... | |
operator TopoDS_Shape () const | |
![]() | |
virtual | ~BRepBuilderAPI_Command () |
virtual Standard_Boolean | IsDone () const |
void | Check () const |
Raises NotDone if done is false. More... | |
Computes the intersection of two shapes or geometries. Geometries can be surfaces of planes. Geometries are converted to faces When a geometry has been converted to topology the created shape can be found using the methods Shape1 and Shape2 inherited from the class BooleanOperation. The result (Shape() method) is a compound containing edges built on intersection curves. By default, the section is performed immediatly in class constructors, with default values :
BRepAlgoAPI_Section::BRepAlgoAPI_Section | ( | const TopoDS_Shape & | S1, |
const TopoDS_Shape & | S2, | ||
const BOPAlgo_PaveFiller & | aDSF, | ||
const Standard_Boolean | PerformNow = Standard_True |
||
) |
|
inlinevirtual |
BRepAlgoAPI_Section::BRepAlgoAPI_Section | ( | const TopoDS_Shape & | Sh1, |
const TopoDS_Shape & | Sh2, | ||
const Standard_Boolean | PerformNow = Standard_True |
||
) |
see upper
BRepAlgoAPI_Section::BRepAlgoAPI_Section | ( | const TopoDS_Shape & | Sh, |
const gp_Pln & | Pl, | ||
const Standard_Boolean | PerformNow = Standard_True |
||
) |
see upper
BRepAlgoAPI_Section::BRepAlgoAPI_Section | ( | const TopoDS_Shape & | Sh, |
const Handle< Geom_Surface > & | Sf, | ||
const Standard_Boolean | PerformNow = Standard_True |
||
) |
see upper
BRepAlgoAPI_Section::BRepAlgoAPI_Section | ( | const Handle< Geom_Surface > & | Sf, |
const TopoDS_Shape & | Sh, | ||
const Standard_Boolean | PerformNow = Standard_True |
||
) |
see upper
BRepAlgoAPI_Section::BRepAlgoAPI_Section | ( | const Handle< Geom_Surface > & | Sf1, |
const Handle< Geom_Surface > & | Sf2, | ||
const Standard_Boolean | PerformNow = Standard_True |
||
) |
This and the above classes construct a framework for computing the section lines of:
void BRepAlgoAPI_Section::Approximation | ( | const Standard_Boolean | B | ) |
Defines an option for computation of further intersections. This computation will be performed by the function Build in this framework. By default, the underlying 3D geometry attached to each elementary edge of the result of a computed intersection is:
|
virtual |
Performs the computation of section lines between two parts defined at the time of construction of this framework or reinitialized with the Init1 and Init2 functions. The constructed shape will be returned by the function Shape. This is a compound object composed of edges. These intersection edges may be built:
Reimplemented from BRepAlgoAPI_BooleanOperation.
void BRepAlgoAPI_Section::ComputePCurveOn1 | ( | const Standard_Boolean | B | ) |
Indicates if the Pcurve must be (or not) performed on first part.
void BRepAlgoAPI_Section::ComputePCurveOn2 | ( | const Standard_Boolean | B | ) |
Define options for the computation of further intersections, which will be performed by the function Build in this framework. By default, no parametric 2D curve (pcurve) is defined for the elementary edges of the result. If ComputePCurve1 equals true, further computations performed in this framework with the function Build will attach an additional pcurve in the parametric space of the first shape to the constructed edges. If ComputePCurve2 equals true, the additional pcurve will be attached to the constructed edges in the parametric space of the second shape. These two functions may be used together.
Standard_Boolean BRepAlgoAPI_Section::HasAncestorFaceOn1 | ( | const TopoDS_Shape & | E, |
TopoDS_Shape & | F | ||
) | const |
get the face of the first part giving section edge <E>. Returns True on the 3 following conditions : 1/ <E> is an edge returned by the Shape() method. 2/ First part of section performed is a shape. 3/ <E> is built on a intersection curve (i.e <E> is not the result of common edges) When False, F remains untouched.
Standard_Boolean BRepAlgoAPI_Section::HasAncestorFaceOn2 | ( | const TopoDS_Shape & | E, |
TopoDS_Shape & | F | ||
) | const |
Identifies the ancestor faces of the intersection edge E resulting from the last computation performed in this framework, that is, the faces of the two original shapes on which the edge E lies:
void BRepAlgoAPI_Section::Init1 | ( | const TopoDS_Shape & | S1 | ) |
initialize first part
void BRepAlgoAPI_Section::Init1 | ( | const gp_Pln & | Pl | ) |
initialize first part
void BRepAlgoAPI_Section::Init1 | ( | const Handle< Geom_Surface > & | Sf | ) |
initialize first part
void BRepAlgoAPI_Section::Init2 | ( | const TopoDS_Shape & | S2 | ) |
initialize second part
void BRepAlgoAPI_Section::Init2 | ( | const gp_Pln & | Pl | ) |
initialize second part
void BRepAlgoAPI_Section::Init2 | ( | const Handle< Geom_Surface > & | Sf | ) |
Reinitializes the first and the second parts on which this algorithm is going to perform the intersection computation. This is done with either: the surface Sf, the plane Pl or the shape Sh. You use the function Build to construct the result.