Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:04

0001 // Created on: 1994-04-21
0002 // Created by: s:   Christophe GUYOT & Frederic UNTEREINER
0003 // Copyright (c) 1994-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 _IGESToBRep_TopoCurve_HeaderFile
0018 #define _IGESToBRep_TopoCurve_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <TColGeom_SequenceOfCurve.hxx>
0025 #include <TColGeom2d_SequenceOfCurve.hxx>
0026 #include <IGESToBRep_CurveAndSurface.hxx>
0027 #include <Standard_Integer.hxx>
0028 class TopoDS_Shape;
0029 class IGESData_IGESEntity;
0030 class TopoDS_Face;
0031 class gp_Trsf2d;
0032 class TopoDS_Vertex;
0033 class IGESGeom_Point;
0034 class IGESGeom_CompositeCurve;
0035 class IGESGeom_OffsetCurve;
0036 class IGESGeom_CurveOnSurface;
0037 class IGESGeom_Boundary;
0038 class Geom_BSplineCurve;
0039 class Geom_Curve;
0040 class Geom2d_BSplineCurve;
0041 class Geom2d_Curve;
0042 
0043 
0044 //! Provides methods to transfer topologic curves entities
0045 //! from IGES to CASCADE.
0046 class IGESToBRep_TopoCurve  : public IGESToBRep_CurveAndSurface
0047 {
0048 public:
0049 
0050   DEFINE_STANDARD_ALLOC
0051 
0052   
0053   //! Creates  a tool TopoCurve  ready  to  run, with
0054   //! epsilons  set  to  1.E-04,  TheModeTopo  to  True,  the
0055   //! optimization of  the continuity to False.
0056   Standard_EXPORT IGESToBRep_TopoCurve();
0057   
0058   //! Creates a tool TopoCurve ready to run and sets its
0059   //! fields as CS's.
0060   Standard_EXPORT IGESToBRep_TopoCurve(const IGESToBRep_CurveAndSurface& CS);
0061   
0062   //! Creates a tool TopoCurve ready to run and sets its
0063   //! fields as CS's.
0064   Standard_EXPORT IGESToBRep_TopoCurve(const IGESToBRep_TopoCurve& CS);
0065   
0066   //! Creates a tool TopoCurve ready to run.
0067   Standard_EXPORT IGESToBRep_TopoCurve(const Standard_Real eps, const Standard_Real epsGeom, const Standard_Real epsCoeff, const Standard_Boolean mode, const Standard_Boolean modeapprox, const Standard_Boolean optimized);
0068   
0069   Standard_EXPORT TopoDS_Shape TransferTopoCurve (const Handle(IGESData_IGESEntity)& start);
0070   
0071   Standard_EXPORT TopoDS_Shape Transfer2dTopoCurve (const Handle(IGESData_IGESEntity)& start, const TopoDS_Face& face, const gp_Trsf2d& trans, const Standard_Real uFact);
0072   
0073   Standard_EXPORT TopoDS_Shape TransferTopoBasicCurve (const Handle(IGESData_IGESEntity)& start);
0074   
0075   Standard_EXPORT TopoDS_Shape Transfer2dTopoBasicCurve (const Handle(IGESData_IGESEntity)& start, const TopoDS_Face& face, const gp_Trsf2d& trans, const Standard_Real uFact);
0076   
0077   Standard_EXPORT TopoDS_Vertex TransferPoint (const Handle(IGESGeom_Point)& start);
0078   
0079   Standard_EXPORT TopoDS_Vertex Transfer2dPoint (const Handle(IGESGeom_Point)& start);
0080   
0081   Standard_EXPORT TopoDS_Shape TransferCompositeCurve (const Handle(IGESGeom_CompositeCurve)& start);
0082   
0083   Standard_EXPORT TopoDS_Shape Transfer2dCompositeCurve (const Handle(IGESGeom_CompositeCurve)& start, const TopoDS_Face& face, const gp_Trsf2d& trans, const Standard_Real uFact);
0084   
0085   Standard_EXPORT TopoDS_Shape TransferOffsetCurve (const Handle(IGESGeom_OffsetCurve)& start);
0086   
0087   Standard_EXPORT TopoDS_Shape Transfer2dOffsetCurve (const Handle(IGESGeom_OffsetCurve)& start, const TopoDS_Face& face, const gp_Trsf2d& trans, const Standard_Real uFact);
0088   
0089   Standard_EXPORT TopoDS_Shape TransferCurveOnSurface (const Handle(IGESGeom_CurveOnSurface)& start);
0090   
0091   //! Transfers a CurveOnSurface directly on a face to trim it.
0092   //! The CurveOnSurface have to be defined Outer or Inner.
0093   Standard_EXPORT TopoDS_Shape TransferCurveOnFace (TopoDS_Face& face, const Handle(IGESGeom_CurveOnSurface)& start, const gp_Trsf2d& trans, const Standard_Real uFact, const Standard_Boolean IsCurv);
0094   
0095   Standard_EXPORT TopoDS_Shape TransferBoundary (const Handle(IGESGeom_Boundary)& start);
0096   
0097   //! Transfers a Boundary directly on a face to trim it.
0098   Standard_EXPORT TopoDS_Shape TransferBoundaryOnFace (TopoDS_Face& face, const Handle(IGESGeom_Boundary)& start, const gp_Trsf2d& trans, const Standard_Real uFact);
0099   
0100   Standard_EXPORT void ApproxBSplineCurve (const Handle(Geom_BSplineCurve)& start);
0101   
0102   //! Returns the count of Curves in "TheCurves"
0103   Standard_EXPORT Standard_Integer NbCurves() const;
0104   
0105   //! Returns a Curve given its rank, by default the first one
0106   //! (null Curvee if out of range) in "TheCurves"
0107   Standard_EXPORT Handle(Geom_Curve) Curve (const Standard_Integer num = 1) const;
0108   
0109   Standard_EXPORT void Approx2dBSplineCurve (const Handle(Geom2d_BSplineCurve)& start);
0110   
0111   //! Returns the count of Curves in "TheCurves2d"
0112   Standard_EXPORT Standard_Integer NbCurves2d() const;
0113   
0114   //! Returns a Curve given its rank, by default the first one
0115   //! (null Curvee if out of range) in "TheCurves2d"
0116   Standard_EXPORT Handle(Geom2d_Curve) Curve2d (const Standard_Integer num = 1) const;
0117   
0118   //! Sets TheBadCase flag
0119   Standard_EXPORT void SetBadCase (const Standard_Boolean value);
0120   
0121   //! Returns TheBadCase flag
0122   Standard_EXPORT Standard_Boolean BadCase() const;
0123 
0124 
0125 
0126 
0127 protected:
0128 
0129 
0130 
0131 
0132 
0133 private:
0134 
0135   
0136   Standard_EXPORT TopoDS_Shape TransferCompositeCurveGeneral (const Handle(IGESGeom_CompositeCurve)& start, const Standard_Boolean is2d, const TopoDS_Face& face, const gp_Trsf2d& trans, const Standard_Real uFact);
0137 
0138 
0139   TColGeom_SequenceOfCurve TheCurves;
0140   TColGeom2d_SequenceOfCurve TheCurves2d;
0141   Standard_Boolean TheBadCase;
0142 
0143 
0144 };
0145 
0146 
0147 
0148 
0149 
0150 
0151 
0152 #endif // _IGESToBRep_TopoCurve_HeaderFile