Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1995-04-25
0002 // Created by: Marie Jose MARTZ
0003 // Copyright (c) 1995-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 _BRepToIGESBRep_Entity_HeaderFile
0018 #define _BRepToIGESBRep_Entity_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <TopTools_IndexedMapOfShape.hxx>
0025 #include <TColStd_IndexedMapOfTransient.hxx>
0026 #include <BRepToIGES_BREntity.hxx>
0027 #include <Standard_Integer.hxx>
0028 #include <Message_ProgressRange.hxx>
0029 
0030 class IGESSolid_EdgeList;
0031 class IGESSolid_VertexList;
0032 class TopoDS_Vertex;
0033 class TopoDS_Edge;
0034 class IGESData_IGESEntity;
0035 class TopoDS_Shape;
0036 class TopoDS_Face;
0037 class IGESSolid_Loop;
0038 class TopoDS_Wire;
0039 class IGESSolid_Face;
0040 class IGESSolid_Shell;
0041 class TopoDS_Shell;
0042 class IGESSolid_ManifoldSolid;
0043 class TopoDS_Solid;
0044 class TopoDS_CompSolid;
0045 class TopoDS_Compound;
0046 
0047 //! provides methods to transfer BRep entity from CASCADE to IGESBRep.
0048 class BRepToIGESBRep_Entity  : public BRepToIGES_BREntity
0049 {
0050 public:
0051 
0052   DEFINE_STANDARD_ALLOC
0053 
0054   
0055   //! Creates a tool Entity
0056   Standard_EXPORT BRepToIGESBRep_Entity();
0057   
0058   //! Clears the contents of the fields
0059   Standard_EXPORT void Clear();
0060   
0061   //! Create the VertexList entity
0062   Standard_EXPORT void TransferVertexList();
0063   
0064   //! Returns the index of <myvertex> in "myVertices"
0065   Standard_EXPORT Standard_Integer IndexVertex (const TopoDS_Vertex& myvertex) const;
0066   
0067   //! Stores <myvertex> in "myVertices"
0068   //! Returns the index of <myvertex>.
0069   Standard_EXPORT Standard_Integer AddVertex (const TopoDS_Vertex& myvertex);
0070   
0071   //! Transfert an Edge entity from TopoDS to IGES
0072   Standard_EXPORT void TransferEdgeList();
0073   
0074   //! Returns the index of <myedge> in "myEdges"
0075   Standard_EXPORT Standard_Integer IndexEdge (const TopoDS_Edge& myedge) const;
0076   
0077   //! Stores <myedge> in "myEdges" and <mycurve3d> in "myCurves".
0078   //! Returns the index of <myedge>.
0079   Standard_EXPORT Standard_Integer AddEdge (const TopoDS_Edge& myedge, const Handle(IGESData_IGESEntity)& mycurve3d);
0080   
0081   //! Returns the result of the transfert of any Shape
0082   //! If  the transfer has  failed, this member return a NullEntity.
0083   Standard_EXPORT virtual Handle(IGESData_IGESEntity) TransferShape
0084                    (const TopoDS_Shape& start,
0085                     const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE;
0086   
0087   //! Transfert an Edge entity from TopoDS to IGES
0088   //! If this Entity could not be converted, this member returns a NullEntity.
0089   Standard_EXPORT Handle(IGESData_IGESEntity) TransferEdge (const TopoDS_Edge& myedge);
0090   
0091   //! Transfert an Edge entity from TopoDS to IGES
0092   //! If this Entity could not be converted, this member returns a NullEntity.
0093   Standard_EXPORT Handle(IGESData_IGESEntity) TransferEdge (const TopoDS_Edge& myedge, const TopoDS_Face& myface, const Standard_Real length);
0094   
0095   //! Transfert a Wire entity from TopoDS to IGES.
0096   //! Returns the curve associated to mywire in the parametric space of myface.
0097   //! If this Entity could not be converted, this member returns a NullEntity.
0098   Standard_EXPORT Handle(IGESSolid_Loop) TransferWire (const TopoDS_Wire& mywire, const TopoDS_Face& myface, const Standard_Real length);
0099   
0100   //! Transfert a Face entity from TopoDS to IGES
0101   //! If this Entity could not be converted, this member returns a NullEntity.
0102   Standard_EXPORT Handle(IGESSolid_Face) TransferFace (const TopoDS_Face& start);
0103   
0104   //! Transfert an Shell entity from TopoDS to IGES
0105   //! If this Entity could not be converted, this member returns a NullEntity.
0106   Standard_EXPORT Handle(IGESSolid_Shell) TransferShell (const TopoDS_Shell& start,
0107                           const Message_ProgressRange& theProgress = Message_ProgressRange());
0108   
0109   //! Transfert a Solid entity from TopoDS to IGES
0110   //! If this Entity could not be converted, this member returns a NullEntity.
0111   Standard_EXPORT Handle(IGESSolid_ManifoldSolid) TransferSolid (const TopoDS_Solid& start,
0112                           const Message_ProgressRange& theProgress = Message_ProgressRange());
0113   
0114   //! Transfert an CompSolid entity from TopoDS to IGES
0115   //! If this Entity could not be converted, this member returns a NullEntity.
0116   Standard_EXPORT Handle(IGESData_IGESEntity) TransferCompSolid (const TopoDS_CompSolid& start,
0117                           const Message_ProgressRange& theProgress = Message_ProgressRange());
0118   
0119   //! Transfert a Compound entity from TopoDS to IGES
0120   //! If this Entity could not be converted, this member returns a NullEntity.
0121   Standard_EXPORT Handle(IGESData_IGESEntity) TransferCompound (const TopoDS_Compound& start,
0122                           const Message_ProgressRange& theProgress = Message_ProgressRange());
0123 
0124 
0125 
0126 
0127 protected:
0128 
0129 
0130 
0131 
0132 
0133 private:
0134 
0135 
0136 
0137   TopTools_IndexedMapOfShape myVertices;
0138   TopTools_IndexedMapOfShape myEdges;
0139   TColStd_IndexedMapOfTransient myCurves;
0140   Handle(IGESSolid_EdgeList) myEdgeList;
0141   Handle(IGESSolid_VertexList) myVertexList;
0142 
0143 
0144 };
0145 
0146 
0147 
0148 
0149 
0150 
0151 
0152 #endif // _BRepToIGESBRep_Entity_HeaderFile