b311480e |
1 | // Copyright (c) 1999-2012 OPEN CASCADE SAS |
2 | // |
3 | // The content of this file is subject to the Open CASCADE Technology Public |
4 | // License Version 6.5 (the "License"). You may not use the content of this file |
5 | // except in compliance with the License. Please obtain a copy of the License |
6 | // at http://www.opencascade.org and read it completely before using this file. |
7 | // |
8 | // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
9 | // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
10 | // |
11 | // The Original Code and all software distributed under the License is |
12 | // distributed on an "AS IS" basis, without warranty of any kind, and the |
13 | // Initial Developer hereby disclaims all such warranties, including without |
14 | // limitation, any warranties of merchantability, fitness for a particular |
15 | // purpose or non-infringement. Please see the License for the specific terms |
16 | // and conditions governing the rights and limitations under the License. |
17 | |
7fd59977 |
18 | #include <STEPEdit.ixx> |
19 | //#include <StepData_FileProtocol.hxx> |
20 | #include <StepAP214.hxx> |
21 | //#include <HeaderSection.hxx> |
22 | |
23 | #include <APIHeaderSection_MakeHeader.hxx> |
24 | |
25 | #include <StepSelect_StepType.hxx> |
26 | #include <IFSelect_SelectSignature.hxx> |
27 | #include <IFSelect_SelectModelEntities.hxx> |
28 | #include <IFSelect_SelectModelRoots.hxx> |
29 | |
30 | |
31 | Handle(Interface_Protocol) STEPEdit::Protocol () |
32 | { |
33 | /* |
34 | static Handle(StepData_FileProtocol) proto; |
35 | if (!proto.IsNull()) return proto; |
36 | proto = new StepData_FileProtocol; |
37 | proto->Add (StepAP214::Protocol()); |
38 | proto->Add (HeaderSection::Protocol()); |
39 | return proto; |
40 | */ |
41 | return StepAP214::Protocol(); |
42 | } |
43 | |
44 | Handle(StepData_StepModel) STEPEdit::NewModel () |
45 | { |
46 | APIHeaderSection_MakeHeader head; |
47 | return head.NewModel(STEPEdit::Protocol()); |
48 | } |
49 | |
50 | Handle(IFSelect_Signature) STEPEdit::SignType () |
51 | { |
52 | static Handle(StepSelect_StepType) sty; |
53 | if (!sty.IsNull()) return sty; |
54 | sty = new StepSelect_StepType; |
55 | sty->SetProtocol (STEPEdit::Protocol()); |
56 | return sty; |
57 | } |
58 | |
59 | Handle(IFSelect_SelectSignature) STEPEdit::NewSelectSDR () |
60 | { |
61 | Handle(IFSelect_SelectSignature) sel = new IFSelect_SelectSignature |
62 | (STEPEdit::SignType(),"SHAPE_DEFINITION_REPRESENTATION"); |
63 | sel->SetInput (new IFSelect_SelectModelRoots); |
64 | return sel; |
65 | } |
66 | |
67 | Handle(IFSelect_SelectSignature) STEPEdit::NewSelectPlacedItem () |
68 | { |
69 | Handle(IFSelect_SelectSignature) sel = new IFSelect_SelectSignature |
70 | (STEPEdit::SignType(),"MAPPED_ITEM|CONTEXT_DEPENDENT_SHAPE_REPRESENTATION",Standard_False); |
71 | sel->SetInput (new IFSelect_SelectModelEntities); |
72 | return sel; |
73 | } |
74 | |
75 | Handle(IFSelect_SelectSignature) STEPEdit::NewSelectShapeRepr () |
76 | { |
77 | Handle(IFSelect_SelectSignature) sel = new IFSelect_SelectSignature |
78 | (STEPEdit::SignType(),"SHAPE_REPRESENTATION",Standard_False); |
79 | // REPRESENTATION_RELATIONSHIP passe par CONTEXT_DEPENDENT_SHAPE_REPRESENTATION |
80 | sel->SetInput (new IFSelect_SelectModelEntities); |
81 | return sel; |
82 | } |