Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1994-11-15
0002 // Created by: Marie Jose MARTZ
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 _BRepToIGES_BREntity_HeaderFile
0018 #define _BRepToIGES_BREntity_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Standard_CString.hxx>
0025 #include <Message_ProgressRange.hxx>
0026 
0027 class IGESData_IGESModel;
0028 class Transfer_FinderProcess;
0029 class IGESData_IGESEntity;
0030 class TopoDS_Shape;
0031 class Standard_Transient;
0032 
0033 
0034 //! provides methods to transfer BRep entity from CASCADE to IGES.
0035 class BRepToIGES_BREntity 
0036 {
0037 public:
0038 
0039   DEFINE_STANDARD_ALLOC
0040 
0041   
0042   //! Creates a tool BREntity
0043   Standard_EXPORT BRepToIGES_BREntity();
0044   
0045   //! Initializes the field of the tool BREntity with
0046   //! default creating values.
0047   Standard_EXPORT void Init();
0048   
0049   //! Set the value of "TheModel"
0050   Standard_EXPORT void SetModel (const Handle(IGESData_IGESModel)& model);
0051   
0052   //! Returns the value of "TheModel"
0053   Standard_EXPORT Handle(IGESData_IGESModel) GetModel() const;
0054   
0055   //! Returns the value of the UnitFlag of the header of the model
0056   //! in meters.
0057   Standard_EXPORT Standard_Real GetUnit() const;
0058   
0059   //! Set the value of "TheMap"
0060   Standard_EXPORT void SetTransferProcess (const Handle(Transfer_FinderProcess)& TP);
0061   
0062   //! Returns the value of "TheMap"
0063   Standard_EXPORT Handle(Transfer_FinderProcess) GetTransferProcess() const;
0064   
0065   //! Returns the result of the transfert of any Shape
0066   //! If  the transfer has  failed, this member return a NullEntity.
0067   Standard_EXPORT virtual Handle(IGESData_IGESEntity) TransferShape
0068                    (const TopoDS_Shape& start,
0069                     const Message_ProgressRange& theProgress = Message_ProgressRange());
0070   
0071   //! Records a new Fail message
0072   Standard_EXPORT void AddFail (const TopoDS_Shape& start, const Standard_CString amess);
0073   
0074   //! Records a new Warning message
0075   Standard_EXPORT void AddWarning (const TopoDS_Shape& start, const Standard_CString amess);
0076   
0077   //! Records a new Fail message
0078   Standard_EXPORT void AddFail (const Handle(Standard_Transient)& start, const Standard_CString amess);
0079   
0080   //! Records a new Warning message
0081   Standard_EXPORT void AddWarning (const Handle(Standard_Transient)& start, const Standard_CString amess);
0082   
0083   //! Returns True if start was already treated and has a result in "TheMap"
0084   //! else returns False.
0085   Standard_EXPORT Standard_Boolean HasShapeResult (const TopoDS_Shape& start) const;
0086   
0087   //! Returns the result of the transfer of the Shape "start" contained
0088   //! in "TheMap" . (if HasShapeResult is True).
0089   Standard_EXPORT Handle(Standard_Transient) GetShapeResult (const TopoDS_Shape& start) const;
0090   
0091   //! set in "TheMap" the result of the transfer of the Shape "start".
0092   Standard_EXPORT void SetShapeResult (const TopoDS_Shape& start, const Handle(Standard_Transient)& result);
0093   
0094   //! Returns True if start was already treated and has a result in "TheMap"
0095   //! else returns False.
0096   Standard_EXPORT Standard_Boolean HasShapeResult (const Handle(Standard_Transient)& start) const;
0097   
0098   //! Returns the result of the transfer of the Transient "start" contained
0099   //! in "TheMap" . (if HasShapeResult is True).
0100   Standard_EXPORT Handle(Standard_Transient) GetShapeResult (const Handle(Standard_Transient)& start) const;
0101   
0102   //! set in "TheMap" the result of the transfer of the Transient "start".
0103   Standard_EXPORT void SetShapeResult (const Handle(Standard_Transient)& start, const Handle(Standard_Transient)& result);
0104   
0105   //! Returns mode for conversion of surfaces
0106   //! (value of parameter write.convertsurface.mode)
0107   Standard_EXPORT Standard_Boolean GetConvertSurfaceMode() const;
0108   
0109   //! Returns mode for writing pcurves
0110   //! (value of parameter write.surfacecurve.mode)
0111   Standard_EXPORT Standard_Boolean GetPCurveMode() const;
0112   
0113   Standard_EXPORT virtual ~BRepToIGES_BREntity();
0114 
0115 private:
0116   Handle(IGESData_IGESModel) TheModel;
0117   Standard_Real TheUnitFactor;
0118   Standard_Boolean myConvSurface;
0119   Standard_Boolean myPCurveMode;
0120   Handle(Transfer_FinderProcess) TheMap;
0121 };
0122 
0123 #endif // _BRepToIGES_BREntity_HeaderFile