Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-26 09:45:34

0001 // Created on: 1995-01-27
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 _BRepToIGES_BRWire_HeaderFile
0018 #define _BRepToIGES_BRWire_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <BRepToIGES_BREntity.hxx>
0025 #include <TopoDS_Shape.hxx>
0026 #include <TopTools_ShapeMapHasher.hxx>
0027 #include <NCollection_DataMap.hxx>
0028 
0029 class IGESData_IGESEntity;
0030 class TopoDS_Shape;
0031 class TopoDS_Vertex;
0032 class TopoDS_Edge;
0033 class TopoDS_Face;
0034 class Geom_Surface;
0035 class TopLoc_Location;
0036 class gp_Pnt2d;
0037 class TopoDS_Wire;
0038 
0039 //! This class implements the transfer of Shape Entities
0040 //! from Geom To IGES. These can be:
0041 //! . Vertex
0042 //! . Edge
0043 //! . Wire
0044 class BRepToIGES_BRWire : public BRepToIGES_BREntity
0045 {
0046 public:
0047   DEFINE_STANDARD_ALLOC
0048 
0049   Standard_EXPORT BRepToIGES_BRWire();
0050 
0051   Standard_EXPORT BRepToIGES_BRWire(const BRepToIGES_BREntity& BR);
0052 
0053   //! Transfer a Shape entity from TopoDS to IGES
0054   //! this entity must be a Vertex or an Edge or a Wire.
0055   //! If this Entity could not be converted,
0056   //! this member returns a NullEntity.
0057   Standard_EXPORT occ::handle<IGESData_IGESEntity> TransferWire(const TopoDS_Shape& start);
0058 
0059   //! Transfer a Vertex entity from TopoDS to IGES
0060   //! If this Entity could not be converted,
0061   //! this member returns a NullEntity.
0062   Standard_EXPORT occ::handle<IGESData_IGESEntity> TransferVertex(const TopoDS_Vertex& myvertex);
0063 
0064   //! Transfer a Vertex entity on an Edge from TopoDS to IGES
0065   //! Returns the parameter of myvertex on myedge.
0066   //! If this Entity could not be converted,
0067   //! this member returns a NullEntity.
0068   Standard_EXPORT occ::handle<IGESData_IGESEntity> TransferVertex(const TopoDS_Vertex& myvertex,
0069                                                                   const TopoDS_Edge&   myedge,
0070                                                                   double&              parameter);
0071 
0072   //! Transfer a Vertex entity of an edge on a Face
0073   //! from TopoDS to IGES
0074   //! Returns the parameter of myvertex on the pcurve
0075   //! of myedge on myface
0076   //! If this Entity could not be converted,
0077   //! this member returns a NullEntity.
0078   Standard_EXPORT occ::handle<IGESData_IGESEntity> TransferVertex(const TopoDS_Vertex& myvertex,
0079                                                                   const TopoDS_Edge&   myedge,
0080                                                                   const TopoDS_Face&   myface,
0081                                                                   double&              parameter);
0082 
0083   //! Transfer a Vertex entity of an edge on a Surface
0084   //! from TopoDS to IGES
0085   //! Returns the parameter of myvertex on the pcurve
0086   //! of myedge on mysurface
0087   //! If this Entity could not be converted,
0088   //! this member returns a NullEntity.
0089   Standard_EXPORT occ::handle<IGESData_IGESEntity> TransferVertex(
0090     const TopoDS_Vertex&             myvertex,
0091     const TopoDS_Edge&               myedge,
0092     const occ::handle<Geom_Surface>& mysurface,
0093     const TopLoc_Location&           myloc,
0094     double&                          parameter);
0095 
0096   //! Transfer a Vertex entity on a Face from TopoDS to IGES
0097   //! Returns the parameters of myvertex on myface
0098   //! If this Entity could not be converted,
0099   //! this member returns a NullEntity.
0100   Standard_EXPORT occ::handle<IGESData_IGESEntity> TransferVertex(const TopoDS_Vertex& myvertex,
0101                                                                   const TopoDS_Face&   myface,
0102                                                                   gp_Pnt2d&            mypoint);
0103 
0104   //! Transfer an Edge 3d entity from TopoDS to IGES
0105   //! If edge is REVERSED and isBRepMode is False 3D edge curve is reversed
0106   //! @param[in] theEdge input edge to transfer
0107   //! @param[in] theOriginMap shapemap contains the original shapes. Should be empty if face is not
0108   //! reversed
0109   //! @param[in] theIsBRepMode indicates if write mode is BRep
0110   //! @return Iges entity or null if could not be converted
0111   Standard_EXPORT occ::handle<IGESData_IGESEntity> TransferEdge(
0112     const TopoDS_Edge&                                                              theEdge,
0113     const NCollection_DataMap<TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher>& theOriginMap,
0114     const bool                                                                      theIsBRepMode);
0115 
0116   //! Transfer an Edge 2d entity on a Face from TopoDS to IGES
0117   //! @param[in] theEdge input edge to transfer
0118   //! @param[in] theFace input face to get the surface and UV coordinates from it
0119   //! @param[in] theOriginMap shapemap contains the original shapes. Should be empty if face is not
0120   //! reversed
0121   //! @param[in] theLength input surface length
0122   //! @param[in] theIsBRepMode indicates if write mode is BRep
0123   //! @return Iges entity or null if could not be converted
0124   Standard_EXPORT occ::handle<IGESData_IGESEntity> TransferEdge(
0125     const TopoDS_Edge&                                                              theEdge,
0126     const TopoDS_Face&                                                              theFace,
0127     const NCollection_DataMap<TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher>& theOriginMap,
0128     const double                                                                    theLength,
0129     const bool                                                                      theIsBRepMode);
0130 
0131   //! Transfer a Wire entity from TopoDS to IGES
0132   //! If this Entity could not be converted,
0133   //! this member returns a NullEntity.
0134   Standard_EXPORT occ::handle<IGESData_IGESEntity> TransferWire(const TopoDS_Wire& mywire);
0135 
0136   //! Transfer a Wire entity from TopoDS to IGES.
0137   //! @param[in] theWire input wire
0138   //! @param[in] theFace input face
0139   //! @param[in] theOriginMap shapemap contains the original shapes. Should be empty if face is not
0140   //! reversed
0141   //! @param[in] theCurve2d input curve 2d
0142   //! @param[in] theLength input surface length
0143   //! @return Iges entity (the curve associated to mywire in the parametric space of myface)
0144   //! or null if could not be converted
0145   Standard_EXPORT occ::handle<IGESData_IGESEntity> TransferWire(
0146     const TopoDS_Wire&                                                              theWire,
0147     const TopoDS_Face&                                                              theFace,
0148     const NCollection_DataMap<TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher>& theOriginMap,
0149     occ::handle<IGESData_IGESEntity>&                                               theCurve2d,
0150     const double                                                                    theLength);
0151 };
0152 
0153 #endif // _BRepToIGES_BRWire_HeaderFile