1 // Created on: 1995-01-31
2 // Created by: Dieter THIEMANN
3 // Copyright (c) 1995-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _STEPControl_ActorWrite_HeaderFile
18 #define _STEPControl_ActorWrite_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <Standard_Integer.hxx>
24 #include <STEPConstruct_ContextTool.hxx>
25 #include <Transfer_ActorOfFinderProcess.hxx>
26 #include <TopTools_HSequenceOfShape.hxx>
27 #include <STEPControl_StepModelType.hxx>
28 class Transfer_Finder;
29 class Transfer_Binder;
30 class Transfer_FinderProcess;
31 class StepShape_ShapeDefinitionRepresentation;
32 class StepGeom_Axis2Placement3d;
34 class StepShape_NonManifoldSurfaceShapeRepresentation;
37 class STEPControl_ActorWrite;
38 DEFINE_STANDARD_HANDLE(STEPControl_ActorWrite, Transfer_ActorOfFinderProcess)
40 //! This class performs the transfer of a Shape from TopoDS
41 //! to AP203 or AP214 (CD2 or DIS)
42 class STEPControl_ActorWrite : public Transfer_ActorOfFinderProcess
48 Standard_EXPORT STEPControl_ActorWrite();
50 Standard_EXPORT virtual Standard_Boolean Recognize (const Handle(Transfer_Finder)& start) Standard_OVERRIDE;
52 Standard_EXPORT virtual Handle(Transfer_Binder) Transfer
53 (const Handle(Transfer_Finder)& start,
54 const Handle(Transfer_FinderProcess)& FP,
55 const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE;
57 Standard_EXPORT Handle(Transfer_Binder) TransferSubShape
58 (const Handle(Transfer_Finder)& start,
59 const Handle(StepShape_ShapeDefinitionRepresentation)& SDR,
60 Handle(StepGeom_Axis2Placement3d)& AX1,
61 const Handle(Transfer_FinderProcess)& FP,
62 const Handle(TopTools_HSequenceOfShape)& shapeGroup = NULL,
63 const Standard_Boolean isManifold = Standard_True,
64 const Message_ProgressRange& theProgress = Message_ProgressRange());
66 Standard_EXPORT Handle(Transfer_Binder) TransferShape
67 (const Handle(Transfer_Finder)& start,
68 const Handle(StepShape_ShapeDefinitionRepresentation)& SDR,
69 const Handle(Transfer_FinderProcess)& FP,
70 const Handle(TopTools_HSequenceOfShape)& shapeGroup = NULL,
71 const Standard_Boolean isManifold = Standard_True,
72 const Message_ProgressRange& theProgress = Message_ProgressRange());
74 Standard_EXPORT Handle(Transfer_Binder) TransferCompound
75 (const Handle(Transfer_Finder)& start,
76 const Handle(StepShape_ShapeDefinitionRepresentation)& SDR,
77 const Handle(Transfer_FinderProcess)& FP,
78 const Message_ProgressRange& theProgress = Message_ProgressRange());
80 Standard_EXPORT void SetMode (const STEPControl_StepModelType M);
82 Standard_EXPORT STEPControl_StepModelType Mode() const;
84 Standard_EXPORT void SetGroupMode (const Standard_Integer mode);
86 Standard_EXPORT Standard_Integer GroupMode() const;
88 Standard_EXPORT void SetTolerance (const Standard_Real Tol);
90 //! Customizable method to check whether shape S should
91 //! be written as assembly or not
92 //! Default implementation uses flag GroupMode and analyses
94 //! NOTE: this method can modify shape
95 Standard_EXPORT virtual Standard_Boolean IsAssembly (TopoDS_Shape& S) const;
100 DEFINE_STANDARD_RTTIEXT(STEPControl_ActorWrite,Transfer_ActorOfFinderProcess)
110 //! Non-manifold shapes are stored in NMSSR group
111 //! (NON_MANIFOLD_SURFACE_SHAPE_REPRESENTATION).
112 //! Use this method to get the corresponding NMSSR (or
113 //! to create a new one if doesn't exist yet)
114 //! (ssv; 13.11.2010)
115 Standard_EXPORT Handle(StepShape_NonManifoldSurfaceShapeRepresentation) getNMSSRForGroup (const Handle(TopTools_HSequenceOfShape)& shapeGroup, const Handle(Transfer_FinderProcess)& FP, Standard_Boolean& isNMSSRCreated) const;
117 //! bind already written shared faces to STEP entity for non-manifold
118 Standard_EXPORT void mergeInfoForNM(const Handle(Transfer_FinderProcess)& theFP, const Handle(Standard_Transient) &theInfo) const;
120 Standard_Integer mygroup;
121 Standard_Real mytoler;
122 STEPConstruct_ContextTool myContext;
133 #endif // _STEPControl_ActorWrite_HeaderFile