0024624: Lost word in license statement in source files
[occt.git] / src / TransferBRep / TransferBRep.cdl
CommitLineData
b311480e 1-- Created on: 1994-10-03
2-- Created by: Christian CAILLET
3-- Copyright (c) 1994-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
d5f74e42 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
973c2be1 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.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
7fd59977 16
17package TransferBRep
18
19 ---Purpose : This package gathers services to simply read files and convert
20 -- them to Shapes from CasCade. IE. it can be used in conjunction
21 -- with purely CasCade software
22
23uses Standard, TCollection, TColStd, TopoDS, TopAbs, TopTools, Interface, Transfer, Message
24
25is
26
27 class Reader;
28
29-- class Analyzer;
30
31 class ShapeInfo;
32 class BinderOfShape instantiates SimpleBinder from Transfer
33 (Shape from TopoDS, ShapeInfo);
34
35 class ShapeBinder;
36 class ShapeListBinder;
37
38 class ShapeMapper instantiates Mapper from Transfer
39 (Shape from TopoDS, ShapeMapHasher from TopTools, ShapeInfo);
40 class OrientedShapeMapper instantiates Mapper from Transfer
41 (Shape from TopoDS, OrientedShapeMapHasher from TopTools, ShapeInfo);
42
43 class TransferResultInfo;
44 class SequenceOfTransferResultInfo instantiates Sequence from TCollection
45 (TransferResultInfo from TransferBRep);
46 class HSequenceOfTransferResultInfo instantiates HSequence from TCollection
47 (TransferResultInfo from TransferBRep,
48 SequenceOfTransferResultInfo from TransferBRep);
49
50 -- some usefull functions for binding shapes --
51
52 ShapeResult (binder : Binder from Transfer) returns Shape from TopoDS;
53 ---Purpose : Get the Shape recorded in a Binder
54 -- If the Binder brings a multiple result, search for the Shape
55
56 ShapeResult (TP : TransientProcess from Transfer; ent : Transient)
57 returns Shape from TopoDS;
58 ---Purpose : Get the Shape recorded in a TransientProcess as result of the
59 -- Transfer of an entity. I.E. in the binder bound to that Entity
60 -- If no result or result not a single Shape, returns a Null Shape
61
62 SetShapeResult (TP : mutable TransientProcess from Transfer; ent : Transient;
63 result : Shape from TopoDS);
64 ---Purpose : Sets a Shape as a result for a starting entity <ent>
65 -- (reverse of ShapeResult)
66 -- It simply creates a ShapeBinder then binds it to the entity
67
68 Shapes (TP : TransientProcess from Transfer; rootsonly : Boolean = Standard_True)
69 returns HSequenceOfShape from TopTools;
70 ---Purpose : Gets the Shapes recorded in a TransientProcess as result of a
71 -- Transfer, considers roots only or all results according
72 -- <rootsonly>, returns them as a HSequence
73
74 Shapes (TP : TransientProcess from Transfer;
75 list : HSequenceOfTransient from TColStd)
76 returns HSequenceOfShape from TopTools;
77 ---Purpose : Gets the Shapes recorded in a TransientProcess as result of a
78 -- Transfer, for a given list of starting entities, returns
79 -- the shapes as a HSequence
80
81
82 ShapeState (FP : FinderProcess from Transfer; shape : Shape from TopoDS)
83 returns Orientation from TopAbs;
84 ---Purpose : Returns a Status regarding a Shape in a FinderProcess
85 -- - FORWARD means bound with SAME Orientation
86 -- - REVERSED means bound with REVERSE Orientation
87 -- - EXTERNAL means NOT BOUND
88 -- - INTERNAL is not used
89
90 ResultFromShape (FP : FinderProcess from Transfer; shape : Shape from TopoDS)
91 returns Binder from Transfer;
92 ---Purpose : Returns the result (as a Binder) attached to a given Shape
93 -- Null if none
94
95 TransientFromShape (FP : FinderProcess from Transfer; shape : Shape from TopoDS)
96 returns Transient;
97 ---Purpose : Returns the result as pure Transient attached to a Shape
98 -- first one if multiple result
99
100 SetTransientFromShape (FP : FinderProcess from Transfer;
101 shape : Shape from TopoDS; result : Transient);
102 ---Purpose : Binds a Transient Result to a Shape in a FinderProcess
103 -- (as first result if multiple : does not add it to existing one)
104
105 ShapeMapper (FP : FinderProcess from Transfer; shape : Shape from TopoDS)
106 returns ShapeMapper;
107 ---Purpose : Returns a ShapeMapper for a given Shape (location included)
108 -- Either <shape> is already mapped, then its Mapper is returned
109 -- Or it is not, then a new one is created then returned, BUT
110 -- it is not mapped here (use Bind or FindElseBind to do this)
111
112 -- Functions to collect transfer result information --
113
114 TransferResultInfo (TP : TransientProcess from Transfer;
115 EntityTypes: HSequenceOfTransient from TColStd;
116 InfoSeq : out HSequenceOfTransferResultInfo from TransferBRep);
117 ---Purpose: Fills sequence of TransferResultInfo for each type of entity
118 -- given in the EntityTypes (entity are given as objects).
119 -- Method IsKind applied to the entities in TP is used to
120 -- compare with entities in EntityTypes.
121 -- TopAbs_ShapeEnum).
122
123 TransferResultInfo (FP : FinderProcess from Transfer;
124 ShapeTypes: HSequenceOfInteger from TColStd;
125 InfoSeq : out HSequenceOfTransferResultInfo from TransferBRep);
126 ---Purpose: Fills sequence of TransferResultInfo for each type of shape
127 -- given in the ShapeTypes (which are in fact considered as
128 -- TopAbs_ShapeEnum).
129 -- The Finders in the FP are considered as ShapeMappers.
130
131 PrintResultInfo ( Printer : Printer from Message;
132 Header : Msg from Message;
133 ResultInfo: TransferResultInfo from TransferBRep;
134 printEmpty: Boolean = Standard_True);
135 ---Purpose: Prints the results of transfer to given priner with given header.
136
137
138
139 -- Functions to analyse checks on objects, shapes ... --
140
141 BRepCheck (shape : Shape from TopoDS; lev : Integer = 1)
142 returns CheckIterator from Interface;
143 ---Purpose : Performs a heavy check by calling the Analyser from BRepCheck
144 -- This tool computes a lot of informations about integrity of a
145 -- Shape. This method uses it and converts its internal result
146 -- to a classic check-list.
147 -- <lev> allows to get more informations :
148 -- 0 : BRepCheck only
149 -- 1(D) + Curves/Surfaces not C0 ; 2 + SameParameter on Edges
150 -- Warning : entities to which checks are bound are the Shapes themselves,
151 -- embedded in ShapeMapper
152
153 ResultCheckList (chl : CheckIterator from Interface;
154 FP : FinderProcess from Transfer;
155 model : InterfaceModel from Interface)
156 returns CheckIterator from Interface;
157 ---Purpose : Takes a starting CheckIterator which brings checks bound with
158 -- starting objects (Shapes, Transient from an Imagine appli ...)
159 -- and converts it to a CheckIterator in which checks are bound
160 -- with results in an InterfaceModel
161 -- Mapping is recorded in the FinderProcess
162 -- Starting objects for which no individual result is recorded
163 -- remain in their state
164
165 Checked (chl : CheckIterator from Interface;
166 alsoshapes : Boolean = Standard_False)
167 returns HSequenceOfTransient from TColStd;
168 ---Purpose : Returns the list of objects to which a non-empty Check is
169 -- bound in a check-list. Objects are transients, they can then
170 -- be either Imagine objects entities for an Interface Norm.
171 -- <alsoshapes> commands Shapes to be returned too
172 -- (as ShapeMapper), see also CheckedShapes
173
174 CheckedShapes (chl : CheckIterator from Interface)
175 returns HSequenceOfShape from TopTools;
176 ---Purpose : Returns the list of shapes to which a non-empty Check is bound
177 -- in a check-list
178
179 CheckObject (chl : CheckIterator from Interface; obj : Transient)
180 returns CheckIterator from Interface;
181 ---Purpose : Returns the check-list bound to a given object, generally none
182 -- (if OK) or one check. <obj> can be, either a true Transient
183 -- object or entity, or a ShapeMapper, in that case the Shape is
184 -- considered
185
186 -- Complementary helps
187
188end TransferBRep;