summaryrefslogtreecommitdiff
path: root/src/MgtBRep/MgtBRep.cxx
blob: e5ce7f831dfb333d6772d0161c04230284e06f76 (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
66
67
68
69
70
71
72
73
74
75
76
77
78
// File:	MgtBRep.cxx
// Created:	Mon Jun 14 19:15:15 1993
// Author:	Remi LEQUETTE
//		<rle@zerox>


#include <MgtBRep.ixx>

#include <MgtTopoDS.hxx>
#include <MgtBRep_TranslateTool.hxx>
#include <MgtBRep_TranslateTool1.hxx>

#include <TopExp_Explorer.hxx>
#include <TopAbs.hxx>
#include <TopoDS.hxx>

#include <Geom_Surface.hxx>

#include <BRep_Tool.hxx>

//=======================================================================
//function : Translate
//purpose  : ... a Shape from BRep to PBRep.
//=======================================================================

Handle(PTopoDS_HShape) MgtBRep::Translate
(const TopoDS_Shape&              aShape,
 PTColStd_TransientPersistentMap& aMap,
 const MgtBRep_TriangleMode    aTriMode)
{
  Handle(MgtBRep_TranslateTool) TR = new MgtBRep_TranslateTool(aTriMode);
  return MgtTopoDS::Translate(aShape, TR, aMap);
}

//=======================================================================
//function : Translate
//purpose  : ... a Shape from PBRep to BRep.
//=======================================================================

void MgtBRep::Translate
(const Handle(PTopoDS_HShape)&    aShape,
 PTColStd_PersistentTransientMap& aMap,
 TopoDS_Shape&                    aResult,
 const MgtBRep_TriangleMode    aTriMode)
{
  Handle(MgtBRep_TranslateTool) TR = new MgtBRep_TranslateTool(aTriMode);
  MgtTopoDS::Translate(aShape, TR, aMap, aResult);
}
//=======================================================================
//function : Translate1
//purpose  : ... a Shape from BRep to PBRep.
//=======================================================================

void MgtBRep::Translate1
(const TopoDS_Shape& aShape,
 PTColStd_TransientPersistentMap& aMap,
 PTopoDS_Shape1& aResult,
 const MgtBRep_TriangleMode aTriMode)
{
  Handle(MgtBRep_TranslateTool1) TR = new MgtBRep_TranslateTool1(aTriMode);
  MgtTopoDS::Translate1(aShape, TR, aMap, aResult);
}


//=======================================================================
//function : Translate1
//purpose  : ... a Shape from PBRep to BRep.
//=======================================================================

void MgtBRep::Translate1
(const PTopoDS_Shape1& aShape,
 PTColStd_PersistentTransientMap& aMap,
 TopoDS_Shape& aResult,
 const MgtBRep_TriangleMode aTriMode)
{
  Handle(MgtBRep_TranslateTool1) TR = new MgtBRep_TranslateTool1(aTriMode);
  MgtTopoDS::Translate1(aShape, TR, aMap, aResult);
}