1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
14 #include <STEPEdit.ixx>
16 #include <StepAP214.hxx>
17 #include <StepAP214_Protocol.hxx>
19 #include <APIHeaderSection_MakeHeader.hxx>
21 #include <StepSelect_StepType.hxx>
22 #include <IFSelect_SelectSignature.hxx>
23 #include <IFSelect_SelectModelEntities.hxx>
24 #include <IFSelect_SelectModelRoots.hxx>
27 Handle(Interface_Protocol) STEPEdit::Protocol ()
30 static Handle(StepData_FileProtocol) proto;
31 if (!proto.IsNull()) return proto;
32 proto = new StepData_FileProtocol;
33 proto->Add (StepAP214::Protocol());
34 proto->Add (HeaderSection::Protocol());
37 return StepAP214::Protocol();
40 Handle(StepData_StepModel) STEPEdit::NewModel ()
42 APIHeaderSection_MakeHeader head;
43 return head.NewModel(STEPEdit::Protocol());
46 Handle(IFSelect_Signature) STEPEdit::SignType ()
48 static Handle(StepSelect_StepType) sty;
49 if (!sty.IsNull()) return sty;
50 sty = new StepSelect_StepType;
51 sty->SetProtocol (STEPEdit::Protocol());
55 Handle(IFSelect_SelectSignature) STEPEdit::NewSelectSDR ()
57 Handle(IFSelect_SelectSignature) sel = new IFSelect_SelectSignature
58 (STEPEdit::SignType(),"SHAPE_DEFINITION_REPRESENTATION");
59 sel->SetInput (new IFSelect_SelectModelRoots);
63 Handle(IFSelect_SelectSignature) STEPEdit::NewSelectPlacedItem ()
65 Handle(IFSelect_SelectSignature) sel = new IFSelect_SelectSignature
66 (STEPEdit::SignType(),"MAPPED_ITEM|CONTEXT_DEPENDENT_SHAPE_REPRESENTATION",Standard_False);
67 sel->SetInput (new IFSelect_SelectModelEntities);
71 Handle(IFSelect_SelectSignature) STEPEdit::NewSelectShapeRepr ()
73 Handle(IFSelect_SelectSignature) sel = new IFSelect_SelectSignature
74 (STEPEdit::SignType(),"SHAPE_REPRESENTATION",Standard_False);
75 // REPRESENTATION_RELATIONSHIP passe par CONTEXT_DEPENDENT_SHAPE_REPRESENTATION
76 sel->SetInput (new IFSelect_SelectModelEntities);