1 -- Created on: 1993-06-14
2 -- Created by: Remi LEQUETTE
3 -- Copyright (c) 1993-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 -- Update: Frederic MAUPAS
22 ---Purpose: The MgtBRep package provides methods to translate
23 -- data between the BRep package and the PBRep
26 -- That is to translate persistent BRep data
27 -- structures in Transient BRep data structures and
30 -- The MgtBRep package uses :
32 -- * The MgtBas package to bind a transient and a
35 -- * The MgtTopoDS package to provide basic methods
36 -- to translate TopoDS and PTopoDS data.
38 -- * The MgtTopLoc package to translate Locations.
40 -- * The MgtGeom, MgtGeom2d packages to translate
43 -- * The MgtPoly package to translate triangulation data.
45 -- The Translate methods has TriangleMode argument.
46 -- If it is MgtBRep_WithTriangle, the methods returns or
47 -- create a Shape with triangulation.
66 -- -----------------------------------------------------------------------
69 -- TriangleMode : WithTriangle stores the triangulation
70 -- WithoutTriangle does not store the triangulation
71 -- TriangulationMode is valid for Store and Retrieve
72 -- -----------------------------------------------------------------------
74 enumeration TriangleMode is
95 Translate(aShape : Shape from TopoDS;
96 aMap : in out TransientPersistentMap from PTColStd;
97 aTriMode : TriangleMode from MgtBRep)
98 returns HShape from PTopoDS;
99 ---Purpose: Translate a transient Shape to a persistent Shape.
100 -- he translation is performed according
101 -- to the map aMap and the triangulation
102 -- specified by aTriMode
104 Translate1(aShape : Shape from TopoDS;
105 aMap : in out TransientPersistentMap from PTColStd;
106 aResult : in out Shape1 from PTopoDS;
107 aTriMode : TriangleMode from MgtBRep);
108 ---Purpose: Translate a transient Shape to a persistent Shape.
109 -- The translation is performed according to the map aMap and the
110 -- triangulation specified by aTriMode.
111 -- The map, aMap, is a tool that lets you share
112 -- topological components. When the map is
113 -- initialized, it is empty. It is built up and used by the
114 -- Translate function every time a topological
115 -- component is converted from persistent to
116 -- transient and vice versa. This is true for all
117 -- topological components that can be shared:
118 -- vertex, edge, wire, face, shell, solid, and so on.
119 -- This map allows you to share individual
120 -- components as they are translated, and also lets
121 -- you share previously converted components
122 -- when you translate other objects which share
123 -- (i.e. refer to) these components.
124 -- The triangulation mode, aTriMode, specifies
125 -- whether a representation of the object as a set
126 -- of triangles - if such a representation exists - is
127 -- to be translated or not in addition to the
128 -- canonical definition of the object.
130 Translate(aShape : HShape from PTopoDS;
131 aMap : in out PersistentTransientMap from PTColStd;
132 aResult : in out Shape from TopoDS;
133 aTriMode : TriangleMode from MgtBRep);
134 ---Purpose: Translate a persistent Shape to a transient Shape.
135 -- Used for upwards compatibility.
138 Translate1(aShape : Shape1 from PTopoDS;
139 aMap : in out PersistentTransientMap from PTColStd;
140 aResult : in out Shape from TopoDS;
141 aTriMode : TriangleMode from MgtBRep);
142 ---Purpose: Translate a persistent Shape to a transient Shape.