0026426: Draft angle algorithm modifies input argument + the result of the operation...
[occt.git] / src / XSAlgo / XSAlgo_AlgoContainer.cxx
CommitLineData
b311480e 1// Created on: 2000-01-19
2// Created by: data exchange team
973c2be1 3// Copyright (c) 2000-2014 OPEN CASCADE SAS
b311480e 4//
973c2be1 5// This file is part of Open CASCADE Technology software library.
b311480e 6//
d5f74e42 7// This library is free software; you can redistribute it and/or modify it under
8// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 9// by the Free Software Foundation, with special exception defined in the file
10// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11// distribution for complete text of the license and disclaimer of any warranty.
b311480e 12//
973c2be1 13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
7fd59977 15
7fd59977 16
7fd59977 17#include <BRep_Builder.hxx>
42cf5bc1 18#include <BRep_Tool.hxx>
7fd59977 19#include <BRepBuilderAPI_MakeEdge.hxx>
42cf5bc1 20#include <Geom2d_Curve.hxx>
21#include <Geom_Curve.hxx>
22#include <Geom_Surface.hxx>
23#include <gp_Pnt.hxx>
24#include <gp_Pnt2d.hxx>
25#include <Interface_Static.hxx>
26#include <Message_ListIteratorOfListOfMsg.hxx>
27#include <Message_ListOfMsg.hxx>
28#include <Message_Msg.hxx>
29#include <Message_ProgressIndicator.hxx>
30#include <Resource_Manager.hxx>
7fd59977 31#include <ShapeAlgo.hxx>
32#include <ShapeAlgo_AlgoContainer.hxx>
33#include <ShapeAlgo_ToolContainer.hxx>
42cf5bc1 34#include <ShapeAnalysis_Edge.hxx>
35#include <ShapeBuild_Edge.hxx>
7fd59977 36#include <ShapeBuild_ReShape.hxx>
42cf5bc1 37#include <ShapeCustom.hxx>
7fd59977 38#include <ShapeExtend_DataMapOfShapeListOfMsg.hxx>
39#include <ShapeExtend_MsgRegistrator.hxx>
7fd59977 40#include <ShapeFix_Edge.hxx>
42cf5bc1 41#include <ShapeFix_Shape.hxx>
42#include <ShapeProcess.hxx>
43#include <ShapeProcess_ShapeContext.hxx>
44#include <Standard_ErrorHandler.hxx>
45#include <Standard_Failure.hxx>
46#include <Standard_Transient.hxx>
47#include <Standard_Type.hxx>
48#include <TopExp.hxx>
49#include <TopoDS.hxx>
50#include <TopoDS_Edge.hxx>
51#include <TopoDS_Face.hxx>
52#include <TopoDS_Iterator.hxx>
53#include <TopoDS_Shape.hxx>
54#include <TopoDS_Vertex.hxx>
55#include <TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx>
56#include <TopTools_DataMapOfShapeShape.hxx>
57#include <Transfer_FinderProcess.hxx>
58#include <Transfer_TransientListBinder.hxx>
59#include <Transfer_TransientProcess.hxx>
7fd59977 60#include <TransferBRep.hxx>
7fd59977 61#include <TransferBRep_ShapeBinder.hxx>
42cf5bc1 62#include <TransferBRep_ShapeMapper.hxx>
63#include <UnitsMethods.hxx>
64#include <XSAlgo_AlgoContainer.hxx>
65#include <XSAlgo_ToolContainer.hxx>
7fd59977 66
67//=======================================================================
68//function : XSAlgo_AlgoContainer
69//purpose :
70//=======================================================================
7fd59977 71XSAlgo_AlgoContainer::XSAlgo_AlgoContainer()
72{
73 myTC = new XSAlgo_ToolContainer;
74}
75
76//=======================================================================
77//function : PrepareForTransfer
78//purpose :
79//=======================================================================
80
81void XSAlgo_AlgoContainer::PrepareForTransfer() const
82{
83 UnitsMethods::SetCasCadeLengthUnit ( Interface_Static::IVal("xstep.cascade.unit") );
84}
85
86//=======================================================================
87//function : ProcessShape
88//purpose :
89//=======================================================================
90
91TopoDS_Shape XSAlgo_AlgoContainer::ProcessShape (const TopoDS_Shape& shape,
92 const Standard_Real Prec,
93 const Standard_Real maxTol,
94 const Standard_CString prscfile,
95 const Standard_CString pseq,
b485ee79
KD
96 Handle(Standard_Transient)& info,
97 const Handle(Message_ProgressIndicator)& progress) const
7fd59977 98{
99 if ( shape.IsNull() ) return shape;
100
b485ee79
KD
101 Handle(ShapeProcess_ShapeContext) context = Handle(ShapeProcess_ShapeContext)::DownCast(info);
102 if ( context.IsNull() )
103 {
104 Standard_CString rscfile = Interface_Static::CVal(prscfile);
105 if (!rscfile)
106 rscfile = prscfile;
107 context = new ShapeProcess_ShapeContext(shape, rscfile);
108 context->SetDetalisation(TopAbs_EDGE);
109 if ( !progress.IsNull() )
110 context->SetProgress(progress);
7fd59977 111 }
112 info = context;
113
114 Standard_CString seq = Interface_Static::CVal ( pseq );
115 if ( ! seq ) seq = pseq;
116
117 // if resource file is not loaded or does not define <seq>.exec.op,
118 // do default fixes
119 Handle(Resource_Manager) rsc = context->ResourceManager();
120 TCollection_AsciiString str ( seq );
121 str += ".exec.op";
122 if ( ! rsc->Find ( str.ToCString() ) ) {
0797d9d3 123#ifdef OCCT_DEBUG
7fd59977 124 {
125 static Standard_Integer time = 0;
126 if ( ! time )
127 cout << "Warning: XSAlgo_AlgoContainer::ProcessShape(): Sequence " << str.ToCString() <<
128 " is not defined in " << prscfile << " resource; do default processing" << endl;
129 time++;
130 }
131#endif
881536e2 132 // if reading, do default ShapeFix
7fd59977 133 if ( ! strncmp ( pseq, "read.", 5 ) ) {
134 try {
135 OCC_CATCH_SIGNALS
136 Handle(ShapeExtend_MsgRegistrator) msg = new ShapeExtend_MsgRegistrator;
137 Handle(ShapeFix_Shape) sfs = ShapeAlgo::AlgoContainer()->ToolContainer()->FixShape();
138 sfs->Init ( shape );
139 sfs->SetMsgRegistrator ( msg );
140 sfs->SetPrecision ( Prec );
141 sfs->SetMaxTolerance ( maxTol );
142 sfs->FixFaceTool()->FixWireTool()->FixSameParameterMode() = Standard_False;
143 sfs->FixSolidTool()->CreateOpenSolidMode() = Standard_False;
b485ee79 144 sfs->Perform(progress);
7fd59977 145
146 TopoDS_Shape S = sfs->Shape();
147 if ( ! S.IsNull() && S != shape ) {
148 context->RecordModification ( sfs->Context(), msg );
149 context->SetResult ( S );
150 }
151 }
152 catch (Standard_Failure) {
0797d9d3 153#ifdef OCCT_DEBUG
7fd59977 154 cout << "Error: XSAlgo_AlgoContainer::ProcessShape(): Exception in ShapeFix::Shape" << endl;
155 Standard_Failure::Caught()->Print(cout); cout << endl;
156#endif
157 }
158 return context->Result();
159 }
881536e2 160 // for writing, define default sequence of DirectFaces
161 else if ( ! strncmp ( pseq, "write.", 6 ) ) {
7fd59977 162 rsc->SetResource ( str.ToCString(), "DirectFaces" );
163 }
164 }
165
166 // Define runtime tolerances and do Shape Processing
167 rsc->SetResource ( "Runtime.Tolerance", Prec );
168 rsc->SetResource ( "Runtime.MaxTolerance", maxTol );
b485ee79
KD
169
170 if ( !ShapeProcess::Perform(context, seq) )
881536e2 171 return shape; // return original shape
b485ee79 172
7fd59977 173 return context->Result();
174}
175
176//=======================================================================
177//function : PerformFixShape
178//purpose :
179//=======================================================================
180
181/*
182TopoDS_Shape XSAlgo_AlgoContainer::PerformFixShape(const TopoDS_Shape& S,
183 const Handle(Transfer_TransientProcess)& TP,
184 const Standard_Real Prec,
185 const Standard_Real MaxTol) const
186{
187 if ( S.IsNull() ) return S;
188
189 TopoDS_Shape shape = S;
190 // fixing shape
191 try {
192 OCC_CATCH_SIGNALS
193 Handle(ShapeFix_Shape) sfs = ShapeAlgo::AlgoContainer()->ToolContainer()->FixShape();
194 sfs->Init ( S );
195 sfs->SetMsgRegistrator ( new ShapeExtend_MsgRegistrator );
196 sfs->SetPrecision ( Prec );
197 sfs->SetMaxTolerance ( MaxTol );
198 sfs->FixFaceTool()->FixWireTool()->FixSameParameterMode() = Standard_False;
199 sfs->Perform();
200
201 shape = sfs->Shape();
202
203 // to be removed when messages come
204 if ( shape == S || shape.IsNull() ) return S;
205
206 // update map to reflect the substitutions
207 Handle(ShapeBuild_ReShape) context = sfs->Context();
208 const ShapeExtend_DataMapOfShapeListOfMsg& msgmap =
209 Handle(ShapeExtend_MsgRegistrator)::DownCast (sfs->MsgRegistrator())->MapShape();
210 for ( Standard_Integer i=1; i <= TP->NbMapped(); i++ ) {
211 Handle(Transfer_Binder) bnd = TP->MapItem ( i );
212 Handle(TransferBRep_ShapeBinder) sb = Handle(TransferBRep_ShapeBinder)::DownCast ( bnd );
213 if ( sb.IsNull() || sb->Result().IsNull() ) continue;
214
215 TopoDS_Shape orig = sb->Result();
216
217 // update messages (messages must be taken from each level in the substitution map)
218 TopoDS_Shape cur, next = orig;
219 do {
220 cur = next;
221 Message_ListOfMsg msglist;
222 if (msgmap.IsBound (cur)) {
223 msglist = msgmap.Find (cur);
224 for (Message_ListIteratorOfListOfMsg iter (msglist); iter.More(); iter.Next()) {
225 const Message_Msg& msg = iter.Value();
226 sb->AddWarning (msg.Value(), msg.Original());
227 }
228 }
229 next = context->Value (cur);
230 } while (cur != next);
231
232 // update shapes
233 TopoDS_Shape res;
234 if ( ! context->Status ( orig, res, Standard_True ) ) continue;
235
236 sb->SetResult ( res );
237 }
238 }
239 catch (Standard_Failure) {
0797d9d3 240#ifdef OCCT_DEBUG
7fd59977 241 cout << "Error: XSAlgo_AlgoContainer::PerformFixShape(): Exception in ShapeFix::Shape" << endl;
242#endif
243 }
244 return shape;
245}
246*/
247
248// ============================================================================
249// Method : MakeEdgeOnCurve
250// Purpose : for CheckPCurve
251// ============================================================================
252
253static TopoDS_Edge MakeEdgeOnCurve(const TopoDS_Edge edge)
254{
255 TopoDS_Edge result;
256 //BRep_Builder B; // B not used - see below (skl)
257 Handle(Geom_Curve) C3d;
258 ShapeAnalysis_Edge sae;
259 Standard_Real cf, cl;
260 if (!sae.Curve3d (edge, C3d, cf, cl, Standard_False ))
261 return result;
262 gp_Pnt PV1 = C3d->Value(cf);
263 gp_Pnt PV2 = C3d->Value(cl);
264 BRepBuilderAPI_MakeEdge mkEdge(C3d, PV1, PV2, cf, cl);
265//:S4136 Standard_Real tol = BRep_Tool::Tolerance (edge);
266 ShapeBuild_Edge SBE; //skl 10.07.2001
267 SBE.SetRange3d(mkEdge,cf,cl); //skl 10.07.2001
268 result = mkEdge.Edge();
269//:S4136 B.UpdateEdge(result,tol);
270 return result;
271}
272
273//=======================================================================
274//function : CheckPCurve
275//purpose :
276//=======================================================================
277
278Standard_Boolean XSAlgo_AlgoContainer::CheckPCurve (const TopoDS_Edge& E,
279 const TopoDS_Face& face,
280 const Standard_Real preci,
281 const Standard_Boolean isSeam) const
282{
283 Standard_Real w1, w2;
284 Handle(Geom2d_Curve) thePC;
285 ShapeAnalysis_Edge sae;
286 if ( ! sae.PCurve (E, face, thePC, w1, w2, Standard_False ) ) {
287 return Standard_False;
288 }
289
290 // Check for pcurve longer than surface
291 Handle(Geom_Surface) surf = BRep_Tool::Surface(face);
292 Standard_Real UF,UL,VF,VL;
293 surf->Bounds (UF,UL,VF,VL);
294 gp_Pnt2d PUV1, PUV2;
295 PUV1 = thePC->Value(w1);
296 PUV2 = thePC->Value(w2);
297 // Multi-periodique ? mieux vaut jeter (attention aux valeurs infinies)
298 Standard_Real DU = Abs (PUV1.X() - PUV2.X());
299 Standard_Real DV = Abs (PUV1.Y() - PUV2.Y());
300 if ( DU/8. > (UL/6. - UF/6.) || DV/8. > (VL/6. - VF/6.) ) {
301 ShapeBuild_Edge().RemovePCurve(E,face);
0797d9d3 302#ifdef OCCT_DEBUG
7fd59977 303 cout<<"Removing pcuve periodic"<<endl;
304#endif
305 return Standard_False;
306 }
307
308 // Second Check : 2D and 3D consistency (if the Pcurve has not been
309 // dropped)
310 // On verifie aussi qu on ne s enroule pas trop ...
311 // ex. : UVV en DEGRES sur une surface en RADIANS, recalee = 57 tours !
312
313 Handle(Geom_Curve) C3d;
314 Standard_Real cf1, cl1;
315 sae.Curve3d (E, C3d, cf1, cl1, Standard_False );
316
317 gp_Pnt P1 = surf->Value(PUV1.X(), PUV1.Y());
318 gp_Pnt P2 = surf->Value(PUV2.X(), PUV2.Y());
319 TopoDS_Vertex V1 = TopExp::FirstVertex(E);
320 TopoDS_Vertex V2 = TopExp::LastVertex(E);
321 gp_Pnt PV1 = ( C3d.IsNull() ? BRep_Tool::Pnt(V1) : C3d->Value(cf1) );
322 gp_Pnt PV2 = ( C3d.IsNull() ? BRep_Tool::Pnt(V2) : C3d->Value(cl1) );
323 Standard_Real Dist11 = PV1.Distance(P1), Dist22 = PV2.Distance(P2);
324
325 if (!((Dist11 <= preci) && (Dist22 <= preci))) {
326 ShapeBuild_Edge().RemovePCurve(E,face);
0797d9d3 327#ifdef OCCT_DEBUG
7fd59977 328 cout<<"Removing pcurve points"<<endl;
329#endif
330 return Standard_False;
331 }
332
333 //
334 // pdn checking deviation between pcurve and 3D curve
335 //
336
337 // Make temporary edge for analysis
338 if ( C3d.IsNull() ) return Standard_False;
339 TopoDS_Edge edge = MakeEdgeOnCurve(E);
340
341 // fill it with pcurve(s)
342 BRep_Builder B;
343 Handle(Geom2d_Curve) seamPC;
344 if ( isSeam ) {
345 Standard_Real f, l;
346 TopoDS_Shape REdge = E.Reversed() ;
347 if ( ! sae.PCurve ( TopoDS::Edge ( REdge ),
348 face, seamPC, f, l, Standard_False ) ||
349 seamPC == thePC )
350 seamPC = Handle(Geom2d_Curve)::DownCast ( thePC->Copy() );
351 B.UpdateEdge ( edge, thePC, seamPC, face, 0.);
352 }
353 else B.UpdateEdge ( edge, thePC, face, 0.);
354 B.Range(edge,face,w1,w2);
355 B.SameRange(edge, Standard_False );
356 //:S4136
357 Standard_Integer SPmode = Interface_Static::IVal("read.stdsameparameter.mode");
358 if ( SPmode )
359 B.SameParameter (edge, Standard_False );
360
361 // call FixSP to see what it will do
362 Handle(ShapeFix_Edge) sfe = new ShapeFix_Edge;
363 sfe->FixSameParameter(edge);
364 Standard_Real tol = BRep_Tool::Tolerance (edge);
365 // Standard_Real tolV1 = BRep_Tool::Tolerance(TopExp::FirstVertex(edge));
366 // Standard_Real tolV2 = BRep_Tool::Tolerance(TopExp::LastVertex(edge));
367 Standard_Boolean sr = BRep_Tool::SameRange ( edge );
368 Standard_Boolean sp = BRep_Tool::SameParameter ( edge );
369
370 // if result is not nice, try to call projection and take the best
371 if ( tol > Min ( 1., 2.*preci ) || ! sr ) {
372 //pdn trying to recompute pcurve
373 TopoDS_Edge edgePr = MakeEdgeOnCurve(E);
374 sfe->FixAddPCurve(edgePr, face, isSeam, preci);
375 sfe->FixSameParameter(edgePr);
376 Standard_Real tolPr = BRep_Tool::Tolerance (edgePr);
377 //pdn choose the best pcurve
378 if ( tolPr < tol || ! sr ) {
379 // tolV1 = BRep_Tool::Tolerance(TopExp::FirstVertex(edgePr));
380 // tolV2 = BRep_Tool::Tolerance(TopExp::LastVertex(edgePr));
381 sr = BRep_Tool::SameRange ( edgePr );
382 sp = BRep_Tool::SameParameter ( edgePr );
383 tol = tolPr;
384 edge = edgePr;
385 }
386 }
387
388 // get corrected pcurve from the temporary edge, and put to original
389 sae.PCurve ( edge, face, thePC, w1, w2, Standard_False );
390 if ( isSeam ) {
391 Standard_Real f, l;
392 TopoDS_Shape REdge = edge.Reversed();
393 sae.PCurve ( TopoDS::Edge ( REdge ), face, seamPC, f, l, Standard_False );
394 if ( E.Orientation() == TopAbs_REVERSED ) //:abv 14.11.01: coneEl.sat loop
395 B.UpdateEdge ( E, seamPC, thePC, face, tol );
396 else
397 B.UpdateEdge ( E, thePC, seamPC, face, tol );
398 }
399 else B.UpdateEdge ( E, thePC, face, tol );
400
401 B.UpdateVertex(V1,tol);
402 B.UpdateVertex(V2,tol);
403 B.Range(E,face, w1, w2);
404 if(BRep_Tool::SameRange(E))
405 B.SameRange( E, sr );
406 if(BRep_Tool::SameParameter(E))
407 B.SameParameter ( E, sp );
408
409 return Standard_True;
410}
411
412//=======================================================================
413//function : MergeTransferInfo
414//purpose :
415//=======================================================================
416
417void XSAlgo_AlgoContainer::MergeTransferInfo(const Handle(Transfer_TransientProcess)& TP,
418 const Handle(Standard_Transient) &info,
419 const Standard_Integer startTPitem) const
420{
421 Handle(ShapeProcess_ShapeContext) context = Handle(ShapeProcess_ShapeContext)::DownCast ( info );
422 if ( context.IsNull() ) return;
423
424 const TopTools_DataMapOfShapeShape &map = context->Map();
425 Handle(ShapeExtend_MsgRegistrator) msg = context->Messages();
426 if ( map.Extent() <=0 && ( msg.IsNull() || msg->MapShape().Extent() <=0 ) )
427 return;
428
429 Standard_Integer i = ( startTPitem >0 ? startTPitem : 1 );
430 for ( ; i <= TP->NbMapped(); i++ ) {
431 Handle(Transfer_Binder) bnd = TP->MapItem ( i );
432 Handle(TransferBRep_ShapeBinder) sb = Handle(TransferBRep_ShapeBinder)::DownCast ( bnd );
433 if ( sb.IsNull() || sb->Result().IsNull() ) continue;
434
435 TopoDS_Shape orig = sb->Result();
436 if ( map.IsBound ( orig ) ) sb->SetResult ( map.Find ( orig ) );
437 else if ( !orig.Location().IsIdentity() )
438 {
439 TopLoc_Location aNullLoc;
440 TopoDS_Shape atmpSh = orig.Located(aNullLoc);
441 if ( map.IsBound ( atmpSh ) ) sb->SetResult ( map.Find ( atmpSh ) );
442 }
443
444 // update messages
445 if ( ! msg.IsNull() ) {
446 const ShapeExtend_DataMapOfShapeListOfMsg& msgmap = msg->MapShape();
447 if ( msgmap.IsBound (orig) ) {
448 const Message_ListOfMsg &msglist = msgmap.Find (orig);
449 for (Message_ListIteratorOfListOfMsg iter (msglist); iter.More(); iter.Next()) {
450 const Message_Msg& mess = iter.Value();
451 sb->AddWarning (TCollection_AsciiString(mess.Value()).ToCString(),
452 TCollection_AsciiString(mess.Original()).ToCString());
453 }
454 }
455 }
456 }
457}
458
459//=======================================================================
460//function : MergeTransferInfo
461//purpose :
462//=======================================================================
463
464void XSAlgo_AlgoContainer::MergeTransferInfo(const Handle(Transfer_FinderProcess)& FP,
465 const Handle(Standard_Transient) &info) const
466{
467 Handle(ShapeProcess_ShapeContext) context = Handle(ShapeProcess_ShapeContext)::DownCast ( info );
468 if ( context.IsNull() ) return;
469
470 const TopTools_DataMapOfShapeShape &map = context->Map();
471 TopTools_DataMapIteratorOfDataMapOfShapeShape ShapeShapeIterator(map);
472 Handle(ShapeExtend_MsgRegistrator) msg = context->Messages();
473
474 for ( ; ShapeShapeIterator.More(); ShapeShapeIterator.Next() ) {
475
476 TopoDS_Shape orig = ShapeShapeIterator.Key(), res = ShapeShapeIterator.Value();
477 Handle(TransferBRep_ShapeMapper) resMapper = TransferBRep::ShapeMapper ( FP, res );
478 Handle(Transfer_Binder) resBinder = FP->Find ( resMapper );
479
480 if (resBinder.IsNull()) {
481 resBinder = new TransferBRep_ShapeBinder(res);
482 //if <orig> shape was splitted, put entities corresponding to new shapes
483 // into Transfer_TransientListBinder.
484 if ( orig.ShapeType() > res.ShapeType() ) {
485 TopoDS_Shape sub;
486 Handle(Transfer_TransientListBinder) TransientListBinder = new Transfer_TransientListBinder;
487 for (TopoDS_Iterator it(res); it.More(); it.Next()) {
488 Handle(Transfer_Finder) subMapper = TransferBRep::ShapeMapper ( FP, it.Value());
489 if (subMapper.IsNull()) continue;
490
491 Handle(Standard_Transient) tr = FP->FindTransient ( subMapper );
492 if (tr.IsNull()) continue;
493 TransientListBinder->AddResult(tr);
494 sub = it.Value();
495 }
496 if ( TransientListBinder->NbTransients() == 1 ) resBinder = new TransferBRep_ShapeBinder(sub);
497 else if ( TransientListBinder->NbTransients() > 1 ) {
498 resBinder->AddResult(TransientListBinder);
499// resBinder->SetNext(TransientListBinder, Standard_True);
0797d9d3 500#ifdef OCCT_DEBUG
7fd59977 501 cout<<"Info: TransientListBinder created for splitted shape"<<endl;
502 }
503 else {
504 cout<<"Warning: XSAlgo_AlgoContainer::MergeTransferInfo() "
505 <<"No results were found for splitted shape. "<<endl;
506 //<<"Transfer_FinderProcess->NbMapped() = "<<FP->NbMapped()<<endl;
507#endif
508 }
509 }
510 }
511
512 Handle(TransferBRep_ShapeMapper) origMapper= TransferBRep::ShapeMapper ( FP, orig);
513 Handle(Transfer_Binder) origBinder = FP->Find ( origMapper );
514 if ( origBinder.IsNull() ) {
515 FP->Bind(origMapper, resBinder);
516 }
517 else {
518 origBinder->AddResult ( resBinder );
519 }
520
521 // update messages
522 if ( ! msg.IsNull() ) {
523 const ShapeExtend_DataMapOfShapeListOfMsg& msgmap = msg->MapShape();
524 if ( msgmap.IsBound (orig) ) {
525 const Message_ListOfMsg &msglist = msgmap.Find (orig);
526 for (Message_ListIteratorOfListOfMsg iter (msglist); iter.More(); iter.Next()) {
527 const Message_Msg& mess = iter.Value();
528 resBinder->AddWarning (TCollection_AsciiString(mess.Value()).ToCString(),
529 TCollection_AsciiString(mess.Original()).ToCString());
530 }
531 }
532 }
533 }
534}