Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:16

0001 // Created on: 1993-06-08
0002 // Created by: Laurent BOURESCHE
0003 // Copyright (c) 1993-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _BRepSweep_Trsf_HeaderFile
0018 #define _BRepSweep_Trsf_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <TopLoc_Location.hxx>
0024 #include <BRepSweep_NumLinearRegularSweep.hxx>
0025 #include <TopAbs_Orientation.hxx>
0026 class BRep_Builder;
0027 class TopoDS_Shape;
0028 class Sweep_NumShape;
0029 
0030 
0031 //! This class is inherited from NumLinearRegularSweep
0032 //! to  implement the  simple   swept primitives built
0033 //! moving a Shape with a Trsf.  It  often is possible
0034 //! to  build  the constructed subshapes  by  a simple
0035 //! move of the  generating subshapes (shared topology
0036 //! and geometry).   So two  ways of construction  are
0037 //! proposed :
0038 //!
0039 //! - sharing  basis elements  (the generatrice can be
0040 //! modified , for  example  PCurves can be added  on
0041 //! faces);
0042 //!
0043 //! - copying everything.
0044 class BRepSweep_Trsf  : public BRepSweep_NumLinearRegularSweep
0045 {
0046 public:
0047 
0048   DEFINE_STANDARD_ALLOC
0049 
0050   
0051   //! ends  the  construction  of the   swept  primitive
0052   //! calling the virtual geometric functions that can't
0053   //! be called in the initialize.
0054   Standard_EXPORT void Init();
0055   
0056   //! function called to analyze the way of construction
0057   //! of the shapes generated by aGenS and aDirV.
0058   Standard_EXPORT Standard_Boolean Process (const TopoDS_Shape& aGenS, const Sweep_NumShape& aDirV);
0059   
0060   //! Builds the vertex addressed by [aGenV,aDirV], with its
0061   //! geometric part, but without subcomponents.
0062   Standard_EXPORT virtual TopoDS_Shape MakeEmptyVertex (const TopoDS_Shape& aGenV, const Sweep_NumShape& aDirV) = 0;
0063   
0064   //! Builds the edge addressed by [aGenV,aDirE], with its
0065   //! geometric part, but without subcomponents.
0066   Standard_EXPORT virtual TopoDS_Shape MakeEmptyDirectingEdge (const TopoDS_Shape& aGenV, const Sweep_NumShape& aDirE) = 0;
0067   
0068   //! Builds the edge addressed by [aGenE,aDirV], with its
0069   //! geometric part, but without subcomponents.
0070   Standard_EXPORT virtual TopoDS_Shape MakeEmptyGeneratingEdge (const TopoDS_Shape& aGenE, const Sweep_NumShape& aDirV) = 0;
0071   
0072   //! Sets the  parameters of the new  vertex  on the new
0073   //! face. The new face and  new vertex where generated
0074   //! from aGenF, aGenV and aDirV .
0075   Standard_EXPORT virtual void SetParameters (const TopoDS_Shape& aNewFace, TopoDS_Shape& aNewVertex, const TopoDS_Shape& aGenF, const TopoDS_Shape& aGenV, const Sweep_NumShape& aDirV) = 0;
0076   
0077   //! Sets the  parameter of the new  vertex  on the new
0078   //! edge. The new edge and  new vertex where generated
0079   //! from aGenV aDirE, and aDirV.
0080   Standard_EXPORT virtual void SetDirectingParameter (const TopoDS_Shape& aNewEdge, TopoDS_Shape& aNewVertex, const TopoDS_Shape& aGenV, const Sweep_NumShape& aDirE, const Sweep_NumShape& aDirV) = 0;
0081   
0082   //! Sets the  parameter of the new  vertex  on the new
0083   //! edge. The new edge and  new vertex where generated
0084   //! from aGenE, aGenV and aDirV .
0085   Standard_EXPORT virtual void SetGeneratingParameter (const TopoDS_Shape& aNewEdge, TopoDS_Shape& aNewVertex, const TopoDS_Shape& aGenE, const TopoDS_Shape& aGenV, const Sweep_NumShape& aDirV) = 0;
0086   
0087   //! Builds  the face addressed  by [aGenS,aDirS], with
0088   //! its geometric part, but without subcomponents. The
0089   //! couple aGenS, aDirS can be  a "generating face and
0090   //! a  directing vertex" or "a   generating edge and a
0091   //! directing  edge".
0092   Standard_EXPORT virtual TopoDS_Shape MakeEmptyFace (const TopoDS_Shape& aGenS, const Sweep_NumShape& aDirS) = 0;
0093   
0094   //! Sets the PCurve for a new edge on a new face. The
0095   //! new edge and  the  new face were generated  using
0096   //! aGenF, aGenE and aDirV.
0097   Standard_EXPORT virtual 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) = 0;
0098   
0099   //! Sets the PCurve for a new edge on a new face. The
0100   //! new edge and  the  new face were generated  using
0101   //! aGenE, aDirE and aDirV.
0102   Standard_EXPORT virtual 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) = 0;
0103   
0104   //! Sets the PCurve for a new edge on a new face. The
0105   //! new edge and  the  new face were generated  using
0106   //! aGenE, aDirE and aGenV.
0107   Standard_EXPORT virtual 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) = 0;
0108   
0109   //! Returns   true   if  aNewSubShape    (addressed by
0110   //! aSubGenS  and aDirS)  must  be added  in aNewShape
0111   //! (addressed by aGenS and aDirS).
0112   Standard_EXPORT virtual Standard_Boolean GGDShapeIsToAdd (const TopoDS_Shape& aNewShape, const TopoDS_Shape& aNewSubShape, const TopoDS_Shape& aGenS, const TopoDS_Shape& aSubGenS, const Sweep_NumShape& aDirS) const = 0;
0113   
0114   //! Returns   true   if  aNewSubShape    (addressed by
0115   //! aGenS  and aSubDirS)  must  be added  in aNewShape
0116   //! (addressed by aGenS and aDirS).
0117   Standard_EXPORT virtual Standard_Boolean GDDShapeIsToAdd (const TopoDS_Shape& aNewShape, const TopoDS_Shape& aNewSubShape, const TopoDS_Shape& aGenS, const Sweep_NumShape& aDirS, const Sweep_NumShape& aSubDirS) const = 0;
0118   
0119   //! In  some  particular  cases  the   topology  of  a
0120   //! generated  face must be  composed  of  independent
0121   //! closed wires,  in this case  this function returns
0122   //! true.
0123   Standard_EXPORT virtual Standard_Boolean SeparatedWires (const TopoDS_Shape& aNewShape, const TopoDS_Shape& aNewSubShape, const TopoDS_Shape& aGenS, const TopoDS_Shape& aSubGenS, const Sweep_NumShape& aDirS) const = 0;
0124   
0125   //! Returns true   if aDirS   and aGenS  addresses   a
0126   //! resulting Shape. In some  specific cases the shape
0127   //! can  be    geometrically   inexsistant,  then this
0128   //! function returns false.
0129   Standard_EXPORT virtual Standard_Boolean HasShape (const TopoDS_Shape& aGenS, const Sweep_NumShape& aDirS) const = 0;
0130   
0131   //! Returns  true if  the geometry   of  aGenS is  not
0132   //! modified by the trsf of the BRepSweep Trsf.
0133   Standard_EXPORT virtual Standard_Boolean IsInvariant (const TopoDS_Shape& aGenS) const = 0;
0134   
0135   //! Called to propagate the continuity of  every vertex
0136   //! between two edges of the  generating wire  aGenS on
0137   //! the generated edge and faces.
0138   Standard_EXPORT void SetContinuity (const TopoDS_Shape& aGenS, const Sweep_NumShape& aDirS);
0139 
0140 
0141 
0142 
0143 protected:
0144 
0145   
0146   //! Initialize  the Trsf BrepSweep, if  aCopy  is true
0147   //! the  basis elements  are    shared  as   often  as
0148   //! possible, else everything is copied.
0149   Standard_EXPORT BRepSweep_Trsf(const BRep_Builder& aBuilder, const TopoDS_Shape& aGenShape, const Sweep_NumShape& aDirWire, const TopLoc_Location& aLocation, const Standard_Boolean aCopy);
0150 
0151 
0152   TopLoc_Location myLocation;
0153   Standard_Boolean myCopy;
0154 
0155 
0156 private:
0157 
0158 
0159 
0160 
0161 
0162 };
0163 
0164 
0165 
0166 
0167 
0168 
0169 
0170 #endif // _BRepSweep_Trsf_HeaderFile