Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-17 09:22:15

0001 // Created on: 1994-12-16
0002 // Created by: Frederic MAUPAS
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 _StepToTopoDS_Tool_HeaderFile
0018 #define _StepToTopoDS_Tool_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <StepShape_TopologicalRepresentationItem.hxx>
0025 #include <TopoDS_Shape.hxx>
0026 #include <NCollection_DataMap.hxx>
0027 #include <StepGeom_CartesianPoint.hxx>
0028 #include <TopoDS_Vertex.hxx>
0029 #include <StepToTopoDS_PointPair.hxx>
0030 #include <TopoDS_Edge.hxx>
0031 #include <Standard_Integer.hxx>
0032 class Transfer_TransientProcess;
0033 class StepShape_TopologicalRepresentationItem;
0034 class TopoDS_Shape;
0035 class StepToTopoDS_PointPair;
0036 class TopoDS_Edge;
0037 class StepGeom_CartesianPoint;
0038 class TopoDS_Vertex;
0039 class Geom_Surface;
0040 class Geom_Curve;
0041 class Geom2d_Curve;
0042 
0043 //! This Tool Class provides Information to build
0044 //! a Cas.Cad BRep from a ProSTEP Shape model.
0045 class StepToTopoDS_Tool
0046 {
0047 public:
0048   DEFINE_STANDARD_ALLOC
0049 
0050   Standard_EXPORT StepToTopoDS_Tool();
0051 
0052   Standard_EXPORT StepToTopoDS_Tool(
0053     const NCollection_DataMap<occ::handle<StepShape_TopologicalRepresentationItem>, TopoDS_Shape>&
0054                                                   Map,
0055     const occ::handle<Transfer_TransientProcess>& TP);
0056 
0057   Standard_EXPORT void Init(
0058     const NCollection_DataMap<occ::handle<StepShape_TopologicalRepresentationItem>, TopoDS_Shape>&
0059                                                   Map,
0060     const occ::handle<Transfer_TransientProcess>& TP);
0061 
0062   Standard_EXPORT bool IsBound(const occ::handle<StepShape_TopologicalRepresentationItem>& TRI);
0063 
0064   Standard_EXPORT void Bind(const occ::handle<StepShape_TopologicalRepresentationItem>& TRI,
0065                             const TopoDS_Shape&                                         S);
0066 
0067   Standard_EXPORT const TopoDS_Shape& Find(
0068     const occ::handle<StepShape_TopologicalRepresentationItem>& TRI);
0069 
0070   Standard_EXPORT void ClearEdgeMap();
0071 
0072   Standard_EXPORT bool IsEdgeBound(const StepToTopoDS_PointPair& PP);
0073 
0074   Standard_EXPORT void BindEdge(const StepToTopoDS_PointPair& PP, const TopoDS_Edge& E);
0075 
0076   Standard_EXPORT const TopoDS_Edge& FindEdge(const StepToTopoDS_PointPair& PP);
0077 
0078   Standard_EXPORT void ClearVertexMap();
0079 
0080   Standard_EXPORT bool IsVertexBound(const occ::handle<StepGeom_CartesianPoint>& PG);
0081 
0082   Standard_EXPORT void BindVertex(const occ::handle<StepGeom_CartesianPoint>& P,
0083                                   const TopoDS_Vertex&                        V);
0084 
0085   Standard_EXPORT const TopoDS_Vertex& FindVertex(const occ::handle<StepGeom_CartesianPoint>& P);
0086 
0087   Standard_EXPORT void ComputePCurve(const bool B);
0088 
0089   Standard_EXPORT bool ComputePCurve() const;
0090 
0091   Standard_EXPORT occ::handle<Transfer_TransientProcess> TransientProcess() const;
0092 
0093   Standard_EXPORT void AddContinuity(const occ::handle<Geom_Surface>& GeomSurf);
0094 
0095   Standard_EXPORT void AddContinuity(const occ::handle<Geom_Curve>& GeomCurve);
0096 
0097   Standard_EXPORT void AddContinuity(const occ::handle<Geom2d_Curve>& GeomCur2d);
0098 
0099   Standard_EXPORT int C0Surf() const;
0100 
0101   Standard_EXPORT int C1Surf() const;
0102 
0103   Standard_EXPORT int C2Surf() const;
0104 
0105   Standard_EXPORT int C0Cur2() const;
0106 
0107   Standard_EXPORT int C1Cur2() const;
0108 
0109   Standard_EXPORT int C2Cur2() const;
0110 
0111   Standard_EXPORT int C0Cur3() const;
0112 
0113   Standard_EXPORT int C1Cur3() const;
0114 
0115   Standard_EXPORT int C2Cur3() const;
0116 
0117 private:
0118   NCollection_DataMap<occ::handle<StepShape_TopologicalRepresentationItem>, TopoDS_Shape> myDataMap;
0119   NCollection_DataMap<occ::handle<StepGeom_CartesianPoint>, TopoDS_Vertex> myVertexMap;
0120   NCollection_DataMap<StepToTopoDS_PointPair, TopoDS_Edge>                 myEdgeMap;
0121   bool                                                                     myComputePC;
0122   occ::handle<Transfer_TransientProcess>                                   myTransProc;
0123   int                                                                      myNbC0Surf;
0124   int                                                                      myNbC1Surf;
0125   int                                                                      myNbC2Surf;
0126   int                                                                      myNbC0Cur2;
0127   int                                                                      myNbC1Cur2;
0128   int                                                                      myNbC2Cur2;
0129   int                                                                      myNbC0Cur3;
0130   int                                                                      myNbC1Cur3;
0131   int                                                                      myNbC2Cur3;
0132 };
0133 
0134 #endif // _StepToTopoDS_Tool_HeaderFile