Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1993-02-03
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_Translation_HeaderFile
0018 #define _BRepSweep_Translation_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <gp_Vec.hxx>
0025 #include <Standard_Boolean.hxx>
0026 #include <BRepSweep_Trsf.hxx>
0027 #include <TopAbs_Orientation.hxx>
0028 class TopoDS_Shape;
0029 class Sweep_NumShape;
0030 class TopLoc_Location;
0031 
0032 
0033 //! Provides   an  algorithm   to   build  object   by
0034 //! translation sweep.
0035 class BRepSweep_Translation  : public BRepSweep_Trsf
0036 {
0037 public:
0038 
0039   DEFINE_STANDARD_ALLOC
0040 
0041   
0042   //! Creates  a  topology by  translating <S>  with the
0043   //! vector  <V>. If  C  is   true S Sucomponents   are
0044   //! copied. If Canonize is true then generated surfaces
0045   //! are attempted to be canonized in simple types
0046   Standard_EXPORT BRepSweep_Translation(const TopoDS_Shape& S, const Sweep_NumShape& N, const TopLoc_Location& L, const gp_Vec& V, const Standard_Boolean C, const Standard_Boolean Canonize = Standard_True);
0047   
0048   //! Builds the vertex addressed by [aGenV,aDirV], with its
0049   //! geometric part, but without subcomponents.
0050   Standard_EXPORT TopoDS_Shape MakeEmptyVertex (const TopoDS_Shape& aGenV, const Sweep_NumShape& aDirV);
0051   
0052   //! Builds the edge addressed by [aGenV,aDirE], with its
0053   //! geometric part, but without subcomponents.
0054   Standard_EXPORT TopoDS_Shape MakeEmptyDirectingEdge (const TopoDS_Shape& aGenV, const Sweep_NumShape& aDirE);
0055   
0056   //! Builds the edge addressed by [aGenE,aDirV], with its
0057   //! geometric part, but without subcomponents.
0058   Standard_EXPORT TopoDS_Shape MakeEmptyGeneratingEdge (const TopoDS_Shape& aGenE, const Sweep_NumShape& aDirV);
0059   
0060   //! Sets the  parameters of the new  vertex  on the new
0061   //! face. The new face and  new vertex where generated
0062   //! from aGenF, aGenV and aDirV .
0063   Standard_EXPORT void SetParameters (const TopoDS_Shape& aNewFace, TopoDS_Shape& aNewVertex, const TopoDS_Shape& aGenF, const TopoDS_Shape& aGenV, const Sweep_NumShape& aDirV);
0064   
0065   //! Sets the  parameter of the new  vertex  on the new
0066   //! edge. The new edge and  new vertex where generated
0067   //! from aGenV aDirE, and aDirV.
0068   Standard_EXPORT void SetDirectingParameter (const TopoDS_Shape& aNewEdge, TopoDS_Shape& aNewVertex, const TopoDS_Shape& aGenV, const Sweep_NumShape& aDirE, const Sweep_NumShape& aDirV);
0069   
0070   //! Sets the  parameter of the new  vertex  on the new
0071   //! edge. The new edge and  new vertex where generated
0072   //! from aGenE, aGenV and aDirV .
0073   Standard_EXPORT void SetGeneratingParameter (const TopoDS_Shape& aNewEdge, TopoDS_Shape& aNewVertex, const TopoDS_Shape& aGenE, const TopoDS_Shape& aGenV, const Sweep_NumShape& aDirV);
0074   
0075   //! Builds the  face addressed  by [aGenS,aDirS], with
0076   //! its geometric part, but without subcomponents. The
0077   //! couple aGenS, aDirS can  be a "generating face and
0078   //! a  directing  vertex" or  "a generating edge and a
0079   //! directing  edge".
0080   Standard_EXPORT TopoDS_Shape MakeEmptyFace (const TopoDS_Shape& aGenS, const Sweep_NumShape& aDirS);
0081   
0082   //! Sets the PCurve for a new edge on a new face. The
0083   //! new edge and  the  new face were generated  using
0084   //! aGenF, aGenE and aDirV.
0085   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);
0086   
0087   //! Sets the PCurve for a new edge on a new face. The
0088   //! new edge and  the  new face were generated  using
0089   //! aGenE, aDirE and aDirV.
0090   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);
0091   
0092   //! Sets the PCurve for a new edge on a new face. The
0093   //! new edge and  the  new face were generated  using
0094   //! aGenE, aDirE and aGenV.
0095   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);
0096   
0097   //! Returns the Orientation of the  shell in the solid
0098   //! generated by the face aGenS  with  the edge aDirS.
0099   //! It is  REVERSED  if the surface is  swept  in  the
0100   //! direction of the normal.
0101   Standard_EXPORT TopAbs_Orientation DirectSolid (const TopoDS_Shape& aGenS, const Sweep_NumShape& aDirS);
0102   
0103   //! Returns   true   if  aNewSubShape    (addressed by
0104   //! aSubGenS  and aDirS)  must  be added  in aNewShape
0105   //! (addressed by aGenS and aDirS).
0106   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;
0107   
0108   //! Returns   true   if  aNewSubShape    (addressed by
0109   //! aGenS  and aSubDirS)  must  be added  in aNewShape
0110   //! (addressed by aGenS and aDirS).
0111   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;
0112   
0113   //! In  some  particular  cases  the   topology  of  a
0114   //! generated  face must be  composed  of  independent
0115   //! closed wires,  in this case  this function returns
0116   //! true.
0117   //! Here it always returns false.
0118   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;
0119   
0120   //! Returns true   if aDirS   and aGenS  addresses   a
0121   //! resulting Shape. In some  specific cases the shape
0122   //! can  be    geometrically   inexsistant,  then this
0123   //! function returns false.
0124   Standard_EXPORT Standard_Boolean HasShape (const TopoDS_Shape& aGenS, const Sweep_NumShape& aDirS) const;
0125   
0126   //! Returns  always     false   because    here    the
0127   //! transformation is a translation.
0128   Standard_EXPORT Standard_Boolean IsInvariant (const TopoDS_Shape& aGenS) const;
0129   
0130   //! Returns the Vector of the Prism,  if it is an infinite
0131   //! prism the Vec is unitar.
0132   Standard_EXPORT gp_Vec Vec() const;
0133 
0134 
0135 
0136 
0137 protected:
0138 
0139 
0140 
0141 
0142 
0143 private:
0144 
0145 
0146 
0147   gp_Vec myVec;
0148   Standard_Boolean myCanonize;
0149 
0150 
0151 };
0152 
0153 
0154 
0155 
0156 
0157 
0158 
0159 #endif // _BRepSweep_Translation_HeaderFile