Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:26

0001 // Created on: 1993-06-17
0002 // Created by: Jean Yves LEBEY
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 _TopOpeBRepDS_BuildTool_HeaderFile
0018 #define _TopOpeBRepDS_BuildTool_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <BRep_Builder.hxx>
0025 #include <TopOpeBRepTool_CurveTool.hxx>
0026 #include <Standard_Boolean.hxx>
0027 #include <TopOpeBRepTool_OutCurveType.hxx>
0028 #include <Standard_Real.hxx>
0029 #include <Standard_Integer.hxx>
0030 #include <TopAbs_Orientation.hxx>
0031 class TopOpeBRepTool_GeomTool;
0032 class TopoDS_Shape;
0033 class TopOpeBRepDS_Point;
0034 class TopOpeBRepDS_Curve;
0035 class TopOpeBRepDS_DataStructure;
0036 class Geom_Curve;
0037 class TopOpeBRepDS_Surface;
0038 class TopoDS_Edge;
0039 class TopoDS_Vertex;
0040 class TopoDS_Face;
0041 class TopOpeBRepDS_HDataStructure;
0042 class Geom2d_Curve;
0043 class Geom_Surface;
0044 
0045 
0046 //! Provides  a  Tool  to  build  topologies. Used  to
0047 //! instantiate the Builder algorithm.
0048 class TopOpeBRepDS_BuildTool 
0049 {
0050 public:
0051 
0052   DEFINE_STANDARD_ALLOC
0053 
0054   
0055   Standard_EXPORT TopOpeBRepDS_BuildTool();
0056   
0057   Standard_EXPORT TopOpeBRepDS_BuildTool(const TopOpeBRepTool_OutCurveType OutCurveType);
0058   
0059   Standard_EXPORT TopOpeBRepDS_BuildTool(const TopOpeBRepTool_GeomTool& GT);
0060   
0061   Standard_EXPORT const TopOpeBRepTool_GeomTool& GetGeomTool() const;
0062   
0063   Standard_EXPORT TopOpeBRepTool_GeomTool& ChangeGeomTool();
0064   
0065   Standard_EXPORT void MakeVertex (TopoDS_Shape& V, const TopOpeBRepDS_Point& P) const;
0066   
0067   Standard_EXPORT void MakeEdge (TopoDS_Shape& E, const TopOpeBRepDS_Curve& C) const;
0068   
0069   Standard_EXPORT void MakeEdge (TopoDS_Shape& E, const TopOpeBRepDS_Curve& C, const TopOpeBRepDS_DataStructure& DS) const;
0070   
0071   Standard_EXPORT void MakeEdge (TopoDS_Shape& E, const Handle(Geom_Curve)& C, const Standard_Real Tol) const;
0072   
0073   Standard_EXPORT void MakeEdge (TopoDS_Shape& E) const;
0074   
0075   Standard_EXPORT void MakeWire (TopoDS_Shape& W) const;
0076   
0077   Standard_EXPORT void MakeFace (TopoDS_Shape& F, const TopOpeBRepDS_Surface& S) const;
0078   
0079   Standard_EXPORT void MakeShell (TopoDS_Shape& Sh) const;
0080   
0081   Standard_EXPORT void MakeSolid (TopoDS_Shape& S) const;
0082   
0083   //! Make an edge <Eou> with the curve of the edge <Ein>
0084   Standard_EXPORT void CopyEdge (const TopoDS_Shape& Ein, TopoDS_Shape& Eou) const;
0085   
0086   Standard_EXPORT void GetOrientedEdgeVertices (TopoDS_Edge& E, TopoDS_Vertex& Vmin, TopoDS_Vertex& Vmax, Standard_Real& Parmin, Standard_Real& Parmax) const;
0087   
0088   Standard_EXPORT void UpdateEdgeCurveTol (const TopoDS_Face& F1, const TopoDS_Face& F2, TopoDS_Edge& E, const Handle(Geom_Curve)& C3Dnew, const Standard_Real tol3d, const Standard_Real tol2d1, const Standard_Real tol2d2, Standard_Real& newtol, Standard_Real& newparmin, Standard_Real& newparmax) const;
0089   
0090   Standard_EXPORT void ApproxCurves (const TopOpeBRepDS_Curve& C, TopoDS_Edge& E, Standard_Integer& inewC, const Handle(TopOpeBRepDS_HDataStructure)& HDS) const;
0091   
0092   Standard_EXPORT void ComputePCurves (const TopOpeBRepDS_Curve& C, TopoDS_Edge& E, TopOpeBRepDS_Curve& newC, const Standard_Boolean CompPC1, const Standard_Boolean CompPC2, const Standard_Boolean CompC3D) const;
0093   
0094   Standard_EXPORT void PutPCurves (const TopOpeBRepDS_Curve& newC, TopoDS_Edge& E, const Standard_Boolean CompPC1, const Standard_Boolean CompPC2) const;
0095   
0096   Standard_EXPORT void RecomputeCurves (const TopOpeBRepDS_Curve& C, const TopoDS_Edge& oldE, TopoDS_Edge& E, Standard_Integer& inewC, const Handle(TopOpeBRepDS_HDataStructure)& HDS) const;
0097   
0098   //! Make a face <Fou> with the surface of the face <Fin>
0099   Standard_EXPORT void CopyFace (const TopoDS_Shape& Fin, TopoDS_Shape& Fou) const;
0100   
0101   Standard_EXPORT void AddEdgeVertex (const TopoDS_Shape& Ein, TopoDS_Shape& Eou, const TopoDS_Shape& V) const;
0102   
0103   Standard_EXPORT void AddEdgeVertex (TopoDS_Shape& E, const TopoDS_Shape& V) const;
0104   
0105   Standard_EXPORT void AddWireEdge (TopoDS_Shape& W, const TopoDS_Shape& E) const;
0106   
0107   Standard_EXPORT void AddFaceWire (TopoDS_Shape& F, const TopoDS_Shape& W) const;
0108   
0109   Standard_EXPORT void AddShellFace (TopoDS_Shape& Sh, const TopoDS_Shape& F) const;
0110   
0111   Standard_EXPORT void AddSolidShell (TopoDS_Shape& S, const TopoDS_Shape& Sh) const;
0112   
0113   //! Sets the parameter <P>  for  the vertex <V> on the
0114   //! edge <E>.
0115   Standard_EXPORT void Parameter (const TopoDS_Shape& E, const TopoDS_Shape& V, const Standard_Real P) const;
0116   
0117   //! Sets the range of edge <E>.
0118   Standard_EXPORT void Range (const TopoDS_Shape& E, const Standard_Real first, const Standard_Real last) const;
0119   
0120   //! Sets the range of edge <Eou> from <Ein>
0121   //! only when <Ein> has a closed geometry.
0122   Standard_EXPORT void UpdateEdge (const TopoDS_Shape& Ein, TopoDS_Shape& Eou) const;
0123   
0124   //! Compute the parameter of  the vertex <V>, supported
0125   //! by   the edge <E>, on the curve  <C>.
0126   Standard_EXPORT void Parameter (const TopOpeBRepDS_Curve& C, TopoDS_Shape& E, TopoDS_Shape& V) const;
0127   
0128   //! Sets the  curve <C> for the edge  <E>
0129   Standard_EXPORT void Curve3D (TopoDS_Shape& E, const Handle(Geom_Curve)& C, const Standard_Real Tol) const;
0130   
0131   //! Sets  the pcurve <C> for  the edge <E> on the face
0132   //! <F>.  If OverWrite is True the old pcurve if there
0133   //! is one  is overwritten, else the  two  pcurves are
0134   //! set.
0135   Standard_EXPORT void PCurve (TopoDS_Shape& F, TopoDS_Shape& E, const Handle(Geom2d_Curve)& C) const;
0136   
0137   Standard_EXPORT void PCurve (TopoDS_Shape& F, TopoDS_Shape& E, const TopOpeBRepDS_Curve& CDS, const Handle(Geom2d_Curve)& C) const;
0138   
0139   Standard_EXPORT void Orientation (TopoDS_Shape& S, const TopAbs_Orientation O) const;
0140   
0141   Standard_EXPORT TopAbs_Orientation Orientation (const TopoDS_Shape& S) const;
0142   
0143   Standard_EXPORT void Closed (TopoDS_Shape& S, const Standard_Boolean B) const;
0144   
0145   Standard_EXPORT Standard_Boolean Approximation() const;
0146   
0147   Standard_EXPORT void UpdateSurface (const TopoDS_Shape& F, const Handle(Geom_Surface)& SU) const;
0148   
0149   Standard_EXPORT void UpdateSurface (const TopoDS_Shape& E, const TopoDS_Shape& oldF, const TopoDS_Shape& newF) const;
0150   
0151   Standard_EXPORT Standard_Boolean OverWrite() const;
0152   
0153   Standard_EXPORT void OverWrite (const Standard_Boolean O);
0154   
0155   Standard_EXPORT Standard_Boolean Translate() const;
0156   
0157   Standard_EXPORT void Translate (const Standard_Boolean T);
0158 
0159 
0160 
0161 
0162 protected:
0163 
0164 
0165 
0166 
0167 
0168 private:
0169 
0170   
0171   Standard_EXPORT void TranslateOnPeriodic (TopoDS_Shape& F, TopoDS_Shape& E, Handle(Geom2d_Curve)& C) const;
0172 
0173 
0174   BRep_Builder myBuilder;
0175   TopOpeBRepTool_CurveTool myCurveTool;
0176   Standard_Boolean myOverWrite;
0177   Standard_Boolean myTranslate;
0178 
0179 
0180 };
0181 
0182 
0183 
0184 
0185 
0186 
0187 
0188 #endif // _TopOpeBRepDS_BuildTool_HeaderFile