0031939: Coding - correction of spelling errors in comments [part 5]
[occt.git] / src / BRepSweep / BRepSweep_Rotation.hxx
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
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
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.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _BRepSweep_Rotation_HeaderFile
18 #define _BRepSweep_Rotation_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <Standard_Real.hxx>
25 #include <gp_Ax1.hxx>
26 #include <BRepSweep_Trsf.hxx>
27 #include <Standard_Boolean.hxx>
28 #include <TopAbs_Orientation.hxx>
29 class Standard_ConstructionError;
30 class TopoDS_Shape;
31 class Sweep_NumShape;
32 class TopLoc_Location;
33 class gp_Ax1;
34
35
36 //! Provides   an  algorithm   to   build  object   by
37 //! Rotation sweep.
38 class BRepSweep_Rotation  : public BRepSweep_Trsf
39 {
40 public:
41
42   DEFINE_STANDARD_ALLOC
43
44   
45   //! Creates a topology  by rotating <S>  around A with the
46   //! angle D.
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);
48   
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;
52   
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;
56   
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;
60   
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;
65   
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;
70   
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;
75   
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
80   //! directing edge".
81   Standard_EXPORT TopoDS_Shape MakeEmptyFace (const TopoDS_Shape& aGenS, const Sweep_NumShape& aDirS) Standard_OVERRIDE;
82   
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;
87   
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;
92   
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;
97   
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;
103   
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;
108   
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;
113   
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;
120   
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;
126   
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;
132   
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;
136   
137   //! returns the axis
138   Standard_EXPORT gp_Ax1 Axe() const;
139   
140   //! returns the angle.
141   Standard_EXPORT Standard_Real Angle() const;
142
143 private:
144
145   Standard_Real myAng;
146   gp_Ax1 myAxe;
147
148 };
149
150 #endif // _BRepSweep_Rotation_HeaderFile