summaryrefslogtreecommitdiff
path: root/src/STEPEdit/STEPEdit.cxx
blob: 96187a53a7284fe3df80ece43dfe9e0271657adf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#include <STEPEdit.ixx>
//#include <StepData_FileProtocol.hxx>
#include <StepAP214.hxx>
//#include <HeaderSection.hxx>

#include <APIHeaderSection_MakeHeader.hxx>

#include <StepSelect_StepType.hxx>
#include <IFSelect_SelectSignature.hxx>
#include <IFSelect_SelectModelEntities.hxx>
#include <IFSelect_SelectModelRoots.hxx>


Handle(Interface_Protocol)  STEPEdit::Protocol ()
{
/*
  static Handle(StepData_FileProtocol) proto;
  if (!proto.IsNull()) return proto;
  proto =  new StepData_FileProtocol;
  proto->Add (StepAP214::Protocol());
  proto->Add (HeaderSection::Protocol());
  return proto;
*/
  return StepAP214::Protocol();
}

Handle(StepData_StepModel)  STEPEdit::NewModel ()
{
  APIHeaderSection_MakeHeader head;
  return head.NewModel(STEPEdit::Protocol());
}

Handle(IFSelect_Signature)  STEPEdit::SignType ()
{
  static Handle(StepSelect_StepType) sty;
  if (!sty.IsNull()) return sty;
  sty = new StepSelect_StepType;
  sty->SetProtocol (STEPEdit::Protocol());
  return sty;
}

Handle(IFSelect_SelectSignature)  STEPEdit::NewSelectSDR ()
{
  Handle(IFSelect_SelectSignature) sel = new IFSelect_SelectSignature
    (STEPEdit::SignType(),"SHAPE_DEFINITION_REPRESENTATION");
  sel->SetInput (new IFSelect_SelectModelRoots);
  return sel;
}

Handle(IFSelect_SelectSignature)  STEPEdit::NewSelectPlacedItem ()
{
  Handle(IFSelect_SelectSignature) sel = new IFSelect_SelectSignature
    (STEPEdit::SignType(),"MAPPED_ITEM|CONTEXT_DEPENDENT_SHAPE_REPRESENTATION",Standard_False);
  sel->SetInput (new IFSelect_SelectModelEntities);
  return sel;
}

Handle(IFSelect_SelectSignature)  STEPEdit::NewSelectShapeRepr ()
{
  Handle(IFSelect_SelectSignature) sel = new IFSelect_SelectSignature
    (STEPEdit::SignType(),"SHAPE_REPRESENTATION",Standard_False);
// REPRESENTATION_RELATIONSHIP passe par CONTEXT_DEPENDENT_SHAPE_REPRESENTATION
  sel->SetInput (new IFSelect_SelectModelEntities);
  return sel;
}