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 <Standard_Real.hxx>
25 #include <STEPConstruct_ContextTool.hxx>
26 #include <Transfer_ActorOfFinderProcess.hxx>
27 #include <Standard_Boolean.hxx>
28 #include <TopTools_HSequenceOfShape.hxx>
29 #include <STEPControl_StepModelType.hxx>
30 class Transfer_Finder;
31 class Transfer_Binder;
32 class Transfer_FinderProcess;
33 class StepShape_ShapeDefinitionRepresentation;
34 class StepGeom_Axis2Placement3d;
36 class StepShape_NonManifoldSurfaceShapeRepresentation;
39 class STEPControl_ActorWrite;
40 DEFINE_STANDARD_HANDLE(STEPControl_ActorWrite, Transfer_ActorOfFinderProcess)
42 //! This class performs the transfer of a Shape from TopoDS
43 //! to AP203 or AP214 (CD2 or DIS)
44 class STEPControl_ActorWrite : public Transfer_ActorOfFinderProcess
50 Standard_EXPORT STEPControl_ActorWrite();
52 Standard_EXPORT virtual Standard_Boolean Recognize (const Handle(Transfer_Finder)& start) Standard_OVERRIDE;
54 Standard_EXPORT virtual Handle(Transfer_Binder) Transfer (const Handle(Transfer_Finder)& start, const Handle(Transfer_FinderProcess)& FP) Standard_OVERRIDE;
56 Standard_EXPORT Handle(Transfer_Binder) TransferSubShape (const Handle(Transfer_Finder)& start, const Handle(StepShape_ShapeDefinitionRepresentation)& SDR, Handle(StepGeom_Axis2Placement3d)& AX1, const Handle(Transfer_FinderProcess)& FP, const Handle(TopTools_HSequenceOfShape)& shapeGroup = NULL, const Standard_Boolean isManifold = Standard_True);
58 Standard_EXPORT Handle(Transfer_Binder) TransferShape (const Handle(Transfer_Finder)& start, const Handle(StepShape_ShapeDefinitionRepresentation)& SDR, const Handle(Transfer_FinderProcess)& FP, const Handle(TopTools_HSequenceOfShape)& shapeGroup = NULL, const Standard_Boolean isManifold = Standard_True);
60 Standard_EXPORT Handle(Transfer_Binder) TransferCompound (const Handle(Transfer_Finder)& start, const Handle(StepShape_ShapeDefinitionRepresentation)& SDR, const Handle(Transfer_FinderProcess)& FP);
62 Standard_EXPORT void SetMode (const STEPControl_StepModelType M);
64 Standard_EXPORT STEPControl_StepModelType Mode() const;
66 Standard_EXPORT void SetGroupMode (const Standard_Integer mode);
68 Standard_EXPORT Standard_Integer GroupMode() const;
70 Standard_EXPORT void SetTolerance (const Standard_Real Tol);
72 //! Customizable method to check whether shape S should
73 //! be written as assembly or not
74 //! Default implementation uses flag GroupMode and analyses
76 //! NOTE: this method can modify shape
77 Standard_EXPORT virtual Standard_Boolean IsAssembly (TopoDS_Shape& S) const;
82 DEFINE_STANDARD_RTTIEXT(STEPControl_ActorWrite,Transfer_ActorOfFinderProcess)
92 //! Non-manifold shapes are stored in NMSSR group
93 //! (NON_MANIFOLD_SURFACE_SHAPE_REPRESENTATION).
94 //! Use this method to get the corresponding NMSSR (or
95 //! to create a new one if doesn't exist yet)
97 Standard_EXPORT Handle(StepShape_NonManifoldSurfaceShapeRepresentation) getNMSSRForGroup (const Handle(TopTools_HSequenceOfShape)& shapeGroup, const Handle(Transfer_FinderProcess)& FP, Standard_Boolean& isNMSSRCreated) const;
99 //! bind already written shared faces to STEP entity for non-manifold
100 Standard_EXPORT void mergeInfoForNM(const Handle(Transfer_FinderProcess)& theFP, const Handle(Standard_Transient) &theInfo) const;
102 Standard_Integer mygroup;
103 Standard_Real mytoler;
104 STEPConstruct_ContextTool myContext;
115 #endif // _STEPControl_ActorWrite_HeaderFile