Test for 0022778: Bug in BRepMesh
[occt.git] / src / TopoDSToStep / TopoDSToStep.cdl
1 -- Created on: 1994-11-25
2 -- Created by: Frederic MAUPAS
3 -- Copyright (c) 1994-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
5 --
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
10 --
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 --
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
20
21
22 package TopoDSToStep
23
24     ---Purpose: This package implements the mapping between CAS.CAD
25     --  Shape representation and AP214 Shape Representation.
26     --  The target schema is pms_c4 (a subset of AP214)
27     --  
28     --  How to use this Package :
29     --  
30     --  Entry point are context dependent. It can be :
31     --     MakeManifoldSolidBrep
32     --     MakeBrepWithVoids
33     --     MakeFacetedBrep
34     --     MakeFacetedBrepAndBrepWithVoids
35     --     MakeShellBasedSurfaceModel
36     --  Each of these classes call the Builder
37     --  The class tool centralizes some common informations.   
38
39 uses TopoDS, StdFail, TCollection, TColStd, TopTools, Transfer, MoniTool,
40      BRepTools, TopLoc, GeomAbs, Geom2d, Geom, gp,
41      StepGeom, StepShape
42
43 is
44
45 --  ------------------------------------------------------
46 --  Enumeration
47 --  ------------------------------------------------------
48
49     enumeration BuilderError is
50         BuilderDone,
51         NoFaceMapped,
52         BuilderOther
53     end BuilderError;
54     
55     enumeration MakeFaceError is
56         FaceDone,
57         InfiniteFace,
58         NonManifoldFace,
59         NoWireMapped,
60         FaceOther
61     end MakeFaceError;
62     
63     enumeration MakeWireError is
64         WireDone,
65         NonManifoldWire,
66         WireOther
67     end MakeWireError;
68     
69     enumeration MakeEdgeError is
70         EdgeDone,
71         NonManifoldEdge,
72         EdgeOther
73     end MakeEdgeError;
74     
75     enumeration MakeVertexError is
76         VertexDone,
77         VertexOther
78     end MakeVertexError;
79     
80     enumeration FacetedError is
81         FacetedDone,    
82         SurfaceNotPlane,
83         PCurveNotLinear
84     end FacetedError;
85
86 --  ------------------------------------------------------
87 --  Package Classes
88 --  ------------------------------------------------------
89
90     private deferred class Root;
91
92     class MakeManifoldSolidBrep;
93
94     class MakeBrepWithVoids;
95
96     class MakeFacetedBrep;
97
98     class MakeFacetedBrepAndBrepWithVoids;
99
100     class MakeShellBasedSurfaceModel;
101
102     class MakeGeometricCurveSet;
103     
104     class Builder;
105     
106     class WireframeBuilder;
107     
108     class Tool;
109     
110     class FacetedTool;
111     
112     class MakeStepFace;
113     
114     class MakeStepWire;
115     
116     class MakeStepEdge;
117     
118     class MakeStepVertex;
119     
120 --    private class DirectModification;
121 --    private class ConicalSurfModif;
122     
123 --  ------------------------------------------------------
124 --  Instanciated Class
125 --  ------------------------------------------------------
126
127 --    class DataMapOfShape instantiates
128 --        DataMap from TCollection 
129 --          (Shape                         from TopoDS,
130 --           TopologicalRepresentationItem from StepShape,
131 --           ShapeMapHasher                from TopTools);
132
133 --  ------------------------------------------------------
134 --  Package Method
135 --  ------------------------------------------------------
136
137     DecodeBuilderError(E : BuilderError from TopoDSToStep)
138         returns HAsciiString from TCollection;   
139    
140     DecodeFaceError(E : MakeFaceError from TopoDSToStep)
141         returns HAsciiString from TCollection;
142         
143     DecodeWireError(E : MakeWireError from TopoDSToStep)
144         returns HAsciiString from TCollection;   
145    
146     DecodeEdgeError(E : MakeEdgeError from TopoDSToStep)
147         returns HAsciiString from TCollection;
148         
149     DecodeVertexError(E : MakeVertexError from TopoDSToStep)
150         returns HAsciiString from TCollection;
151         
152 --    DirectFaces(S : Shape from TopoDS)
153 --      returns Shape from TopoDS;
154         ---Purpose: Returns a new shape without undirect surfaces.
155         
156     AddResult (FP: FinderProcess from Transfer;
157                Shape: Shape from TopoDS;
158                entity: Transient from Standard);
159         ---Purpose: Adds an entity into the list of results (binders) for
160         --          shape stored in FinderProcess
161
162     AddResult (FP: FinderProcess from Transfer;
163                Tool: Tool from TopoDSToStep);
164         ---Purpose: Adds all entities recorded in Tool into the map of results
165         --          (binders) stored in FinderProcess
166
167 end TopoDSToStep;