1 // Created on: 1993-02-15
2 // Created by: Laurent BOURESCHE
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _BRepSweep_Rotation_HeaderFile
18 #define _BRepSweep_Rotation_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Standard_Real.hxx>
26 #include <BRepSweep_Trsf.hxx>
27 #include <Standard_Boolean.hxx>
28 #include <TopAbs_Orientation.hxx>
29 class Standard_ConstructionError;
32 class TopLoc_Location;
36 //! Provides an algorithm to build object by
38 class BRepSweep_Rotation : public BRepSweep_Trsf
45 //! Creates a topology by rotating <S> around A with the
47 Standard_EXPORT BRepSweep_Rotation(const TopoDS_Shape& S, const Sweep_NumShape& N, const TopLoc_Location& L, const gp_Ax1& A, const Standard_Real D, const Standard_Boolean C);
49 //! Builds the vertex addressed by [aGenV,aDirV], with its
50 //! geometric part, but without subcomponents.
51 Standard_EXPORT TopoDS_Shape MakeEmptyVertex (const TopoDS_Shape& aGenV, const Sweep_NumShape& aDirV) Standard_OVERRIDE;
53 //! Builds the edge addressed by [aGenV,aDirE], with its
54 //! geometric part, but without subcomponents.
55 Standard_EXPORT TopoDS_Shape MakeEmptyDirectingEdge (const TopoDS_Shape& aGenV, const Sweep_NumShape& aDirE) Standard_OVERRIDE;
57 //! Builds the edge addressed by [aGenE,aDirV], with its
58 //! geometric part, but without subcomponents.
59 Standard_EXPORT TopoDS_Shape MakeEmptyGeneratingEdge (const TopoDS_Shape& aGenE, const Sweep_NumShape& aDirV) Standard_OVERRIDE;
61 //! Sets the parameters of the new vertex on the new
62 //! face. The new face and new vertex where generated
63 //! from aGenF, aGenV and aDirV .
64 Standard_EXPORT void SetParameters (const TopoDS_Shape& aNewFace, TopoDS_Shape& aNewVertex, const TopoDS_Shape& aGenF, const TopoDS_Shape& aGenV, const Sweep_NumShape& aDirV) Standard_OVERRIDE;
66 //! Sets the parameter of the new vertex on the new
67 //! edge. The new edge and new vertex where generated
68 //! from aGenV aDirE, and aDirV.
69 Standard_EXPORT void SetDirectingParameter (const TopoDS_Shape& aNewEdge, TopoDS_Shape& aNewVertex, const TopoDS_Shape& aGenV, const Sweep_NumShape& aDirE, const Sweep_NumShape& aDirV) Standard_OVERRIDE;
71 //! Sets the parameter of the new vertex on the new
72 //! edge. The new edge and new vertex where generated
73 //! from aGenE, aGenV and aDirV .
74 Standard_EXPORT void SetGeneratingParameter (const TopoDS_Shape& aNewEdge, TopoDS_Shape& aNewVertex, const TopoDS_Shape& aGenE, const TopoDS_Shape& aGenV, const Sweep_NumShape& aDirV) Standard_OVERRIDE;
76 //! Builds the face addressed by [aGenS,aDirS], with
77 //! its geometric part, but without subcomponents. The
78 //! couple aGenS, aDirS can be a "generating face and
79 //! a directing vertex" or "a generating edge and a
81 Standard_EXPORT TopoDS_Shape MakeEmptyFace (const TopoDS_Shape& aGenS, const Sweep_NumShape& aDirS) Standard_OVERRIDE;
83 //! Sets the PCurve for a new edge on a new face. The
84 //! new edge and the new face were generated using
85 //! aGenF, aGenE and aDirV.
86 Standard_EXPORT void SetPCurve (const TopoDS_Shape& aNewFace, TopoDS_Shape& aNewEdge, const TopoDS_Shape& aGenF, const TopoDS_Shape& aGenE, const Sweep_NumShape& aDirV, const TopAbs_Orientation orien) Standard_OVERRIDE;
88 //! Sets the PCurve for a new edge on a new face. The
89 //! new edge and the new face were generated using
90 //! aGenE, aDirE and aDirV.
91 Standard_EXPORT void SetGeneratingPCurve (const TopoDS_Shape& aNewFace, TopoDS_Shape& aNewEdge, const TopoDS_Shape& aGenE, const Sweep_NumShape& aDirE, const Sweep_NumShape& aDirV, const TopAbs_Orientation orien) Standard_OVERRIDE;
93 //! Sets the PCurve for a new edge on a new face. The
94 //! new edge and the new face were generated using
95 //! aGenE, aDirE and aGenV.
96 Standard_EXPORT void SetDirectingPCurve (const TopoDS_Shape& aNewFace, TopoDS_Shape& aNewEdge, const TopoDS_Shape& aGenE, const TopoDS_Shape& aGenV, const Sweep_NumShape& aDirE, const TopAbs_Orientation orien) Standard_OVERRIDE;
98 //! Returns the Orientation of the shell in the solid
99 //! generated by the face aGenS with the edge aDirS.
100 //! It is REVERSED if the surface is swept in the
101 //! direction of the normal.
102 Standard_EXPORT TopAbs_Orientation DirectSolid (const TopoDS_Shape& aGenS, const Sweep_NumShape& aDirS) Standard_OVERRIDE;
104 //! Returns true if aNewSubShape (addressed by
105 //! aSubGenS and aDirS) must be added in aNewShape
106 //! (addressed by aGenS and aDirS).
107 Standard_EXPORT Standard_Boolean GGDShapeIsToAdd (const TopoDS_Shape& aNewShape, const TopoDS_Shape& aNewSubShape, const TopoDS_Shape& aGenS, const TopoDS_Shape& aSubGenS, const Sweep_NumShape& aDirS) const Standard_OVERRIDE;
109 //! Returns true if aNewSubShape (addressed by
110 //! aGenS and aSubDirS) must be added in aNewShape
111 //! (addressed by aGenS and aDirS).
112 Standard_EXPORT Standard_Boolean GDDShapeIsToAdd (const TopoDS_Shape& aNewShape, const TopoDS_Shape& aNewSubShape, const TopoDS_Shape& aGenS, const Sweep_NumShape& aDirS, const Sweep_NumShape& aSubDirS) const Standard_OVERRIDE;
114 //! In some particular cases the topology of a
115 //! generated face must be composed of independent
116 //! closed wires, in this case this function returns
117 //! true. The only case in which the function may
118 //! return true is a planar face in a closed revol.
119 Standard_EXPORT Standard_Boolean SeparatedWires (const TopoDS_Shape& aNewShape, const TopoDS_Shape& aNewSubShape, const TopoDS_Shape& aGenS, const TopoDS_Shape& aSubGenS, const Sweep_NumShape& aDirS) const Standard_OVERRIDE;
121 //! In some particular cases the topology of a
122 //! generated Shell must be composed of independent
123 //! closed Shells, in this case this function returns
124 //! a Compound of independent Shells.
125 Standard_EXPORT virtual TopoDS_Shape SplitShell (const TopoDS_Shape& aNewShape) const Standard_OVERRIDE;
127 //! Returns true if aDirS and aGenS addresses a
128 //! resulting Shape. In some specific cases the shape
129 //! can be geometrically inexsistant, then this
130 //! function returns false.
131 Standard_EXPORT Standard_Boolean HasShape (const TopoDS_Shape& aGenS, const Sweep_NumShape& aDirS) const Standard_OVERRIDE;
133 //! Returns true when the geometry of aGenS is not
134 //! modified by the rotation.
135 Standard_EXPORT Standard_Boolean IsInvariant (const TopoDS_Shape& aGenS) const Standard_OVERRIDE;
138 Standard_EXPORT gp_Ax1 Axe() const;
140 //! returns the angle.
141 Standard_EXPORT Standard_Real Angle() const;
150 #endif // _BRepSweep_Rotation_HeaderFile