1 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/drv/BRepBlend/BRepBlend_Walking_0.cxx OCCT-6.8.0_SRC-patch/drv/BRepBlend/BRepBlend_Walking_0.cxx
2 --- OCCT-6.8.0_SRC/drv/BRepBlend/BRepBlend_Walking_0.cxx 2014-11-11 17:53:30.000000000 +0300
3 +++ OCCT-6.8.0_SRC-patch/drv/BRepBlend/BRepBlend_Walking_0.cxx 2015-01-16 14:33:41.000000000 +0300
5 #include <Blend_Point.hxx>
6 #include <Blend_Function.hxx>
7 #include <Blend_FuncInv.hxx>
8 +#include <ChFiDS_HElSpine.hxx>
9 #include <gp_Pnt2d.hxx>
10 #include <IntSurf_Transition.hxx>
12 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/inc/AIS_InteractiveContext.hxx OCCT-6.8.0_SRC-patch/inc/AIS_InteractiveContext.hxx
13 --- OCCT-6.8.0_SRC/inc/AIS_InteractiveContext.hxx 2014-11-11 17:54:39.000000000 +0300
14 +++ OCCT-6.8.0_SRC-patch/inc/AIS_InteractiveContext.hxx 2015-01-16 14:34:51.000000000 +0300
16 //! Local Context opened.
17 Standard_EXPORT Standard_Boolean KeepTemporary (const Handle(AIS_InteractiveObject)& anIObj, const Standard_Integer InWhichLocal = -1) ;
19 - //! Removes the interactive object aniobj from all viewers.
20 - //! If a local context is open and if updateviewer equals
21 - //! Standard_False, the presentation of the Interactive
22 - //! Object activates the selection mode; the object is
23 - //! displayed but no viewer will be updated.
24 - Standard_EXPORT void Clear (const Handle(AIS_InteractiveObject)& aniobj, const Standard_Boolean updateviewer = Standard_True) ;
26 //! Empties the graphic presentation of the mode
28 //! If a local context is open and if updateviewer equals
29 @@ -1633,6 +1626,12 @@
30 Standard_EXPORT void InitAttributes() ;
32 Standard_EXPORT Standard_Integer PurgeViewer (const Handle(V3d_Viewer)& Vwr) ;
35 + Standard_EXPORT void redisplayPrsModes (const Handle(AIS_InteractiveObject)& theIObj, const Standard_Boolean theToUpdateViewer = Standard_True) ;
38 + Standard_EXPORT void redisplayPrsRecModes (const Handle(AIS_InteractiveObject)& theIObj, const Standard_Boolean theToUpdateViewer = Standard_True) ;
40 AIS_DataMapOfIOStatus myObjects;
41 Handle(SelectMgr_SelectionManager) mgrSelector;
42 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/inc/Blend_Walking_1.gxx OCCT-6.8.0_SRC-patch/inc/Blend_Walking_1.gxx
43 --- OCCT-6.8.0_SRC/inc/Blend_Walking_1.gxx 2014-11-11 17:46:43.000000000 +0300
44 +++ OCCT-6.8.0_SRC-patch/inc/Blend_Walking_1.gxx 2015-01-16 12:59:38.000000000 +0300
47 void Blend_Walking::Perform(Blend_Function& Func,
48 Blend_FuncInv& FuncInv,
49 + const Handle(ChFiDS_HElSpine)& HGuide,
50 const Standard_Real Pdep,
51 const Standard_Real Pmax,
52 const Standard_Real MaxStep,
57 - InternalPerform(Func,FuncInv,Pmax);
58 + InternalPerform(Func,FuncInv,HGuide,Pmax);
63 previousP.ParametersOnS1(sol(1),sol(2));
64 previousP.ParametersOnS2(sol(3),sol(4));
66 - InternalPerform(Func,FuncInv,P);
67 + Handle(ChFiDS_HElSpine) anHGuide;
68 + InternalPerform(Func,FuncInv,anHGuide,P);
73 if(OnS1) clasonS1 = Standard_False;
74 else clasonS2 = Standard_False;
76 - InternalPerform(Func,FuncInv,P);
77 + Handle(ChFiDS_HElSpine) anHGuide;
78 + InternalPerform(Func,FuncInv,anHGuide,P);
80 clasonS1 = Standard_True;
81 clasonS2 = Standard_True;
83 previousP.ParametersOnS1(sol(1),sol(2));
84 previousP.ParametersOnS2(sol(3),sol(4));
86 - InternalPerform(Func,FuncInv,Pmin);
87 + Handle(ChFiDS_HElSpine) anHGuide;
88 + InternalPerform(Func,FuncInv,anHGuide,Pmin);
90 iscomplete = Standard_True;
92 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/inc/Blend_Walking_4.gxx OCCT-6.8.0_SRC-patch/inc/Blend_Walking_4.gxx
93 --- OCCT-6.8.0_SRC/inc/Blend_Walking_4.gxx 2014-11-11 17:46:43.000000000 +0300
94 +++ OCCT-6.8.0_SRC-patch/inc/Blend_Walking_4.gxx 2015-01-16 12:59:38.000000000 +0300
96 // Alternatively, this file may be used under the terms of Open CASCADE
97 // commercial license or contractual agreement.
99 +#include <gce_MakePln.hxx>
101 static void evalpinit(math_Vector& parinit,
102 const Blend_Point& previousP,
103 const Standard_Real parprec,
106 void Blend_Walking::InternalPerform(Blend_Function& Func,
107 Blend_FuncInv& FuncInv,
108 + const Handle(ChFiDS_HElSpine)& HGuide,
109 const Standard_Real Bound)
112 @@ -251,12 +254,64 @@
113 // avec les surfaces periodiques.
114 State = Blend_OnRst12;
117 p2d = TheArcTool::Value(recdomain1->Value(),solrst1(1));
120 + Pnt1 = TheSurfaceTool::Value(surf1,sol(1),sol(2));
121 p2d = TheArcTool::Value(recdomain2->Value(),solrst2(1));
124 + Pnt2 = TheSurfaceTool::Value(surf2,sol(3),sol(4));
125 + if (!HGuide.IsNull())
127 + const Standard_Real TolProd = 1.e-5;
128 + Standard_Real SavedParams [2];
129 + Standard_Boolean SameDirs [2] = {Standard_False, Standard_False};
130 + ChFiDS_ElSpine& theElSpine = HGuide->ChangeCurve();
131 + SavedParams[0] = theElSpine.GetSavedFirstParameter();
132 + SavedParams[1] = theElSpine.GetSavedLastParameter();
133 + for (Standard_Integer ind = 0; ind < 2; ind++)
135 + if (!Precision::IsInfinite(SavedParams[ind]))
137 + //Check the original first and last parameters of guide curve
138 + //for equality to found parameter <param>:
139 + //check equality of tangent to guide curve and
140 + //normal to plane built on 3 points:
141 + //point on guide curve and points on restrictions of adjacent
145 + HGuide->D1(SavedParams[ind], Pnt0, Dir0);
146 + Standard_Real Length = Dir0.Magnitude();
147 + if (Length <= gp::Resolution())
150 + gce_MakePln PlaneBuilder(Pnt0, Pnt1, Pnt2);
151 + if (!PlaneBuilder.IsDone())
153 + gp_Pln thePlane = PlaneBuilder.Value();
154 + gp_Dir DirPlane = thePlane.Axis().Direction();
155 + gp_Vec theProd = Dir0 ^ DirPlane;
156 + Standard_Real ProdMod = theProd.Magnitude();
157 + if (ProdMod <= TolProd)
158 + SameDirs[ind] = Standard_True;
161 + Standard_Real theParam = Precision::Infinite();
162 + //Choose the closest parameter
163 + if (SameDirs[0] && SameDirs[1])
164 + theParam = (Abs(param - SavedParams[0]) < Abs(param - SavedParams[1]))?
165 + SavedParams[0] : SavedParams[1];
166 + else if (SameDirs[0])
167 + theParam = SavedParams[0];
168 + else if (SameDirs[1])
169 + theParam = SavedParams[1];
171 + if (!Precision::IsInfinite(theParam))
177 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/inc/BRepBlend_Walking.hxx OCCT-6.8.0_SRC-patch/inc/BRepBlend_Walking.hxx
178 --- OCCT-6.8.0_SRC/inc/BRepBlend_Walking.hxx 2014-11-11 17:53:30.000000000 +0300
179 +++ OCCT-6.8.0_SRC-patch/inc/BRepBlend_Walking.hxx 2015-01-16 14:33:41.000000000 +0300
181 #include <Handle_Adaptor2d_HCurve2d.hxx>
182 #include <Handle_Adaptor3d_HCurve.hxx>
183 #include <Standard_Integer.hxx>
184 +#include <Handle_ChFiDS_HElSpine.hxx>
185 #include <TopAbs_State.hxx>
186 #include <Blend_Status.hxx>
187 class BRepBlend_Line;
190 class Blend_Function;
192 +class ChFiDS_HElSpine;
194 class IntSurf_Transition;
198 Standard_EXPORT void AddSingularPoint (const Blend_Point& P) ;
200 - Standard_EXPORT void Perform (Blend_Function& F, Blend_FuncInv& FInv, const Standard_Real Pdep, const Standard_Real Pmax, const Standard_Real MaxStep, const Standard_Real TolGuide, const math_Vector& Soldep, const Standard_Real Tolesp, const Standard_Real Fleche, const Standard_Boolean Appro = Standard_False) ;
201 + Standard_EXPORT void Perform (Blend_Function& F, Blend_FuncInv& FInv, const Handle(ChFiDS_HElSpine)& HGuide, const Standard_Real Pdep, const Standard_Real Pmax, const Standard_Real MaxStep, const Standard_Real TolGuide, const math_Vector& Soldep, const Standard_Real Tolesp, const Standard_Real Fleche, const Standard_Boolean Appro = Standard_False) ;
203 Standard_EXPORT Standard_Boolean PerformFirstSection (Blend_Function& F, const Standard_Real Pdep, math_Vector& ParDep, const Standard_Real Tolesp, const Standard_Real TolGuide, TopAbs_State& Pos1, TopAbs_State& Pos2) ;
209 - Standard_EXPORT void InternalPerform (Blend_Function& F, Blend_FuncInv& FInv, const Standard_Real Bound) ;
210 + Standard_EXPORT void InternalPerform (Blend_Function& F, Blend_FuncInv& FInv, const Handle(ChFiDS_HElSpine)& HGuide, const Standard_Real Bound) ;
212 Standard_EXPORT Standard_Integer ArcToRecadre (const Standard_Boolean OnFirst, const math_Vector& Sol, const Standard_Integer PrevIndex, gp_Pnt2d& lpt2d, gp_Pnt2d& pt2d, Standard_Real& ponarc) ;
214 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/inc/ChFiDS_ElSpine.hxx OCCT-6.8.0_SRC-patch/inc/ChFiDS_ElSpine.hxx
215 --- OCCT-6.8.0_SRC/inc/ChFiDS_ElSpine.hxx 2014-11-11 17:53:46.000000000 +0300
216 +++ OCCT-6.8.0_SRC-patch/inc/ChFiDS_ElSpine.hxx 2015-01-16 14:33:58.000000000 +0300
219 Standard_EXPORT virtual Standard_Real LastParameter() const;
221 + Standard_EXPORT Standard_Real GetSavedFirstParameter() const;
223 + Standard_EXPORT Standard_Real GetSavedLastParameter() const;
225 Standard_EXPORT GeomAbs_Shape Continuity() const;
227 Standard_EXPORT Standard_Integer NbIntervals (const GeomAbs_Shape S) ;
230 Standard_EXPORT void LastParameter (const Standard_Real P) ;
232 + Standard_EXPORT void SaveFirstParameter() ;
234 + Standard_EXPORT void SaveLastParameter() ;
236 Standard_EXPORT void SetOrigin (const Standard_Real O) ;
238 Standard_EXPORT void FirstPointAndTgt (gp_Pnt& P, gp_Vec& T) const;
241 Standard_Real period;
242 Standard_Boolean periodic;
243 + Standard_Real pfirstsav;
244 + Standard_Real plastsav;
248 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/inc/Graphic3d_GraphicDriver.hxx OCCT-6.8.0_SRC-patch/inc/Graphic3d_GraphicDriver.hxx
249 --- OCCT-6.8.0_SRC/inc/Graphic3d_GraphicDriver.hxx 2014-11-11 17:54:46.000000000 +0300
250 +++ OCCT-6.8.0_SRC-patch/inc/Graphic3d_GraphicDriver.hxx 2015-01-16 14:34:57.000000000 +0300
252 //! call_togl_setvisualisation
253 Standard_EXPORT virtual void SetVisualisation (const Graphic3d_CView& ACView) = 0;
255 - //! call_togl_transparency
256 - Standard_EXPORT virtual void Transparency (const Graphic3d_CView& ACView, const Standard_Boolean AFlag) = 0;
259 Standard_EXPORT virtual Standard_Boolean View (Graphic3d_CView& ACView) = 0;
261 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/inc/IntPatch_ImpImpIntersection_4.gxx OCCT-6.8.0_SRC-patch/inc/IntPatch_ImpImpIntersection_4.gxx
262 --- OCCT-6.8.0_SRC/inc/IntPatch_ImpImpIntersection_4.gxx 2014-11-11 17:46:54.000000000 +0300
263 +++ OCCT-6.8.0_SRC-patch/inc/IntPatch_ImpImpIntersection_4.gxx 2015-01-16 13:01:24.000000000 +0300
264 @@ -1151,6 +1151,7 @@
265 const Standard_Real theUlSurf1,
266 const Standard_Real thePeriodOfSurf1,
267 const Handle(IntSurf_LineOn2S)& theLine,
268 + const Standard_Real theTol3D,
269 const Standard_Real theTol2D,
270 const Standard_Boolean theFlForce)
272 @@ -1177,6 +1178,32 @@
273 thePntOnSurf2.X(), thePntOnSurf2.Y());
276 + const Standard_Integer aNbPnts = theLine->NbPoints();
279 + Standard_Real aUl = 0.0, aVl = 0.0;
280 + const IntSurf_PntOn2S aPlast = theLine->Value(aNbPnts);
282 + aPlast.ParametersOnS2(aUl, aVl);
284 + aPlast.ParametersOnS1(aUl, aVl);
287 + {//Parameter value will be always increased.
288 + return Standard_False;
291 + //theTol2D is minimal step along parameter changed.
292 + //Therefore, if we apply this minimal step two
293 + //neighbour points will be always "same". Consequently,
294 + //we should reduce tolerance for IsSame checking.
295 + const Standard_Real aDTol = 1.0-Epsilon(1.0);
296 + if(aPnt.IsSame(aPlast, theTol3D*aDTol, theTol2D*aDTol))
298 + theLine->RemovePoint(aNbPnts);
303 return Standard_True;
305 @@ -1191,6 +1218,7 @@
306 const stCoeffsValue& theCoeffs,
307 const Bnd_Box2d& theUVSurf1,
308 const Bnd_Box2d& theUVSurf2,
309 + const Standard_Real theTol3D,
310 const Standard_Real theTol2D,
311 const Standard_Real thePeriod,
312 const Standard_Real theNulValue,
313 @@ -1281,7 +1309,7 @@
314 AddPointIntoWL(theQuad1, theQuad2, isTheReverse,
315 gp_Pnt2d(anUpar1, aV1), gp_Pnt2d(aU2, aV2),
316 aUSurf1f, aUSurf1l, thePeriod,
317 - theWL->Curve(), theTol2D, theFlForce);
318 + theWL->Curve(), theTol3D, theTol2D, theFlForce);
322 @@ -1313,7 +1341,7 @@
323 AddPointIntoWL(theQuad1, theQuad2, isTheReverse,
324 gp_Pnt2d(anUpar2, aV1), gp_Pnt2d(aU2, aV2),
325 aUSurf1f, aUSurf1l, thePeriod,
326 - theWL->Curve(), theTol2D, theFlForce);
327 + theWL->Curve(),theTol3D, theTol2D, theFlForce);
331 @@ -1346,7 +1374,7 @@
332 AddPointIntoWL(theQuad1, theQuad2, isTheReverse,
333 gp_Pnt2d(anUpar2, aV1), gp_Pnt2d(aU2, aV2),
334 aUSurf1f, aUSurf1l, thePeriod,
335 - theWL->Curve(), theTol2D, theFlForce);
336 + theWL->Curve(), theTol3D, theTol2D, theFlForce);
340 @@ -1376,7 +1404,7 @@
341 AddPointIntoWL(theQuad1, theQuad2, isTheReverse,
342 gp_Pnt2d(anUpar1, aV1), gp_Pnt2d(aU2, aV2),
343 aUSurf1f, aUSurf1l, thePeriod,
344 - theWL->Curve(), theTol2D, theFlForce);
345 + theWL->Curve(), theTol3D, theTol2D, theFlForce);
349 @@ -1545,7 +1573,8 @@
351 Standard_Real &a = theU1crit[i],
353 - if(Abs(a - b) < theTol2D)
354 + const Standard_Real aRemain = fmod(Abs(a - b), thePeriod); // >= 0, because Abs(a - b) >= 0
355 + if((Abs(a - b) < theTol2D) || (aRemain < theTol2D) || (Abs(aRemain - thePeriod) < theTol2D))
358 b = Precision::Infinite();
359 @@ -1817,6 +1846,7 @@
360 Standard_Boolean isAddedIntoWL1 = Standard_False, isAddedIntoWL2 = Standard_False;
362 Standard_Real anUf = aU1f[aCurInterval], anUl = aU1l[aCurInterval];
363 + const Standard_Boolean isDeltaPeriod = IsEqual(anUl-anUf, aPeriod);
365 //Inscribe and sort critical points
366 InscribeAndSortArray(anU1crit, aNbCritPointsMax, anUf, anUl, theTol2D, aPeriod);
367 @@ -1830,6 +1860,8 @@
368 Handle(IntPatch_WLine) aWLine2 = new IntPatch_WLine(aL2S2, Standard_False);
370 Standard_Integer aWL1FindStatus = 0, aWL2FindStatus = 0;
371 + Standard_Boolean isAddingWL1Enabled = Standard_True,
372 + isAddingWL2Enabled = Standard_True;
374 Standard_Real anU1 = anUf;
376 @@ -1845,6 +1877,23 @@
382 + if(IsEqual(anU1, anUl))
384 + //if isAddedIntoWL* == TRUE WLine contains only one point
385 + //(which was end point of previous WLine). If we will
386 + //add point found on the current step WLine will contain only
387 + //two points. At that both these points will be equal to the
388 + //points found earlier. Therefore, new WLine will repeat
389 + //already existing WLine. Consequently, it is necessary
390 + //to forbid building new line in this case.
392 + isAddingWL1Enabled = !isAddedIntoWL1;
393 + isAddingWL2Enabled = !isAddedIntoWL2;
397 for(Standard_Integer i = 0; i < aNbCritPointsMax; i++)
399 if((anU1 - anU1crit[i])*aCriticalDelta[i] < 0.0)
400 @@ -1995,123 +2044,129 @@
401 isFirst = Standard_False;
404 - if( ((aUSurf2f-aU21) <= theTol2D) &&
405 - ((aU21-aUSurf2l) <= theTol2D) &&
406 - ((aVSurf1f - aV11) <= theTol2D) &&
407 - ((aV11 - aVSurf1l) <= theTol2D) &&
408 - ((aVSurf2f - aV21) <= theTol2D) && ((aV21 - aVSurf2l) <= theTol2D))
409 + if(isAddingWL1Enabled)
411 - Standard_Boolean isForce = Standard_False;
412 - if(!aWL1FindStatus)
413 + if( ((aUSurf2f-aU21) <= theTol2D) &&
414 + ((aU21-aUSurf2l) <= theTol2D) &&
415 + ((aVSurf1f - aV11) <= theTol2D) &&
416 + ((aV11 - aVSurf1l) <= theTol2D) &&
417 + ((aVSurf2f - aV21) <= theTol2D) && ((aV21 - aVSurf2l) <= theTol2D))
419 - Standard_Boolean isFound1 = Standard_False, isFound2 = Standard_False;
421 - if(((aUSurf2l - aUSurf2f) >= aPeriod) && (Abs(anU1-aUSurf1l) < theTol2D))
422 + Standard_Boolean isForce = Standard_False;
423 + if(!aWL1FindStatus)
425 - isForce = Standard_True;
427 + Standard_Boolean isFound1 = Standard_False, isFound2 = Standard_False;
429 - AddBoundaryPoint(theQuad1, theQuad2, aWLine1, anEquationCoeffs,
430 - theUVSurf1, theUVSurf2, theTol2D, aPeriod,
431 - aNulValue, anU1, aU21, aV11, aV11Prev,
432 - aV21, aV21Prev, isTheReverse,
433 - 1.0, isForce, isFound1, isFound2);
434 + if(((aUSurf2l - aUSurf2f) >= aPeriod) && (Abs(anU1-aUSurf1l) < theTol2D))
436 + isForce = Standard_True;
439 + AddBoundaryPoint(theQuad1, theQuad2, aWLine1, anEquationCoeffs,
440 + theUVSurf1, theUVSurf2, theTol3D, theTol2D, aPeriod,
441 + aNulValue, anU1, aU21, aV11, aV11Prev,
442 + aV21, aV21Prev, isTheReverse,
443 + 1.0, isForce, isFound1, isFound2);
445 - if(isFound1 || isFound2)
447 - aWL1FindStatus = 1;
448 + if(isFound1 || isFound2)
450 + aWL1FindStatus = 1;
455 - if((aWL1FindStatus != 2) || (aWLine1->NbPnts() >= 1))
457 - if(AddPointIntoWL(theQuad1, theQuad2, isTheReverse,
458 - gp_Pnt2d(anU1, aV11), gp_Pnt2d(aU21, aV21),
459 - aUSurf1f, aUSurf1l, aPeriod,
460 - aWLine1->Curve(), theTol2D, isForce))
461 + if((aWL1FindStatus != 2) || (aWLine1->NbPnts() >= 1))
463 - if(!aWL1FindStatus)
464 + if(AddPointIntoWL(theQuad1, theQuad2, isTheReverse,
465 + gp_Pnt2d(anU1, aV11), gp_Pnt2d(aU21, aV21),
466 + aUSurf1f, aUSurf1l, aPeriod,
467 + aWLine1->Curve(), theTol3D, theTol2D, isForce))
469 - aWL1FindStatus = 1;
470 + if(!aWL1FindStatus)
472 + aWL1FindStatus = 1;
480 - if(aWL1FindStatus == 1)
483 - Standard_Boolean isFound1 = Standard_False, isFound2 = Standard_False;
484 + if(aWL1FindStatus == 1)
486 + Standard_Boolean isFound1 = Standard_False, isFound2 = Standard_False;
488 - AddBoundaryPoint(theQuad1, theQuad2, aWLine1, anEquationCoeffs,
489 - theUVSurf1, theUVSurf2, theTol2D, aPeriod,
490 - aNulValue, anU1, aU21, aV11, aV11Prev,
491 - aV21, aV21Prev, isTheReverse,
492 - 1.0, Standard_False, isFound1, isFound2);
493 + AddBoundaryPoint(theQuad1, theQuad2, aWLine1, anEquationCoeffs,
494 + theUVSurf1, theUVSurf2, theTol3D, theTol2D, aPeriod,
495 + aNulValue, anU1, aU21, aV11, aV11Prev,
496 + aV21, aV21Prev, isTheReverse,
497 + 1.0, Standard_False, isFound1, isFound2);
499 - if(isFound1 || isFound2)
500 - aWL1FindStatus = 2; //start a new line
501 + if(isFound1 || isFound2)
502 + aWL1FindStatus = 2; //start a new line
507 - if( ((aUSurf2f-aU22) <= theTol2D) &&
508 - ((aU22-aUSurf2l) <= theTol2D) &&
509 - ((aVSurf1f - aV12) <= theTol2D) &&
510 - ((aV12 - aVSurf1l) <= theTol2D) &&
511 - ((aVSurf2f - aV22) <= theTol2D) &&
512 - ((aV22 - aVSurf2l) <= theTol2D))
514 + if(isAddingWL2Enabled)
516 - Standard_Boolean isForce = Standard_False;
518 - if(!aWL2FindStatus)
519 + if( ((aUSurf2f-aU22) <= theTol2D) &&
520 + ((aU22-aUSurf2l) <= theTol2D) &&
521 + ((aVSurf1f - aV12) <= theTol2D) &&
522 + ((aV12 - aVSurf1l) <= theTol2D) &&
523 + ((aVSurf2f - aV22) <= theTol2D) &&
524 + ((aV22 - aVSurf2l) <= theTol2D))
526 - Standard_Boolean isFound1 = Standard_False, isFound2 = Standard_False;
527 + Standard_Boolean isForce = Standard_False;
529 - if(((aUSurf2l - aUSurf2f) >= aPeriod) && (Abs(anU1-aUSurf1l) < theTol2D))
530 + if(!aWL2FindStatus)
532 - isForce = Standard_True;
534 + Standard_Boolean isFound1 = Standard_False, isFound2 = Standard_False;
536 - AddBoundaryPoint(theQuad1, theQuad2, aWLine2, anEquationCoeffs,
537 - theUVSurf1, theUVSurf2, theTol2D, aPeriod,
538 - aNulValue, anU1, aU22, aV12, aV12Prev,
539 - aV22, aV22Prev, isTheReverse,
540 - -1.0, isForce, isFound1, isFound2);
541 + if(((aUSurf2l - aUSurf2f) >= aPeriod) && (Abs(anU1-aUSurf1l) < theTol2D))
543 + isForce = Standard_True;
546 + AddBoundaryPoint(theQuad1, theQuad2, aWLine2, anEquationCoeffs,
547 + theUVSurf1, theUVSurf2, theTol3D, theTol2D, aPeriod,
548 + aNulValue, anU1, aU22, aV12, aV12Prev,
549 + aV22, aV22Prev, isTheReverse,
550 + -1.0, isForce, isFound1, isFound2);
552 - if(isFound1 || isFound2)
554 - aWL2FindStatus = 1;
555 + if(isFound1 || isFound2)
557 + aWL2FindStatus = 1;
562 - if((aWL2FindStatus != 2) || (aWLine2->NbPnts() >= 1))
564 - if(AddPointIntoWL(theQuad1, theQuad2, isTheReverse,
565 - gp_Pnt2d(anU1, aV12), gp_Pnt2d(aU22, aV22),
566 - aUSurf1f, aUSurf1l, aPeriod,
567 - aWLine2->Curve(), theTol2D, isForce))
568 + if((aWL2FindStatus != 2) || (aWLine2->NbPnts() >= 1))
570 - if(!aWL2FindStatus)
571 + if(AddPointIntoWL(theQuad1, theQuad2, isTheReverse,
572 + gp_Pnt2d(anU1, aV12), gp_Pnt2d(aU22, aV22),
573 + aUSurf1f, aUSurf1l, aPeriod,
574 + aWLine2->Curve(), theTol3D, theTol2D, isForce))
576 - aWL2FindStatus = 1;
577 + if(!aWL2FindStatus)
579 + aWL2FindStatus = 1;
587 - if(aWL2FindStatus == 1)
590 - Standard_Boolean isFound1 = Standard_False, isFound2 = Standard_False;
591 + if(aWL2FindStatus == 1)
593 + Standard_Boolean isFound1 = Standard_False, isFound2 = Standard_False;
595 - AddBoundaryPoint(theQuad1, theQuad2, aWLine2, anEquationCoeffs,
596 - theUVSurf1, theUVSurf2, theTol2D, aPeriod,
597 - aNulValue, anU1, aU22, aV12, aV12Prev,
598 - aV22, aV22Prev, isTheReverse,
599 - -1.0, Standard_False, isFound1, isFound2);
600 + AddBoundaryPoint(theQuad1, theQuad2, aWLine2, anEquationCoeffs,
601 + theUVSurf1, theUVSurf2, theTol3D, theTol2D, aPeriod,
602 + aNulValue, anU1, aU22, aV12, aV12Prev,
603 + aV22, aV22Prev, isTheReverse,
604 + -1.0, Standard_False, isFound1, isFound2);
606 - if(isFound1 || isFound2)
607 - aWL2FindStatus = 2; //start a new line
608 + if(isFound1 || isFound2)
609 + aWL2FindStatus = 2; //start a new line
614 @@ -2237,15 +2292,29 @@
616 else if(aWLine1->NbPnts() > 1)
618 - isTheEmpty = Standard_False;
619 - isAddedIntoWL1 = Standard_True;
620 + Standard_Boolean isGood = Standard_True;
622 + if(aWLine1->NbPnts() == 2)
624 + const IntSurf_PntOn2S& aPf = aWLine1->Point(1);
625 + const IntSurf_PntOn2S& aPl = aWLine1->Point(2);
627 - SeekAdditionalPoints(theQuad1, theQuad2, aWLine1->Curve(),
628 - anEquationCoeffs, aNbPoints, aUSurf2f, aUSurf2l,
629 - theTol2D, aPeriod, 1.0, isTheReverse);
630 + if(aPf.IsSame(aPl, Precision::Confusion()))
631 + isGood = Standard_False;
634 - aWLine1->ComputeVertexParameters(theTol3D);
635 - theSlin.Append(aWLine1);
638 + isTheEmpty = Standard_False;
639 + isAddedIntoWL1 = Standard_True;
641 + SeekAdditionalPoints( theQuad1, theQuad2, aWLine1->Curve(),
642 + anEquationCoeffs, aNbPoints, aUSurf2f, aUSurf2l,
643 + theTol2D, aPeriod, 1.0, isTheReverse);
645 + aWLine1->ComputeVertexParameters(theTol3D);
646 + theSlin.Append(aWLine1);
651 @@ -2267,15 +2336,28 @@
653 else if(aWLine2->NbPnts() > 1)
655 - isTheEmpty = Standard_False;
656 - isAddedIntoWL2 = Standard_True;
657 + Standard_Boolean isGood = Standard_True;
658 + if(aWLine2->NbPnts() == 2)
660 + const IntSurf_PntOn2S& aPf = aWLine2->Point(1);
661 + const IntSurf_PntOn2S& aPl = aWLine2->Point(2);
663 + if(aPf.IsSame(aPl, Precision::Confusion()))
664 + isGood = Standard_False;
667 - SeekAdditionalPoints(theQuad1, theQuad2, aWLine2->Curve(),
668 - anEquationCoeffs, aNbPoints, aUSurf2f, aUSurf2l,
669 - theTol2D, aPeriod, -1.0, isTheReverse);
672 + isTheEmpty = Standard_False;
673 + isAddedIntoWL2 = Standard_True;
675 - aWLine2->ComputeVertexParameters(theTol3D);
676 - theSlin.Append(aWLine2);
677 + SeekAdditionalPoints(theQuad1, theQuad2, aWLine2->Curve(),
678 + anEquationCoeffs, aNbPoints, aUSurf2f, aUSurf2l,
679 + theTol2D, aPeriod, -1.0, isTheReverse);
681 + aWLine2->ComputeVertexParameters(theTol3D);
682 + theSlin.Append(aWLine2);
687 @@ -2284,6 +2366,203 @@
691 + if(theSlin.Length() > 0)
693 + for(Standard_Integer aNumOfLine = 2; aNumOfLine <= theSlin.Length(); aNumOfLine++)
695 + const Handle(IntPatch_WLine)& aWLine = Handle(IntPatch_WLine)::DownCast(theSlin.Value(aNumOfLine));
697 + const IntSurf_PntOn2S& aPntFWL = aWLine->Point(1);
699 + Standard_Real aU1 = 0.0, aU2 = 0.0, aV1 = 0.0, aV2 = 0.0;
700 + aPntFWL.Parameters(aU1, aV1, aU2, aV2);
702 + if( IsEqual(aU1, 0.0) || IsEqual(aU1, aPeriod))
704 + theSlin.Exchange(1, aNumOfLine);
709 + for(Standard_Integer aNumOfLine1 = 1; aNumOfLine1 <= theSlin.Length(); aNumOfLine1++)
711 + const Handle(IntPatch_WLine)& aWLine1 = Handle(IntPatch_WLine)::DownCast(theSlin.Value(aNumOfLine1));
713 + const Standard_Integer aNbPntsWL1 = aWLine1->NbPnts();
714 + const IntSurf_PntOn2S& aPntFWL1 = aWLine1->Point(1);
715 + const IntSurf_PntOn2S& aPntLWL1 = aWLine1->Point(aNbPntsWL1);
717 + for(Standard_Integer aNPt = 1; aNPt <= theSPnt.Length(); aNPt++)
719 + const IntSurf_PntOn2S aPntCur = theSPnt.Value(aNPt).PntOn2S();
721 + if( aPntCur.IsSame(aPntFWL1, Precision::Confusion()) ||
722 + aPntCur.IsSame(aPntLWL1, Precision::Confusion()))
724 + theSPnt.Remove(aNPt);
729 + Standard_Boolean hasBeenRemoved = Standard_False;
730 + for(Standard_Integer aNumOfLine2 = aNumOfLine1 + 1; aNumOfLine2 <= theSlin.Length(); aNumOfLine2++)
732 + const Handle(IntPatch_WLine)& aWLine2 = Handle(IntPatch_WLine)::DownCast(theSlin.Value(aNumOfLine2));
734 + const Standard_Integer aNbPntsWL1 = aWLine1->NbPnts();
735 + const Standard_Integer aNbPntsWL2 = aWLine2->NbPnts();
737 + const IntSurf_PntOn2S& aPntFWL1 = aWLine1->Point(1);
738 + const IntSurf_PntOn2S& aPntLWL1 = aWLine1->Point(aNbPntsWL1);
740 + const IntSurf_PntOn2S& aPntFWL2 = aWLine2->Point(1);
741 + const IntSurf_PntOn2S& aPntLWL2 = aWLine2->Point(aNbPntsWL2);
743 + if(aPntFWL1.IsSame(aPntFWL2, Precision::Confusion()))
745 + Standard_Real aU11 = 0.0, aU12 = 0.0, aV11 = 0.0, aV12 = 0.0;
746 + Standard_Real aU21 = 0.0, aU22 = 0.0, aV21 = 0.0, aV22 = 0.0;
748 + aPntFWL1.Parameters(aU11, aV11, aU12, aV12);
749 + aPntFWL2.Parameters(aU21, aV21, aU22, aV22);
751 + if( !(IsEqual(fmod(aU11, aPeriod), 0.0) ||
752 + IsEqual(fmod(aU12, aPeriod), 0.0) ||
753 + IsEqual(fmod(aU21, aPeriod), 0.0) ||
754 + IsEqual(fmod(aU22, aPeriod), 0.0) ||
755 + IsEqual(aU11, aUSurf1f) || IsEqual(aU11, aUSurf1l) ||
756 + IsEqual(aU21, aUSurf1f) || IsEqual(aU21, aUSurf1l) ||
757 + IsEqual(aU12, aUSurf2f) || IsEqual(aU12, aUSurf2l) ||
758 + IsEqual(aU22, aUSurf2f) || IsEqual(aU22, aUSurf2l)))
760 + aWLine1->ClearVertexes();
761 + for(Standard_Integer aNPt = 1; aNPt <= aNbPntsWL2; aNPt++)
763 + const IntSurf_PntOn2S& aPt = aWLine2->Point(aNPt);
764 + aWLine1->Curve()->InsertBefore(1, aPt);
767 + aWLine1->ComputeVertexParameters(theTol3D);
769 + theSlin.Remove(aNumOfLine2);
771 + hasBeenRemoved = Standard_True;
777 + if(aPntFWL1.IsSame(aPntLWL2, Precision::Confusion()))
779 + Standard_Real aU11 = 0.0, aU12 = 0.0, aV11 = 0.0, aV12 = 0.0;
780 + Standard_Real aU21 = 0.0, aU22 = 0.0, aV21 = 0.0, aV22 = 0.0;
782 + aPntFWL1.Parameters(aU11, aV11, aU12, aV12);
783 + aPntLWL2.Parameters(aU21, aV21, aU22, aV22);
785 + if( !(IsEqual(fmod(aU11, aPeriod), 0.0) ||
786 + IsEqual(fmod(aU12, aPeriod), 0.0) ||
787 + IsEqual(fmod(aU21, aPeriod), 0.0) ||
788 + IsEqual(fmod(aU22, aPeriod), 0.0) ||
789 + IsEqual(aU11, aUSurf1f) || IsEqual(aU11, aUSurf1l) ||
790 + IsEqual(aU21, aUSurf1f) || IsEqual(aU21, aUSurf1l) ||
791 + IsEqual(aU12, aUSurf2f) || IsEqual(aU12, aUSurf2l) ||
792 + IsEqual(aU22, aUSurf2f) || IsEqual(aU22, aUSurf2l)))
794 + aWLine1->ClearVertexes();
795 + for(Standard_Integer aNPt = aNbPntsWL2; aNPt >= 1; aNPt--)
797 + const IntSurf_PntOn2S& aPt = aWLine2->Point(aNPt);
798 + aWLine1->Curve()->InsertBefore(1, aPt);
801 + aWLine1->ComputeVertexParameters(theTol3D);
803 + theSlin.Remove(aNumOfLine2);
805 + hasBeenRemoved = Standard_True;
811 + if(aPntLWL1.IsSame(aPntFWL2, Precision::Confusion()))
813 + Standard_Real aU11 = 0.0, aU12 = 0.0, aV11 = 0.0, aV12 = 0.0;
814 + Standard_Real aU21 = 0.0, aU22 = 0.0, aV21 = 0.0, aV22 = 0.0;
816 + aPntLWL1.Parameters(aU11, aV11, aU12, aV12);
817 + aPntFWL2.Parameters(aU21, aV21, aU22, aV22);
819 + if( !(IsEqual(fmod(aU11, aPeriod), 0.0) ||
820 + IsEqual(fmod(aU12, aPeriod), 0.0) ||
821 + IsEqual(fmod(aU21, aPeriod), 0.0) ||
822 + IsEqual(fmod(aU22, aPeriod), 0.0) ||
823 + IsEqual(aU11, aUSurf1f) || IsEqual(aU11, aUSurf1l) ||
824 + IsEqual(aU21, aUSurf1f) || IsEqual(aU21, aUSurf1l) ||
825 + IsEqual(aU12, aUSurf2f) || IsEqual(aU12, aUSurf2l) ||
826 + IsEqual(aU22, aUSurf2f) || IsEqual(aU22, aUSurf2l)))
828 + aWLine1->ClearVertexes();
829 + for(Standard_Integer aNPt = 1; aNPt <= aNbPntsWL2; aNPt++)
831 + const IntSurf_PntOn2S& aPt = aWLine2->Point(aNPt);
832 + aWLine1->Curve()->Add(aPt);
835 + aWLine1->ComputeVertexParameters(theTol3D);
837 + theSlin.Remove(aNumOfLine2);
839 + hasBeenRemoved = Standard_True;
845 + if(aPntLWL1.IsSame(aPntLWL2, Precision::Confusion()))
847 + Standard_Real aU11 = 0.0, aU12 = 0.0, aV11 = 0.0, aV12 = 0.0;
848 + Standard_Real aU21 = 0.0, aU22 = 0.0, aV21 = 0.0, aV22 = 0.0;
850 + aPntLWL1.Parameters(aU11, aV11, aU12, aV12);
851 + aPntLWL2.Parameters(aU21, aV21, aU22, aV22);
853 + if( !(IsEqual(fmod(aU11, aPeriod), 0.0) ||
854 + IsEqual(fmod(aU12, aPeriod), 0.0) ||
855 + IsEqual(fmod(aU21, aPeriod), 0.0) ||
856 + IsEqual(fmod(aU22, aPeriod), 0.0) ||
857 + IsEqual(aU11, aUSurf1f) || IsEqual(aU11, aUSurf1l) ||
858 + IsEqual(aU21, aUSurf1f) || IsEqual(aU21, aUSurf1l) ||
859 + IsEqual(aU12, aUSurf2f) || IsEqual(aU12, aUSurf2l) ||
860 + IsEqual(aU22, aUSurf2f) || IsEqual(aU22, aUSurf2l)))
862 + aWLine1->ClearVertexes();
863 + for(Standard_Integer aNPt = aNbPntsWL2; aNPt >= 1; aNPt--)
865 + const IntSurf_PntOn2S& aPt = aWLine2->Point(aNPt);
866 + aWLine1->Curve()->Add(aPt);
869 + aWLine1->ComputeVertexParameters(theTol3D);
871 + theSlin.Remove(aNumOfLine2);
873 + hasBeenRemoved = Standard_True;
883 + //aWLine1->ComputeVertexParameters(theTol3D);
885 + }//if(theSlin.Length() > 0)
888 return Standard_True;
891 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/inc/IntPatch_WLine.hxx OCCT-6.8.0_SRC-patch/inc/IntPatch_WLine.hxx
892 --- OCCT-6.8.0_SRC/inc/IntPatch_WLine.hxx 2014-11-11 17:54:07.000000000 +0300
893 +++ OCCT-6.8.0_SRC-patch/inc/IntPatch_WLine.hxx 2015-01-16 14:34:19.000000000 +0300
896 Standard_EXPORT const Handle(Adaptor2d_HCurve2d)& GetArcOnS2() const;
898 + Standard_EXPORT void ClearVertexes() ;
900 + Standard_EXPORT void RemoveVertex (const Standard_Integer theIndex) ;
902 + Standard_EXPORT void InsertVertexBefore (const Standard_Integer theIndex, const IntPatch_Point& thePnt) ;
904 Standard_EXPORT void Dump() const;
907 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/inc/IntPatch_WLine.lxx OCCT-6.8.0_SRC-patch/inc/IntPatch_WLine.lxx
908 --- OCCT-6.8.0_SRC/inc/IntPatch_WLine.lxx 2014-11-11 17:46:54.000000000 +0300
909 +++ OCCT-6.8.0_SRC-patch/inc/IntPatch_WLine.lxx 2015-01-16 12:59:50.000000000 +0300
915 +inline void IntPatch_WLine::ClearVertexes()
920 +inline void IntPatch_WLine::RemoveVertex(const Standard_Integer theIndex)
922 + if((theIndex < 1) || (theIndex > NbVertex()))
923 + Standard_OutOfRange::Raise("Cannot delete not existing vertex");
924 + svtx.Remove(theIndex);
927 +inline void IntPatch_WLine::InsertVertexBefore( const Standard_Integer theIndex,
928 + const IntPatch_Point& thePnt)
930 + const Standard_Integer aNbVertexes = NbVertex();
931 + Standard_Integer anIndex = Max(theIndex, 1);
933 + if(anIndex > aNbVertexes)
934 + svtx.Append(thePnt);
936 + svtx.InsertBefore(theIndex, thePnt);
938 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/inc/IntSurf_PntOn2S.hxx OCCT-6.8.0_SRC-patch/inc/IntSurf_PntOn2S.hxx
939 --- OCCT-6.8.0_SRC/inc/IntSurf_PntOn2S.hxx 2014-11-11 17:54:10.000000000 +0300
940 +++ OCCT-6.8.0_SRC-patch/inc/IntSurf_PntOn2S.hxx 2015-01-16 14:34:22.000000000 +0300
943 //! Returns the parameters of the point on both surfaces.
944 void Parameters (Standard_Real& U1, Standard_Real& V1, Standard_Real& U2, Standard_Real& V2) const;
946 + //! Returns TRUE if 2D- and 3D-coordinates of theOterPoint are equal to
947 + //! corresponding coordinates of me (with given tolerance).
948 + //! If theTol2D == 0.0 we will compare 3D-points only.
949 + Standard_EXPORT Standard_Boolean IsSame (const IntSurf_PntOn2S& theOterPoint, const Standard_Real theTol3D = 0.0, const Standard_Real theTol2D = 0.0) const;
953 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/inc/OpenGl_GraphicDriver.hxx OCCT-6.8.0_SRC-patch/inc/OpenGl_GraphicDriver.hxx
954 --- OCCT-6.8.0_SRC/inc/OpenGl_GraphicDriver.hxx 2014-11-11 17:46:58.000000000 +0300
955 +++ OCCT-6.8.0_SRC-patch/inc/OpenGl_GraphicDriver.hxx 2015-01-16 13:01:24.000000000 +0300
957 Standard_EXPORT void SetClipPlanes (const Graphic3d_CView& theCView);
958 Standard_EXPORT void SetCamera (const Graphic3d_CView& theCView);
959 Standard_EXPORT void SetVisualisation (const Graphic3d_CView& ACView);
960 - Standard_EXPORT void Transparency (const Graphic3d_CView& ACView, const Standard_Boolean AFlag);
961 Standard_EXPORT Standard_Boolean View (Graphic3d_CView& ACView);
962 Standard_EXPORT void Environment (const Graphic3d_CView& ACView);
963 Standard_EXPORT void ZBufferTriedronSetup (const Quantity_NameOfColor XColor = Quantity_NOC_RED, const Quantity_NameOfColor YColor = Quantity_NOC_GREEN, const Quantity_NameOfColor ZColor = Quantity_NOC_BLUE1, const Standard_Real SizeRatio = 0.8, const Standard_Real AxisDiametr = 0.05, const Standard_Integer NbFacettes = 12);
964 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/inc/OpenGl_Workspace.hxx OCCT-6.8.0_SRC-patch/inc/OpenGl_Workspace.hxx
965 --- OCCT-6.8.0_SRC/inc/OpenGl_Workspace.hxx 2014-11-11 17:46:58.000000000 +0300
966 +++ OCCT-6.8.0_SRC-patch/inc/OpenGl_Workspace.hxx 2015-01-16 13:01:24.000000000 +0300
968 Image_PixMap& theImage,
969 const Graphic3d_BufferType& theBufferType);
971 - void UseTransparency (const Standard_Boolean theFlag);
972 Standard_Boolean& UseZBuffer() { return myUseZBuffer; }
973 Standard_Boolean& UseDepthTest() { return myUseDepthTest; }
974 Standard_Boolean& UseGLLight() { return myUseGLLight; }
976 Standard_Boolean myTransientDrawToFront; //!< optimization flag for immediate mode (to render directly to the front buffer)
977 Standard_Boolean myBackBufferRestored;
978 Standard_Boolean myIsImmediateDrawn; //!< flag indicates that immediate mode buffer contains some data
979 - Standard_Boolean myUseTransparency;
980 Standard_Boolean myUseZBuffer;
981 Standard_Boolean myUseDepthTest;
982 Standard_Boolean myUseGLLight;
983 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/inc/ShapeFix_Shape.hxx OCCT-6.8.0_SRC-patch/inc/ShapeFix_Shape.hxx
984 --- OCCT-6.8.0_SRC/inc/ShapeFix_Shape.hxx 2014-11-11 17:54:25.000000000 +0300
985 +++ OCCT-6.8.0_SRC-patch/inc/ShapeFix_Shape.hxx 2015-01-16 14:34:37.000000000 +0300
987 //! Returns (modifiable) the mode for applying
988 //! ShapeFix::FixVertexPosition before all fixes, by default False.
989 Standard_Integer& FixVertexPositionMode() ;
991 + //! Returns (modifiable) the mode for fixing tolerances of vertices on whole shape
992 + //! after performing all fixes
993 + Standard_Integer& FixVertexTolMode() ;
998 Standard_Integer myFixWireMode;
999 Standard_Integer myFixSameParameterMode;
1000 Standard_Integer myFixVertexPositionMode;
1001 + Standard_Integer myFixVertexTolMode;
1002 Standard_Integer myStatus;
1005 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/inc/ShapeFix_Shape.lxx OCCT-6.8.0_SRC-patch/inc/ShapeFix_Shape.lxx
1006 --- OCCT-6.8.0_SRC/inc/ShapeFix_Shape.lxx 2014-11-11 17:47:05.000000000 +0300
1007 +++ OCCT-6.8.0_SRC-patch/inc/ShapeFix_Shape.lxx 2015-01-16 13:00:03.000000000 +0300
1008 @@ -122,3 +122,13 @@
1010 return myFixVertexPositionMode;
1013 +//=======================================================================
1014 +//function : FixVertexTolMode
1016 +//=======================================================================
1018 +inline Standard_Integer& ShapeFix_Shape::FixVertexTolMode()
1020 + return myFixVertexTolMode;
1022 \ No newline at end of file
1023 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/inc/V3d_View.hxx OCCT-6.8.0_SRC-patch/inc/V3d_View.hxx
1024 --- OCCT-6.8.0_SRC/inc/V3d_View.hxx 2014-11-11 17:54:58.000000000 +0300
1025 +++ OCCT-6.8.0_SRC-patch/inc/V3d_View.hxx 2015-01-16 14:35:09.000000000 +0300
1027 //! Returns TRUE when the light is active in this view.
1028 Standard_EXPORT Standard_Boolean IsActiveLight (const Handle(V3d_Light)& aLight) const;
1030 - //! Activate/Deactivate the transparency in this view.
1031 - Standard_EXPORT void SetTransparency (const Standard_Boolean AnActivity = Standard_False) ;
1033 //! sets the immediate update mode and returns the previous one.
1034 Standard_EXPORT Standard_Boolean SetImmediateUpdate (const Standard_Boolean theImmediateUpdate) ;
1038 Standard_EXPORT Handle(Graphic3d_TextureEnv) TextureEnv() const;
1040 - //! Returns the transparency activity.
1041 - Standard_EXPORT Standard_Boolean Transparency() const;
1043 //! Returns the current visualisation mode.
1044 Standard_EXPORT V3d_TypeOfVisualization Visualization() const;
1046 @@ -1075,7 +1069,6 @@
1047 TColStd_Array2OfReal MyTrsf;
1048 Handle(Graphic3d_Structure) MyGridEchoStructure;
1049 Handle(Graphic3d_Group) MyGridEchoGroup;
1050 - Standard_Boolean MyTransparencyFlag;
1051 Graphic3d_Vector myXscreenAxis;
1052 Graphic3d_Vector myYscreenAxis;
1053 Graphic3d_Vector myZscreenAxis;
1054 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/inc/Visual3d_View.hxx OCCT-6.8.0_SRC-patch/inc/Visual3d_View.hxx
1055 --- OCCT-6.8.0_SRC/inc/Visual3d_View.hxx 2014-11-11 17:54:59.000000000 +0300
1056 +++ OCCT-6.8.0_SRC-patch/inc/Visual3d_View.hxx 2015-01-16 14:35:10.000000000 +0300
1057 @@ -478,11 +478,6 @@
1058 //! Warning: Works only under Windows.
1059 Standard_EXPORT Standard_Boolean Print (const Aspect_Handle hPrnDC, const Standard_Boolean showBackground, const Standard_CString filename, const Aspect_PrintAlgo printAlgorithm = Aspect_PA_STRETCH, const Standard_Real theScaleFactor = 1.0) const;
1061 - //! if <AFlag> is Standard_True then the transparency
1062 - //! is managed in the view <me>.
1063 - //! Default Standard_False
1064 - Standard_EXPORT void SetTransparency (const Standard_Boolean AFlag) ;
1066 //! Returns Standard_True if the ZBuffer is activated
1067 //! in the view <me> and Standard_False if not.
1068 Standard_EXPORT Standard_Boolean ZBufferIsActivated() const;
1069 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/inc/Visual3d_ViewManager.hxx OCCT-6.8.0_SRC-patch/inc/Visual3d_ViewManager.hxx
1070 --- OCCT-6.8.0_SRC/inc/Visual3d_ViewManager.hxx 2014-11-11 17:54:59.000000000 +0300
1071 +++ OCCT-6.8.0_SRC-patch/inc/Visual3d_ViewManager.hxx 2015-01-16 14:35:10.000000000 +0300
1072 @@ -200,16 +200,6 @@
1073 //! if <AStructure> is displayed in <AProjector> and TOS_COMPUTED.
1074 Standard_EXPORT void ReCompute (const Handle(Graphic3d_Structure)& AStructure, const Handle(Graphic3d_DataStructureManager)& AProjector) ;
1076 - //! Returns Standard_True if the transparency
1077 - //! is activated in all activated views.
1078 - //! Default Standard_False
1079 - Standard_EXPORT Standard_Boolean Transparency() const;
1081 - //! if <AFlag> is Standard_True then the transparency
1083 - //! Default Standard_False
1084 - Standard_EXPORT void SetTransparency (const Standard_Boolean AFlag) ;
1086 //! Returns Standard_True if the zbuffer activity
1087 //! is managed automatically.
1088 //! Default Standard_False
1090 Aspect_GenId MyViewGenId;
1091 Handle(Graphic3d_GraphicDriver) MyGraphicDriver;
1092 Standard_Boolean MyZBufferAuto;
1093 - Standard_Boolean MyTransparency;
1094 TColStd_MapOfInteger myLayerIds;
1095 TColStd_SequenceOfInteger myLayerSeq;
1096 Visual3d_MapOfZLayerSettings myMapOfZLayerSettings;
1097 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/samples/qt/VoxelDemo/src/Viewer.cpp OCCT-6.8.0_SRC-patch/samples/qt/VoxelDemo/src/Viewer.cpp
1098 --- OCCT-6.8.0_SRC/samples/qt/VoxelDemo/src/Viewer.cpp 2014-11-11 17:46:38.000000000 +0300
1099 +++ OCCT-6.8.0_SRC-patch/samples/qt/VoxelDemo/src/Viewer.cpp 2015-01-16 12:59:32.000000000 +0300
1102 myView->MustBeResized();
1103 myView->SetSurfaceDetail(V3d_TEX_NONE);
1104 - myView->SetTransparency(Standard_True);
1105 myView->SetSize(10000.0);
1106 myView->SetZSize(10000.0);
1107 myView->SetViewMappingDefault();
1108 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/AIS/AIS_InteractiveContext.cdl OCCT-6.8.0_SRC-patch/src/AIS/AIS_InteractiveContext.cdl
1109 --- OCCT-6.8.0_SRC/src/AIS/AIS_InteractiveContext.cdl 2014-11-11 17:46:38.000000000 +0300
1110 +++ OCCT-6.8.0_SRC-patch/src/AIS/AIS_InteractiveContext.cdl 2015-01-16 13:01:23.000000000 +0300
1111 @@ -268,15 +268,6 @@
1112 -- inWhichLocal gives the local context in which anIObj
1113 -- is displayed. By default, the index -1 refers to the last
1114 -- Local Context opened.
1116 - Clear(me : mutable;
1117 - aniobj : InteractiveObject from AIS;
1118 - updateviewer : Boolean from Standard = Standard_True);
1119 ----Purpose: Removes the interactive object aniobj from all viewers.
1120 --- If a local context is open and if updateviewer equals
1121 --- Standard_False, the presentation of the Interactive
1122 --- Object activates the selection mode; the object is
1123 --- displayed but no viewer will be updated.
1125 ClearPrs( me :mutable;
1126 aniobj : InteractiveObject from AIS;
1127 @@ -2046,6 +2037,16 @@
1128 PurgeViewer(me:mutable;Vwr:Viewer from V3d)
1129 returns Integer from Standard is static private;
1131 + redisplayPrsModes (me : mutable;
1132 + theIObj : InteractiveObject from AIS;
1133 + theToUpdateViewer : Boolean from Standard = Standard_True) is static private;
1134 + ---Purpose: UNKNOWN
1136 + redisplayPrsRecModes (me : mutable;
1137 + theIObj : InteractiveObject from AIS;
1138 + theToUpdateViewer : Boolean from Standard = Standard_True) is static private;
1139 + ---Purpose: UNKNOWN
1143 myObjects : DataMapOfIOStatus from AIS;
1144 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/AIS/AIS_InteractiveContext.cxx OCCT-6.8.0_SRC-patch/src/AIS/AIS_InteractiveContext.cxx
1145 --- OCCT-6.8.0_SRC/src/AIS/AIS_InteractiveContext.cxx 2014-11-11 17:46:38.000000000 +0300
1146 +++ OCCT-6.8.0_SRC-patch/src/AIS/AIS_InteractiveContext.cxx 2015-01-16 13:01:23.000000000 +0300
1149 // Modified by XAB & Serguei Dec 97 (angle &deviation coeffts)
1151 -#define BUC60577 //GG_101099 Enable to compute correctly
1152 -// transparency with more than one object in the view.
1154 -#define BUC60632 //GG 15/03/00 Add protection on SetDisplayMode()
1155 -// method, compute only authorized presentation.
1157 -#define BUC60688 //GG 25/05/00 Add SetSensitivity() methods.
1159 -#define BUC60722 //GG 04/09/00 Always enable viewer update when erasing something
1161 -#define IMP051001 //GG Adds SetZDetected() and ZDetected() methods
1163 -#define OCC172 //SAV clear static map before destroying context.
1165 -#define OCC204 //SAV 26/02/02 : pass <updateviewer> flag to
1166 -// AddOrRemoveCurrentObject method from ClearGlobal.
1168 -#define OCC4373 //SAN 10/11/03 : improve display mode management in
1169 -// Display( IO, updateviewer ) and
1170 -// SetDisplayMode( IO, mode, updateviewer ) methods
1172 #include <AIS_InteractiveContext.ixx>
1174 //#include <AIS_DataMapIteratorOfDataMapOfInteractiveInteger.hxx>
1177 #include <AIS_ListIteratorOfListOfInteractive.hxx>
1179 -// In the method GetDefModes() the returned value of the selection mode
1180 -// is always equal to 0 if it is -1.
1183 -// The local context is closed the method ::ResetOriginalState() sets the selection mode equal to 0
1184 -// in spite of the selection mode of the interactive object in Natural Point.
1187 -static Standard_Boolean AISDebugModeOn()
1189 -// static OSD_Environment aisdb("AISDEBUGMODE");
1190 -// return !aisdb.Value().IsEmpty();
1191 - static Standard_Integer isDebugMode(-1);
1192 - if (isDebugMode < 0) {
1194 - OSD_Environment aisdb("AISDEBUGMODE");
1195 - if (aisdb.Value().IsEmpty())
1198 - return (isDebugMode != 0);
1203 static volatile Standard_Integer THE_AIS_INDEX_SEL = 0;
1205 return TCollection_AsciiString ("AIS_CurContext_")
1206 + TCollection_AsciiString (Standard_Atomic_Increment (&THE_AIS_INDEX_CUR));
1211 //=======================================================================
1212 //function : AIS_InteractiveContext
1214 mySubIntensity(Quantity_NOC_GRAY40),
1218 myZDetectionFlag(0),
1220 myIsAutoActivateSelMode( Standard_True )
1223 @@ -141,31 +96,30 @@
1225 void AIS_InteractiveContext::Delete() const
1227 - //Clear the static current selection. Else the memory
1229 + // clear the static current selection
1230 AIS_Selection::ClearCurrentSelection();
1233 // to avoid an exception
1234 - if ( AIS_Selection::Find( mySelectionName.ToCString() ) )
1235 - AIS_Selection::Remove( mySelectionName.ToCString() );
1236 + if (AIS_Selection::Find (mySelectionName.ToCString()))
1238 + AIS_Selection::Remove (mySelectionName.ToCString());
1241 // to avoid an exception
1242 - if ( AIS_Selection::Find( myCurrentName.ToCString() ) )
1243 - AIS_Selection::Remove( myCurrentName.ToCString() );
1244 + if (AIS_Selection::Find (myCurrentName.ToCString()))
1246 + AIS_Selection::Remove (myCurrentName.ToCString());
1249 // let's remove one reference explicitly. this operation's supposed to
1250 // be performed when mgrSelector will be destroyed but anyway...
1251 - mgrSelector->Remove( myMainSel );
1253 - AIS_ListOfInteractive aList;
1255 - AIS_DataMapIteratorOfDataMapOfIOStatus anIt(myObjects);
1256 + mgrSelector->Remove (myMainSel);
1258 Handle(AIS_InteractiveContext) aNullContext;
1259 - for(; anIt.More() ; anIt.Next())
1260 + for (AIS_DataMapIteratorOfDataMapOfIOStatus anObjIter (myObjects); anObjIter.More(); anObjIter.Next())
1262 - Handle(AIS_InteractiveObject) anObj = anIt.Key();
1263 - anObj->SetContext(aNullContext);
1265 + Handle(AIS_InteractiveObject) anObj = anObjIter.Key();
1266 + anObj->SetContext (aNullContext);
1268 MMgt_TShared::Delete();
1270 @@ -209,494 +163,466 @@
1272 //=======================================================================
1273 //function : DisplayedObjects
1276 //=======================================================================
1278 -void AIS_InteractiveContext::DisplayedObjects(AIS_ListOfInteractive& aListOfIO,
1279 - const Standard_Boolean OnlyFromNeutral) const
1280 +void AIS_InteractiveContext::DisplayedObjects (AIS_ListOfInteractive& theListOfIO,
1281 + const Standard_Boolean theOnlyFromNeutral) const
1284 - cout<<"AIS_IC::DisplayedObjects"<<endl;
1287 - AIS_DataMapIteratorOfDataMapOfIOStatus It(myObjects);
1288 - if(!HasOpenedContext() || OnlyFromNeutral){
1289 - for(;It.More();It.Next()){
1290 - if(It.Value()->GraphicStatus()==AIS_DS_Displayed)
1291 - aListOfIO.Append(It.Key());
1295 - TColStd_MapOfTransient theMap;
1297 - for(;It.More();It.Next()){
1298 - if(It.Value()->GraphicStatus()==AIS_DS_Displayed)
1299 - theMap.Add(It.Key());
1302 - //parse all local contexts...
1304 - cout<<"\tFrom Neutral Point : "<<theMap.Extent()<<endl;
1305 - Standard_Integer NbDisp;
1306 - for(AIS_DataMapIteratorOfDataMapOfILC it1(myLocalContexts);it1.More();it1.Next()){
1307 - const Handle(AIS_LocalContext)& LC = it1.Value();
1308 - NbDisp = LC->DisplayedObjects(theMap);
1309 - cout<<"\tIn Local Context "<<it1.Key()<<" : "<<NbDisp<<endl;
1312 - Handle(AIS_InteractiveObject) curIO;
1313 - Handle(Standard_Transient) Tr;
1314 - for(TColStd_MapIteratorOfMapOfTransient it2(theMap);it2.More();it2.Next()){
1316 - curIO = *((Handle(AIS_InteractiveObject)*) &Tr);
1317 - aListOfIO.Append(curIO);
1318 + if (!HasOpenedContext()
1319 + || theOnlyFromNeutral)
1321 + for (AIS_DataMapIteratorOfDataMapOfIOStatus anObjIter (myObjects); anObjIter.More(); anObjIter.Next())
1323 + if (anObjIter.Value()->GraphicStatus() == AIS_DS_Displayed)
1325 + theListOfIO.Append (anObjIter.Key());
1332 + TColStd_MapOfTransient aDispMap;
1333 + for (AIS_DataMapIteratorOfDataMapOfIOStatus anObjIter (myObjects); anObjIter.More(); anObjIter.Next())
1335 + if (anObjIter.Value()->GraphicStatus() == AIS_DS_Displayed)
1337 + aDispMap.Add (anObjIter.Key());
1341 + // parse all local contexts...
1342 + for (AIS_DataMapIteratorOfDataMapOfILC aCtxIter (myLocalContexts); aCtxIter.More(); aCtxIter.Next())
1344 + const Handle(AIS_LocalContext)& aLocCtx = aCtxIter.Value();
1345 + aLocCtx->DisplayedObjects (aDispMap);
1348 + Handle(AIS_InteractiveObject) anObj;
1349 + for (TColStd_MapIteratorOfMapOfTransient aDispMapIter (aDispMap); aDispMapIter.More(); aDispMapIter.Next())
1351 + const Handle(Standard_Transient)& aTransient = aDispMapIter.Key();
1352 + anObj = *((Handle(AIS_InteractiveObject)* )&aTransient);
1353 + theListOfIO.Append (anObj);
1357 //=======================================================================
1358 //function : DisplayedObjects
1361 //=======================================================================
1363 -void AIS_InteractiveContext::DisplayedObjects(const AIS_KindOfInteractive TheKind,
1364 - const Standard_Integer TheSign,
1365 - AIS_ListOfInteractive& aListOfIO,
1366 - const Standard_Boolean /*OnlyFromNeutral*/) const
1367 +void AIS_InteractiveContext::DisplayedObjects (const AIS_KindOfInteractive theKind,
1368 + const Standard_Integer theSign,
1369 + AIS_ListOfInteractive& theListOfIO,
1370 + const Standard_Boolean /*OnlyFromNeutral*/) const
1372 - ObjectsByDisplayStatus( TheKind, TheSign, AIS_DS_Displayed, aListOfIO );
1373 + ObjectsByDisplayStatus (theKind, theSign, AIS_DS_Displayed, theListOfIO);
1376 //=======================================================================
1377 //function : ErasedObjects
1380 //=======================================================================
1382 -void AIS_InteractiveContext::ErasedObjects(AIS_ListOfInteractive& theListOfIO) const
1383 +void AIS_InteractiveContext::ErasedObjects (AIS_ListOfInteractive& theListOfIO) const
1385 - ObjectsByDisplayStatus( AIS_DS_Erased, theListOfIO );
1386 + ObjectsByDisplayStatus (AIS_DS_Erased, theListOfIO);
1389 //=======================================================================
1390 //function : ErasedObjects
1393 //=======================================================================
1395 -void AIS_InteractiveContext::ErasedObjects(const AIS_KindOfInteractive TheKind,
1396 - const Standard_Integer TheSign,
1397 - AIS_ListOfInteractive& theListOfIO) const
1398 +void AIS_InteractiveContext::ErasedObjects (const AIS_KindOfInteractive theKind,
1399 + const Standard_Integer theSign,
1400 + AIS_ListOfInteractive& theListOfIO) const
1402 - ObjectsByDisplayStatus( TheKind, TheSign, AIS_DS_Erased, theListOfIO );
1403 + ObjectsByDisplayStatus (theKind, theSign, AIS_DS_Erased, theListOfIO);
1406 //=======================================================================
1407 //function : ObjectsByDisplayStatus
1410 //=======================================================================
1412 -void AIS_InteractiveContext::ObjectsByDisplayStatus(const AIS_DisplayStatus theStatus,
1413 - AIS_ListOfInteractive& theListOfIO) const
1414 +void AIS_InteractiveContext::ObjectsByDisplayStatus (const AIS_DisplayStatus theStatus,
1415 + AIS_ListOfInteractive& theListOfIO) const
1417 - AIS_DataMapIteratorOfDataMapOfIOStatus It(myObjects);
1418 - for(;It.More();It.Next()){
1419 - if(It.Value()->GraphicStatus() == theStatus)
1420 - theListOfIO.Append(It.Key());
1421 + for (AIS_DataMapIteratorOfDataMapOfIOStatus anObjIter (myObjects); anObjIter.More(); anObjIter.Next())
1423 + if (anObjIter.Value()->GraphicStatus() == theStatus)
1425 + theListOfIO.Append (anObjIter.Key());
1430 //=======================================================================
1431 //function : ObjectsByDisplayStatus
1434 //=======================================================================
1435 +void AIS_InteractiveContext::ObjectsByDisplayStatus (const AIS_KindOfInteractive theKind,
1436 + const Standard_Integer theSign,
1437 + const AIS_DisplayStatus theStatus,
1438 + AIS_ListOfInteractive& theListOfIO) const
1440 + for (AIS_DataMapIteratorOfDataMapOfIOStatus anObjIter (myObjects); anObjIter.More(); anObjIter.Next())
1442 + if (anObjIter.Value()->GraphicStatus() != theStatus
1443 + || anObjIter.Key()->Type() != theKind)
1448 -void AIS_InteractiveContext::ObjectsByDisplayStatus(const AIS_KindOfInteractive TheKind,
1449 - const Standard_Integer TheSign,
1450 - const AIS_DisplayStatus theStatus,
1451 - AIS_ListOfInteractive& theListOfIO) const
1453 - AIS_DataMapIteratorOfDataMapOfIOStatus It(myObjects);
1454 - for(;It.More();It.Next()){
1455 - if(It.Value()->GraphicStatus()==theStatus){
1456 - if(It.Key()->Type()==TheKind){
1458 - theListOfIO.Append(It.Key());
1460 - if(It.Key()->Signature()==TheSign)
1461 - theListOfIO.Append(It.Key());
1465 + || anObjIter.Key()->Signature() == theSign)
1467 + theListOfIO.Append (anObjIter.Key());
1472 //=======================================================================
1473 //function : ObjectsInside
1476 //=======================================================================
1477 +void AIS_InteractiveContext::ObjectsInside (AIS_ListOfInteractive& theListOfIO,
1478 + const AIS_KindOfInteractive theKind,
1479 + const Standard_Integer theSign) const
1481 + if (theKind == AIS_KOI_None
1484 + for (AIS_DataMapIteratorOfDataMapOfIOStatus anObjIter (myObjects); anObjIter.More(); anObjIter.Next())
1486 + theListOfIO.Append (anObjIter.Key());
1491 -void AIS_InteractiveContext::ObjectsInside(AIS_ListOfInteractive& aListOfIO,
1492 - const AIS_KindOfInteractive TheKind,
1493 - const Standard_Integer TheSign) const
1495 - AIS_DataMapIteratorOfDataMapOfIOStatus It(myObjects);
1496 - if(TheKind==AIS_KOI_None && TheSign ==-1){
1497 - for(;It.More();It.Next()){
1498 - aListOfIO.Append(It.Key());
1502 - for(;It.More();It.Next()){
1503 - if(It.Key()->Type()==TheKind){
1505 - aListOfIO.Append(It.Key());
1507 - if(It.Key()->Signature()==TheSign)
1508 - aListOfIO.Append(It.Key());
1511 + for (AIS_DataMapIteratorOfDataMapOfIOStatus anObjIter (myObjects); anObjIter.More(); anObjIter.Next())
1513 + if (anObjIter.Key()->Type() != theKind)
1519 + || anObjIter.Key()->Signature() == theSign)
1521 + theListOfIO.Append (anObjIter.Key());
1526 //=======================================================================
1527 //function : Display
1530 //=======================================================================
1531 +void AIS_InteractiveContext::Display (const Handle(AIS_InteractiveObject)& theIObj,
1532 + const Standard_Boolean theToUpdateViewer)
1534 + if (theIObj.IsNull())
1539 + Standard_Integer aDispMode = 0, aHiMod = -1, aSelMode = -1;
1540 + GetDefModes (theIObj, aDispMode, aHiMod, aSelMode);
1542 -void AIS_InteractiveContext::Display(const Handle(AIS_InteractiveObject)& anIObj,
1543 - const Standard_Boolean updateviewer )
1544 + Display (theIObj, aDispMode, myIsAutoActivateSelMode ? aSelMode : -1,
1545 + theToUpdateViewer, theIObj->AcceptShapeDecomposition());
1548 +//=======================================================================
1549 +//function : Display
1551 +//=======================================================================
1552 +void AIS_InteractiveContext::Display (const Handle(AIS_InteractiveObject)& theIObj,
1553 + const Standard_Integer theDispMode,
1554 + const Standard_Integer theSelectionMode,
1555 + const Standard_Boolean theToUpdateViewer,
1556 + const Standard_Boolean theToAllowDecomposition)
1558 - if(anIObj.IsNull()) return;
1560 - Standard_Integer DispMode,HiMod,SelMode;
1562 - GetDefModes(anIObj,DispMode,HiMod,SelMode);
1564 - Handle (AIS_InteractiveContext) aThis = this;
1565 - if(!anIObj->HasInteractiveContext())
1566 - anIObj->SetContext(aThis);
1568 - //NO LOCAL CONTEXT OPEN
1569 - if(!HasOpenedContext()) {
1571 - // SAN : Do not return here. Perform advanced display mode analysis a bit later...
1572 - if(IsDisplayed(anIObj)) return;
1575 - // it did not yet exist
1576 - if(!myObjects.IsBound(anIObj)){
1578 - Handle(AIS_GlobalStatus) STATUS=
1580 - new AIS_GlobalStatus(AIS_DS_Displayed,DispMode,SelMode);
1582 - new AIS_GlobalStatus(AIS_DS_Displayed,DispMode,0);
1584 - myObjects.Bind (anIObj,STATUS);
1585 - myMainPM->Display(anIObj,DispMode);
1586 - if( myIsAutoActivateSelMode )
1588 - if(!mgrSelector->Contains(anIObj))
1589 - mgrSelector->Load(anIObj);
1590 - mgrSelector->Activate(anIObj,SelMode,myMainSel);
1593 - if(updateviewer) myMainVwr->Update();
1595 - // it is somewhere else...
1598 - // const Handle(AIS_GlobalStatus)& STATUS = myObjects(anIObj);
1599 - Handle(AIS_GlobalStatus) STATUS = myObjects(anIObj);
1601 - if (STATUS->GraphicStatus() == AIS_DS_Displayed || STATUS->GraphicStatus() == AIS_DS_Erased)
1603 - // SAN : erase presentations for all display modes different from <DispMode>;
1604 - // then make sure <DispMode> is displayed and maybe highlighted;
1605 - // Finally, activate selection mode <SelMode> if not yet activated.
1606 - TColStd_ListOfInteger aModesToRemove;
1607 - TColStd_ListIteratorOfListOfInteger ItL (STATUS->DisplayedModes());
1608 - for(;ItL.More();ItL.Next()){
1610 - Standard_Integer OldMode = ItL.Value();
1612 - if(OldMode!=DispMode){
1613 - aModesToRemove.Append(OldMode);
1614 - if(myMainPM->IsHighlighted(anIObj,OldMode))
1615 - myMainPM->Unhighlight(anIObj,OldMode);
1616 - myMainPM->Erase(anIObj,OldMode);
1619 + if (theIObj.IsNull())
1624 - for(ItL.Initialize(aModesToRemove);ItL.More();ItL.Next())
1625 - STATUS->RemoveDisplayMode(ItL.Value());
1626 + if (!theIObj->HasInteractiveContext())
1628 + theIObj->SetContext (this);
1631 - if(!STATUS->IsDModeIn(DispMode))
1632 - STATUS->AddDisplayMode(DispMode);
1633 + if (HasOpenedContext())
1635 + myLocalContexts (myCurLocalIndex)->Display (theIObj, theDispMode, theToAllowDecomposition, theSelectionMode);
1636 + if (theToUpdateViewer)
1638 + myMainVwr->Update();
1643 - myMainPM->Display(anIObj,DispMode);
1644 - if (STATUS->GraphicStatus() == AIS_DS_Erased)
1646 - STATUS->SetGraphicStatus(AIS_DS_Displayed);
1648 - if(STATUS->IsHilighted()){
1649 - myMainPM->Highlight(anIObj,HiMod);
1651 - if( myIsAutoActivateSelMode )
1653 - if(!mgrSelector->Contains(anIObj))
1654 - mgrSelector->Load(anIObj);
1655 - if(!mgrSelector->IsActivated(anIObj,SelMode))
1656 - mgrSelector->Activate(anIObj,SelMode,myMainSel);
1658 + if (!myObjects.IsBound (theIObj))
1660 + Handle(AIS_GlobalStatus) aStatus = new AIS_GlobalStatus (AIS_DS_Displayed, theDispMode, theSelectionMode);
1661 + myObjects.Bind (theIObj, aStatus);
1662 + myMainPM->Display(theIObj, theDispMode);
1663 + if (theSelectionMode != -1)
1665 + if (!mgrSelector->Contains (theIObj))
1667 + mgrSelector->Load (theIObj);
1671 - if(anIObj->IsTransparent() && !myMainVwr->Viewer()->Transparency())
1672 - myMainVwr->Viewer()->SetTransparency(Standard_True);
1673 - if(updateviewer) myMainVwr->Update();
1674 + mgrSelector->Activate (theIObj, theSelectionMode, myMainSel);
1678 - // LOCAL CONTEXT OPEN
1681 - myLocalContexts(myCurLocalIndex)->Display(anIObj,DispMode,anIObj->AcceptShapeDecomposition(),SelMode);
1683 - if(anIObj->IsTransparent() && !myMainVwr->Viewer()->Transparency())
1684 - myMainVwr->Viewer()->SetTransparency(Standard_True);
1687 - if(updateviewer) myMainVwr->Update();
1690 + Handle(AIS_GlobalStatus) aStatus = myObjects (theIObj);
1691 + if (aStatus->GraphicStatus() != AIS_DS_Displayed
1692 + && aStatus->GraphicStatus() != AIS_DS_Erased)
1697 -//=======================================================================
1698 -//function : Display
1700 -//=======================================================================
1701 + // Erase presentations for all display modes different from aDispMode.
1702 + // Then make sure aDispMode is displayed and maybe highlighted.
1703 + // Finally, activate selection mode <SelMode> if not yet activated.
1704 + TColStd_ListOfInteger aModesToRemove;
1705 + for (TColStd_ListIteratorOfListOfInteger aDispModeIter (aStatus->DisplayedModes()); aDispModeIter.More(); aDispModeIter.Next())
1707 + const Standard_Integer anOldMode = aDispModeIter.Value();
1708 + if (anOldMode != theDispMode)
1710 + aModesToRemove.Append (anOldMode);
1711 + if(myMainPM->IsHighlighted (theIObj, anOldMode))
1713 + myMainPM->Unhighlight (theIObj, anOldMode);
1715 + myMainPM->Erase (theIObj, anOldMode);
1719 -void AIS_InteractiveContext::Display(const Handle(AIS_InteractiveObject)& anIObj,
1720 - const Standard_Integer aDisplayMode,
1721 - const Standard_Integer aSelectionMode,
1722 - const Standard_Boolean updateviewer,
1723 - const Standard_Boolean allowdecomposition)
1725 - if(anIObj.IsNull()) return;
1726 + for (TColStd_ListIteratorOfListOfInteger aRemModeIter (aModesToRemove); aRemModeIter.More(); aRemModeIter.Next())
1728 + aStatus->RemoveDisplayMode (aRemModeIter.Value());
1731 - if(!anIObj->HasInteractiveContext()) anIObj->SetContext(this);
1733 - // if no local context...
1734 - if(!HasOpenedContext()) {
1735 - // if(!anIObj->HasDisplayMode())
1736 - // anIObj->SetDisplayMode(aDisplayMode);
1738 - if(!myObjects.IsBound(anIObj)){
1739 - Handle(AIS_GlobalStatus) STATUS=
1740 - new AIS_GlobalStatus(AIS_DS_Displayed,aDisplayMode,aSelectionMode);
1741 - myObjects.Bind (anIObj,STATUS);
1742 - myMainPM->Display(anIObj,aDisplayMode);
1743 - if(aSelectionMode!=-1){
1744 - if(!mgrSelector->Contains(anIObj))
1745 - mgrSelector->Load(anIObj,aSelectionMode);
1746 - mgrSelector->Activate(anIObj,aSelectionMode,myMainSel);
1748 - if(updateviewer) myMainVwr->Update();
1749 + if (!aStatus->IsDModeIn (theDispMode))
1751 + aStatus->AddDisplayMode (theDispMode);
1754 + myMainPM->Display (theIObj, theDispMode);
1755 + if (aStatus->GraphicStatus() == AIS_DS_Erased)
1757 + aStatus->SetGraphicStatus (AIS_DS_Displayed);
1759 + if (aStatus->IsHilighted())
1761 + const Standard_Integer aHiMod = theIObj->HasHilightMode() ? theIObj->HilightMode() : theDispMode;
1762 + myMainPM->Highlight (theIObj, aHiMod);
1764 - // anIObj->SelectionMode(aSelectionMode);
1767 - // const Handle(AIS_GlobalStatus)& STATUS = myObjects(anIObj);
1768 - Handle(AIS_GlobalStatus) STATUS = myObjects(anIObj);
1770 - if(!STATUS->IsDModeIn(aDisplayMode)){
1771 - myMainPM->Display(anIObj,aDisplayMode);
1772 - STATUS->AddDisplayMode(aDisplayMode);
1773 - if(STATUS->IsSubIntensityOn())
1774 - myMainPM->Color(anIObj,mySubIntensity,aDisplayMode);
1775 + if (theSelectionMode != -1)
1777 + if (!mgrSelector->Contains (theIObj))
1779 + mgrSelector->Load (theIObj);
1781 - if(aSelectionMode!=-1){
1782 - STATUS->AddSelectionMode(aSelectionMode);
1783 - mgrSelector->Activate(anIObj,aSelectionMode,myMainSel);
1784 + if (!mgrSelector->IsActivated (theIObj, theSelectionMode))
1786 + mgrSelector->Activate (theIObj, theSelectionMode, myMainSel);
1788 - if(updateviewer) myMainVwr->Update();
1794 - myLocalContexts(myCurLocalIndex)->Display(anIObj,aDisplayMode,allowdecomposition,aSelectionMode);
1795 - if(updateviewer) myMainVwr->Update();
1799 + if (theToUpdateViewer)
1801 + myMainVwr->Update();
1805 //=======================================================================
1809 //=======================================================================
1811 -void AIS_InteractiveContext::Load(const Handle(AIS_InteractiveObject)& anIObj,
1812 - const Standard_Integer SelMode,
1813 - const Standard_Boolean AllowDecomposition)
1814 +void AIS_InteractiveContext::Load (const Handle(AIS_InteractiveObject)& theIObj,
1815 + const Standard_Integer theSelMode,
1816 + const Standard_Boolean theToAllowDecomposition)
1818 - if(anIObj.IsNull()) return;
1819 - if(!anIObj->HasInteractiveContext()) anIObj->SetContext(this);
1821 + if (theIObj.IsNull())
1826 - if(!HasOpenedContext()) {
1827 - if(SelMode==-1 && !AllowDecomposition){
1828 - Standard_Integer DispMode,HiMod,SelModeDef;
1830 - GetDefModes(anIObj,DispMode,HiMod,SelModeDef);
1831 - Handle(AIS_GlobalStatus) STATUS=
1832 - new AIS_GlobalStatus(AIS_DS_Erased,DispMode,SelModeDef);
1833 - myObjects.Bind (anIObj,STATUS);
1836 + if (!theIObj->HasInteractiveContext())
1838 + theIObj->SetContext (this);
1841 + if (HasOpenedContext())
1843 + myLocalContexts (myCurLocalIndex)->Load (theIObj, theToAllowDecomposition, theSelMode);
1846 - myLocalContexts(myCurLocalIndex)->Load(anIObj,AllowDecomposition,SelMode);
1849 + if (theSelMode == -1
1850 + && !theToAllowDecomposition
1851 + && !myObjects.IsBound (theIObj))
1853 + Standard_Integer aDispMode, aHiMod, aSelModeDef;
1854 + GetDefModes (theIObj, aDispMode, aHiMod, aSelModeDef);
1855 + Handle(AIS_GlobalStatus) aStatus = new AIS_GlobalStatus (AIS_DS_Erased, aDispMode, aSelModeDef);
1856 + myObjects.Bind (theIObj, aStatus);
1860 //=======================================================================
1864 //=======================================================================
1866 -void AIS_InteractiveContext::Erase(const Handle(AIS_InteractiveObject)& anIObj,
1867 - const Standard_Boolean updateviewer)
1868 +void AIS_InteractiveContext::Erase (const Handle(AIS_InteractiveObject)& theIObj,
1869 + const Standard_Boolean theToUpdateViewer)
1871 - if(anIObj.IsNull()) return;
1873 - if ( !anIObj->IsAutoHilight() )
1874 - anIObj->ClearSelected();
1875 + if (theIObj.IsNull())
1880 - if(!HasOpenedContext()){
1881 - EraseGlobal(anIObj,updateviewer);
1882 + if (!theIObj->IsAutoHilight())
1884 + theIObj->ClearSelected();
1888 + Standard_Boolean wasInCtx = Standard_False;
1889 + if (HasOpenedContext())
1891 + // First it is checked if it is possible to remove in the current local context
1892 + // then one tries to remove in other local contexts, if they allow it...
1893 + wasInCtx = myLocalContexts (myCurLocalIndex)->Erase (theIObj);
1894 + for (AIS_DataMapIteratorOfDataMapOfILC aCtxIter (myLocalContexts); aCtxIter.More(); aCtxIter.Next())
1896 - // First it is checked if it is possible to remove in the current local context
1897 - // then one tries to remove in other local contexts, if they allow it...
1899 - Standard_Boolean WasInCtx = myLocalContexts(myCurLocalIndex)->Erase(anIObj);
1901 - AIS_DataMapIteratorOfDataMapOfILC It(myLocalContexts);
1902 - for (;It.More();It.Next()){
1903 - if(It.Value()->AcceptErase())
1905 - WasInCtx |= It.Value()->Erase(anIObj);
1907 - WasInCtx = It.Value()->Erase(anIObj);
1909 + if (aCtxIter.Value()->AcceptErase())
1911 + wasInCtx = aCtxIter.Value()->Erase (theIObj) || wasInCtx;
1915 - EraseGlobal(anIObj,updateviewer);
1917 - if(updateviewer) myMainVwr->Update();
1923 + EraseGlobal (theIObj, Standard_False);
1926 + if (theToUpdateViewer)
1928 + myMainVwr->Update();
1932 //=======================================================================
1933 //function : EraseAll
1936 //=======================================================================
1938 -void AIS_InteractiveContext::EraseAll(const Standard_Boolean updateviewer)
1939 +void AIS_InteractiveContext::EraseAll (const Standard_Boolean theToUpdateViewer)
1941 - if(!HasOpenedContext())
1942 + if (HasOpenedContext())
1944 - for (AIS_DataMapIteratorOfDataMapOfIOStatus ItM(myObjects); ItM.More(); ItM.Next())
1946 - if(ItM.Value()->GraphicStatus() == AIS_DS_Displayed)
1947 - Erase(ItM.Key(),Standard_False);
1953 + for (AIS_DataMapIteratorOfDataMapOfIOStatus anObjIter (myObjects); anObjIter.More(); anObjIter.Next())
1955 + if (anObjIter.Value()->GraphicStatus() == AIS_DS_Displayed)
1957 - myMainVwr->Update();
1958 + Erase (anObjIter.Key(), Standard_False);
1962 + if (theToUpdateViewer)
1964 + myMainVwr->Update();
1968 //=======================================================================
1969 //function : DisplayAll
1972 //=======================================================================
1974 -void AIS_InteractiveContext::DisplayAll(const Standard_Boolean updateviewer)
1975 +void AIS_InteractiveContext::DisplayAll (const Standard_Boolean theToUpdateViewer)
1977 - if(!HasOpenedContext()){
1979 - AIS_DisplayStatus aStatus;
1980 + if (HasOpenedContext())
1985 - if (!HasOpenedContext())
1986 + for (AIS_DataMapIteratorOfDataMapOfIOStatus anObjIter (myObjects); anObjIter.More(); anObjIter.Next())
1988 + const AIS_DisplayStatus aStatus = anObjIter.Value()->GraphicStatus();
1989 + if (aStatus == AIS_DS_Erased)
1991 - for (AIS_DataMapIteratorOfDataMapOfIOStatus ItM (myObjects); ItM.More(); ItM.Next())
1993 - aStatus = ItM.Value()->GraphicStatus();
1994 - if (aStatus == AIS_DS_Erased)
1995 - Display(ItM.Key(),Standard_False);
1999 - myMainVwr->Update();
2001 + Display (anObjIter.Key(), Standard_False);
2006 + if (theToUpdateViewer)
2008 + myMainVwr->Update();
2012 //=======================================================================
2013 //function : DisplaySelected
2016 //=======================================================================
2018 -void AIS_InteractiveContext::DisplaySelected(const Standard_Boolean updateviewer)
2019 +void AIS_InteractiveContext::DisplaySelected (const Standard_Boolean theToUpdateViewer)
2022 - if (!HasOpenedContext())
2023 + if (HasOpenedContext())
2025 - Standard_Boolean found = Standard_False;
2026 - Handle(AIS_Selection) sel = AIS_Selection::Selection(myCurrentName.ToCString());
2027 - Handle(AIS_InteractiveObject) iObj;
2028 - for (sel->Init(); sel->More(); sel->Next())
2030 - iObj = Handle(AIS_InteractiveObject)::DownCast(sel->Value());
2031 - Display(iObj,Standard_False);
2032 - found = Standard_True;
2034 - if (found && updateviewer)
2036 - myMainVwr->Update();
2041 + Standard_Boolean isFound = Standard_False;
2042 + Handle(AIS_Selection) aSelIter = AIS_Selection::Selection (myCurrentName.ToCString());
2043 + for (aSelIter->Init(); aSelIter->More(); aSelIter->Next())
2045 + Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast (aSelIter->Value());
2046 + Display (anObj, Standard_False);
2047 + isFound = Standard_True;
2051 + if (isFound && theToUpdateViewer)
2053 + myMainVwr->Update();
2057 //=======================================================================
2058 //function : EraseSelected
2061 //=======================================================================
2063 -void AIS_InteractiveContext::EraseSelected(const Standard_Boolean updateviewer)
2064 +void AIS_InteractiveContext::EraseSelected (const Standard_Boolean theToUpdateViewer)
2066 - if (!HasOpenedContext())
2067 + if (HasOpenedContext())
2069 - Standard_Boolean found = Standard_False;
2070 - Handle(AIS_Selection) sel = AIS_Selection::Selection(myCurrentName.ToCString());
2071 - Handle(AIS_InteractiveObject) iObj;
2072 - for (sel->Init();sel->More();sel->Next())
2074 - iObj = Handle(AIS_InteractiveObject)::DownCast(sel->Value());
2075 - Erase(iObj,Standard_False);
2076 - found = Standard_True;
2078 - if(found && updateviewer)
2080 - myMainVwr->Update();
2085 + Standard_Boolean isFound = Standard_False;
2086 + Handle(AIS_Selection) aSelIter = AIS_Selection::Selection(myCurrentName.ToCString());
2087 + for (aSelIter->Init(); aSelIter->More(); aSelIter->Next())
2089 + Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast (aSelIter->Value());
2090 + Erase (anObj, Standard_False);
2091 + isFound = Standard_True;
2094 + if (isFound && theToUpdateViewer)
2096 + myMainVwr->Update();
2100 //=======================================================================
2103 @@ -761,187 +687,163 @@
2104 return Standard_True;
2108 //=======================================================================
2110 +//function : DisplayStatus
2112 //=======================================================================
2114 -AIS_DisplayStatus AIS_InteractiveContext::DisplayStatus(const Handle(AIS_InteractiveObject)& anIObj) const
2115 +AIS_DisplayStatus AIS_InteractiveContext::DisplayStatus (const Handle(AIS_InteractiveObject)& theIObj) const
2117 - if(anIObj.IsNull()) return AIS_DS_None;
2119 - if(myObjects.IsBound(anIObj))
2120 - return myObjects(anIObj)->GraphicStatus();
2121 + if (theIObj.IsNull())
2123 + return AIS_DS_None;
2125 + else if (myObjects.IsBound (theIObj))
2127 + return myObjects (theIObj)->GraphicStatus();
2130 - AIS_DataMapIteratorOfDataMapOfILC ItM(myLocalContexts);
2131 - for(;ItM.More();ItM.Next()){
2132 - if(ItM.Value()->IsIn(anIObj))
2133 + for (AIS_DataMapIteratorOfDataMapOfILC aCtxIter (myLocalContexts); aCtxIter.More(); aCtxIter.Next())
2135 + if (aCtxIter.Value()->IsIn (theIObj))
2137 return AIS_DS_Temporary;
2148 //=======================================================================
2149 //function : DisplayedModes
2152 //=======================================================================
2154 -const TColStd_ListOfInteger& AIS_InteractiveContext::
2155 -DisplayedModes(const Handle(AIS_InteractiveObject)& anIObj) const
2156 +const TColStd_ListOfInteger& AIS_InteractiveContext::DisplayedModes (const Handle(AIS_InteractiveObject)& theIObj) const
2158 - return myObjects(anIObj)->DisplayedModes();
2159 + return myObjects (theIObj)->DisplayedModes();
2163 //=======================================================================
2167 //=======================================================================
2168 -void AIS_InteractiveContext::Remove(const Handle(AIS_InteractiveObject)& anIObj,
2169 - const Standard_Boolean updateviewer)
2170 +void AIS_InteractiveContext::Remove (const Handle(AIS_InteractiveObject)& theIObj,
2171 + const Standard_Boolean theToUpdateViewer)
2174 - if(anIObj.IsNull()) return;
2176 - if(!HasOpenedContext()){
2177 - ClearGlobal(anIObj,updateviewer);
2178 + if (theIObj.IsNull())
2184 + if (HasOpenedContext())
2186 + myLocalContexts (myCurLocalIndex)->Remove (theIObj);
2187 + for (AIS_DataMapIteratorOfDataMapOfILC aCtxIter (myLocalContexts); aCtxIter.More(); aCtxIter.Next())
2189 - myLocalContexts(myCurLocalIndex)->Remove(anIObj);
2190 - AIS_DataMapIteratorOfDataMapOfILC It(myLocalContexts);
2191 - for (;It.More() ;It.Next()){
2192 - if(It.Value()->AcceptErase())
2193 - It.Value()->Remove(anIObj);
2195 + if (aCtxIter.Value()->AcceptErase())
2197 + aCtxIter.Value()->Remove (theIObj);
2200 - ClearGlobal(anIObj,updateviewer);
2202 -// if(updateviewer) myMainVwr->Update();
2206 + ClearGlobal (theIObj, theToUpdateViewer);
2209 //=======================================================================
2210 //function : RemoveAll
2213 //=======================================================================
2214 -void AIS_InteractiveContext::RemoveAll(const Standard_Boolean updateviewer)
2215 +void AIS_InteractiveContext::RemoveAll (const Standard_Boolean theToUpdateViewer)
2217 AIS_ListOfInteractive aList;
2218 - ObjectsInside(aList);
2219 - AIS_ListIteratorOfListOfInteractive aListIterator;
2220 - for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
2221 - Remove(aListIterator.Value(), Standard_False);
2222 + ObjectsInside (aList);
2223 + for (AIS_ListIteratorOfListOfInteractive aListIterator (aList); aListIterator.More(); aListIterator.Next())
2225 + Remove (aListIterator.Value(), Standard_False);
2229 - myMainVwr->Update();
2232 -//=======================================================================
2235 -//=======================================================================
2237 -void AIS_InteractiveContext::Clear(const Handle(AIS_InteractiveObject)& anIObj,
2238 - const Standard_Boolean updateviewer)
2240 - if(anIObj.IsNull()) return;
2242 - if(!HasOpenedContext()){
2243 - ClearGlobal(anIObj,updateviewer);
2244 + if (theToUpdateViewer)
2246 + myMainVwr->Update();
2251 - Standard_Boolean WasInCtx = myLocalContexts(myCurLocalIndex)->Remove(anIObj);
2252 - AIS_DataMapIteratorOfDataMapOfILC It(myLocalContexts);
2253 - for (;It.More() ;It.Next()){
2254 - if(It.Value()->AcceptErase())
2255 - WasInCtx = It.Value()->Remove(anIObj);
2259 - ClearGlobal(anIObj,updateviewer);
2261 - if(updateviewer) myMainVwr->Update();
2268 //=======================================================================
2269 //function : ClearPrs
2272 //=======================================================================
2274 -void AIS_InteractiveContext::ClearPrs(const Handle(AIS_InteractiveObject)& anIObj,
2275 - const Standard_Integer aMode,
2276 - const Standard_Boolean updateviewer)
2277 +void AIS_InteractiveContext::ClearPrs (const Handle(AIS_InteractiveObject)& theIObj,
2278 + const Standard_Integer theMode,
2279 + const Standard_Boolean theToUpdateViewer)
2281 - if(anIObj.IsNull()) return;
2282 + if (theIObj.IsNull())
2287 - if(!HasOpenedContext()){
2288 - ClearGlobalPrs(anIObj,aMode,updateviewer);
2289 + if (!HasOpenedContext())
2291 + ClearGlobalPrs (theIObj, theMode, theToUpdateViewer);
2296 + Standard_Boolean wasInCtx = myLocalContexts (myCurLocalIndex)->ClearPrs (theIObj, theMode);
2297 + for (AIS_DataMapIteratorOfDataMapOfILC aCtxIter (myLocalContexts); aCtxIter.More(); aCtxIter.Next())
2299 + if (aCtxIter.Value()->AcceptErase())
2301 - Standard_Boolean WasInCtx = myLocalContexts(myCurLocalIndex)->ClearPrs(anIObj,aMode);
2302 - AIS_DataMapIteratorOfDataMapOfILC It(myLocalContexts);
2303 - for (;It.More() ;It.Next()){
2304 - if(It.Value()->AcceptErase())
2305 - WasInCtx = It.Value()->ClearPrs(anIObj,aMode);
2308 - ClearGlobalPrs(anIObj,aMode,updateviewer);
2310 - if(updateviewer) myMainVwr->Update();
2312 + wasInCtx = aCtxIter.Value()->ClearPrs (theIObj, theMode) || wasInCtx;
2317 + ClearGlobalPrs (theIObj, theMode, theToUpdateViewer);
2319 + else if (theToUpdateViewer)
2321 + myMainVwr->Update();
2325 //=======================================================================
2326 //function : Hilight
2329 //=======================================================================
2331 -void AIS_InteractiveContext::Hilight(const Handle(AIS_InteractiveObject)& anIObj,
2332 - const Standard_Boolean updateviewer)
2333 +void AIS_InteractiveContext::Hilight (const Handle(AIS_InteractiveObject)& theIObj,
2334 + const Standard_Boolean theToUpdateViewer)
2336 - if(anIObj.IsNull()) return;
2337 + if (theIObj.IsNull())
2342 - if(!anIObj->HasInteractiveContext()) anIObj->SetContext(this);
2343 + if (!theIObj->HasInteractiveContext())
2345 + theIObj->SetContext (this);
2347 if (!HasOpenedContext())
2349 - if(!myObjects.IsBound(anIObj)) return;
2352 - // const Handle(AIS_GlobalStatus)& STATUS = myObjects(anIObj);
2353 - // const TColStd_ListOfInteger& LL = STATUS->DisplayedModes();
2354 - Handle(AIS_GlobalStatus) STATUS = myObjects(anIObj);
2357 - STATUS->SetHilightStatus (Standard_True);
2358 + if (!myObjects.IsBound (theIObj))
2363 - if (STATUS->GraphicStatus() == AIS_DS_Displayed)
2364 + Handle(AIS_GlobalStatus) aStatus = myObjects (theIObj);
2365 + aStatus->SetHilightStatus (Standard_True);
2366 + if (aStatus->GraphicStatus() == AIS_DS_Displayed)
2368 - Standard_Integer aHilightMode = anIObj->HasHilightMode() ? anIObj->HilightMode() : 0;
2369 - myMainPM->Highlight (anIObj, aHilightMode);
2370 + Standard_Integer aHilightMode = theIObj->HasHilightMode() ? theIObj->HilightMode() : 0;
2371 + myMainPM->Highlight (theIObj, aHilightMode);
2376 - myLocalContexts(myCurLocalIndex)->Hilight(anIObj);
2377 + myLocalContexts (myCurLocalIndex)->Hilight (theIObj);
2380 - if(updateviewer) myMainVwr->Update();
2381 + if (theToUpdateViewer)
2383 + myMainVwr->Update();
2386 //=======================================================================
2387 //function : Hilight
2388 @@ -1086,153 +988,165 @@
2390 //=======================================================================
2391 //function : IsDisplayed
2394 //=======================================================================
2396 -Standard_Boolean AIS_InteractiveContext::
2397 -IsDisplayed(const Handle(AIS_InteractiveObject)& anIObj,
2398 - const Standard_Integer aMode) const
2399 +Standard_Boolean AIS_InteractiveContext::IsDisplayed (const Handle(AIS_InteractiveObject)& theIObj,
2400 + const Standard_Integer theMode) const
2402 - if(anIObj.IsNull()) return Standard_False;
2403 - if(myObjects.IsBound(anIObj)) {
2404 - if(myObjects(anIObj)->GraphicStatus()==AIS_DS_Displayed &&
2405 - myObjects(anIObj)->IsDModeIn(aMode))
2406 + if (theIObj.IsNull())
2408 + return Standard_False;
2411 + if (myObjects.IsBound (theIObj))
2413 + Handle(AIS_GlobalStatus) aStatus = myObjects (theIObj);
2414 + if (aStatus->GraphicStatus() == AIS_DS_Displayed
2415 + && aStatus->IsDModeIn (theMode))
2417 return Standard_True;
2421 - AIS_DataMapIteratorOfDataMapOfILC ItM(myLocalContexts);
2422 - for(;ItM.More();ItM.Next()){
2423 - if(ItM.Value()->IsDisplayed(anIObj,aMode))
2425 + for (AIS_DataMapIteratorOfDataMapOfILC aCtxIter (myLocalContexts); aCtxIter.More(); aCtxIter.Next())
2427 + if (aCtxIter.Value()->IsDisplayed (theIObj, theMode))
2429 return Standard_True;
2432 return Standard_False;
2436 //=======================================================================
2437 //function : DisplayPriority
2440 //=======================================================================
2442 -Standard_Integer AIS_InteractiveContext::
2443 -DisplayPriority(const Handle(AIS_InteractiveObject)& anIObj) const
2444 +Standard_Integer AIS_InteractiveContext::DisplayPriority (const Handle(AIS_InteractiveObject)& theIObj) const
2446 - if(anIObj.IsNull()) return -1;
2447 + if (theIObj.IsNull())
2451 + else if (!myObjects.IsBound (theIObj))
2456 - if (myObjects.IsBound(anIObj))
2457 + Handle(AIS_GlobalStatus) aStatus = myObjects (theIObj);
2458 + if (aStatus->GraphicStatus() == AIS_DS_Displayed
2459 + || aStatus->GraphicStatus() == AIS_DS_Erased)
2461 - Handle(AIS_GlobalStatus) STATUS = myObjects(anIObj);
2462 - if (STATUS->GraphicStatus() == AIS_DS_Displayed || STATUS->GraphicStatus() == AIS_DS_Erased)
2464 - Standard_Integer aDispMode = anIObj->HasDisplayMode() ? anIObj->DisplayMode() :
2465 - (anIObj->AcceptDisplayMode(myDisplayMode)? myDisplayMode : 0);
2466 - return myMainPM->DisplayPriority (anIObj, aDispMode);
2468 + Standard_Integer aDispMode = theIObj->HasDisplayMode()
2469 + ? theIObj->DisplayMode()
2470 + : (theIObj->AcceptDisplayMode (myDisplayMode)
2473 + return myMainPM->DisplayPriority (theIObj, aDispMode);
2478 //=======================================================================
2479 //function : SetDisplayPriority
2482 //=======================================================================
2484 -void AIS_InteractiveContext::SetDisplayPriority(const Handle(AIS_InteractiveObject)& anIObj,
2485 - const Standard_Integer aPriority)
2486 +void AIS_InteractiveContext::SetDisplayPriority (const Handle(AIS_InteractiveObject)& theIObj,
2487 + const Standard_Integer thePriority)
2489 - if(anIObj.IsNull())
2490 + if (theIObj.IsNull())
2493 - if(!anIObj->HasInteractiveContext())
2494 - anIObj->SetContext(this);
2495 - if(myObjects.IsBound(anIObj))
2498 + if (!theIObj->HasInteractiveContext())
2500 - Handle(AIS_GlobalStatus) STATUS = myObjects(anIObj);
2501 + theIObj->SetContext (this);
2504 - if (STATUS->GraphicStatus() == AIS_DS_Displayed || STATUS->GraphicStatus() == AIS_DS_Erased)
2506 - Standard_Integer aDisplayMode = anIObj->HasDisplayMode() ? anIObj->DisplayMode() :
2507 - (anIObj->AcceptDisplayMode(myDisplayMode)? myDisplayMode : 0);
2508 - myMainPM->SetDisplayPriority (anIObj, aDisplayMode, aPriority);
2509 + if (myObjects.IsBound (theIObj))
2511 + Handle(AIS_GlobalStatus) aStatus = myObjects (theIObj);
2512 + if (aStatus->GraphicStatus() == AIS_DS_Displayed
2513 + || aStatus->GraphicStatus() == AIS_DS_Erased)
2515 + Standard_Integer aDisplayMode = theIObj->HasDisplayMode()
2516 + ? theIObj->DisplayMode()
2517 + : (theIObj->AcceptDisplayMode (myDisplayMode)
2520 + myMainPM->SetDisplayPriority (theIObj, aDisplayMode, thePriority);
2523 else if (HasOpenedContext())
2525 - myLocalContexts(myCurLocalIndex)->SetDisplayPriority(anIObj,aPriority);
2526 + myLocalContexts (myCurLocalIndex)->SetDisplayPriority (theIObj, thePriority);
2530 //=======================================================================
2531 //function : Redisplay
2534 //=======================================================================
2536 -void AIS_InteractiveContext::Redisplay(const Handle(AIS_InteractiveObject)& anIObj,
2537 - const Standard_Boolean updateviewer,
2538 - const Standard_Boolean allmodes)
2539 +void AIS_InteractiveContext::Redisplay (const Handle(AIS_InteractiveObject)& theIObj,
2540 + const Standard_Boolean theToUpdateViewer,
2541 + const Standard_Boolean theAllModes)
2543 - if(AISDebugModeOn()){
2544 - cout<<"===>AIS_InteractiveContext::Redisplay de :";
2545 - cout<<anIObj->DynamicType()->Name()<<endl;
2548 - RecomputePrsOnly(anIObj,updateviewer,allmodes);
2549 - RecomputeSelectionOnly(anIObj);
2550 + RecomputePrsOnly (theIObj, theToUpdateViewer, theAllModes);
2551 + RecomputeSelectionOnly (theIObj);
2554 //=======================================================================
2555 //function : Redisplay
2558 //=======================================================================
2560 -void AIS_InteractiveContext::Redisplay(const AIS_KindOfInteractive KOI,
2561 - const Standard_Integer /*Sign*/,
2562 - const Standard_Boolean updateviewer)
2564 - Standard_Boolean found_viewer(Standard_False);
2566 - for(AIS_DataMapIteratorOfDataMapOfIOStatus It(myObjects);It.More();It.Next()){
2568 - // const Handle(AIS_InteractiveObject)& IO = It.Key();
2569 - Handle(AIS_InteractiveObject) IO = It.Key();
2571 - if(IO->Type()== KOI){
2573 -// Standard_Boolean good = (Sign==-1)? Standard_True :
2574 -// ((IO->Signature()==Sign)? Standard_True:Standard_False);
2576 - Redisplay(IO,Standard_False);
2577 - if (It.Value()->GraphicStatus() == AIS_DS_Displayed)
2579 - found_viewer = Standard_True;
2581 +void AIS_InteractiveContext::Redisplay (const AIS_KindOfInteractive theKOI,
2582 + const Standard_Integer /*theSign*/,
2583 + const Standard_Boolean theToUpdateViewer)
2585 + Standard_Boolean isRedisplayed = Standard_False;
2586 + for (AIS_DataMapIteratorOfDataMapOfIOStatus anObjIter (myObjects); anObjIter.More(); anObjIter.Next())
2588 + Handle(AIS_InteractiveObject) anObj = anObjIter.Key();
2589 + if (anObj->Type() != theKOI)
2594 + Redisplay (anObj, Standard_False);
2595 + isRedisplayed = anObjIter.Value()->GraphicStatus() == AIS_DS_Displayed
2598 - // update viewer...
2599 - if(updateviewer && found_viewer)
2601 + if (theToUpdateViewer
2604 myMainVwr->Update();
2609 //=======================================================================
2610 //function : RecomputePrsOnly
2613 //=======================================================================
2615 -void AIS_InteractiveContext::RecomputePrsOnly(const Handle(AIS_InteractiveObject)& anIObj,
2616 - const Standard_Boolean updateviewer,
2617 - const Standard_Boolean allmodes)
2618 +void AIS_InteractiveContext::RecomputePrsOnly (const Handle(AIS_InteractiveObject)& theIObj,
2619 + const Standard_Boolean theToUpdateViewer,
2620 + const Standard_Boolean theAllModes)
2622 - if(anIObj.IsNull()) return;
2623 - anIObj->Update(allmodes);
2624 + if (theIObj.IsNull())
2629 - if (!updateviewer)
2630 + theIObj->Update (theAllModes);
2631 + if (!theToUpdateViewer)
2636 - if (HasOpenedContext() ||
2637 - (myObjects.IsBound(anIObj) && myObjects(anIObj)->GraphicStatus() == AIS_DS_Displayed))
2638 + if (HasOpenedContext()
2639 + || (myObjects.IsBound (theIObj)
2640 + && myObjects (theIObj)->GraphicStatus() == AIS_DS_Displayed))
2642 myMainVwr->Update();
2644 @@ -1276,21 +1190,19 @@
2646 //=======================================================================
2650 //=======================================================================
2651 void AIS_InteractiveContext::Update (const Handle(AIS_InteractiveObject)& theIObj,
2652 - const Standard_Boolean theUpdateViewer)
2653 + const Standard_Boolean theUpdateViewer)
2655 if (theIObj.IsNull())
2660 - TColStd_ListOfInteger aListOfFlaggedPrsModes;
2661 - theIObj->ToBeUpdated (aListOfFlaggedPrsModes);
2663 - TColStd_ListIteratorOfListOfInteger aPrsModesIt (aListOfFlaggedPrsModes);
2664 - for ( ; aPrsModesIt.More(); aPrsModesIt.Next())
2665 + TColStd_ListOfInteger aPrsModes;
2666 + theIObj->ToBeUpdated (aPrsModes);
2667 + for (TColStd_ListIteratorOfListOfInteger aPrsModesIt (aPrsModes); aPrsModesIt.More(); aPrsModesIt.Next())
2669 theIObj->Update (aPrsModesIt.Value(), Standard_False);
2671 @@ -1323,138 +1235,142 @@
2673 //=======================================================================
2674 //function : SetLocation
2677 //=======================================================================
2679 -void AIS_InteractiveContext::SetLocation(const Handle(AIS_InteractiveObject)& anIObj,
2680 - const TopLoc_Location& aLoc)
2681 +void AIS_InteractiveContext::SetLocation (const Handle(AIS_InteractiveObject)& theIObj,
2682 + const TopLoc_Location& theLoc)
2684 - if(anIObj.IsNull()) return;
2686 + if (theIObj.IsNull())
2691 - if(anIObj->HasTransformation() && aLoc.IsIdentity()){
2692 - anIObj->ResetTransformation();
2693 - mgrSelector->Update(anIObj,Standard_False);
2694 + if (theIObj->HasTransformation()
2695 + && theLoc.IsIdentity())
2697 + theIObj->ResetTransformation();
2698 + mgrSelector->Update (theIObj, Standard_False);
2701 + else if (theLoc.IsIdentity())
2705 - if(aLoc.IsIdentity()) return ;
2707 // first reset the previous location to properly clean everything...
2708 - if(anIObj->HasTransformation())
2709 - anIObj->ResetTransformation();
2710 + if (theIObj->HasTransformation())
2712 + theIObj->ResetTransformation();
2715 + theIObj->SetLocalTransformation (theLoc.Transformation());
2717 - anIObj->SetLocalTransformation (aLoc.Transformation());
2719 - if(!HasOpenedContext())
2720 - mgrSelector->Update(anIObj,Standard_False);
2721 + if (!HasOpenedContext())
2723 + mgrSelector->Update (theIObj, Standard_False);
2728 - // const Handle(StdSelect_ViewerSelector3d)& tempSel = myLocalContexts(myCurLocalIndex)->MainSelector();
2729 - Handle(StdSelect_ViewerSelector3d) tempSel = myLocalContexts(myCurLocalIndex)->MainSelector();
2731 - mgrSelector->Update(anIObj,tempSel,Standard_False);
2734 + Handle(StdSelect_ViewerSelector3d) aTempSel = myLocalContexts (myCurLocalIndex)->MainSelector();
2735 + mgrSelector->Update (theIObj, aTempSel, Standard_False);
2739 //=======================================================================
2740 //function : ResetLocation
2743 //=======================================================================
2744 -void AIS_InteractiveContext::ResetLocation(const Handle(AIS_InteractiveObject)& anIObj)
2745 +void AIS_InteractiveContext::ResetLocation (const Handle(AIS_InteractiveObject)& theIObj)
2747 - if(anIObj.IsNull()) return;
2748 + if (theIObj.IsNull())
2753 - anIObj->ResetTransformation();
2754 - mgrSelector->Update(anIObj,Standard_False);
2755 + theIObj->ResetTransformation();
2756 + mgrSelector->Update (theIObj, Standard_False);
2759 //=======================================================================
2760 //function : HasLocation
2763 //=======================================================================
2765 -Standard_Boolean AIS_InteractiveContext::
2766 -HasLocation(const Handle(AIS_InteractiveObject)& anIObj) const
2767 +Standard_Boolean AIS_InteractiveContext::HasLocation (const Handle(AIS_InteractiveObject)& theIObj) const
2769 - if(anIObj.IsNull()) return Standard_False;
2771 - return anIObj->HasTransformation();
2772 + return !theIObj.IsNull()
2773 + && theIObj->HasTransformation();
2776 -TopLoc_Location AIS_InteractiveContext::
2777 -Location(const Handle(AIS_InteractiveObject)& anIObj) const
2778 +//=======================================================================
2779 +//function : Location
2781 +//=======================================================================
2782 +TopLoc_Location AIS_InteractiveContext::Location (const Handle(AIS_InteractiveObject)& theIObj) const
2784 - return anIObj->Transformation();
2785 + return theIObj->Transformation();
2788 //=======================================================================
2789 //function : SetDeviationCoefficient
2792 //=======================================================================
2794 -void AIS_InteractiveContext::SetDeviationCoefficient(const Standard_Real aCoefficient)
2795 +void AIS_InteractiveContext::SetDeviationCoefficient (const Standard_Real theCoefficient)
2797 - myDefaultDrawer->SetDeviationCoefficient(aCoefficient);
2798 + myDefaultDrawer->SetDeviationCoefficient (theCoefficient);
2801 //=======================================================================
2802 //function : SetDeviationAngle
2805 //=======================================================================
2807 -void AIS_InteractiveContext::SetDeviationAngle(const Standard_Real anAngle)
2808 +void AIS_InteractiveContext::SetDeviationAngle (const Standard_Real theAngle)
2810 - myDefaultDrawer->SetDeviationCoefficient(anAngle);
2811 + myDefaultDrawer->SetDeviationCoefficient (theAngle);
2814 //=======================================================================
2815 //function : DeviationAngle
2816 //purpose : Gets deviationAngle
2817 //=======================================================================
2819 Standard_Real AIS_InteractiveContext::DeviationAngle() const
2821 - //return M_PI/180.0e0 ;
2822 - return myDefaultDrawer->DeviationAngle();
2823 + return myDefaultDrawer->DeviationAngle();
2826 //=======================================================================
2827 //function : DeviationCoefficient
2830 //=======================================================================
2832 -Standard_Real AIS_InteractiveContext::DeviationCoefficient() const
2833 +Standard_Real AIS_InteractiveContext::DeviationCoefficient() const
2835 return myDefaultDrawer->DeviationCoefficient();
2838 //=======================================================================
2839 //function : SetHLRDeviationCoefficient
2842 //=======================================================================
2844 -void AIS_InteractiveContext::SetHLRDeviationCoefficient(const Standard_Real aCoefficient)
2845 +void AIS_InteractiveContext::SetHLRDeviationCoefficient (const Standard_Real theCoefficient)
2847 - myDefaultDrawer->SetHLRDeviationCoefficient(aCoefficient);
2848 + myDefaultDrawer->SetHLRDeviationCoefficient (theCoefficient);
2851 //=======================================================================
2852 //function : HLRDeviationCoefficient
2855 //=======================================================================
2857 -Standard_Real AIS_InteractiveContext::HLRDeviationCoefficient() const
2858 +Standard_Real AIS_InteractiveContext::HLRDeviationCoefficient() const
2860 return myDefaultDrawer->HLRDeviationCoefficient();
2863 //=======================================================================
2864 //function : SetHLRAngle
2867 //=======================================================================
2869 -void AIS_InteractiveContext::SetHLRAngle(const Standard_Real anAngle)
2870 +void AIS_InteractiveContext::SetHLRAngle (const Standard_Real theAngle)
2872 - myDefaultDrawer->SetHLRAngle(anAngle);
2873 + myDefaultDrawer->SetHLRAngle (theAngle);
2876 //=======================================================================
2877 @@ -1463,23 +1379,19 @@
2878 // and set them in myHLRAngle and in myHLRDeviationCoefficient
2879 // of myDefaultDrawer
2880 //=======================================================================
2882 -void AIS_InteractiveContext::SetHLRAngleAndDeviation(const Standard_Real anAngle)
2883 +void AIS_InteractiveContext::SetHLRAngleAndDeviation (const Standard_Real theAngle)
2885 + Standard_Real anOutAngl, anOutDefl;
2886 + HLRBRep::PolyHLRAngleAndDeflection (theAngle, anOutAngl, anOutDefl);
2888 - Standard_Real OutAngl,OutDefl;
2889 - HLRBRep::PolyHLRAngleAndDeflection(anAngle,OutAngl,OutDefl);
2891 - myDefaultDrawer->SetHLRAngle(OutAngl);
2892 - myDefaultDrawer->SetHLRDeviationCoefficient(OutDefl);
2894 + myDefaultDrawer->SetHLRAngle (anOutAngl);
2895 + myDefaultDrawer->SetHLRDeviationCoefficient (anOutDefl);
2898 //=======================================================================
2899 //function : HLRAngle
2902 //=======================================================================
2904 Standard_Real AIS_InteractiveContext::HLRAngle() const
2906 return myDefaultDrawer->HLRAngle();
2907 @@ -1487,1348 +1399,1320 @@
2909 //=======================================================================
2910 //function : SetDisplayMode
2913 //=======================================================================
2915 -void AIS_InteractiveContext::SetDisplayMode(const AIS_DisplayMode aMode,
2916 - const Standard_Boolean updateviewer)
2917 +void AIS_InteractiveContext::SetDisplayMode (const AIS_DisplayMode theMode,
2918 + const Standard_Boolean theToUpdateViewer)
2920 - if(aMode==myDisplayMode) return;
2921 - AIS_DataMapIteratorOfDataMapOfIOStatus It(myObjects);
2922 + if (theMode == myDisplayMode)
2927 - for(;It.More();It.Next()){
2929 - // const Handle(AIS_InteractiveObject)& anObj = It.Key();
2930 - Handle(AIS_InteractiveObject) anObj = It.Key();
2932 - Standard_Boolean Processed = (anObj->IsKind(STANDARD_TYPE(AIS_Shape)) ||
2933 - anObj->IsKind(STANDARD_TYPE(AIS_ConnectedInteractive)) ||
2934 - anObj->IsKind(STANDARD_TYPE(AIS_MultipleConnectedInteractive)) );
2935 + for (AIS_DataMapIteratorOfDataMapOfIOStatus anObjIter (myObjects); anObjIter.More(); anObjIter.Next())
2937 + Handle(AIS_InteractiveObject) anObj = anObjIter.Key();
2938 + Standard_Boolean toProcess = anObj->IsKind (STANDARD_TYPE(AIS_Shape))
2939 + || anObj->IsKind (STANDARD_TYPE(AIS_ConnectedInteractive))
2940 + || anObj->IsKind (STANDARD_TYPE(AIS_MultipleConnectedInteractive));
2942 - if ((!anObj->HasDisplayMode()) && Processed)
2944 + || anObj->HasDisplayMode()
2945 + || !anObj->AcceptDisplayMode (theMode))
2950 + Handle(AIS_GlobalStatus) aStatus = anObjIter.Value();
2951 + if (aStatus->IsDModeIn (myDisplayMode))
2953 + aStatus->RemoveDisplayMode (myDisplayMode);
2956 + aStatus->AddDisplayMode (theMode);
2957 + if (aStatus->GraphicStatus() == AIS_DS_Displayed)
2959 + myMainPM->SetVisibility (anObj, myDisplayMode, Standard_False);
2960 + myMainPM->Display (anObj, theMode);
2961 + if (aStatus->IsSubIntensityOn())
2963 - if(anObj->AcceptDisplayMode(aMode)){
2965 - // const Handle(AIS_GlobalStatus)& STATUS = It.Value();
2966 - Handle(AIS_GlobalStatus) STATUS = It.Value();
2968 - if(STATUS->IsDModeIn(myDisplayMode))
2969 - STATUS->RemoveDisplayMode(myDisplayMode);
2971 - STATUS->AddDisplayMode(aMode);
2973 - if(STATUS->GraphicStatus()== AIS_DS_Displayed){
2974 - myMainPM->SetVisibility (anObj, myDisplayMode, Standard_False);
2975 - myMainPM->Display(anObj, aMode);
2976 - if(STATUS->IsSubIntensityOn())
2977 - myMainPM->Color(anObj,mySubIntensity,aMode);
2979 - // myDisplayMode = aMode;
2981 + myMainPM->Color (anObj, mySubIntensity, theMode);
2985 - myDisplayMode = aMode;
2986 - if(updateviewer) myMainVwr->Update();
2992 + myDisplayMode = theMode;
2993 + if (theToUpdateViewer)
2995 + myMainVwr->Update();
2999 //=======================================================================
3000 //function : SetDisplayMode
3003 //=======================================================================
3005 -void AIS_InteractiveContext::SetDisplayMode(const Handle(AIS_InteractiveObject)& anIObj,
3006 - const Standard_Integer aMode,
3007 - const Standard_Boolean updateviewer)
3008 +void AIS_InteractiveContext::SetDisplayMode (const Handle(AIS_InteractiveObject)& theIObj,
3009 + const Standard_Integer theMode,
3010 + const Standard_Boolean theToUpdateViewer)
3013 - if(!anIObj->HasInteractiveContext())
3014 - anIObj->SetContext(this);
3015 - if(!HasOpenedContext()){
3017 - if(!myObjects.IsBound(anIObj))
3018 - anIObj->SetDisplayMode(aMode);
3019 - else if( anIObj->AcceptDisplayMode(aMode) )
3022 - // const Handle(AIS_GlobalStatus)& STATUS = myObjects(anIObj);
3023 - Handle(AIS_GlobalStatus) STATUS = myObjects(anIObj);
3025 - // SAN : erase presentations for all display modes different from <aMode>
3026 - if(STATUS->GraphicStatus()==AIS_DS_Displayed){
3027 - TColStd_ListOfInteger aModesToRemove;
3028 - TColStd_ListIteratorOfListOfInteger ItL (STATUS->DisplayedModes());
3029 - for(;ItL.More();ItL.Next()){
3031 - Standard_Integer OldMode = ItL.Value();
3033 - if(OldMode!=aMode){
3034 - aModesToRemove.Append(OldMode);
3035 - if(myMainPM->IsHighlighted(anIObj,OldMode))
3036 - myMainPM->Unhighlight(anIObj,OldMode);
3037 - myMainPM->SetVisibility (anIObj, OldMode, Standard_False);
3040 + if (!theIObj->HasInteractiveContext())
3042 + theIObj->SetContext(this);
3045 + if (HasOpenedContext())
3050 - for(ItL.Initialize(aModesToRemove);ItL.More();ItL.Next())
3051 - STATUS->RemoveDisplayMode(ItL.Value());
3052 + if (!myObjects.IsBound (theIObj))
3054 + theIObj->SetDisplayMode (theMode);
3057 + else if (!theIObj->AcceptDisplayMode (theMode))
3062 - if(!STATUS->IsDModeIn(aMode))
3063 - STATUS->AddDisplayMode(aMode);
3064 + Handle(AIS_GlobalStatus) aStatus = myObjects (theIObj);
3065 + if (aStatus->GraphicStatus() != AIS_DS_Displayed)
3067 + theIObj->SetDisplayMode (theMode);
3071 - myMainPM->Display(anIObj,aMode);
3072 - Standard_Integer DM,HM,SM;
3073 - GetDefModes(anIObj,DM,HM,SM);
3074 - if(STATUS->IsHilighted()){
3075 - myMainPM->Highlight(anIObj,HM);
3077 - if(STATUS->IsSubIntensityOn()){
3078 - myMainPM->Color(anIObj,mySubIntensity,aMode);
3080 - if(anIObj->IsTransparent() && !myMainVwr->Viewer()->Transparency())
3081 - myMainVwr->Viewer()->SetTransparency(Standard_True);
3083 - if(updateviewer) myMainVwr->Update();
3084 + // erase presentations for all display modes different from <aMode>
3085 + TColStd_ListOfInteger aModesToRemove;
3086 + for (TColStd_ListIteratorOfListOfInteger aDispModeIter (aStatus->DisplayedModes()); aDispModeIter.More(); aDispModeIter.Next())
3088 + const Standard_Integer anOldMode = aDispModeIter.Value();
3089 + if (anOldMode != theMode)
3091 + aModesToRemove.Append (anOldMode);
3092 + if (myMainPM->IsHighlighted (theIObj, anOldMode))
3094 + myMainPM->Unhighlight (theIObj, anOldMode);
3096 - anIObj->SetDisplayMode(aMode);
3097 + myMainPM->SetVisibility (theIObj, anOldMode, Standard_False);
3101 + for (TColStd_ListIteratorOfListOfInteger aRemModeIter (aModesToRemove); aRemModeIter.More(); aRemModeIter.Next())
3103 + aStatus->RemoveDisplayMode (aRemModeIter.Value());
3106 + if (!aStatus->IsDModeIn (theMode))
3108 + aStatus->AddDisplayMode (theMode);
3111 + myMainPM->Display (theIObj, theMode);
3112 + Standard_Integer aDispMode, aHiMode, aSelMode;
3113 + GetDefModes (theIObj, aDispMode, aHiMode, aSelMode);
3114 + if (aStatus->IsHilighted())
3116 + myMainPM->Highlight (theIObj, aHiMode);
3118 + if (aStatus->IsSubIntensityOn())
3120 + myMainPM->Color (theIObj, mySubIntensity, theMode);
3123 + if (theToUpdateViewer)
3125 + myMainVwr->Update();
3127 + theIObj->SetDisplayMode (theMode);
3130 //=======================================================================
3131 //function : UnsetDisplayMode
3134 //=======================================================================
3136 -void AIS_InteractiveContext::
3137 -UnsetDisplayMode(const Handle(AIS_InteractiveObject)& anIObj,
3138 - const Standard_Boolean updateviewer)
3139 +void AIS_InteractiveContext::UnsetDisplayMode (const Handle(AIS_InteractiveObject)& theIObj,
3140 + const Standard_Boolean theToUpdateViewer)
3142 - if(anIObj.IsNull()) return ;
3143 - if(!anIObj->HasDisplayMode()) return;
3145 - if(!myObjects.IsBound(anIObj))
3146 - anIObj->UnsetDisplayMode();
3148 + if (theIObj.IsNull()
3149 + || !theIObj->HasDisplayMode())
3154 + if (!myObjects.IsBound (theIObj))
3156 + theIObj->UnsetDisplayMode();
3160 + const Standard_Integer anOldMode = theIObj->DisplayMode();
3161 + if (myDisplayMode == anOldMode)
3166 + const Handle(AIS_GlobalStatus)& aStatus = myObjects (theIObj);
3167 + aStatus->RemoveDisplayMode (anOldMode);
3168 + if (!aStatus->IsDModeIn(myDisplayMode))
3170 + aStatus->AddDisplayMode (myDisplayMode);
3173 + if (aStatus->GraphicStatus() == AIS_DS_Displayed)
3175 + if (myMainPM->IsHighlighted (theIObj, anOldMode))
3177 - Standard_Integer OldMode = anIObj->DisplayMode();
3178 - if(myDisplayMode==OldMode) return;
3179 - const Handle(AIS_GlobalStatus)& STATUS = myObjects(anIObj);
3180 - STATUS->RemoveDisplayMode(OldMode);
3181 - if(!STATUS->IsDModeIn(myDisplayMode))
3182 - STATUS->AddDisplayMode(myDisplayMode);
3183 - if(STATUS->GraphicStatus()==AIS_DS_Displayed){
3184 - if(myMainPM->IsHighlighted(anIObj,OldMode))
3185 - myMainPM->Unhighlight(anIObj,OldMode);
3186 - myMainPM->SetVisibility (anIObj, OldMode, Standard_False);
3187 - myMainPM->Display(anIObj,myDisplayMode);
3188 - Standard_Integer DM,HM,SM;
3189 - GetDefModes(anIObj,DM,HM,SM);
3190 - if(STATUS->IsHilighted()){
3191 - myMainPM->Highlight(anIObj,HM);
3193 - if(STATUS->IsSubIntensityOn()){
3194 - myMainPM->Color(anIObj,mySubIntensity,myDisplayMode);
3196 - if(updateviewer) myMainVwr->Update();
3198 - anIObj->UnsetDisplayMode();
3200 + myMainPM->Unhighlight (theIObj, anOldMode);
3202 + myMainPM->SetVisibility (theIObj, anOldMode, Standard_False);
3203 + myMainPM->Display (theIObj, myDisplayMode);
3205 + Standard_Integer aDispMode, aHiMode, aSelMode;
3206 + GetDefModes (theIObj, aDispMode, aHiMode, aSelMode);
3207 + if (aStatus->IsHilighted())
3209 + myMainPM->Highlight (theIObj, aHiMode);
3211 + if (aStatus->IsSubIntensityOn())
3213 + myMainPM->Color (theIObj, mySubIntensity, myDisplayMode);
3216 + if (theToUpdateViewer)
3218 + myMainVwr->Update();
3222 + theIObj->UnsetDisplayMode();
3225 //=======================================================================
3226 //function : SetCurrentFacingModel
3229 //=======================================================================
3231 -void AIS_InteractiveContext::SetCurrentFacingModel(
3232 - const Handle(AIS_InteractiveObject)& anIObj,
3233 - const Aspect_TypeOfFacingModel aModel)
3234 +void AIS_InteractiveContext::SetCurrentFacingModel (const Handle(AIS_InteractiveObject)& theIObj,
3235 + const Aspect_TypeOfFacingModel theModel)
3237 - if ( !anIObj.IsNull () )
3238 - anIObj->SetCurrentFacingModel(aModel);
3239 + if (!theIObj.IsNull())
3241 + theIObj->SetCurrentFacingModel (theModel);
3245 //=======================================================================
3246 -//function : SetColor
3248 +//function : redisplayPrsRecModes
3250 //=======================================================================
3252 -void AIS_InteractiveContext::SetColor(const Handle(AIS_InteractiveObject)& anIObj,
3253 - const Quantity_NameOfColor aColor,
3254 - const Standard_Boolean updateviewer)
3255 +void AIS_InteractiveContext::redisplayPrsRecModes (const Handle(AIS_InteractiveObject)& theIObj,
3256 + const Standard_Boolean theToUpdateViewer)
3258 - SetColor(anIObj,Quantity_Color(aColor),updateviewer);
3259 + if (theIObj->RecomputeEveryPrs())
3261 + theIObj->Redisplay();
3265 + for (TColStd_ListIteratorOfListOfInteger aModes (theIObj->ListOfRecomputeModes()); aModes.More(); aModes.Next())
3267 + theIObj->Update (aModes.Value(), Standard_False);
3269 + theIObj->SetRecomputeOk();
3272 + if (theToUpdateViewer)
3274 + UpdateCurrentViewer();
3278 -void AIS_InteractiveContext::SetColor(const Handle(AIS_InteractiveObject)& anIObj,
3279 - const Quantity_Color &aColor,
3280 - const Standard_Boolean updateviewer)
3281 +//=======================================================================
3282 +//function : redisplayPrsModes
3284 +//=======================================================================
3285 +void AIS_InteractiveContext::redisplayPrsModes (const Handle(AIS_InteractiveObject)& theIObj,
3286 + const Standard_Boolean theToUpdateViewer)
3288 - if(anIObj.IsNull()) return ;
3290 - if(!anIObj->HasInteractiveContext())
3291 - anIObj->SetContext(this);
3292 - anIObj->SetColor(aColor);
3293 - if(anIObj->RecomputeEveryPrs())
3294 - anIObj->Redisplay();
3295 + if (theIObj->RecomputeEveryPrs())
3297 + theIObj->Redisplay();
3301 + TColStd_ListOfInteger aModes;
3302 + theIObj->ToBeUpdated (aModes);
3303 + for (TColStd_ListIteratorOfListOfInteger aModeIter (aModes); aModeIter.More(); aModeIter.Next())
3305 - Standard_Integer NbDisp=0;
3306 - TColStd_ListIteratorOfListOfInteger ITI(anIObj->ListOfRecomputeModes());
3307 - for (;ITI.More();ITI.Next())
3309 - anIObj->Update(ITI.Value(),Standard_False);
3312 - anIObj->SetRecomputeOk();
3314 - cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
3316 + theIObj->Update (aModeIter.Value(), Standard_False);
3318 + theIObj->SetRecomputeOk();
3324 -// if(anIObj->Type()==AIS_KOI_Datum && anIObj->Signature()==3){
3325 -// Handle(AIS_Trihedron) Tr = *((Handle(AIS_Trihedron)*)&anIObj);
3326 -// Standard_Real Lx = myDefaultDrawer->DatumAspect()->FirstAxisLength();
3328 -// gp_Dir D =Tr->Component()->XDirection();
3329 -// gp_Pnt O = Tr->Component()->Location();
3330 -// gp_Vec V(D);V*=Lx/5.;
3331 -// T.SetRotation(gp_Ax1(O,D),M_PI/6.);
3332 -// T.SetTranslationPart(V);
3333 -// TopLoc_Location L,IncLoc(T);
3335 -// for(Standard_Integer I=1;I<90;I++){
3336 -// if(anIObj->HasLocation())
3337 -// L = anIObj->Location() * IncLoc;
3340 -// SetLocation(anIObj,L);
3341 -// UpdateCurrentViewer();
3343 -// for(I=1;I<90;I++){
3344 -// L = anIObj->Location() /IncLoc;
3345 -// SetLocation(anIObj,L);
3346 -// UpdateCurrentViewer();
3348 -// ResetLocation(anIObj);
3351 - if(updateviewer) UpdateCurrentViewer();
3352 + if (theToUpdateViewer)
3354 + UpdateCurrentViewer();
3358 //=======================================================================
3359 -//function : SetDeviationCoefficient
3361 +//function : SetColor
3363 //=======================================================================
3364 +void AIS_InteractiveContext::SetColor (const Handle(AIS_InteractiveObject)& theIObj,
3365 + const Quantity_NameOfColor theColor,
3366 + const Standard_Boolean theToUpdateViewer)
3368 + SetColor (theIObj, Quantity_Color(theColor), theToUpdateViewer);
3371 -void AIS_InteractiveContext::SetDeviationCoefficient(
3372 - const Handle(AIS_InteractiveObject)& anIObj,
3373 - const Standard_Real aCoefficient,
3374 - const Standard_Boolean updateviewer)
3375 +//=======================================================================
3376 +//function : SetColor
3378 +//=======================================================================
3379 +void AIS_InteractiveContext::SetColor (const Handle(AIS_InteractiveObject)& theIObj,
3380 + const Quantity_Color& theColor,
3381 + const Standard_Boolean theToUpdateViewer)
3383 -// cout<<" Coefficient:"<< aCoefficient <<endl;
3384 - if(anIObj.IsNull()) return ;
3386 - if(!anIObj->HasInteractiveContext())
3387 - anIObj->SetContext(this);
3388 + if (theIObj.IsNull())
3393 - // To be modified after the related methods of AIS_Shape are passed to InteractiveObject
3394 - if(anIObj->Type()!=AIS_KOI_Object && anIObj->Type()!=AIS_KOI_Shape) return;
3395 - if(anIObj->Signature()!=0) return;
3396 - (*((Handle(AIS_Shape)*)&anIObj))->SetOwnDeviationCoefficient(aCoefficient);
3397 + if (!theIObj->HasInteractiveContext())
3399 + theIObj->SetContext (this);
3401 + theIObj->SetColor (theColor);
3402 + redisplayPrsRecModes (theIObj, theToUpdateViewer);
3405 +//=======================================================================
3406 +//function : SetDeviationCoefficient
3408 +//=======================================================================
3409 +void AIS_InteractiveContext::SetDeviationCoefficient (const Handle(AIS_InteractiveObject)& theIObj,
3410 + const Standard_Real theCoefficient,
3411 + const Standard_Boolean theToUpdateViewer)
3413 + if (theIObj.IsNull())
3418 + if (!theIObj->HasInteractiveContext())
3420 + theIObj->SetContext (this);
3423 - if(anIObj->RecomputeEveryPrs())
3424 - anIObj->Redisplay();
3427 - Standard_Integer NbDisp=0;
3428 - TColStd_ListOfInteger LL;
3429 - anIObj->ToBeUpdated(LL);
3430 - TColStd_ListIteratorOfListOfInteger ITI(LL);
3431 - for (;ITI.More();ITI.Next())
3433 - anIObj->Update(ITI.Value(),Standard_False);
3436 - anIObj->SetRecomputeOk();
3438 - cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
3441 - if(updateviewer) UpdateCurrentViewer();
3442 + // to be modified after the related methods of AIS_Shape are passed to InteractiveObject
3443 + if (theIObj->Type() != AIS_KOI_Object
3444 + && theIObj->Type() != AIS_KOI_Shape)
3448 + else if (theIObj->Signature() != 0)
3453 + Handle(AIS_Shape) aShape = Handle(AIS_Shape)::DownCast (theIObj);
3454 + aShape->SetOwnDeviationCoefficient (theCoefficient);
3455 + redisplayPrsModes (theIObj, theToUpdateViewer);
3458 //=======================================================================
3459 //function : SetHLRDeviationCoefficient
3462 //=======================================================================
3464 -void AIS_InteractiveContext::SetHLRDeviationCoefficient(
3465 - const Handle(AIS_InteractiveObject)& anIObj,
3466 - const Standard_Real aCoefficient,
3467 - const Standard_Boolean updateviewer)
3468 +void AIS_InteractiveContext::SetHLRDeviationCoefficient (const Handle(AIS_InteractiveObject)& theIObj,
3469 + const Standard_Real theCoefficient,
3470 + const Standard_Boolean theToUpdateViewer)
3472 -// cout<<" HLRCoefficient:"<< aCoefficient <<endl;
3473 - if(anIObj.IsNull()) return ;
3474 + if (theIObj.IsNull())
3479 + if (!theIObj->HasInteractiveContext())
3481 + theIObj->SetContext (this);
3484 - if(!anIObj->HasInteractiveContext())
3485 - anIObj->SetContext(this);
3486 // To be modified after the related methods of AIS_Shape are passed to InteractiveObject
3487 - if(anIObj->Type()!=AIS_KOI_Object && anIObj->Type()!=AIS_KOI_Shape) return;
3488 - if(anIObj->Signature()!=0) return;
3489 - (*((Handle(AIS_Shape)*)&anIObj))->SetOwnHLRDeviationCoefficient(aCoefficient);
3493 - if(anIObj->RecomputeEveryPrs())
3494 - anIObj->Redisplay();
3497 - Standard_Integer NbDisp=0;
3498 + if (theIObj->Type() != AIS_KOI_Object
3499 + && theIObj->Type() != AIS_KOI_Shape)
3503 + else if (theIObj->Signature() != 0)
3508 - TColStd_ListOfInteger LL;
3509 - anIObj->ToBeUpdated(LL);
3510 - TColStd_ListIteratorOfListOfInteger ITI(LL);
3511 - for (;ITI.More();ITI.Next())
3513 - anIObj->Update(ITI.Value(),Standard_False);
3516 - anIObj->SetRecomputeOk();
3518 - cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
3521 - if(updateviewer) UpdateCurrentViewer();
3522 + Handle(AIS_Shape) aShape = Handle(AIS_Shape)::DownCast (theIObj);
3523 + aShape->SetOwnHLRDeviationCoefficient (theCoefficient);
3524 + redisplayPrsModes (theIObj, theToUpdateViewer);
3528 //=======================================================================
3529 //function : SetDeviationAngle
3532 //=======================================================================
3534 -void AIS_InteractiveContext::SetDeviationAngle(
3535 - const Handle(AIS_InteractiveObject)& anIObj,
3536 - const Standard_Real anAngle,
3537 - const Standard_Boolean updateviewer)
3538 +void AIS_InteractiveContext::SetDeviationAngle (const Handle(AIS_InteractiveObject)& theIObj,
3539 + const Standard_Real theAngle,
3540 + const Standard_Boolean theToUpdateViewer)
3542 -// cout<<" Angle:"<< anAngle <<endl;
3543 - if(anIObj.IsNull()) return ;
3544 + if (theIObj.IsNull())
3549 + if (!theIObj->HasInteractiveContext())
3551 + theIObj->SetContext (this);
3554 - if(!anIObj->HasInteractiveContext())
3555 - anIObj->SetContext(this);
3556 // To be modified after the related methods of AIS_Shape are passed to InteractiveObject
3557 - if(anIObj->Type()!=AIS_KOI_Shape) return;
3558 - if(anIObj->Signature()!=0) return;
3559 - (*((Handle(AIS_Shape)*)&anIObj))->SetOwnDeviationAngle(anAngle);
3561 + if (theIObj->Type() != AIS_KOI_Shape)
3565 + else if (theIObj->Signature() != 0)
3570 - if(anIObj->RecomputeEveryPrs())
3571 - anIObj->Redisplay();
3574 - Standard_Integer NbDisp=0;
3575 - TColStd_ListOfInteger LL;
3576 - anIObj->ToBeUpdated(LL);
3577 - TColStd_ListIteratorOfListOfInteger ITI(LL);
3578 - for (;ITI.More();ITI.Next())
3580 - anIObj->Update(ITI.Value(),Standard_False);
3583 - anIObj->SetRecomputeOk();
3585 - cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
3588 - if(updateviewer) UpdateCurrentViewer();
3589 + Handle(AIS_Shape) aShape = Handle(AIS_Shape)::DownCast (theIObj);
3590 + aShape->SetOwnDeviationAngle (theAngle);
3591 + redisplayPrsModes (theIObj, theToUpdateViewer);
3594 //=======================================================================
3595 -//function : SetDeviationAngle
3597 +//function : SetAngleAndDeviation
3599 //=======================================================================
3600 +void AIS_InteractiveContext::SetAngleAndDeviation (const Handle(AIS_InteractiveObject)& theIObj,
3601 + const Standard_Real theAngle,
3602 + const Standard_Boolean theToUpdateViewer)
3604 + if (theIObj.IsNull())
3609 -void AIS_InteractiveContext::SetAngleAndDeviation(
3610 - const Handle(AIS_InteractiveObject)& anIObj,
3611 - const Standard_Real anAngle,
3612 - const Standard_Boolean updateviewer)
3614 -// cout<<" Angle:"<< anAngle <<endl;
3615 - if(anIObj.IsNull()) return ;
3616 -// Standard_Real anAngleRad = M_PI*anAngle/180; test rob...
3617 - if(!anIObj->HasInteractiveContext())
3618 - anIObj->SetContext(this);
3619 + if (!theIObj->HasInteractiveContext())
3621 + theIObj->SetContext (this);
3624 // To be modified after the related methods of AIS_Shape are passed to InteractiveObject
3625 - if(anIObj->Type()!=AIS_KOI_Shape) return;
3626 - if(anIObj->Signature()!=0) return;
3627 - (*((Handle(AIS_Shape)*)&anIObj))->SetAngleAndDeviation(anAngle);
3628 + if (theIObj->Type() != AIS_KOI_Shape)
3632 + if (theIObj->Signature() != 0)
3637 + Handle(AIS_Shape) aShape = Handle(AIS_Shape)::DownCast (theIObj);
3638 + aShape->SetAngleAndDeviation (theAngle);
3640 - if(anIObj->RecomputeEveryPrs())
3641 - anIObj->Redisplay();
3642 + if (theIObj->RecomputeEveryPrs())
3644 + theIObj->Redisplay();
3647 - Update(anIObj,updateviewer);
3649 + Update (theIObj, theToUpdateViewer);
3653 //=======================================================================
3654 -//function : SetDeviationAngle
3656 +//function : SetHLRAngleAndDeviation
3658 //=======================================================================
3659 +void AIS_InteractiveContext::SetHLRAngleAndDeviation (const Handle(AIS_InteractiveObject)& theIObj,
3660 + const Standard_Real theAngle,
3661 + const Standard_Boolean theToUpdateViewer)
3663 + if (theIObj.IsNull())
3668 -void AIS_InteractiveContext::SetHLRAngleAndDeviation(
3669 - const Handle(AIS_InteractiveObject)& anIObj,
3670 - const Standard_Real anAngle,
3671 - const Standard_Boolean updateviewer)
3673 -// cout<<" Angle:"<< anAngle <<endl;
3675 - if(anIObj.IsNull()) return ;
3676 - if(!anIObj->HasInteractiveContext())
3677 - anIObj->SetContext(this);
3678 + if (!theIObj->HasInteractiveContext())
3680 + theIObj->SetContext (this);
3683 // To be modified after the related methods of AIS_Shape are passed to InteractiveObject
3684 - if(anIObj->Type()!=AIS_KOI_Shape) return;
3685 - if(anIObj->Signature()!=0) return;
3686 - (*((Handle(AIS_Shape)*)&anIObj))->SetHLRAngleAndDeviation(anAngle);
3689 - if(anIObj->RecomputeEveryPrs())
3690 - anIObj->Redisplay();
3693 - Standard_Integer NbDisp=0;
3695 - TColStd_ListOfInteger LL;
3696 - anIObj->ToBeUpdated(LL);
3697 - TColStd_ListIteratorOfListOfInteger ITI(LL);
3698 - for (;ITI.More();ITI.Next())
3700 - anIObj->Update(ITI.Value(),Standard_False);
3703 - anIObj->SetRecomputeOk();
3705 - cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
3708 - if(updateviewer) UpdateCurrentViewer();
3709 + if (theIObj->Type() != AIS_KOI_Shape)
3713 + if (theIObj->Signature() != 0)
3717 + Handle(AIS_Shape) aShape = Handle(AIS_Shape)::DownCast (theIObj);
3718 + aShape->SetHLRAngleAndDeviation (theAngle);
3719 + redisplayPrsModes (theIObj, theToUpdateViewer);
3722 //=======================================================================
3723 //function : SetHLRDeviationAngle
3726 //=======================================================================
3728 -void AIS_InteractiveContext::SetHLRDeviationAngle(
3729 - const Handle(AIS_InteractiveObject)& anIObj,
3730 - const Standard_Real anAngle,
3731 - const Standard_Boolean updateviewer)
3732 +void AIS_InteractiveContext::SetHLRDeviationAngle (const Handle(AIS_InteractiveObject)& theIObj,
3733 + const Standard_Real theAngle,
3734 + const Standard_Boolean theToUpdateViewer)
3736 -// cout<<" HLRAngle:"<< anAngle <<endl;
3737 - if(anIObj.IsNull()) return ;
3739 - if(!anIObj->HasInteractiveContext())
3740 - anIObj->SetContext(this);
3741 - // To be modified after the related methods of AIS_Shape are passed to InteractiveObject
3742 - if( anIObj->Type()!=AIS_KOI_Shape) return;
3743 - if(anIObj->Signature()!=0) return;
3744 - (*((Handle(AIS_Shape)*)&anIObj))->SetOwnHLRDeviationAngle(anAngle);
3745 + if (theIObj.IsNull())
3750 + if (!theIObj->HasInteractiveContext())
3752 + theIObj->SetContext (this);
3755 - if(anIObj->RecomputeEveryPrs())
3756 - anIObj->Redisplay();
3759 - Standard_Integer NbDisp=0;
3760 - TColStd_ListOfInteger LL;
3761 - anIObj->ToBeUpdated(LL);
3762 - TColStd_ListIteratorOfListOfInteger ITI(LL);
3763 - for (;ITI.More();ITI.Next())
3765 - anIObj->Update(ITI.Value(),Standard_False);
3768 - anIObj->SetRecomputeOk();
3770 - cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
3773 - if(updateviewer) UpdateCurrentViewer();
3774 + // To be modified after the related methods of AIS_Shape are passed to InteractiveObject
3775 + if (theIObj->Type() != AIS_KOI_Shape)
3779 + if (theIObj->Signature() != 0)
3783 + Handle(AIS_Shape) aShape = Handle(AIS_Shape)::DownCast (theIObj);
3784 + aShape->SetOwnHLRDeviationAngle (theAngle);
3785 + redisplayPrsModes (theIObj, theToUpdateViewer);
3788 //=======================================================================
3789 //function : UnsetColor
3792 //=======================================================================
3794 -void AIS_InteractiveContext::UnsetColor(const Handle(AIS_InteractiveObject)& anIObj,
3795 - const Standard_Boolean updateviewer)
3796 +void AIS_InteractiveContext::UnsetColor (const Handle(AIS_InteractiveObject)& theIObj,
3797 + const Standard_Boolean theToUpdateViewer)
3799 - if(anIObj.IsNull()) return ;
3800 - anIObj->UnsetColor();
3801 - if(anIObj->RecomputeEveryPrs())
3802 - anIObj->Redisplay();
3805 - Standard_Integer NbDisp =0;
3806 - TColStd_ListIteratorOfListOfInteger ITI(anIObj->ListOfRecomputeModes());
3807 - for (;ITI.More();ITI.Next())
3809 - anIObj->Update(ITI.Value(),Standard_False);
3813 - cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
3815 - anIObj->SetRecomputeOk();
3818 - UpdateCurrentViewer();
3819 + if (theIObj.IsNull())
3824 + theIObj->UnsetColor();
3825 + redisplayPrsRecModes (theIObj, theToUpdateViewer);
3828 //=======================================================================
3829 //function : HasColor
3832 //=======================================================================
3834 -Standard_Boolean AIS_InteractiveContext::HasColor(const Handle(AIS_InteractiveObject)& anIObj) const
3835 +Standard_Boolean AIS_InteractiveContext::HasColor (const Handle(AIS_InteractiveObject)& theIObj) const
3837 - return anIObj->HasColor();
3839 + return theIObj->HasColor();
3842 //=======================================================================
3846 //=======================================================================
3848 -Quantity_NameOfColor AIS_InteractiveContext::Color(const Handle(AIS_InteractiveObject)& anIObj) const
3849 +Quantity_NameOfColor AIS_InteractiveContext::Color (const Handle(AIS_InteractiveObject)& theIObj) const
3851 - return anIObj->Color();
3852 + return theIObj->Color();
3855 -void AIS_InteractiveContext::Color(const Handle(AIS_InteractiveObject)& anIObj,
3856 - Quantity_Color &aColor) const
3857 +//=======================================================================
3860 +//=======================================================================
3861 +void AIS_InteractiveContext::Color (const Handle(AIS_InteractiveObject)& theIObj,
3862 + Quantity_Color& theColor) const
3864 - anIObj->Color(aColor);
3865 + theIObj->Color (theColor);
3868 //=======================================================================
3872 //=======================================================================
3874 -Standard_Real AIS_InteractiveContext::Width(const Handle(AIS_InteractiveObject)& anIObj) const
3875 +Standard_Real AIS_InteractiveContext::Width (const Handle(AIS_InteractiveObject)& theIObj) const
3877 - return anIObj->Width();
3878 + return theIObj->Width();
3881 //=======================================================================
3882 //function : SetWidth
3885 //=======================================================================
3887 -void AIS_InteractiveContext::SetWidth(const Handle(AIS_InteractiveObject)& anIObj,
3888 - const Standard_Real aValue,
3889 - const Standard_Boolean updateviewer)
3890 +void AIS_InteractiveContext::SetWidth (const Handle(AIS_InteractiveObject)& theIObj,
3891 + const Standard_Real theWidth,
3892 + const Standard_Boolean theToUpdateViewer)
3894 - if(anIObj.IsNull()) return ;
3896 - if(!anIObj->HasInteractiveContext())
3897 - anIObj->SetContext(this);
3898 - anIObj->SetWidth(aValue);
3899 - if(anIObj->RecomputeEveryPrs())
3900 - anIObj->Redisplay();
3903 - Standard_Integer NbDisp=0;
3904 - TColStd_ListIteratorOfListOfInteger ITI(anIObj->ListOfRecomputeModes());
3905 - for (;ITI.More();ITI.Next())
3907 - anIObj->Update(ITI.Value(),Standard_False);
3911 - cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
3913 - anIObj->SetRecomputeOk();
3916 - UpdateCurrentViewer();
3917 + if (theIObj.IsNull())
3922 + if (!theIObj->HasInteractiveContext())
3924 + theIObj->SetContext (this);
3927 + theIObj->SetWidth (theWidth);
3928 + redisplayPrsRecModes (theIObj, theToUpdateViewer);
3931 //=======================================================================
3932 //function : UnsetWidth
3935 //=======================================================================
3937 -void AIS_InteractiveContext::UnsetWidth(const Handle(AIS_InteractiveObject)& anIObj,
3938 - const Standard_Boolean updateviewer)
3939 +void AIS_InteractiveContext::UnsetWidth (const Handle(AIS_InteractiveObject)& theIObj,
3940 + const Standard_Boolean theToUpdateViewer)
3942 - if(anIObj.IsNull()) return ;
3943 - anIObj->UnsetWidth();
3944 - if(anIObj->RecomputeEveryPrs())
3945 - anIObj->Redisplay();
3948 - TColStd_ListIteratorOfListOfInteger ITI(anIObj->ListOfRecomputeModes());
3949 - for (;ITI.More();ITI.Next())
3951 - anIObj->Update(ITI.Value(),Standard_False);
3953 - anIObj->SetRecomputeOk();
3956 - UpdateCurrentViewer();
3957 + if (theIObj.IsNull())
3962 + theIObj->UnsetWidth();
3963 + redisplayPrsRecModes (theIObj, theToUpdateViewer);
3966 //=======================================================================
3967 //function : SetMaterial
3970 //=======================================================================
3971 +void AIS_InteractiveContext::SetMaterial (const Handle(AIS_InteractiveObject)& theIObj,
3972 + const Graphic3d_NameOfMaterial theName,
3973 + const Standard_Boolean theToUpdateViewer)
3975 + if (theIObj.IsNull())
3980 -void AIS_InteractiveContext::SetMaterial(const Handle(AIS_InteractiveObject)& anIObj,
3982 - const Graphic3d_NameOfMaterial aName,
3983 -// const Graphic3d_NameOfPhysicalMaterial aName,
3984 - const Standard_Boolean updateviewer)
3986 - if(!anIObj->HasInteractiveContext())
3987 - anIObj->SetContext(this);
3988 - anIObj->SetMaterial(aName);
3989 - if(anIObj->RecomputeEveryPrs())
3990 - anIObj->Redisplay();
3993 - TColStd_ListIteratorOfListOfInteger ITI(anIObj->ListOfRecomputeModes());
3994 - for (;ITI.More();ITI.Next())
3996 - anIObj->Update(ITI.Value(),Standard_False);
3998 - anIObj->SetRecomputeOk();
4001 - UpdateCurrentViewer();
4002 + if (!theIObj->HasInteractiveContext())
4004 + theIObj->SetContext (this);
4007 + theIObj->SetMaterial (theName);
4008 + redisplayPrsRecModes (theIObj, theToUpdateViewer);
4011 //=======================================================================
4012 //function : UnsetMaterial
4015 //=======================================================================
4017 -void AIS_InteractiveContext::UnsetMaterial(const Handle(AIS_InteractiveObject)& anIObj,
4018 - const Standard_Boolean updateviewer)
4019 +void AIS_InteractiveContext::UnsetMaterial (const Handle(AIS_InteractiveObject)& theIObj,
4020 + const Standard_Boolean theToUpdateViewer)
4022 - if(anIObj.IsNull()) return ;
4023 - anIObj->UnsetMaterial();
4024 - if(anIObj->RecomputeEveryPrs())
4025 - anIObj->Redisplay();
4028 - TColStd_ListIteratorOfListOfInteger ITI(anIObj->ListOfRecomputeModes());
4029 - for (;ITI.More();ITI.Next())
4031 - anIObj->Update(ITI.Value(),Standard_False);
4033 - anIObj->SetRecomputeOk();
4036 - UpdateCurrentViewer();
4037 + if (theIObj.IsNull())
4041 + theIObj->UnsetMaterial();
4042 + redisplayPrsRecModes (theIObj, theToUpdateViewer);
4045 //=======================================================================
4046 //function : SetTransparency
4049 //=======================================================================
4050 +void AIS_InteractiveContext::SetTransparency (const Handle(AIS_InteractiveObject)& theIObj,
4051 + const Standard_Real theValue,
4052 + const Standard_Boolean theToUpdateViewer)
4054 + if (theIObj.IsNull())
4059 -void AIS_InteractiveContext::SetTransparency(const Handle(AIS_InteractiveObject)& anIObj,
4060 - const Standard_Real aValue,
4061 - const Standard_Boolean updateviewer)
4063 - if(anIObj.IsNull()) return ;
4064 - if(!anIObj->HasInteractiveContext())
4065 - anIObj->SetContext(this);
4067 -#ifdef BUC60577 //right optimization
4068 - if(!anIObj->IsTransparent() && aValue<=0.05) return;
4070 -// if(!anIObj->IsTransparent() && aValue<=0.05) return;
4073 - UnsetTransparency(anIObj,updateviewer);
4074 + if (!theIObj->HasInteractiveContext())
4076 + theIObj->SetContext (this);
4079 + if (!theIObj->IsTransparent()
4080 + && theValue <= 0.05)
4085 - if(!myMainVwr->Viewer()->Transparency())
4086 - myMainVwr->Viewer()->SetTransparency(Standard_True);
4087 - anIObj->SetTransparency(aValue);
4088 - if(anIObj->RecomputeEveryPrs())
4089 - anIObj->Redisplay();
4092 - TColStd_ListIteratorOfListOfInteger ITI(anIObj->ListOfRecomputeModes());
4093 - for (;ITI.More();ITI.Next())
4095 - anIObj->Update(ITI.Value(),Standard_False);
4097 - anIObj->SetRecomputeOk();
4100 - UpdateCurrentViewer();
4102 + if (theValue <= 0.05)
4104 + UnsetTransparency (theIObj, theToUpdateViewer);
4108 + theIObj->SetTransparency (theValue);
4109 + redisplayPrsRecModes (theIObj, theToUpdateViewer);
4112 //=======================================================================
4113 //function : UnsetTransparency
4116 //=======================================================================
4118 -void AIS_InteractiveContext::UnsetTransparency(const Handle(AIS_InteractiveObject)& anIObj,
4119 - const Standard_Boolean updateviewer)
4120 +void AIS_InteractiveContext::UnsetTransparency (const Handle(AIS_InteractiveObject)& theIObj,
4121 + const Standard_Boolean theToUpdateViewer)
4123 - if(anIObj.IsNull()) return ;
4124 - anIObj->UnsetTransparency();
4125 - if(anIObj->RecomputeEveryPrs())
4126 - anIObj->Redisplay();
4129 - TColStd_ListIteratorOfListOfInteger ITI(anIObj->ListOfRecomputeModes());
4130 - for (;ITI.More();ITI.Next())
4132 - anIObj->Update(ITI.Value(),Standard_False);
4134 - anIObj->SetRecomputeOk();
4137 - // To Unset transparency in the viewer, if no other object is transparent ...(Speed)
4138 - AIS_DataMapIteratorOfDataMapOfIOStatus It(myObjects);
4139 - Standard_Boolean FoundTransp(Standard_False);
4140 - for(;It.More() && !FoundTransp ;It.Next()){
4141 - if(It.Key()->IsTransparent())
4142 - FoundTransp = Standard_True;
4143 + if (theIObj.IsNull())
4148 - myMainVwr->Viewer()->SetTransparency(Standard_False);
4152 - UpdateCurrentViewer();
4154 + theIObj->UnsetTransparency();
4155 + redisplayPrsRecModes (theIObj, theToUpdateViewer);
4158 -//=======================================================================
4159 -//function : SetSelectedAspect
4161 -//=======================================================================
4162 -void AIS_InteractiveContext::SetSelectedAspect(
4163 - const Handle(Prs3d_BasicAspect)& anAspect,
4164 - const Standard_Boolean globalChange,
4165 - const Standard_Boolean updateViewer)
4167 - if( !HasOpenedContext() ) {
4168 - Standard_Boolean found = Standard_False;
4169 - Handle(AIS_Selection) sel =
4170 - AIS_Selection::Selection(myCurrentName.ToCString());
4171 - Handle(AIS_InteractiveObject) object;
4172 - for( sel->Init() ; sel->More() ; sel->Next()) {
4173 - found = Standard_True;
4174 - object = Handle(AIS_InteractiveObject)::DownCast(sel->Value());
4175 - object->SetAspect(anAspect,globalChange);
4177 - if( found && updateViewer) {
4178 - myMainVwr->Update();
4180 +//=======================================================================
4181 +//function : SetSelectedAspect
4183 +//=======================================================================
4184 +void AIS_InteractiveContext::SetSelectedAspect (const Handle(Prs3d_BasicAspect)& theAspect,
4185 + const Standard_Boolean theIsGlobalChange,
4186 + const Standard_Boolean theToUpdateViewer)
4188 + if (HasOpenedContext())
4193 + Standard_Boolean isFound = Standard_False;
4194 + Handle(AIS_Selection) aSelIter = AIS_Selection::Selection (myCurrentName.ToCString());
4195 + for (aSelIter->Init(); aSelIter->More(); aSelIter->Next())
4197 + isFound = Standard_True;
4198 + Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast (aSelIter->Value());
4199 + anObj->SetAspect (theAspect, theIsGlobalChange);
4203 + && theToUpdateViewer)
4205 + myMainVwr->Update();
4209 //=======================================================================
4210 //function : SetLocalAttributes
4213 //=======================================================================
4214 +void AIS_InteractiveContext::SetLocalAttributes (const Handle(AIS_InteractiveObject)& theIObj,
4215 + const Handle(AIS_Drawer)& theDrawer,
4216 + const Standard_Boolean theToUpdateViewer)
4218 + if (theIObj.IsNull())
4223 -void AIS_InteractiveContext::SetLocalAttributes(const Handle(AIS_InteractiveObject)& anIObj,
4224 - const Handle(AIS_Drawer)& aDrawer,
4225 - const Standard_Boolean updateviewer)
4227 - if(anIObj.IsNull()) return ;
4228 - if(!anIObj->HasInteractiveContext())
4229 - anIObj->SetContext(this);
4230 - anIObj->SetAttributes(aDrawer);
4231 - Update(anIObj,updateviewer);
4233 + if (!theIObj->HasInteractiveContext())
4235 + theIObj->SetContext (this);
4238 + theIObj->SetAttributes (theDrawer);
4239 + Update (theIObj, theToUpdateViewer);
4242 //=======================================================================
4243 //function : UnsetLocalAttributes
4246 //=======================================================================
4247 -void AIS_InteractiveContext::UnsetLocalAttributes(const Handle(AIS_InteractiveObject)& anIObj,
4248 - const Standard_Boolean updateviewer)
4249 +void AIS_InteractiveContext::UnsetLocalAttributes (const Handle(AIS_InteractiveObject)& theIObj,
4250 + const Standard_Boolean theToUpdateViewer)
4252 - if(anIObj.IsNull()) return ;
4253 - if(!anIObj->HasInteractiveContext())
4254 - anIObj->SetContext(this);
4255 - anIObj->UnsetAttributes();
4256 - Update(anIObj,updateviewer);
4258 + if (theIObj.IsNull())
4263 + if (!theIObj->HasInteractiveContext())
4265 + theIObj->SetContext (this);
4267 + theIObj->UnsetAttributes();
4268 + Update (theIObj, theToUpdateViewer);
4271 //=======================================================================
4275 //=======================================================================
4277 -void AIS_InteractiveContext::Status(const Handle(AIS_InteractiveObject)& anIObj, TCollection_ExtendedString& astatus) const
4278 +void AIS_InteractiveContext::Status (const Handle(AIS_InteractiveObject)& theIObj,
4279 + TCollection_ExtendedString& theStatus) const
4283 + if (theIObj.IsNull()
4284 + || !myObjects.IsBound (theIObj))
4289 - if(anIObj.IsNull()) return ;
4290 - if(myObjects.IsBound(anIObj)){
4291 - astatus += "\t ____________________________________________";
4292 - astatus += "\t| Known at Neutral Point:\n\tDisplayStatus:";
4293 - const Handle(AIS_GlobalStatus)& ST = myObjects(anIObj);
4294 - switch(ST->GraphicStatus()){
4295 + theStatus += "\t ____________________________________________";
4296 + theStatus += "\t| Known at Neutral Point:\n\tDisplayStatus:";
4297 + const Handle(AIS_GlobalStatus)& aStatus = myObjects (theIObj);
4298 + switch (aStatus->GraphicStatus())
4300 case AIS_DS_Displayed:
4302 - astatus +="\t| -->Displayed\n";
4305 - case AIS_DS_Erased:
4307 - astatus +="\t| -->Erased\n";
4312 + theStatus += "\t| -->Displayed\n";
4315 - astatus += "\t| Active Display Modes in the MainViewer :\n";
4316 - TColStd_ListIteratorOfListOfInteger ItL (ST->DisplayedModes());
4317 - for(;ItL.More();ItL.Next()){
4318 - astatus += "\t|\t Mode ";
4319 - astatus += TCollection_AsciiString(ItL.Value());
4322 - if(IsCurrent(anIObj)) astatus +="\t| Current\n";
4323 - if(IsSelected(anIObj)) astatus +="\t| Selected\n";
4325 - astatus += "\t| Active Selection Modes in the MainViewer :\n";
4326 - for(ItL.Initialize(ST->SelectionModes());ItL.More();ItL.Next()){
4327 - astatus += "\t\t Mode ";
4328 - astatus += TCollection_AsciiString(ItL.Value());
4331 - astatus += "\t ____________________________________________";
4333 + case AIS_DS_Erased:
4335 + theStatus += "\t| -->Erased\n";
4343 + theStatus += "\t| Active Display Modes in the MainViewer :\n";
4344 + for (TColStd_ListIteratorOfListOfInteger aDispModeIter (aStatus->DisplayedModes()); aDispModeIter.More(); aDispModeIter.Next())
4346 + theStatus += "\t|\t Mode ";
4347 + theStatus += TCollection_AsciiString (aDispModeIter.Value());
4348 + theStatus += "\n";
4350 + if (IsCurrent (theIObj)) theStatus +="\t| Current\n";
4351 + if (IsSelected(theIObj)) theStatus +="\t| Selected\n";
4353 + theStatus += "\t| Active Selection Modes in the MainViewer :\n";
4354 + for (TColStd_ListIteratorOfListOfInteger aSelModeIter (aStatus->SelectionModes()); aSelModeIter.More(); aSelModeIter.Next())
4356 + theStatus += "\t\t Mode ";
4357 + theStatus += TCollection_AsciiString (aSelModeIter.Value());
4358 + theStatus += "\n";
4360 + theStatus += "\t ____________________________________________";
4363 //=======================================================================
4364 //function : GetDefModes
4367 //=======================================================================
4368 +void AIS_InteractiveContext::GetDefModes (const Handle(AIS_InteractiveObject)& theIObj,
4369 + Standard_Integer& theDispMode,
4370 + Standard_Integer& theHiMode,
4371 + Standard_Integer& theSelMode) const
4373 + if (theIObj.IsNull())
4378 -void AIS_InteractiveContext::GetDefModes(const Handle(AIS_InteractiveObject)& anIObj,
4379 - Standard_Integer& DispMode,
4380 - Standard_Integer& HiMode,
4381 - Standard_Integer& SelMode) const
4383 - if(anIObj.IsNull()) return ;
4384 - DispMode = anIObj->HasDisplayMode() ? anIObj->DisplayMode() :
4385 - (anIObj->AcceptDisplayMode(myDisplayMode)? myDisplayMode : 0);
4387 - HiMode = anIObj->HasHilightMode()? anIObj->HilightMode():DispMode;
4389 - SelMode = anIObj->HasSelectionMode()? anIObj->SelectionMode() : -1;
4391 - SelMode = anIObj->HasSelectionMode()? anIObj->SelectionMode() : 0;
4393 + theDispMode = theIObj->HasDisplayMode()
4394 + ? theIObj->DisplayMode()
4395 + : (theIObj->AcceptDisplayMode (myDisplayMode)
4398 + theHiMode = theIObj->HasHilightMode() ? theIObj->HilightMode() : theDispMode;
4399 + theSelMode = theIObj->HasSelectionMode() ? theIObj->SelectionMode() : -1;
4403 //=======================================================================
4404 //function : EraseGlobal
4407 //=======================================================================
4409 -void AIS_InteractiveContext::EraseGlobal(const Handle(AIS_InteractiveObject)& anIObj,
4410 - const Standard_Boolean updateviewer)
4411 +void AIS_InteractiveContext::EraseGlobal (const Handle(AIS_InteractiveObject)& theIObj,
4412 + const Standard_Boolean theToUpdateviewer)
4414 - if(anIObj.IsNull()) return ;
4415 - if(!myObjects.IsBound(anIObj)) return;
4416 + if (theIObj.IsNull()
4417 + || !myObjects.IsBound (theIObj))
4423 - // const Handle(AIS_GlobalStatus)& STATUS = myObjects(anIObj);
4424 - Handle(AIS_GlobalStatus) STATUS = myObjects(anIObj);
4426 - Standard_Integer Dmode = anIObj->HasHilightMode() ? anIObj->HilightMode() : 0;
4427 - if(STATUS->GraphicStatus()==AIS_DS_Displayed){
4429 - TColStd_ListIteratorOfListOfInteger ItL (STATUS->DisplayedModes());
4430 - for(;ItL.More();ItL.Next()){
4431 - if(myMainPM->IsHighlighted(anIObj,ItL.Value()))
4432 - myMainPM->Unhighlight(anIObj,ItL.Value());
4433 - myMainPM->SetVisibility (anIObj, ItL.Value(), Standard_False);
4434 + Handle(AIS_GlobalStatus) aStatus = myObjects (theIObj);
4436 + Standard_Integer aDispMode = theIObj->HasHilightMode() ? theIObj->HilightMode() : 0;
4437 + if (aStatus->GraphicStatus() == AIS_DS_Displayed)
4439 + for (TColStd_ListIteratorOfListOfInteger aDispModeIter (aStatus->DisplayedModes()); aDispModeIter.More(); aDispModeIter.Next())
4441 + if (myMainPM->IsHighlighted (theIObj, aDispModeIter.Value()))
4443 + myMainPM->Unhighlight (theIObj, aDispModeIter.Value());
4445 + myMainPM->SetVisibility (theIObj, aDispModeIter.Value(), Standard_False);
4448 + if (IsCurrent (theIObj)
4449 + && !aStatus->IsDModeIn (aDispMode))
4451 + myMainPM->SetVisibility (theIObj, aDispMode, Standard_False);
4454 + for (TColStd_ListIteratorOfListOfInteger aSelModeIter (aStatus->SelectionModes()); aSelModeIter.More(); aSelModeIter.Next())
4456 + mgrSelector->Deactivate (theIObj, aSelModeIter.Value(), myMainSel);
4459 + if (theToUpdateviewer)
4461 + myMainVwr->Update();
4463 - if(IsCurrent(anIObj) && !STATUS->IsDModeIn(Dmode))
4464 - myMainPM->SetVisibility (anIObj, Dmode, Standard_False);
4466 - for(ItL.Initialize(STATUS->SelectionModes());ItL.More();ItL.Next())
4467 - mgrSelector->Deactivate(anIObj,ItL.Value(),myMainSel);
4468 - if(updateviewer) myMainVwr->Update();
4470 - STATUS->SetGraphicStatus(AIS_DS_Erased);
4472 + aStatus->SetGraphicStatus (AIS_DS_Erased);
4475 //=======================================================================
4476 //function : ClearGlobal
4479 //=======================================================================
4481 -void AIS_InteractiveContext::ClearGlobal(const Handle(AIS_InteractiveObject)& anIObj,
4482 - const Standard_Boolean updateviewer)
4483 +void AIS_InteractiveContext::ClearGlobal (const Handle(AIS_InteractiveObject)& theIObj,
4484 + const Standard_Boolean theToUpdateviewer)
4486 - if(anIObj.IsNull()) return ;
4487 - if(!myObjects.IsBound(anIObj)) return;
4489 - // const Handle(AIS_GlobalStatus)& STATUS = myObjects(anIObj);
4490 - Handle(AIS_GlobalStatus) STATUS = myObjects(anIObj);
4492 - TColStd_ListIteratorOfListOfInteger ItL (STATUS->DisplayedModes());
4493 - for(;ItL.More();ItL.Next()){
4494 - if(STATUS->IsHilighted()){
4495 - if(IsCurrent(anIObj))
4497 - AddOrRemoveCurrentObject( anIObj, updateviewer );
4499 - AddOrRemoveCurrentObject(anIObj);
4501 - else if(myMainPM->IsHighlighted(anIObj,ItL.Value()))
4502 - myMainPM->Unhighlight(anIObj,ItL.Value());
4504 - myMainPM->Erase(anIObj,ItL.Value());
4505 - myMainPM->Clear(anIObj,ItL.Value());
4506 - if(anIObj->HasHilightMode()){
4507 - Standard_Integer im = anIObj->HilightMode();
4508 - myMainPM->Unhighlight(anIObj,im);
4509 - myMainPM->Erase(anIObj,im);
4513 + if (theIObj.IsNull()
4514 + || !myObjects.IsBound (theIObj))
4519 + Handle(AIS_GlobalStatus) aStatus = myObjects (theIObj);
4520 + for (TColStd_ListIteratorOfListOfInteger aDispModeIter (aStatus->DisplayedModes()); aDispModeIter.More(); aDispModeIter.Next())
4522 + if (aStatus->IsHilighted())
4524 + if (IsCurrent (theIObj))
4526 + AddOrRemoveCurrentObject (theIObj, theToUpdateviewer);
4528 + else if (myMainPM->IsHighlighted (theIObj, aDispModeIter.Value()))
4530 + myMainPM->Unhighlight (theIObj, aDispModeIter.Value());
4533 + myMainPM->Erase (theIObj, aDispModeIter.Value());
4534 + myMainPM->Clear (theIObj, aDispModeIter.Value());
4535 + if (theIObj->HasHilightMode())
4537 + Standard_Integer im = theIObj->HilightMode();
4538 + myMainPM->Unhighlight (theIObj, im);
4539 + myMainPM->Erase (theIObj, im);
4543 - //Object removes from Detected sequence
4544 - Standard_Integer i = 1;
4545 - for(i = 1; i < myAISDetectedSeq.Length(); i++)
4546 + // Object removes from Detected sequence
4547 + for(Standard_Integer aDetIter = 1; aDetIter < myAISDetectedSeq.Length(); ++aDetIter)
4549 Handle(AIS_InteractiveObject) anObj = DetectedCurrentObject();
4550 - if( !anObj.IsNull() && anObj != anIObj )
4551 - myAISDetectedSeq.Remove( i );
4552 + if (!anObj.IsNull()
4553 + && anObj != theIObj)
4555 + myAISDetectedSeq.Remove (aDetIter);
4559 - if(myLastinMain == anIObj)
4560 + if (myLastinMain == theIObj)
4562 myLastinMain.Nullify();
4564 - if(myLastPicked == anIObj)
4566 + if (myLastPicked == theIObj)
4568 myLastPicked.Nullify();
4571 + // remove IO from the selection manager to avoid memory leaks
4572 + mgrSelector->Remove (theIObj);
4574 - // OCC21671: Remove IO from the selection manager in any case
4575 - // to avoid memory leaks
4576 - mgrSelector->Remove(anIObj);
4577 + myObjects.UnBind (theIObj);
4579 - if (updateviewer && (STATUS->GraphicStatus() == AIS_DS_Displayed))
4580 + if (theToUpdateviewer
4581 + && aStatus->GraphicStatus() == AIS_DS_Displayed)
4583 myMainVwr->Update();
4586 - myObjects.UnBind(anIObj);
4590 //=======================================================================
4591 //function : ClearGlobalPrs
4594 //=======================================================================
4595 +void AIS_InteractiveContext::ClearGlobalPrs (const Handle(AIS_InteractiveObject)& theIObj,
4596 + const Standard_Integer theMode,
4597 + const Standard_Boolean theToUpdateViewer)
4599 + if (theIObj.IsNull()
4600 + || !myObjects.IsBound (theIObj))
4605 -void AIS_InteractiveContext::ClearGlobalPrs(const Handle(AIS_InteractiveObject)& anIObj,
4606 - const Standard_Integer aMode,
4607 - const Standard_Boolean updateviewer)
4609 - if(anIObj.IsNull()) return ;
4610 - if(!myObjects.IsBound(anIObj)) return;
4611 - const Handle(AIS_GlobalStatus)& STATUS = myObjects(anIObj);
4613 - Standard_Integer DM = anIObj->HasHilightMode() ? anIObj->HilightMode() : 0;
4614 - if(STATUS->IsDModeIn(aMode)){
4615 - if(DM==aMode && myMainPM->IsHighlighted(anIObj,aMode))
4616 - myMainPM->Unhighlight(anIObj,aMode);
4618 - myMainPM->Erase(anIObj,aMode);
4619 - myMainPM->Clear(anIObj,aMode);
4620 + const Handle(AIS_GlobalStatus)& aStatus = myObjects (theIObj);
4621 + if (aStatus->IsDModeIn (theMode))
4623 + const Standard_Integer aDispMode = theIObj->HasHilightMode() ? theIObj->HilightMode() : 0;
4624 + if (aDispMode == theMode
4625 + && myMainPM->IsHighlighted (theIObj, theMode))
4627 + myMainPM->Unhighlight (theIObj, theMode);
4630 + myMainPM->Erase (theIObj, theMode);
4631 + myMainPM->Clear (theIObj, theMode);
4635 - if(STATUS->GraphicStatus()==AIS_DS_Displayed && updateviewer)
4636 + if (aStatus->GraphicStatus() == AIS_DS_Displayed
4637 + && theToUpdateViewer)
4639 myMainVwr->Update();
4643 //=======================================================================
4644 //function : DrawHiddenLine
4647 //=======================================================================
4649 -Standard_Boolean AIS_InteractiveContext::DrawHiddenLine () const {
4651 +Standard_Boolean AIS_InteractiveContext::DrawHiddenLine() const
4653 return myDefaultDrawer->DrawHiddenLine();
4656 //=======================================================================
4657 //function : EnableDrawHiddenLine
4660 //=======================================================================
4662 -void AIS_InteractiveContext::EnableDrawHiddenLine () const {
4663 +void AIS_InteractiveContext::EnableDrawHiddenLine() const
4665 myDefaultDrawer->EnableDrawHiddenLine();
4668 //=======================================================================
4669 //function : DisableDrawHiddenLine
4672 //=======================================================================
4674 -void AIS_InteractiveContext::DisableDrawHiddenLine () const {
4675 +void AIS_InteractiveContext::DisableDrawHiddenLine() const
4677 myDefaultDrawer->DisableDrawHiddenLine();
4680 //=======================================================================
4681 //function : HiddenLineAspect
4684 //=======================================================================
4686 -Handle (Prs3d_LineAspect) AIS_InteractiveContext::HiddenLineAspect () const {
4687 +Handle (Prs3d_LineAspect) AIS_InteractiveContext::HiddenLineAspect() const
4689 return myDefaultDrawer->HiddenLineAspect();
4692 //=======================================================================
4693 //function : SetHiddenLineAspect
4696 //=======================================================================
4698 -void AIS_InteractiveContext::SetHiddenLineAspect ( const Handle(Prs3d_LineAspect)& anAspect) const {
4699 - myDefaultDrawer->SetHiddenLineAspect(anAspect);
4700 +void AIS_InteractiveContext::SetHiddenLineAspect (const Handle(Prs3d_LineAspect)& theAspect) const
4702 + myDefaultDrawer->SetHiddenLineAspect (theAspect);
4705 //=======================================================================
4706 //function : SetIsoNumber
4709 //=======================================================================
4711 -void AIS_InteractiveContext::SetIsoNumber(const Standard_Integer Nb,const AIS_TypeOfIso Type)
4712 +void AIS_InteractiveContext::SetIsoNumber (const Standard_Integer theNb,
4713 + const AIS_TypeOfIso theType)
4716 - case AIS_TOI_IsoU:
4717 - myDefaultDrawer->UIsoAspect()->SetNumber(Nb);
4719 - case AIS_TOI_IsoV:
4720 - myDefaultDrawer->VIsoAspect()->SetNumber(Nb);
4722 - case AIS_TOI_Both:
4723 - myDefaultDrawer->UIsoAspect()->SetNumber(Nb);
4724 - myDefaultDrawer->VIsoAspect()->SetNumber(Nb);
4729 + case AIS_TOI_IsoU:
4730 + myDefaultDrawer->UIsoAspect()->SetNumber (theNb);
4732 + case AIS_TOI_IsoV:
4733 + myDefaultDrawer->VIsoAspect()->SetNumber (theNb);
4735 + case AIS_TOI_Both:
4736 + myDefaultDrawer->UIsoAspect()->SetNumber (theNb);
4737 + myDefaultDrawer->VIsoAspect()->SetNumber (theNb);
4742 //=======================================================================
4743 //function : IsoNumber
4746 //=======================================================================
4748 -Standard_Integer AIS_InteractiveContext::IsoNumber(const AIS_TypeOfIso Type)
4749 +Standard_Integer AIS_InteractiveContext::IsoNumber (const AIS_TypeOfIso theType)
4753 - case AIS_TOI_IsoU:
4754 - return myDefaultDrawer->UIsoAspect()->Number();
4755 - case AIS_TOI_IsoV:
4756 - return myDefaultDrawer->VIsoAspect()->Number();
4757 - case AIS_TOI_Both:
4758 - return (myDefaultDrawer->UIsoAspect()->Number()==
4759 - myDefaultDrawer->VIsoAspect()->Number()) ?
4760 - myDefaultDrawer->UIsoAspect()->Number(): -1;
4763 + case AIS_TOI_IsoU: return myDefaultDrawer->UIsoAspect()->Number();
4764 + case AIS_TOI_IsoV: return myDefaultDrawer->VIsoAspect()->Number();
4765 + case AIS_TOI_Both: return myDefaultDrawer->UIsoAspect()->Number() == myDefaultDrawer->VIsoAspect()->Number()
4766 + ? myDefaultDrawer->UIsoAspect()->Number()
4772 //=======================================================================
4773 //function : IsoOnPlane
4776 //=======================================================================
4778 -void AIS_InteractiveContext::IsoOnPlane(const Standard_Boolean SwitchOn)
4779 +void AIS_InteractiveContext::IsoOnPlane (const Standard_Boolean theToSwitchOn)
4781 - myDefaultDrawer->SetIsoOnPlane(SwitchOn);
4782 + myDefaultDrawer->SetIsoOnPlane (theToSwitchOn);
4785 //=======================================================================
4786 //function : IsoOnPlane
4789 //=======================================================================
4791 -Standard_Boolean AIS_InteractiveContext::IsoOnPlane() const
4792 +Standard_Boolean AIS_InteractiveContext::IsoOnPlane() const
4794 return myDefaultDrawer->IsoOnPlane();
4797 //=======================================================================
4798 //function : SetSelectionMode
4801 //=======================================================================
4803 -void AIS_InteractiveContext::SetSelectionMode(const Handle(AIS_InteractiveObject)&, const Standard_Integer )
4804 +void AIS_InteractiveContext::SetSelectionMode (const Handle(AIS_InteractiveObject)& ,
4805 + const Standard_Integer )
4810 //=======================================================================
4811 //function : UnsetSelectionMode
4814 //=======================================================================
4816 -void AIS_InteractiveContext::UnsetSelectionMode(const Handle(AIS_InteractiveObject)&)
4817 +void AIS_InteractiveContext::UnsetSelectionMode (const Handle(AIS_InteractiveObject)& )
4822 //=======================================================================
4823 //function : SetSensitivityMode
4826 //=======================================================================
4828 -void AIS_InteractiveContext::SetSensitivityMode(const StdSelect_SensitivityMode aMode) {
4830 - if( HasOpenedContext() )
4831 - myLocalContexts(myCurLocalIndex)->SetSensitivityMode(aMode);
4833 - myMainSel->SetSensitivityMode(aMode);
4834 +void AIS_InteractiveContext::SetSensitivityMode (const StdSelect_SensitivityMode theMode)
4836 + if (HasOpenedContext())
4838 + myLocalContexts (myCurLocalIndex)->SetSensitivityMode (theMode);
4842 + myMainSel->SetSensitivityMode (theMode);
4846 //=======================================================================
4847 //function : SensitivityMode
4850 //=======================================================================
4852 -StdSelect_SensitivityMode AIS_InteractiveContext::SensitivityMode() const {
4854 - if( HasOpenedContext() )
4855 - return myLocalContexts(myCurLocalIndex)->SensitivityMode();
4856 - return myMainSel->SensitivityMode();
4857 +StdSelect_SensitivityMode AIS_InteractiveContext::SensitivityMode() const
4859 + return HasOpenedContext()
4860 + ? myLocalContexts (myCurLocalIndex)->SensitivityMode()
4861 + : myMainSel->SensitivityMode();
4864 //=======================================================================
4865 //function : SetSensitivity
4868 //=======================================================================
4870 -void AIS_InteractiveContext::SetSensitivity(const Standard_Real aPrecision) {
4872 - if( HasOpenedContext() )
4873 - myLocalContexts(myCurLocalIndex)->SetSensitivity(aPrecision);
4875 - myMainSel->SetSensitivity(aPrecision);
4876 +void AIS_InteractiveContext::SetSensitivity (const Standard_Real thePrecision)
4878 + if (HasOpenedContext())
4880 + myLocalContexts(myCurLocalIndex)->SetSensitivity (thePrecision);
4884 + myMainSel->SetSensitivity (thePrecision);
4888 //=======================================================================
4889 //function : Sensitivity
4892 //=======================================================================
4894 -Standard_Real AIS_InteractiveContext::Sensitivity() const {
4896 - if( HasOpenedContext() )
4897 - return myLocalContexts(myCurLocalIndex)->Sensitivity();
4898 - return myMainSel->Sensitivity();
4899 +Standard_Real AIS_InteractiveContext::Sensitivity() const
4901 + return HasOpenedContext()
4902 + ? myLocalContexts(myCurLocalIndex)->Sensitivity()
4903 + : myMainSel->Sensitivity();
4906 //=======================================================================
4907 //function : SetPixelTolerance
4910 //=======================================================================
4912 -void AIS_InteractiveContext::SetPixelTolerance(const Standard_Integer aPrecision) {
4914 - if( HasOpenedContext() )
4915 - myLocalContexts(myCurLocalIndex)->SetPixelTolerance(aPrecision);
4917 - myMainSel->SetPixelTolerance(aPrecision);
4918 +void AIS_InteractiveContext::SetPixelTolerance (const Standard_Integer thePrecision)
4920 + if (HasOpenedContext())
4922 + myLocalContexts (myCurLocalIndex)->SetPixelTolerance (thePrecision);
4926 + myMainSel->SetPixelTolerance (thePrecision);
4930 //=======================================================================
4931 //function : PixelTolerance
4934 //=======================================================================
4936 -Standard_Integer AIS_InteractiveContext::PixelTolerance() const {
4938 - if( HasOpenedContext() )
4939 - return myLocalContexts(myCurLocalIndex)->PixelTolerance();
4940 - return myMainSel->PixelTolerance();
4941 +Standard_Integer AIS_InteractiveContext::PixelTolerance() const
4943 + return HasOpenedContext()
4944 + ? myLocalContexts (myCurLocalIndex)->PixelTolerance()
4945 + : myMainSel->PixelTolerance();
4948 //=======================================================================
4949 //function : IsInLocal
4952 //=======================================================================
4954 -Standard_Boolean AIS_InteractiveContext::IsInLocal(const Handle(AIS_InteractiveObject)& anIObj,
4955 - Standard_Integer& TheIndex) const
4956 +Standard_Boolean AIS_InteractiveContext::IsInLocal (const Handle(AIS_InteractiveObject)& theIObj,
4957 + Standard_Integer& theIndex) const
4959 - if(anIObj.IsNull()) return Standard_False;
4960 + if (theIObj.IsNull())
4962 + return Standard_False;
4965 // if it exists at neutral point 0 index is returned
4966 - if(myObjects.IsBound(anIObj)) {
4968 + if (myObjects.IsBound (theIObj))
4971 return Standard_False;
4973 - for(Standard_Integer I=1;I<=myLocalContexts.Extent();I++){
4974 - if(myLocalContexts.IsBound(I)){
4975 - if(myLocalContexts(I)->IsIn(anIObj)){
4978 + for (Standard_Integer aCtxIter = 1; aCtxIter <= myLocalContexts.Extent(); ++aCtxIter)
4980 + if (myLocalContexts.IsBound (aCtxIter))
4982 + if(myLocalContexts (aCtxIter)->IsIn (theIObj))
4984 + theIndex = aCtxIter;
4985 return Standard_True;
4992 return Standard_False;
4997 //=======================================================================
4998 //function : InitAttributes
5001 //=======================================================================
5003 void AIS_InteractiveContext::InitAttributes()
5006 - mgrSelector->Add(myMainSel);
5007 + mgrSelector->Add (myMainSel);
5008 myCurrentName = AIS_Context_NewCurName();
5009 mySelectionName = AIS_Context_NewSelName();
5011 - AIS_Selection::CreateSelection(mySelectionName.ToCString());
5012 - AIS_Selection::CreateSelection(myCurrentName.ToCString());
5013 + AIS_Selection::CreateSelection (mySelectionName.ToCString());
5014 + AIS_Selection::CreateSelection (myCurrentName.ToCString());
5017 - myDefaultDrawer->SetShadingAspectGlobal(Standard_False);
5018 - Graphic3d_MaterialAspect aMat(Graphic3d_NOM_BRASS);
5019 - myDefaultDrawer->ShadingAspect()->SetMaterial(aMat);
5020 + myDefaultDrawer->SetShadingAspectGlobal (Standard_False);
5021 + Graphic3d_MaterialAspect aMat (Graphic3d_NOM_BRASS);
5022 + myDefaultDrawer->ShadingAspect()->SetMaterial (aMat);
5024 // myDefaultDrawer->ShadingAspect()->SetColor(Quantity_NOC_GRAY70);
5025 - Handle (Prs3d_LineAspect) HLA = myDefaultDrawer->HiddenLineAspect();
5026 - HLA->SetColor(Quantity_NOC_GRAY20);
5028 - HLA->SetTypeOfLine(Aspect_TOL_DASH);
5029 + Handle(Prs3d_LineAspect) aLineAspect = myDefaultDrawer->HiddenLineAspect();
5030 + aLineAspect->SetColor (Quantity_NOC_GRAY20);
5031 + aLineAspect->SetWidth (1.0);
5032 + aLineAspect->SetTypeOfLine (Aspect_TOL_DASH);
5034 // tolerance to 4 pixels...
5035 SetPixelTolerance();
5037 // Customizing the drawer for trihedrons and planes...
5039 - Handle (Prs3d_DatumAspect) DA = myDefaultDrawer->DatumAspect();
5040 - Standard_Real aLength(100.);
5041 - DA->SetAxisLength(aLength,aLength,aLength);
5042 - Quantity_NameOfColor col = Quantity_NOC_LIGHTSTEELBLUE4;
5043 - DA->FirstAxisAspect()->SetColor(col);
5044 - DA->SecondAxisAspect()->SetColor(col);
5045 - DA->ThirdAxisAspect()->SetColor(col);
5047 - Handle(Prs3d_PlaneAspect)PA = myDefaultDrawer->PlaneAspect();
5049 - PA->SetPlaneLength(aLength,aLength);
5050 - PA->EdgesAspect()->SetColor(Quantity_NOC_SKYBLUE);
5053 + Handle(Prs3d_DatumAspect) aTrihAspect = myDefaultDrawer->DatumAspect();
5054 + const Standard_Real aLength = 100.0;
5055 + aTrihAspect->SetAxisLength (aLength, aLength, aLength);
5056 + const Quantity_NameOfColor aColor = Quantity_NOC_LIGHTSTEELBLUE4;
5057 + aTrihAspect->FirstAxisAspect() ->SetColor (aColor);
5058 + aTrihAspect->SecondAxisAspect()->SetColor (aColor);
5059 + aTrihAspect->ThirdAxisAspect() ->SetColor (aColor);
5061 + Handle(Prs3d_PlaneAspect) aPlaneAspect = myDefaultDrawer->PlaneAspect();
5062 + const Standard_Real aPlaneLength = 200.0;
5063 + aPlaneAspect->SetPlaneLength (aPlaneLength, aPlaneLength);
5064 + aPlaneAspect->EdgesAspect()->SetColor (Quantity_NOC_SKYBLUE);
5068 //=======================================================================
5069 //function : TrihedronSize
5072 //=======================================================================
5073 Standard_Real AIS_InteractiveContext::TrihedronSize() const
5075 return myDefaultDrawer->DatumAspect()->FirstAxisLength();
5078 //=======================================================================
5079 //function : SetTrihedronSize
5082 //=======================================================================
5083 -void AIS_InteractiveContext::SetTrihedronSize(const Standard_Real aVal,const Standard_Boolean /*updateviewer*/)
5084 +void AIS_InteractiveContext::SetTrihedronSize (const Standard_Real theVal,
5085 + const Standard_Boolean /*updateviewer*/)
5087 - myDefaultDrawer->DatumAspect()->SetAxisLength(aVal,aVal,aVal);
5088 - Redisplay(AIS_KOI_Datum,3,Standard_False);
5089 - Redisplay(AIS_KOI_Datum,4,Standard_True);
5090 + myDefaultDrawer->DatumAspect()->SetAxisLength (theVal, theVal, theVal);
5091 + Redisplay (AIS_KOI_Datum, 3, Standard_False);
5092 + Redisplay (AIS_KOI_Datum, 4, Standard_True);
5097 //=======================================================================
5098 //function : SetPlaneSize
5101 //=======================================================================
5102 -void AIS_InteractiveContext::SetPlaneSize(const Standard_Real aValX,
5103 - const Standard_Real aValY,
5104 +void AIS_InteractiveContext::SetPlaneSize(const Standard_Real theValX,
5105 + const Standard_Real theValY,
5106 const Standard_Boolean /*updateviewer*/)
5108 - myDefaultDrawer->PlaneAspect()->SetPlaneLength(aValX,aValY);
5109 - Redisplay(AIS_KOI_Datum,7);
5110 + myDefaultDrawer->PlaneAspect()->SetPlaneLength (theValX, theValY);
5111 + Redisplay (AIS_KOI_Datum, 7);
5114 //=======================================================================
5115 //function : SetPlaneSize
5118 //=======================================================================
5120 -void AIS_InteractiveContext::SetPlaneSize(const Standard_Real aVal,
5121 - const Standard_Boolean updateviewer)
5122 +void AIS_InteractiveContext::SetPlaneSize (const Standard_Real theVal,
5123 + const Standard_Boolean theToUpdateViewer)
5125 - SetPlaneSize(aVal,aVal,updateviewer);
5126 + SetPlaneSize (theVal, theVal, theToUpdateViewer);
5129 //=======================================================================
5130 //function : PlaneSize
5133 //=======================================================================
5135 -Standard_Boolean AIS_InteractiveContext::PlaneSize(Standard_Real& LX,Standard_Real& LY) const
5136 +Standard_Boolean AIS_InteractiveContext::PlaneSize (Standard_Real& theX,
5137 + Standard_Real& theY) const
5139 - LX = myDefaultDrawer->PlaneAspect()->PlaneXLength();
5140 - LY = myDefaultDrawer->PlaneAspect()->PlaneYLength();
5141 - return (Abs(LX-LY)<=Precision::Confusion());
5142 + theX = myDefaultDrawer->PlaneAspect()->PlaneXLength();
5143 + theY = myDefaultDrawer->PlaneAspect()->PlaneYLength();
5144 + return (Abs (theX - theY) <= Precision::Confusion());
5149 //=======================================================================
5152 +//function : SetAutoActivateSelection
5154 //=======================================================================
5155 -void AIS_InteractiveContext::SetAutoActivateSelection( const Standard_Boolean Auto )
5156 +void AIS_InteractiveContext::SetAutoActivateSelection (const Standard_Boolean theIsAuto)
5158 - myIsAutoActivateSelMode = Auto;
5159 + myIsAutoActivateSelMode = theIsAuto;
5162 //=======================================================================
5165 +//function : GetAutoActivateSelection
5167 //=======================================================================
5168 Standard_Boolean AIS_InteractiveContext::GetAutoActivateSelection() const
5170 @@ -2837,13 +2721,12 @@
5172 //=======================================================================
5173 //function : SetZLayer
5176 //=======================================================================
5178 void AIS_InteractiveContext::SetZLayer (const Handle(AIS_InteractiveObject)& theIObj,
5179 const Standard_Integer theLayerId)
5181 - if (theIObj.IsNull ())
5182 + if (theIObj.IsNull())
5185 if (myObjects.IsBound (theIObj))
5186 @@ -2853,7 +2736,7 @@
5187 theIObj->SetZLayer (myMainPM, theLayerId);
5190 - else if (HasOpenedContext ())
5191 + else if (HasOpenedContext())
5193 myLocalContexts (myCurLocalIndex)->SetZLayer (theIObj, theLayerId);
5195 @@ -2861,19 +2744,18 @@
5197 //=======================================================================
5198 //function : GetZLayer
5201 //=======================================================================
5203 Standard_Integer AIS_InteractiveContext::GetZLayer (const Handle(AIS_InteractiveObject)& theIObj) const
5205 - if (theIObj.IsNull ())
5206 + if (theIObj.IsNull())
5209 if (myObjects.IsBound (theIObj))
5211 return theIObj->GetZLayer (myMainPM);
5213 - else if (HasOpenedContext ())
5214 + else if (HasOpenedContext())
5216 return myLocalContexts (myCurLocalIndex)->GetZLayer (theIObj);
5218 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/AIS/AIS_LocalContext_1.cxx OCCT-6.8.0_SRC-patch/src/AIS/AIS_LocalContext_1.cxx
5219 --- OCCT-6.8.0_SRC/src/AIS/AIS_LocalContext_1.cxx 2014-11-11 17:46:38.000000000 +0300
5220 +++ OCCT-6.8.0_SRC-patch/src/AIS/AIS_LocalContext_1.cxx 2015-01-16 13:01:23.000000000 +0300
5223 if (mylastindex != 0 && mylastindex <= myMapOfOwner.Extent())
5225 + myMainPM->ClearImmediateDraw();
5226 Unhilight (myMapOfOwner (mylastindex), theView);
5227 if (theToRedrawImmediate)
5233 + myMainPM->ClearImmediateDraw();
5234 const Handle(V3d_Viewer)& aViewer = myCTX->CurrentViewer();
5235 for (aViewer->InitActiveViews(); aViewer->MoreActiveViews(); aViewer->NextActiveViews())
5241 - myMainPM->ClearImmediateDraw();
5242 const Standard_Integer aHilightMode = GetHiMod (Handle(AIS_InteractiveObject)::DownCast (theOwner->Selectable()));
5243 if (IsSelected (theOwner))
5245 @@ -1044,6 +1045,10 @@
5246 myMapOfOwner.Clear();
5247 myMapOfOwner.Assign (anOwnersToKeep);
5248 mylastindex = myMapOfOwner.FindIndex (aLastPicked);
5249 + if (!IsValidIndex (mylastindex))
5251 + myMainPM->ClearImmediateDraw();
5254 if (!isAISRemainsDetected)
5256 @@ -1197,6 +1202,7 @@
5258 if (thePickOwner.IsNull())
5260 + myMainPM->ClearImmediateDraw();
5261 if (theToRedrawImmediate)
5263 theView->RedrawImmediate();
5264 @@ -1248,6 +1254,7 @@
5265 if (aNewIndex != mylastindex
5266 || thePickOwner->IsForcedHilight())
5268 + myMainPM->ClearImmediateDraw();
5269 if (mylastindex != 0
5270 && mylastindex <= myMapOfOwner.Extent())
5272 @@ -1270,7 +1277,7 @@
5273 mylastindex = aNewIndex;
5277 + if (mylastindex != 0)
5279 mylastgood = mylastindex;
5281 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/AIS/AIS_LocalContext.cxx OCCT-6.8.0_SRC-patch/src/AIS/AIS_LocalContext.cxx
5282 --- OCCT-6.8.0_SRC/src/AIS/AIS_LocalContext.cxx 2014-11-11 17:46:38.000000000 +0300
5283 +++ OCCT-6.8.0_SRC-patch/src/AIS/AIS_LocalContext.cxx 2015-01-16 12:59:32.000000000 +0300
5284 @@ -445,65 +445,67 @@
5286 Standard_Boolean AIS_LocalContext::Remove(const Handle(AIS_InteractiveObject)& aSelectable)
5288 - if(!myActiveObjects.IsBound(aSelectable)) return Standard_False;
5289 + if(!myActiveObjects.IsBound (aSelectable))
5291 + return Standard_False;
5294 + if (IsSelected (aSelectable))
5296 + AddOrRemoveSelected (aSelectable, Standard_False);
5299 + const Handle(AIS_LocalStatus)& Att = myActiveObjects (aSelectable);
5301 - if(IsSelected(aSelectable))
5302 - AddOrRemoveSelected(aSelectable,Standard_False);
5304 - const Handle(AIS_LocalStatus)& Att = myActiveObjects(aSelectable);
5306 TColStd_ListIteratorOfListOfInteger It;
5307 - // it is checked which were the temporary attributes
5308 - // and they are set to 0
5310 - // desactivate standard modes
5311 - if(Att->Decomposed()){
5312 - for(It.Initialize(myListOfStandardMode);It.More();It.Next()){
5313 - mySM->Deactivate(aSelectable,It.Value(),myMainVS);
5314 + // Deactivate standard modes
5315 + if (Att->Decomposed())
5317 + for (It.Initialize (myListOfStandardMode); It.More(); It.Next())
5319 + mySM->Deactivate (aSelectable, It.Value(), myMainVS);
5323 - // if object or temporary presentations...
5324 - if(Att->IsTemporary())
5326 + // If object or temporary presentations
5327 + if (Att->IsTemporary())
5329 + if (Att->IsSubIntensityOn())
5331 - if(Att->IsSubIntensityOn())
5332 - myMainPM->Unhighlight(aSelectable,Att->HilightMode());
5334 - // remove if bug on clear correct...
5335 - myMainPM->Erase(aSelectable,Att->DisplayMode());
5336 - myMainPM->Clear(aSelectable,Att->DisplayMode());
5337 - if(myMainPM->IsDisplayed(aSelectable,Att->HilightMode()))
5338 - myMainPM->Erase(aSelectable,Att->HilightMode());
5339 - // myMainPM->Clear(aSelectable,Att->HilightMode());
5340 + myMainPM->Unhighlight (aSelectable, Att->HilightMode());
5342 - // if below intensity
5345 + myMainPM->Erase (aSelectable, Att->DisplayMode());
5346 + myMainPM->Clear (aSelectable, Att->DisplayMode());
5347 + if (myMainPM->IsDisplayed (aSelectable, Att->HilightMode()))
5349 - if(Att->IsSubIntensityOn())
5350 - myCTX->SubIntensityOff(aSelectable);
5351 + myMainPM->Erase (aSelectable, Att->HilightMode());
5353 - // desactivate stored proper modes
5354 - for(It.Initialize(Att->SelectionModes());It.More();It.Next()){
5355 - mySM->Deactivate(aSelectable,It.Value(),myMainVS);
5357 -// pop : si je laisses cela plantes dans les elements de construction
5358 -// alors a toi de jouer ROB
5359 -// RemoveSelected(aSelectable);
5361 - if(IsSelected(aSelectable))
5362 - AddOrRemoveSelected(aSelectable);
5363 - myActiveObjects.UnBind(aSelectable);
5365 + // If subintensity used
5366 + else if (Att->IsSubIntensityOn())
5368 + myCTX->SubIntensityOff (aSelectable);
5371 + // Deactivate stored selection modes
5372 + for (It.Initialize (Att->SelectionModes()); It.More(); It.Next())
5374 + mySM->Deactivate (aSelectable, It.Value(), myMainVS);
5377 // Remove the interactive object from selection manager
5378 if (mySM->Contains (aSelectable))
5380 mySM->Remove (aSelectable);
5385 ClearOutdatedSelection (aSelectable, Standard_True);
5387 + // This should be done at the very end because most methods use
5388 + // myActiveObjects even during clean-up
5389 + myActiveObjects.UnBind (aSelectable);
5390 return Standard_True;
5393 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/Blend/Blend_Walking_1.gxx OCCT-6.8.0_SRC-patch/src/Blend/Blend_Walking_1.gxx
5394 --- OCCT-6.8.0_SRC/src/Blend/Blend_Walking_1.gxx 2014-11-11 17:46:43.000000000 +0300
5395 +++ OCCT-6.8.0_SRC-patch/src/Blend/Blend_Walking_1.gxx 2015-01-16 12:59:38.000000000 +0300
5398 void Blend_Walking::Perform(Blend_Function& Func,
5399 Blend_FuncInv& FuncInv,
5400 + const Handle(ChFiDS_HElSpine)& HGuide,
5401 const Standard_Real Pdep,
5402 const Standard_Real Pmax,
5403 const Standard_Real MaxStep,
5408 - InternalPerform(Func,FuncInv,Pmax);
5409 + InternalPerform(Func,FuncInv,HGuide,Pmax);
5411 done = Standard_True;
5414 previousP.ParametersOnS1(sol(1),sol(2));
5415 previousP.ParametersOnS2(sol(3),sol(4));
5417 - InternalPerform(Func,FuncInv,P);
5418 + Handle(ChFiDS_HElSpine) anHGuide;
5419 + InternalPerform(Func,FuncInv,anHGuide,P);
5420 return Standard_True;
5424 if(OnS1) clasonS1 = Standard_False;
5425 else clasonS2 = Standard_False;
5427 - InternalPerform(Func,FuncInv,P);
5428 + Handle(ChFiDS_HElSpine) anHGuide;
5429 + InternalPerform(Func,FuncInv,anHGuide,P);
5431 clasonS1 = Standard_True;
5432 clasonS2 = Standard_True;
5434 previousP.ParametersOnS1(sol(1),sol(2));
5435 previousP.ParametersOnS2(sol(3),sol(4));
5437 - InternalPerform(Func,FuncInv,Pmin);
5438 + Handle(ChFiDS_HElSpine) anHGuide;
5439 + InternalPerform(Func,FuncInv,anHGuide,Pmin);
5441 iscomplete = Standard_True;
5442 return Standard_True;
5443 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/Blend/Blend_Walking_4.gxx OCCT-6.8.0_SRC-patch/src/Blend/Blend_Walking_4.gxx
5444 --- OCCT-6.8.0_SRC/src/Blend/Blend_Walking_4.gxx 2014-11-11 17:46:43.000000000 +0300
5445 +++ OCCT-6.8.0_SRC-patch/src/Blend/Blend_Walking_4.gxx 2015-01-16 12:59:38.000000000 +0300
5447 // Alternatively, this file may be used under the terms of Open CASCADE
5448 // commercial license or contractual agreement.
5450 +#include <gce_MakePln.hxx>
5452 static void evalpinit(math_Vector& parinit,
5453 const Blend_Point& previousP,
5454 const Standard_Real parprec,
5457 void Blend_Walking::InternalPerform(Blend_Function& Func,
5458 Blend_FuncInv& FuncInv,
5459 + const Handle(ChFiDS_HElSpine)& HGuide,
5460 const Standard_Real Bound)
5463 @@ -251,12 +254,64 @@
5464 // avec les surfaces periodiques.
5465 State = Blend_OnRst12;
5467 + gp_Pnt Pnt1, Pnt2;
5468 p2d = TheArcTool::Value(recdomain1->Value(),solrst1(1));
5471 + Pnt1 = TheSurfaceTool::Value(surf1,sol(1),sol(2));
5472 p2d = TheArcTool::Value(recdomain2->Value(),solrst2(1));
5475 + Pnt2 = TheSurfaceTool::Value(surf2,sol(3),sol(4));
5476 + if (!HGuide.IsNull())
5478 + const Standard_Real TolProd = 1.e-5;
5479 + Standard_Real SavedParams [2];
5480 + Standard_Boolean SameDirs [2] = {Standard_False, Standard_False};
5481 + ChFiDS_ElSpine& theElSpine = HGuide->ChangeCurve();
5482 + SavedParams[0] = theElSpine.GetSavedFirstParameter();
5483 + SavedParams[1] = theElSpine.GetSavedLastParameter();
5484 + for (Standard_Integer ind = 0; ind < 2; ind++)
5486 + if (!Precision::IsInfinite(SavedParams[ind]))
5488 + //Check the original first and last parameters of guide curve
5489 + //for equality to found parameter <param>:
5490 + //check equality of tangent to guide curve and
5491 + //normal to plane built on 3 points:
5492 + //point on guide curve and points on restrictions of adjacent
5496 + HGuide->D1(SavedParams[ind], Pnt0, Dir0);
5497 + Standard_Real Length = Dir0.Magnitude();
5498 + if (Length <= gp::Resolution())
5501 + gce_MakePln PlaneBuilder(Pnt0, Pnt1, Pnt2);
5502 + if (!PlaneBuilder.IsDone())
5504 + gp_Pln thePlane = PlaneBuilder.Value();
5505 + gp_Dir DirPlane = thePlane.Axis().Direction();
5506 + gp_Vec theProd = Dir0 ^ DirPlane;
5507 + Standard_Real ProdMod = theProd.Magnitude();
5508 + if (ProdMod <= TolProd)
5509 + SameDirs[ind] = Standard_True;
5512 + Standard_Real theParam = Precision::Infinite();
5513 + //Choose the closest parameter
5514 + if (SameDirs[0] && SameDirs[1])
5515 + theParam = (Abs(param - SavedParams[0]) < Abs(param - SavedParams[1]))?
5516 + SavedParams[0] : SavedParams[1];
5517 + else if (SameDirs[0])
5518 + theParam = SavedParams[0];
5519 + else if (SameDirs[1])
5520 + theParam = SavedParams[1];
5522 + if (!Precision::IsInfinite(theParam))
5528 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/Blend/Blend_Walking.cdl OCCT-6.8.0_SRC-patch/src/Blend/Blend_Walking.cdl
5529 --- OCCT-6.8.0_SRC/src/Blend/Blend_Walking.cdl 2014-11-11 17:46:43.000000000 +0300
5530 +++ OCCT-6.8.0_SRC-patch/src/Blend/Blend_Walking.cdl 2015-01-16 12:59:38.000000000 +0300
5532 Transition from IntSurf,
5533 Function from Blend,
5535 + HElSpine from ChFiDS,
5541 Perform(me: in out; F : in out Function from Blend;
5542 FInv : in out FuncInv from Blend;
5543 + HGuide : HElSpine from ChFiDS;
5544 Pdep : Real from Standard;
5545 Pmax : Real from Standard;
5546 MaxStep : Real from Standard;
5549 InternalPerform (me: in out;F : in out Function from Blend;
5550 FInv : in out FuncInv from Blend;
5551 + HGuide : HElSpine from ChFiDS;
5552 Bound : Real from Standard)
5555 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/BOPAlgo/BOPAlgo_BuilderSolid.cxx OCCT-6.8.0_SRC-patch/src/BOPAlgo/BOPAlgo_BuilderSolid.cxx
5556 --- OCCT-6.8.0_SRC/src/BOPAlgo/BOPAlgo_BuilderSolid.cxx 2014-11-11 17:46:39.000000000 +0300
5557 +++ OCCT-6.8.0_SRC-patch/src/BOPAlgo/BOPAlgo_BuilderSolid.cxx 2015-01-16 12:59:34.000000000 +0300
5561 if (aInOutMap.IsBound (aHole)){
5562 - const TopoDS_Shape& aHole2=aInOutMap(aHole);
5563 - if (IsInside(aHole, aHole2, myContext)) {
5564 + const TopoDS_Shape& aSolidWas=aInOutMap(aHole);
5565 + if (IsInside(aSolid, aSolidWas, myContext)) {
5566 aInOutMap.UnBind(aHole);
5567 aInOutMap.Bind (aHole, aSolid);
5569 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/BOPAlgo/BOPAlgo_PaveFiller_5.cxx OCCT-6.8.0_SRC-patch/src/BOPAlgo/BOPAlgo_PaveFiller_5.cxx
5570 --- OCCT-6.8.0_SRC/src/BOPAlgo/BOPAlgo_PaveFiller_5.cxx 2014-11-11 17:46:39.000000000 +0300
5571 +++ OCCT-6.8.0_SRC-patch/src/BOPAlgo/BOPAlgo_PaveFiller_5.cxx 2015-01-16 12:59:34.000000000 +0300
5573 aPB->Indices(nV[0], nV[1]);
5575 BOPDS_FaceInfo& aFI=myDS->ChangeFaceInfo(nF);
5576 - ////const BOPDS_IndexedMapOfPaveBlock& aMPBF=aFI.PaveBlocksOn();
5577 const BOPCol_MapOfInteger& aMIFOn=aFI.VerticesOn();
5578 const BOPCol_MapOfInteger& aMIFIn=aFI.VerticesIn();
5581 aEF.SetIndices(nE, nF);
5582 aEF.SetCommonPart(aCP);
5583 myDS->AddInterf(nE, nF);
5588 BOPAlgo_Tools::FillMap(aPB, nF, aMPBLI, aAllocator);
5591 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/BOPTools/BOPTools_AlgoTools_1.cxx OCCT-6.8.0_SRC-patch/src/BOPTools/BOPTools_AlgoTools_1.cxx
5592 --- OCCT-6.8.0_SRC/src/BOPTools/BOPTools_AlgoTools_1.cxx 2014-11-11 17:46:40.000000000 +0300
5593 +++ OCCT-6.8.0_SRC-patch/src/BOPTools/BOPTools_AlgoTools_1.cxx 2015-01-16 13:01:24.000000000 +0300
5595 Standard_Real& theFVal) {
5597 const Standard_Real aPar = theX(1);
5598 + if (!CheckParameter(aPar))
5599 + return Standard_False;
5602 my3DCurve->D0(aPar, aP1);
5604 math_Vector& theGrad) {
5606 const Standard_Real aPar = theX(1);
5608 + if (!CheckParameter(aPar))
5609 + return Standard_False;
5611 gp_Vec aDC3D, aDSU, aDSV;
5613 @@ -417,6 +420,19 @@
5618 + Standard_Boolean CheckParameter(const Standard_Real theParam)
5620 + if (theParam < my3DCurve->FirstParameter() ||
5621 + theParam > my3DCurve->LastParameter() ||
5622 + theParam < my2DCurve->FirstParameter() ||
5623 + theParam > my2DCurve->LastParameter() )
5625 + return Standard_False;
5627 + return Standard_True;
5630 Handle(Geom_Curve) my3DCurve;
5631 Handle(Geom2d_Curve) my2DCurve;
5632 Handle(Geom_Surface) mySurf;
5633 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/BOPTools/BOPTools_AlgoTools.cxx OCCT-6.8.0_SRC-patch/src/BOPTools/BOPTools_AlgoTools.cxx
5634 --- OCCT-6.8.0_SRC/src/BOPTools/BOPTools_AlgoTools.cxx 2014-11-11 17:46:40.000000000 +0300
5635 +++ OCCT-6.8.0_SRC-patch/src/BOPTools/BOPTools_AlgoTools.cxx 2015-01-16 13:01:24.000000000 +0300
5638 Handle(IntTools_Context)& theContext,
5639 GeomAPI_ProjectPointOnSurf& aProjPL,
5640 - const Standard_Real aDt);
5641 + const Standard_Real aDt,
5642 + const Standard_Real aTolE);
5644 Standard_Real MinStep3D(const TopoDS_Edge& theE1,
5645 const TopoDS_Face& theF1,
5646 @@ -1825,14 +1826,18 @@
5647 GeomAPI_ProjectPointOnSurf& aProjPL,
5648 const Standard_Real aDt)
5650 + Standard_Real aTolE;
5653 BOPTools_AlgoTools3D::GetNormalToFaceOnEdge(aE, aF, aT, aDN);
5654 if (aF.Orientation()==TopAbs_REVERSED){
5658 + aTolE=BRep_Tool::Tolerance(aE);
5662 - if (!FindPointInFace(aF, aP, aDB, aPx, theContext, aProjPL, aDt)) {
5663 + if (!FindPointInFace(aF, aP, aDB, aPx, theContext, aProjPL, aDt, aTolE)) {
5664 BOPTools_AlgoTools3D::GetApproxNormalToFaceOnEdge(aE, aF, aT, aPx,
5666 aProjPL.Perform(aPx);
5667 @@ -1841,7 +1846,6 @@
5668 aDB.SetXYZ(aVec.XYZ());
5672 //=======================================================================
5673 //function : FindPointInFace
5674 //purpose : Find a point in the face in direction of <aDB>
5675 @@ -1852,12 +1856,13 @@
5677 Handle(IntTools_Context)& theContext,
5678 GeomAPI_ProjectPointOnSurf& aProjPL,
5679 - const Standard_Real aDt)
5680 + const Standard_Real aDt,
5681 + const Standard_Real aTolE)
5683 Standard_Integer aNbItMax;
5684 Standard_Real aDist, aDTol, aPM;
5685 Standard_Boolean bRet;
5689 aDTol = Precision::Angular();
5690 aPM = aP.XYZ().Modulus();
5691 @@ -1869,10 +1874,27 @@
5693 GeomAPI_ProjectPointOnSurf& aProj=theContext->ProjPS(aF);
5696 + aProj.Perform(aPS);
5697 + if (!aProj.IsDone()) {
5700 + aPS=aProj.NearestPoint();
5701 + aProjPL.Perform(aPS);
5702 + aPS=aProjPL.NearestPoint();
5704 + aPS.SetXYZ(aPS.XYZ()+2.*aTolE*aDB.XYZ());
5705 + aProj.Perform(aPS);
5706 + if (!aProj.IsDone()) {
5709 + aPS=aProj.NearestPoint();
5710 + aProjPL.Perform(aPS);
5711 + aPS=aProjPL.NearestPoint();
5715 - aP1.SetCoord(aP.X()+aDt*aDB.X(),
5716 - aP.Y()+aDt*aDB.Y(),
5717 - aP.Z()+aDt*aDB.Z());
5718 + aP1.SetXYZ(aPS.XYZ()+aDt*aDB.XYZ());
5721 if (!aProj.IsDone()) {
5722 @@ -1884,7 +1906,7 @@
5723 aProjPL.Perform(aPOut);
5724 aPOut = aProjPL.NearestPoint();
5726 - gp_Vec aV(aP, aPOut);
5727 + gp_Vec aV(aPS, aPOut);
5728 aDB.SetXYZ(aV.XYZ());
5729 } while (aDist > aDTol && --aNbItMax);
5731 @@ -2006,8 +2028,8 @@
5732 //function : IsInvertedSolid
5734 //=======================================================================
5736 - BOPTools_AlgoTools::IsInvertedSolid(const TopoDS_Solid& aSolid)
5737 +Standard_Boolean BOPTools_AlgoTools::IsInvertedSolid
5738 + (const TopoDS_Solid& aSolid)
5740 Standard_Real aTolS;
5741 TopAbs_State aState;
5742 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/BRepFill/BRepFill_Pipe.cxx OCCT-6.8.0_SRC-patch/src/BRepFill/BRepFill_Pipe.cxx
5743 --- OCCT-6.8.0_SRC/src/BRepFill/BRepFill_Pipe.cxx 2014-11-11 17:46:41.000000000 +0300
5744 +++ OCCT-6.8.0_SRC-patch/src/BRepFill/BRepFill_Pipe.cxx 2015-01-16 12:59:36.000000000 +0300
5745 @@ -274,18 +274,9 @@
5748 ShapeUpgrade_RemoveLocations RemLoc;
5749 + RemLoc.SetRemoveLevel(TopAbs_COMPOUND);
5750 RemLoc.Remove(myFirst);
5751 myFirst = RemLoc.GetResult();
5752 - TopLoc_Location theLoc = myFirst.Location();
5753 - if (!theLoc.IsIdentity())
5755 - TopoDS_Shape NewMyFirst = BRepBuilderAPI_Copy(myFirst);
5756 - RemLoc.Remove(NewMyFirst);
5757 - NewMyFirst = RemLoc.GetResult();
5758 - TopLoc_Location theIdentity;
5759 - NewMyFirst.Location(theIdentity);
5760 - myFirst = BRepBuilderAPI_Transform(NewMyFirst, theLoc.Transformation(), Standard_True);
5763 myLoc->Law(myLoc->NbLaw())->GetDomain(first, last);
5764 myLoc->Law(myLoc->NbLaw())->D0(last,M, V);
5765 @@ -308,16 +299,6 @@
5767 RemLoc.Remove(myLast);
5768 myLast = RemLoc.GetResult();
5769 - theLoc = myLast.Location();
5770 - if (!theLoc.IsIdentity())
5772 - TopoDS_Shape NewMyLast = BRepBuilderAPI_Copy(myLast);
5773 - RemLoc.Remove(NewMyLast);
5774 - NewMyLast = RemLoc.GetResult();
5775 - TopLoc_Location theIdentity;
5776 - NewMyLast.Location(theIdentity);
5777 - myLast = BRepBuilderAPI_Transform(NewMyLast, theLoc.Transformation(), Standard_True);
5782 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/ChFi3d/ChFi3d_Builder_2.cxx OCCT-6.8.0_SRC-patch/src/ChFi3d/ChFi3d_Builder_2.cxx
5783 --- OCCT-6.8.0_SRC/src/ChFi3d/ChFi3d_Builder_2.cxx 2014-11-11 17:46:44.000000000 +0300
5784 +++ OCCT-6.8.0_SRC-patch/src/ChFi3d/ChFi3d_Builder_2.cxx 2015-01-16 12:59:39.000000000 +0300
5785 @@ -1862,10 +1862,13 @@
5786 Standard_Real wl = Guide.LastParameter();
5787 Standard_Real locfleche = (wl - wf) * fleche;
5788 Standard_Real wfsav = wf, wlsav = wl;
5789 - //Now the ElSpine is artificially extended to help rsnld.
5790 - Standard_Real prab = 0.01;
5791 - Guide.FirstParameter(wf-prab*(wl-wf));
5792 - Guide.LastParameter (wl+prab*(wl-wf));
5793 + if (!Guide.IsPeriodic())
5795 + //Now the ElSpine is artificially extended to help rsnld.
5796 + Standard_Real prab = 0.01;
5797 + Guide.FirstParameter(wf-prab*(wl-wf));
5798 + Guide.LastParameter (wl+prab*(wl-wf));
5800 Handle(ChFiDS_Spine)& Spine = Stripe->ChangeSpine();
5801 Standard_Integer ii, nbed = Spine->NbEdges();
5802 Standard_Real lastedlastp = Spine->LastParameter(nbed);
5803 @@ -1920,7 +1923,9 @@
5805 if(Guide.IsPeriodic()) {
5806 Last = First - Guide.Period();
5807 + Guide.SaveFirstParameter();
5808 Guide.FirstParameter(Last);
5809 + Guide.SaveLastParameter();
5810 Guide.LastParameter (First * 1.1);//Extension to help rsnld.
5813 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/ChFi3d/ChFi3d_Builder_6.cxx OCCT-6.8.0_SRC-patch/src/ChFi3d/ChFi3d_Builder_6.cxx
5814 --- OCCT-6.8.0_SRC/src/ChFi3d/ChFi3d_Builder_6.cxx 2014-11-11 17:46:44.000000000 +0300
5815 +++ OCCT-6.8.0_SRC-patch/src/ChFi3d/ChFi3d_Builder_6.cxx 2015-01-16 12:59:39.000000000 +0300
5816 @@ -1573,7 +1573,7 @@
5817 if (5*TolGuide > MS) TolGuide = MS/5;
5818 if (5*TolEsp > MS) TolEsp = MS/5;
5820 - TheWalk.Perform(Func,FInv,NewFirst,Target,MS,TolGuide,
5821 + TheWalk.Perform(Func,FInv,HGuide,NewFirst,Target,MS,TolGuide,
5822 ParSol,TolEsp,Fleche,Appro);
5823 if (!TheWalk.IsDone()) {
5825 @@ -2113,7 +2113,7 @@
5826 if (5*TolEsp > MS) TolEsp = MS/5;
5829 - TheWalk.Perform(Func,FInv,NewFirst,Target,MS,TolGuide,
5830 + TheWalk.Perform(Func,FInv,HGuide,NewFirst,Target,MS,TolGuide,
5831 ParSol,TolEsp,Fleche,Appro);
5833 if (!TheWalk.IsDone()) {
5834 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/ChFi3d/ChFi3d_Builder_C1.cxx OCCT-6.8.0_SRC-patch/src/ChFi3d/ChFi3d_Builder_C1.cxx
5835 --- OCCT-6.8.0_SRC/src/ChFi3d/ChFi3d_Builder_C1.cxx 2014-11-11 17:46:44.000000000 +0300
5836 +++ OCCT-6.8.0_SRC-patch/src/ChFi3d/ChFi3d_Builder_C1.cxx 2015-01-16 13:01:24.000000000 +0300
5838 pared = ponc1.Parameter();
5839 parltg = ponc2.Parameter();
5840 if ((parltg > f) && (parltg < l)) {
5842 - ////modified by jgv, 10.05.2012 for the bug 23139////
5843 + ////modified by jgv, 10.05.2012 for the bug 23139, 25657////
5844 Handle(Geom2d_Curve) PConF = fi.PCurveOnFace();
5845 if (!PConF.IsNull())
5850 /////////////////////////////////////////////////////
5852 fi.SetParameter(parltg,isfirst);
5853 cp.SetArc(cp.Tolerance(),cp.Arc(),pared,cp.TransitionOnArc());
5854 return Standard_True;
5855 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/ChFiDS/ChFiDS_ElSpine.cdl OCCT-6.8.0_SRC-patch/src/ChFiDS/ChFiDS_ElSpine.cdl
5856 --- OCCT-6.8.0_SRC/src/ChFiDS/ChFiDS_ElSpine.cdl 2014-11-11 17:46:44.000000000 +0300
5857 +++ OCCT-6.8.0_SRC-patch/src/ChFiDS/ChFiDS_ElSpine.cdl 2015-01-16 12:59:39.000000000 +0300
5859 LastParameter(me) returns Real from Standard
5862 + GetSavedFirstParameter(me) returns Real from Standard;
5864 + GetSavedLastParameter(me) returns Real from Standard;
5866 Continuity(me) returns Shape from GeomAbs
5867 is redefined static;
5869 @@ -102,6 +106,10 @@
5871 LastParameter(me : in out; P : Real from Standard);
5873 + SaveFirstParameter(me : in out);
5875 + SaveLastParameter(me : in out);
5877 SetOrigin(me : in out; O : Real from Standard);
5879 FirstPointAndTgt(me; P : out Pnt from gp; T : out Vec from gp);
5881 period : Real from Standard;
5882 periodic : Boolean from Standard;
5884 +pfirstsav : Real from Standard;
5885 +plastsav : Real from Standard;
5888 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/ChFiDS/ChFiDS_ElSpine.cxx OCCT-6.8.0_SRC-patch/src/ChFiDS/ChFiDS_ElSpine.cxx
5889 --- OCCT-6.8.0_SRC/src/ChFiDS/ChFiDS_ElSpine.cxx 2014-11-11 17:46:44.000000000 +0300
5890 +++ OCCT-6.8.0_SRC-patch/src/ChFiDS/ChFiDS_ElSpine.cxx 2015-01-16 12:59:39.000000000 +0300
5893 ChFiDS_ElSpine::ChFiDS_ElSpine():periodic(0)
5895 + pfirstsav = Precision::Infinite();
5896 + plastsav = Precision::Infinite();
5903 //=======================================================================
5904 +//function : GetSavedFirstParameter
5906 +//=======================================================================
5908 +Standard_Real ChFiDS_ElSpine::GetSavedFirstParameter() const
5913 +//=======================================================================
5914 +//function : GetSavedLastParameter
5916 +//=======================================================================
5918 +Standard_Real ChFiDS_ElSpine::GetSavedLastParameter() const
5923 +//=======================================================================
5924 //function : Continuity
5926 //=======================================================================
5927 @@ -229,6 +251,26 @@
5931 +//=======================================================================
5932 +//function : SaveFirstParameter
5934 +//=======================================================================
5936 +void ChFiDS_ElSpine::SaveFirstParameter()
5938 + pfirstsav = pfirst;
5941 +//=======================================================================
5942 +//function : SaveLastParameter
5944 +//=======================================================================
5946 +void ChFiDS_ElSpine::SaveLastParameter()
5952 //=======================================================================
5953 //function : SetOrigin
5954 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/Graphic3d/Graphic3d_GraphicDriver.cdl OCCT-6.8.0_SRC-patch/src/Graphic3d/Graphic3d_GraphicDriver.cdl
5955 --- OCCT-6.8.0_SRC/src/Graphic3d/Graphic3d_GraphicDriver.cdl 2014-11-11 17:46:49.000000000 +0300
5956 +++ OCCT-6.8.0_SRC-patch/src/Graphic3d/Graphic3d_GraphicDriver.cdl 2015-01-16 13:01:24.000000000 +0300
5957 @@ -261,12 +261,6 @@
5959 ---Purpose: call_togl_setvisualisation
5961 - Transparency ( me : mutable;
5962 - ACView : CView from Graphic3d;
5963 - AFlag : Boolean from Standard )
5965 - ---Purpose: call_togl_transparency
5967 View ( me : mutable;
5968 ACView : in out CView from Graphic3d )
5969 returns Boolean from Standard
5970 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx OCCT-6.8.0_SRC-patch/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx
5971 --- OCCT-6.8.0_SRC/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx 2014-11-11 17:46:54.000000000 +0300
5972 +++ OCCT-6.8.0_SRC-patch/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx 2015-01-16 13:01:24.000000000 +0300
5973 @@ -1151,6 +1151,7 @@
5974 const Standard_Real theUlSurf1,
5975 const Standard_Real thePeriodOfSurf1,
5976 const Handle(IntSurf_LineOn2S)& theLine,
5977 + const Standard_Real theTol3D,
5978 const Standard_Real theTol2D,
5979 const Standard_Boolean theFlForce)
5981 @@ -1177,6 +1178,32 @@
5982 thePntOnSurf2.X(), thePntOnSurf2.Y());
5985 + const Standard_Integer aNbPnts = theLine->NbPoints();
5988 + Standard_Real aUl = 0.0, aVl = 0.0;
5989 + const IntSurf_PntOn2S aPlast = theLine->Value(aNbPnts);
5991 + aPlast.ParametersOnS2(aUl, aVl);
5993 + aPlast.ParametersOnS1(aUl, aVl);
5996 + {//Parameter value will be always increased.
5997 + return Standard_False;
6000 + //theTol2D is minimal step along parameter changed.
6001 + //Therefore, if we apply this minimal step two
6002 + //neighbour points will be always "same". Consequently,
6003 + //we should reduce tolerance for IsSame checking.
6004 + const Standard_Real aDTol = 1.0-Epsilon(1.0);
6005 + if(aPnt.IsSame(aPlast, theTol3D*aDTol, theTol2D*aDTol))
6007 + theLine->RemovePoint(aNbPnts);
6012 return Standard_True;
6014 @@ -1191,6 +1218,7 @@
6015 const stCoeffsValue& theCoeffs,
6016 const Bnd_Box2d& theUVSurf1,
6017 const Bnd_Box2d& theUVSurf2,
6018 + const Standard_Real theTol3D,
6019 const Standard_Real theTol2D,
6020 const Standard_Real thePeriod,
6021 const Standard_Real theNulValue,
6022 @@ -1281,7 +1309,7 @@
6023 AddPointIntoWL(theQuad1, theQuad2, isTheReverse,
6024 gp_Pnt2d(anUpar1, aV1), gp_Pnt2d(aU2, aV2),
6025 aUSurf1f, aUSurf1l, thePeriod,
6026 - theWL->Curve(), theTol2D, theFlForce);
6027 + theWL->Curve(), theTol3D, theTol2D, theFlForce);
6031 @@ -1313,7 +1341,7 @@
6032 AddPointIntoWL(theQuad1, theQuad2, isTheReverse,
6033 gp_Pnt2d(anUpar2, aV1), gp_Pnt2d(aU2, aV2),
6034 aUSurf1f, aUSurf1l, thePeriod,
6035 - theWL->Curve(), theTol2D, theFlForce);
6036 + theWL->Curve(),theTol3D, theTol2D, theFlForce);
6040 @@ -1346,7 +1374,7 @@
6041 AddPointIntoWL(theQuad1, theQuad2, isTheReverse,
6042 gp_Pnt2d(anUpar2, aV1), gp_Pnt2d(aU2, aV2),
6043 aUSurf1f, aUSurf1l, thePeriod,
6044 - theWL->Curve(), theTol2D, theFlForce);
6045 + theWL->Curve(), theTol3D, theTol2D, theFlForce);
6049 @@ -1376,7 +1404,7 @@
6050 AddPointIntoWL(theQuad1, theQuad2, isTheReverse,
6051 gp_Pnt2d(anUpar1, aV1), gp_Pnt2d(aU2, aV2),
6052 aUSurf1f, aUSurf1l, thePeriod,
6053 - theWL->Curve(), theTol2D, theFlForce);
6054 + theWL->Curve(), theTol3D, theTol2D, theFlForce);
6058 @@ -1545,7 +1573,8 @@
6060 Standard_Real &a = theU1crit[i],
6061 &b = theU1crit[i-1];
6062 - if(Abs(a - b) < theTol2D)
6063 + const Standard_Real aRemain = fmod(Abs(a - b), thePeriod); // >= 0, because Abs(a - b) >= 0
6064 + if((Abs(a - b) < theTol2D) || (aRemain < theTol2D) || (Abs(aRemain - thePeriod) < theTol2D))
6067 b = Precision::Infinite();
6068 @@ -1817,6 +1846,7 @@
6069 Standard_Boolean isAddedIntoWL1 = Standard_False, isAddedIntoWL2 = Standard_False;
6071 Standard_Real anUf = aU1f[aCurInterval], anUl = aU1l[aCurInterval];
6072 + const Standard_Boolean isDeltaPeriod = IsEqual(anUl-anUf, aPeriod);
6074 //Inscribe and sort critical points
6075 InscribeAndSortArray(anU1crit, aNbCritPointsMax, anUf, anUl, theTol2D, aPeriod);
6076 @@ -1830,6 +1860,8 @@
6077 Handle(IntPatch_WLine) aWLine2 = new IntPatch_WLine(aL2S2, Standard_False);
6079 Standard_Integer aWL1FindStatus = 0, aWL2FindStatus = 0;
6080 + Standard_Boolean isAddingWL1Enabled = Standard_True,
6081 + isAddingWL2Enabled = Standard_True;
6083 Standard_Real anU1 = anUf;
6085 @@ -1845,6 +1877,23 @@
6091 + if(IsEqual(anU1, anUl))
6093 + //if isAddedIntoWL* == TRUE WLine contains only one point
6094 + //(which was end point of previous WLine). If we will
6095 + //add point found on the current step WLine will contain only
6096 + //two points. At that both these points will be equal to the
6097 + //points found earlier. Therefore, new WLine will repeat
6098 + //already existing WLine. Consequently, it is necessary
6099 + //to forbid building new line in this case.
6101 + isAddingWL1Enabled = !isAddedIntoWL1;
6102 + isAddingWL2Enabled = !isAddedIntoWL2;
6106 for(Standard_Integer i = 0; i < aNbCritPointsMax; i++)
6108 if((anU1 - anU1crit[i])*aCriticalDelta[i] < 0.0)
6109 @@ -1995,123 +2044,129 @@
6110 isFirst = Standard_False;
6113 - if( ((aUSurf2f-aU21) <= theTol2D) &&
6114 - ((aU21-aUSurf2l) <= theTol2D) &&
6115 - ((aVSurf1f - aV11) <= theTol2D) &&
6116 - ((aV11 - aVSurf1l) <= theTol2D) &&
6117 - ((aVSurf2f - aV21) <= theTol2D) && ((aV21 - aVSurf2l) <= theTol2D))
6118 + if(isAddingWL1Enabled)
6120 - Standard_Boolean isForce = Standard_False;
6121 - if(!aWL1FindStatus)
6122 + if( ((aUSurf2f-aU21) <= theTol2D) &&
6123 + ((aU21-aUSurf2l) <= theTol2D) &&
6124 + ((aVSurf1f - aV11) <= theTol2D) &&
6125 + ((aV11 - aVSurf1l) <= theTol2D) &&
6126 + ((aVSurf2f - aV21) <= theTol2D) && ((aV21 - aVSurf2l) <= theTol2D))
6128 - Standard_Boolean isFound1 = Standard_False, isFound2 = Standard_False;
6130 - if(((aUSurf2l - aUSurf2f) >= aPeriod) && (Abs(anU1-aUSurf1l) < theTol2D))
6131 + Standard_Boolean isForce = Standard_False;
6132 + if(!aWL1FindStatus)
6134 - isForce = Standard_True;
6136 + Standard_Boolean isFound1 = Standard_False, isFound2 = Standard_False;
6138 - AddBoundaryPoint(theQuad1, theQuad2, aWLine1, anEquationCoeffs,
6139 - theUVSurf1, theUVSurf2, theTol2D, aPeriod,
6140 - aNulValue, anU1, aU21, aV11, aV11Prev,
6141 - aV21, aV21Prev, isTheReverse,
6142 - 1.0, isForce, isFound1, isFound2);
6143 + if(((aUSurf2l - aUSurf2f) >= aPeriod) && (Abs(anU1-aUSurf1l) < theTol2D))
6145 + isForce = Standard_True;
6148 + AddBoundaryPoint(theQuad1, theQuad2, aWLine1, anEquationCoeffs,
6149 + theUVSurf1, theUVSurf2, theTol3D, theTol2D, aPeriod,
6150 + aNulValue, anU1, aU21, aV11, aV11Prev,
6151 + aV21, aV21Prev, isTheReverse,
6152 + 1.0, isForce, isFound1, isFound2);
6154 - if(isFound1 || isFound2)
6156 - aWL1FindStatus = 1;
6157 + if(isFound1 || isFound2)
6159 + aWL1FindStatus = 1;
6164 - if((aWL1FindStatus != 2) || (aWLine1->NbPnts() >= 1))
6166 - if(AddPointIntoWL(theQuad1, theQuad2, isTheReverse,
6167 - gp_Pnt2d(anU1, aV11), gp_Pnt2d(aU21, aV21),
6168 - aUSurf1f, aUSurf1l, aPeriod,
6169 - aWLine1->Curve(), theTol2D, isForce))
6170 + if((aWL1FindStatus != 2) || (aWLine1->NbPnts() >= 1))
6172 - if(!aWL1FindStatus)
6173 + if(AddPointIntoWL(theQuad1, theQuad2, isTheReverse,
6174 + gp_Pnt2d(anU1, aV11), gp_Pnt2d(aU21, aV21),
6175 + aUSurf1f, aUSurf1l, aPeriod,
6176 + aWLine1->Curve(), theTol3D, theTol2D, isForce))
6178 - aWL1FindStatus = 1;
6179 + if(!aWL1FindStatus)
6181 + aWL1FindStatus = 1;
6189 - if(aWL1FindStatus == 1)
6192 - Standard_Boolean isFound1 = Standard_False, isFound2 = Standard_False;
6193 + if(aWL1FindStatus == 1)
6195 + Standard_Boolean isFound1 = Standard_False, isFound2 = Standard_False;
6197 - AddBoundaryPoint(theQuad1, theQuad2, aWLine1, anEquationCoeffs,
6198 - theUVSurf1, theUVSurf2, theTol2D, aPeriod,
6199 - aNulValue, anU1, aU21, aV11, aV11Prev,
6200 - aV21, aV21Prev, isTheReverse,
6201 - 1.0, Standard_False, isFound1, isFound2);
6202 + AddBoundaryPoint(theQuad1, theQuad2, aWLine1, anEquationCoeffs,
6203 + theUVSurf1, theUVSurf2, theTol3D, theTol2D, aPeriod,
6204 + aNulValue, anU1, aU21, aV11, aV11Prev,
6205 + aV21, aV21Prev, isTheReverse,
6206 + 1.0, Standard_False, isFound1, isFound2);
6208 - if(isFound1 || isFound2)
6209 - aWL1FindStatus = 2; //start a new line
6210 + if(isFound1 || isFound2)
6211 + aWL1FindStatus = 2; //start a new line
6216 - if( ((aUSurf2f-aU22) <= theTol2D) &&
6217 - ((aU22-aUSurf2l) <= theTol2D) &&
6218 - ((aVSurf1f - aV12) <= theTol2D) &&
6219 - ((aV12 - aVSurf1l) <= theTol2D) &&
6220 - ((aVSurf2f - aV22) <= theTol2D) &&
6221 - ((aV22 - aVSurf2l) <= theTol2D))
6223 + if(isAddingWL2Enabled)
6225 - Standard_Boolean isForce = Standard_False;
6227 - if(!aWL2FindStatus)
6228 + if( ((aUSurf2f-aU22) <= theTol2D) &&
6229 + ((aU22-aUSurf2l) <= theTol2D) &&
6230 + ((aVSurf1f - aV12) <= theTol2D) &&
6231 + ((aV12 - aVSurf1l) <= theTol2D) &&
6232 + ((aVSurf2f - aV22) <= theTol2D) &&
6233 + ((aV22 - aVSurf2l) <= theTol2D))
6235 - Standard_Boolean isFound1 = Standard_False, isFound2 = Standard_False;
6236 + Standard_Boolean isForce = Standard_False;
6238 - if(((aUSurf2l - aUSurf2f) >= aPeriod) && (Abs(anU1-aUSurf1l) < theTol2D))
6239 + if(!aWL2FindStatus)
6241 - isForce = Standard_True;
6243 + Standard_Boolean isFound1 = Standard_False, isFound2 = Standard_False;
6245 - AddBoundaryPoint(theQuad1, theQuad2, aWLine2, anEquationCoeffs,
6246 - theUVSurf1, theUVSurf2, theTol2D, aPeriod,
6247 - aNulValue, anU1, aU22, aV12, aV12Prev,
6248 - aV22, aV22Prev, isTheReverse,
6249 - -1.0, isForce, isFound1, isFound2);
6250 + if(((aUSurf2l - aUSurf2f) >= aPeriod) && (Abs(anU1-aUSurf1l) < theTol2D))
6252 + isForce = Standard_True;
6255 + AddBoundaryPoint(theQuad1, theQuad2, aWLine2, anEquationCoeffs,
6256 + theUVSurf1, theUVSurf2, theTol3D, theTol2D, aPeriod,
6257 + aNulValue, anU1, aU22, aV12, aV12Prev,
6258 + aV22, aV22Prev, isTheReverse,
6259 + -1.0, isForce, isFound1, isFound2);
6261 - if(isFound1 || isFound2)
6263 - aWL2FindStatus = 1;
6264 + if(isFound1 || isFound2)
6266 + aWL2FindStatus = 1;
6271 - if((aWL2FindStatus != 2) || (aWLine2->NbPnts() >= 1))
6273 - if(AddPointIntoWL(theQuad1, theQuad2, isTheReverse,
6274 - gp_Pnt2d(anU1, aV12), gp_Pnt2d(aU22, aV22),
6275 - aUSurf1f, aUSurf1l, aPeriod,
6276 - aWLine2->Curve(), theTol2D, isForce))
6277 + if((aWL2FindStatus != 2) || (aWLine2->NbPnts() >= 1))
6279 - if(!aWL2FindStatus)
6280 + if(AddPointIntoWL(theQuad1, theQuad2, isTheReverse,
6281 + gp_Pnt2d(anU1, aV12), gp_Pnt2d(aU22, aV22),
6282 + aUSurf1f, aUSurf1l, aPeriod,
6283 + aWLine2->Curve(), theTol3D, theTol2D, isForce))
6285 - aWL2FindStatus = 1;
6286 + if(!aWL2FindStatus)
6288 + aWL2FindStatus = 1;
6296 - if(aWL2FindStatus == 1)
6299 - Standard_Boolean isFound1 = Standard_False, isFound2 = Standard_False;
6300 + if(aWL2FindStatus == 1)
6302 + Standard_Boolean isFound1 = Standard_False, isFound2 = Standard_False;
6304 - AddBoundaryPoint(theQuad1, theQuad2, aWLine2, anEquationCoeffs,
6305 - theUVSurf1, theUVSurf2, theTol2D, aPeriod,
6306 - aNulValue, anU1, aU22, aV12, aV12Prev,
6307 - aV22, aV22Prev, isTheReverse,
6308 - -1.0, Standard_False, isFound1, isFound2);
6309 + AddBoundaryPoint(theQuad1, theQuad2, aWLine2, anEquationCoeffs,
6310 + theUVSurf1, theUVSurf2, theTol3D, theTol2D, aPeriod,
6311 + aNulValue, anU1, aU22, aV12, aV12Prev,
6312 + aV22, aV22Prev, isTheReverse,
6313 + -1.0, Standard_False, isFound1, isFound2);
6315 - if(isFound1 || isFound2)
6316 - aWL2FindStatus = 2; //start a new line
6317 + if(isFound1 || isFound2)
6318 + aWL2FindStatus = 2; //start a new line
6323 @@ -2237,15 +2292,29 @@
6325 else if(aWLine1->NbPnts() > 1)
6327 - isTheEmpty = Standard_False;
6328 - isAddedIntoWL1 = Standard_True;
6329 + Standard_Boolean isGood = Standard_True;
6331 + if(aWLine1->NbPnts() == 2)
6333 + const IntSurf_PntOn2S& aPf = aWLine1->Point(1);
6334 + const IntSurf_PntOn2S& aPl = aWLine1->Point(2);
6336 - SeekAdditionalPoints(theQuad1, theQuad2, aWLine1->Curve(),
6337 - anEquationCoeffs, aNbPoints, aUSurf2f, aUSurf2l,
6338 - theTol2D, aPeriod, 1.0, isTheReverse);
6339 + if(aPf.IsSame(aPl, Precision::Confusion()))
6340 + isGood = Standard_False;
6343 - aWLine1->ComputeVertexParameters(theTol3D);
6344 - theSlin.Append(aWLine1);
6347 + isTheEmpty = Standard_False;
6348 + isAddedIntoWL1 = Standard_True;
6350 + SeekAdditionalPoints( theQuad1, theQuad2, aWLine1->Curve(),
6351 + anEquationCoeffs, aNbPoints, aUSurf2f, aUSurf2l,
6352 + theTol2D, aPeriod, 1.0, isTheReverse);
6354 + aWLine1->ComputeVertexParameters(theTol3D);
6355 + theSlin.Append(aWLine1);
6360 @@ -2267,15 +2336,28 @@
6362 else if(aWLine2->NbPnts() > 1)
6364 - isTheEmpty = Standard_False;
6365 - isAddedIntoWL2 = Standard_True;
6366 + Standard_Boolean isGood = Standard_True;
6367 + if(aWLine2->NbPnts() == 2)
6369 + const IntSurf_PntOn2S& aPf = aWLine2->Point(1);
6370 + const IntSurf_PntOn2S& aPl = aWLine2->Point(2);
6372 + if(aPf.IsSame(aPl, Precision::Confusion()))
6373 + isGood = Standard_False;
6376 - SeekAdditionalPoints(theQuad1, theQuad2, aWLine2->Curve(),
6377 - anEquationCoeffs, aNbPoints, aUSurf2f, aUSurf2l,
6378 - theTol2D, aPeriod, -1.0, isTheReverse);
6381 + isTheEmpty = Standard_False;
6382 + isAddedIntoWL2 = Standard_True;
6384 - aWLine2->ComputeVertexParameters(theTol3D);
6385 - theSlin.Append(aWLine2);
6386 + SeekAdditionalPoints(theQuad1, theQuad2, aWLine2->Curve(),
6387 + anEquationCoeffs, aNbPoints, aUSurf2f, aUSurf2l,
6388 + theTol2D, aPeriod, -1.0, isTheReverse);
6390 + aWLine2->ComputeVertexParameters(theTol3D);
6391 + theSlin.Append(aWLine2);
6396 @@ -2284,6 +2366,203 @@
6400 + if(theSlin.Length() > 0)
6402 + for(Standard_Integer aNumOfLine = 2; aNumOfLine <= theSlin.Length(); aNumOfLine++)
6404 + const Handle(IntPatch_WLine)& aWLine = Handle(IntPatch_WLine)::DownCast(theSlin.Value(aNumOfLine));
6406 + const IntSurf_PntOn2S& aPntFWL = aWLine->Point(1);
6408 + Standard_Real aU1 = 0.0, aU2 = 0.0, aV1 = 0.0, aV2 = 0.0;
6409 + aPntFWL.Parameters(aU1, aV1, aU2, aV2);
6411 + if( IsEqual(aU1, 0.0) || IsEqual(aU1, aPeriod))
6413 + theSlin.Exchange(1, aNumOfLine);
6418 + for(Standard_Integer aNumOfLine1 = 1; aNumOfLine1 <= theSlin.Length(); aNumOfLine1++)
6420 + const Handle(IntPatch_WLine)& aWLine1 = Handle(IntPatch_WLine)::DownCast(theSlin.Value(aNumOfLine1));
6422 + const Standard_Integer aNbPntsWL1 = aWLine1->NbPnts();
6423 + const IntSurf_PntOn2S& aPntFWL1 = aWLine1->Point(1);
6424 + const IntSurf_PntOn2S& aPntLWL1 = aWLine1->Point(aNbPntsWL1);
6426 + for(Standard_Integer aNPt = 1; aNPt <= theSPnt.Length(); aNPt++)
6428 + const IntSurf_PntOn2S aPntCur = theSPnt.Value(aNPt).PntOn2S();
6430 + if( aPntCur.IsSame(aPntFWL1, Precision::Confusion()) ||
6431 + aPntCur.IsSame(aPntLWL1, Precision::Confusion()))
6433 + theSPnt.Remove(aNPt);
6438 + Standard_Boolean hasBeenRemoved = Standard_False;
6439 + for(Standard_Integer aNumOfLine2 = aNumOfLine1 + 1; aNumOfLine2 <= theSlin.Length(); aNumOfLine2++)
6441 + const Handle(IntPatch_WLine)& aWLine2 = Handle(IntPatch_WLine)::DownCast(theSlin.Value(aNumOfLine2));
6443 + const Standard_Integer aNbPntsWL1 = aWLine1->NbPnts();
6444 + const Standard_Integer aNbPntsWL2 = aWLine2->NbPnts();
6446 + const IntSurf_PntOn2S& aPntFWL1 = aWLine1->Point(1);
6447 + const IntSurf_PntOn2S& aPntLWL1 = aWLine1->Point(aNbPntsWL1);
6449 + const IntSurf_PntOn2S& aPntFWL2 = aWLine2->Point(1);
6450 + const IntSurf_PntOn2S& aPntLWL2 = aWLine2->Point(aNbPntsWL2);
6452 + if(aPntFWL1.IsSame(aPntFWL2, Precision::Confusion()))
6454 + Standard_Real aU11 = 0.0, aU12 = 0.0, aV11 = 0.0, aV12 = 0.0;
6455 + Standard_Real aU21 = 0.0, aU22 = 0.0, aV21 = 0.0, aV22 = 0.0;
6457 + aPntFWL1.Parameters(aU11, aV11, aU12, aV12);
6458 + aPntFWL2.Parameters(aU21, aV21, aU22, aV22);
6460 + if( !(IsEqual(fmod(aU11, aPeriod), 0.0) ||
6461 + IsEqual(fmod(aU12, aPeriod), 0.0) ||
6462 + IsEqual(fmod(aU21, aPeriod), 0.0) ||
6463 + IsEqual(fmod(aU22, aPeriod), 0.0) ||
6464 + IsEqual(aU11, aUSurf1f) || IsEqual(aU11, aUSurf1l) ||
6465 + IsEqual(aU21, aUSurf1f) || IsEqual(aU21, aUSurf1l) ||
6466 + IsEqual(aU12, aUSurf2f) || IsEqual(aU12, aUSurf2l) ||
6467 + IsEqual(aU22, aUSurf2f) || IsEqual(aU22, aUSurf2l)))
6469 + aWLine1->ClearVertexes();
6470 + for(Standard_Integer aNPt = 1; aNPt <= aNbPntsWL2; aNPt++)
6472 + const IntSurf_PntOn2S& aPt = aWLine2->Point(aNPt);
6473 + aWLine1->Curve()->InsertBefore(1, aPt);
6476 + aWLine1->ComputeVertexParameters(theTol3D);
6478 + theSlin.Remove(aNumOfLine2);
6480 + hasBeenRemoved = Standard_True;
6486 + if(aPntFWL1.IsSame(aPntLWL2, Precision::Confusion()))
6488 + Standard_Real aU11 = 0.0, aU12 = 0.0, aV11 = 0.0, aV12 = 0.0;
6489 + Standard_Real aU21 = 0.0, aU22 = 0.0, aV21 = 0.0, aV22 = 0.0;
6491 + aPntFWL1.Parameters(aU11, aV11, aU12, aV12);
6492 + aPntLWL2.Parameters(aU21, aV21, aU22, aV22);
6494 + if( !(IsEqual(fmod(aU11, aPeriod), 0.0) ||
6495 + IsEqual(fmod(aU12, aPeriod), 0.0) ||
6496 + IsEqual(fmod(aU21, aPeriod), 0.0) ||
6497 + IsEqual(fmod(aU22, aPeriod), 0.0) ||
6498 + IsEqual(aU11, aUSurf1f) || IsEqual(aU11, aUSurf1l) ||
6499 + IsEqual(aU21, aUSurf1f) || IsEqual(aU21, aUSurf1l) ||
6500 + IsEqual(aU12, aUSurf2f) || IsEqual(aU12, aUSurf2l) ||
6501 + IsEqual(aU22, aUSurf2f) || IsEqual(aU22, aUSurf2l)))
6503 + aWLine1->ClearVertexes();
6504 + for(Standard_Integer aNPt = aNbPntsWL2; aNPt >= 1; aNPt--)
6506 + const IntSurf_PntOn2S& aPt = aWLine2->Point(aNPt);
6507 + aWLine1->Curve()->InsertBefore(1, aPt);
6510 + aWLine1->ComputeVertexParameters(theTol3D);
6512 + theSlin.Remove(aNumOfLine2);
6514 + hasBeenRemoved = Standard_True;
6520 + if(aPntLWL1.IsSame(aPntFWL2, Precision::Confusion()))
6522 + Standard_Real aU11 = 0.0, aU12 = 0.0, aV11 = 0.0, aV12 = 0.0;
6523 + Standard_Real aU21 = 0.0, aU22 = 0.0, aV21 = 0.0, aV22 = 0.0;
6525 + aPntLWL1.Parameters(aU11, aV11, aU12, aV12);
6526 + aPntFWL2.Parameters(aU21, aV21, aU22, aV22);
6528 + if( !(IsEqual(fmod(aU11, aPeriod), 0.0) ||
6529 + IsEqual(fmod(aU12, aPeriod), 0.0) ||
6530 + IsEqual(fmod(aU21, aPeriod), 0.0) ||
6531 + IsEqual(fmod(aU22, aPeriod), 0.0) ||
6532 + IsEqual(aU11, aUSurf1f) || IsEqual(aU11, aUSurf1l) ||
6533 + IsEqual(aU21, aUSurf1f) || IsEqual(aU21, aUSurf1l) ||
6534 + IsEqual(aU12, aUSurf2f) || IsEqual(aU12, aUSurf2l) ||
6535 + IsEqual(aU22, aUSurf2f) || IsEqual(aU22, aUSurf2l)))
6537 + aWLine1->ClearVertexes();
6538 + for(Standard_Integer aNPt = 1; aNPt <= aNbPntsWL2; aNPt++)
6540 + const IntSurf_PntOn2S& aPt = aWLine2->Point(aNPt);
6541 + aWLine1->Curve()->Add(aPt);
6544 + aWLine1->ComputeVertexParameters(theTol3D);
6546 + theSlin.Remove(aNumOfLine2);
6548 + hasBeenRemoved = Standard_True;
6554 + if(aPntLWL1.IsSame(aPntLWL2, Precision::Confusion()))
6556 + Standard_Real aU11 = 0.0, aU12 = 0.0, aV11 = 0.0, aV12 = 0.0;
6557 + Standard_Real aU21 = 0.0, aU22 = 0.0, aV21 = 0.0, aV22 = 0.0;
6559 + aPntLWL1.Parameters(aU11, aV11, aU12, aV12);
6560 + aPntLWL2.Parameters(aU21, aV21, aU22, aV22);
6562 + if( !(IsEqual(fmod(aU11, aPeriod), 0.0) ||
6563 + IsEqual(fmod(aU12, aPeriod), 0.0) ||
6564 + IsEqual(fmod(aU21, aPeriod), 0.0) ||
6565 + IsEqual(fmod(aU22, aPeriod), 0.0) ||
6566 + IsEqual(aU11, aUSurf1f) || IsEqual(aU11, aUSurf1l) ||
6567 + IsEqual(aU21, aUSurf1f) || IsEqual(aU21, aUSurf1l) ||
6568 + IsEqual(aU12, aUSurf2f) || IsEqual(aU12, aUSurf2l) ||
6569 + IsEqual(aU22, aUSurf2f) || IsEqual(aU22, aUSurf2l)))
6571 + aWLine1->ClearVertexes();
6572 + for(Standard_Integer aNPt = aNbPntsWL2; aNPt >= 1; aNPt--)
6574 + const IntSurf_PntOn2S& aPt = aWLine2->Point(aNPt);
6575 + aWLine1->Curve()->Add(aPt);
6578 + aWLine1->ComputeVertexParameters(theTol3D);
6580 + theSlin.Remove(aNumOfLine2);
6582 + hasBeenRemoved = Standard_True;
6589 + if(hasBeenRemoved)
6592 + //aWLine1->ComputeVertexParameters(theTol3D);
6594 + }//if(theSlin.Length() > 0)
6597 return Standard_True;
6600 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/IntPatch/IntPatch_WLine.cdl OCCT-6.8.0_SRC-patch/src/IntPatch/IntPatch_WLine.cdl
6601 --- OCCT-6.8.0_SRC/src/IntPatch/IntPatch_WLine.cdl 2014-11-11 17:46:54.000000000 +0300
6602 +++ OCCT-6.8.0_SRC-patch/src/IntPatch/IntPatch_WLine.cdl 2015-01-16 12:59:50.000000000 +0300
6603 @@ -309,9 +309,21 @@
6604 ---C++: return const&
6605 returns HCurve2d from Adaptor2d;
6608 + ClearVertexes(me: mutable)
6612 + RemoveVertex(me: mutable;
6613 + theIndex : Integer from Standard)
6616 + InsertVertexBefore(me: mutable;
6617 + theIndex : Integer from Standard;
6618 + thePnt : Point from IntPatch)
6627 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/IntPatch/IntPatch_WLine.lxx OCCT-6.8.0_SRC-patch/src/IntPatch/IntPatch_WLine.lxx
6628 --- OCCT-6.8.0_SRC/src/IntPatch/IntPatch_WLine.lxx 2014-11-11 17:46:54.000000000 +0300
6629 +++ OCCT-6.8.0_SRC-patch/src/IntPatch/IntPatch_WLine.lxx 2015-01-16 12:59:50.000000000 +0300
6635 +inline void IntPatch_WLine::ClearVertexes()
6640 +inline void IntPatch_WLine::RemoveVertex(const Standard_Integer theIndex)
6642 + if((theIndex < 1) || (theIndex > NbVertex()))
6643 + Standard_OutOfRange::Raise("Cannot delete not existing vertex");
6644 + svtx.Remove(theIndex);
6647 +inline void IntPatch_WLine::InsertVertexBefore( const Standard_Integer theIndex,
6648 + const IntPatch_Point& thePnt)
6650 + const Standard_Integer aNbVertexes = NbVertex();
6651 + Standard_Integer anIndex = Max(theIndex, 1);
6653 + if(anIndex > aNbVertexes)
6654 + svtx.Append(thePnt);
6656 + svtx.InsertBefore(theIndex, thePnt);
6658 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/IntSurf/IntSurf_PntOn2S.cdl OCCT-6.8.0_SRC-patch/src/IntSurf/IntSurf_PntOn2S.cdl
6659 --- OCCT-6.8.0_SRC/src/IntSurf/IntSurf_PntOn2S.cdl 2014-11-11 17:46:54.000000000 +0300
6660 +++ OCCT-6.8.0_SRC-patch/src/IntSurf/IntSurf_PntOn2S.cdl 2015-01-16 13:01:24.000000000 +0300
6661 @@ -119,6 +119,15 @@
6665 + IsSame(me; theOterPoint : PntOn2S from IntSurf;
6666 + theTol3D, theTol2D: Real from Standard = 0.0)
6668 + ---Purpose: Returns TRUE if 2D- and 3D-coordinates of theOterPoint are equal to
6669 + -- corresponding coordinates of me (with given tolerance).
6670 + -- If theTol2D == 0.0 we will compare 3D-points only.
6672 + returns Boolean from Standard;
6677 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/IntSurf/IntSurf_PntOn2S.cxx OCCT-6.8.0_SRC-patch/src/IntSurf/IntSurf_PntOn2S.cxx
6678 --- OCCT-6.8.0_SRC/src/IntSurf/IntSurf_PntOn2S.cxx 2014-11-11 17:46:54.000000000 +0300
6679 +++ OCCT-6.8.0_SRC-patch/src/IntSurf/IntSurf_PntOn2S.cxx 2015-01-16 12:59:51.000000000 +0300
6684 +Standard_Boolean IntSurf_PntOn2S::IsSame( const IntSurf_PntOn2S& theOterPoint,
6685 + const Standard_Real theTol3D,
6686 + const Standard_Real theTol2D) const
6688 + if(pt.SquareDistance(theOterPoint.Value()) > theTol3D*theTol3D)
6689 + return Standard_False;
6691 + if(IsEqual(theTol2D, 0.0))
6692 + {//We need not compare 2D-coordinates of the points
6693 + return Standard_True;
6696 + Standard_Real aU1 = 0.0, aV1 = 0.0, aU2 = 0.0, aV2 = 0.0;
6697 + theOterPoint.Parameters(aU1, aV1, aU2, aV2);
6699 + gp_Pnt2d aP1(u1, v1), aP2(aU1, aV1);
6701 + if(!aP1.IsEqual(aP2, theTol2D))
6702 + return Standard_False;
6704 + aP1.SetCoord(u2, v2);
6705 + aP2.SetCoord(aU2, aV2);
6707 + if(!aP1.IsEqual(aP2, theTol2D))
6708 + return Standard_False;
6710 + return Standard_True;
6712 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/IntTools/IntTools_EdgeFace.cxx OCCT-6.8.0_SRC-patch/src/IntTools/IntTools_EdgeFace.cxx
6713 --- OCCT-6.8.0_SRC/src/IntTools/IntTools_EdgeFace.cxx 2014-11-11 17:46:54.000000000 +0300
6714 +++ OCCT-6.8.0_SRC-patch/src/IntTools/IntTools_EdgeFace.cxx 2015-01-16 12:59:51.000000000 +0300
6715 @@ -1365,20 +1365,27 @@
6716 (const IntTools_CommonPrt& aCP,
6719 - Standard_Real aTF, aTL, Tol, U1f,U1l,V1f,V1l, af, al,aDist2, aMinDist2, aTm, aDist2New;
6720 - Standard_Real aEpsT;
6721 + Standard_Real aTF, aTL, Tol, U1f,U1l,V1f,V1l;
6722 + Standard_Real aEpsT, af, al,aDist2, aMinDist2, aTm, aDist2New;
6723 Standard_Boolean theflag=Standard_False;
6724 Standard_Integer aNbExt, i, iLower ;
6726 + GeomAbs_CurveType aType;
6728 aCP.Range1(aTF, aTL);
6729 + aType=myC.GetType();
6732 + if (aType==GeomAbs_Line) {
6737 aDist2=DistanceFunction(aTm);
6740 Tol = Precision::PConfusion();
6742 - const Handle(Geom_Curve)& Curve =BRep_Tool::Curve (myC.Edge(), af, al);
6743 + const Handle(Geom_Curve)& Curve =BRep_Tool::Curve (myC.Edge(), af, al);
6744 const Handle(Geom_Surface)& Surface=BRep_Tool::Surface(myS.Face());
6746 Surface->Bounds(U1f,U1l,V1f,V1l);
6747 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/IntTools/IntTools_FaceFace.cxx OCCT-6.8.0_SRC-patch/src/IntTools/IntTools_FaceFace.cxx
6748 --- OCCT-6.8.0_SRC/src/IntTools/IntTools_FaceFace.cxx 2014-11-11 17:46:54.000000000 +0300
6749 +++ OCCT-6.8.0_SRC-patch/src/IntTools/IntTools_FaceFace.cxx 2015-01-16 12:59:51.000000000 +0300
6750 @@ -1243,10 +1243,9 @@
6758 - typl=L->ArcType();
6761 //########################################
6762 // Line, Parabola, Hyperbola
6763 @@ -1276,10 +1275,14 @@
6765 aNbParts=myLConstruct.NbParts();
6766 for (i=1; i<=aNbParts; i++) {
6767 + Standard_Boolean bFNIt, bLPIt;
6769 myLConstruct.Part(i, fprm, lprm);
6771 - if (!Precision::IsNegativeInfinite(fprm) &&
6772 - !Precision::IsPositiveInfinite(lprm)) {
6774 + bFNIt=Precision::IsNegativeInfinite(fprm);
6775 + bLPIt=Precision::IsPositiveInfinite(lprm);
6777 + if (!bFNIt && !bLPIt) {
6779 IntTools_Curve aCurve;
6781 @@ -1309,7 +1312,7 @@
6783 aCurve.SetFirstCurve2d(H1);
6788 Handle (Geom2d_Curve) C2d;
6789 BuildPCurves(fprm,lprm,Tolpc,myHS2->ChangeSurface().Surface(),newc,C2d);
6790 @@ -1325,25 +1328,24 @@
6791 aCurve.SetSecondCurve2d(H1);
6793 mySeqOfCurve.Append(aCurve);
6794 - } // end of if (!Precision::IsNegativeInfinite(fprm) && !Precision::IsPositiveInfinite(lprm))
6795 + } //if (!bFNIt && !bLPIt) {
6797 // on regarde si on garde
6799 - Standard_Boolean bFNIt, bLPIt;
6800 Standard_Real aTestPrm, dT=100.;
6802 - bFNIt=Precision::IsNegativeInfinite(fprm);
6803 - bLPIt=Precision::IsPositiveInfinite(lprm);
6808 if (bFNIt && !bLPIt) {
6811 else if (!bFNIt && bLPIt) {
6816 + // i.e, if (bFNIt && bLPIt)
6817 + aTestPrm=IntTools_Tools::IntermediatePoint(-dT, dT);
6820 gp_Pnt ptref(newc->Value(aTestPrm));
6822 GeomAbs_SurfaceType typS1 = myHS1->GetType();
6823 @@ -1353,8 +1355,7 @@
6824 typS1 == GeomAbs_SurfaceOfRevolution ||
6825 typS2 == GeomAbs_SurfaceOfExtrusion ||
6826 typS2 == GeomAbs_OffsetSurface ||
6827 - typS2 == GeomAbs_SurfaceOfRevolution)
6829 + typS2 == GeomAbs_SurfaceOfRevolution) {
6830 Handle(Geom2d_BSplineCurve) H1;
6831 mySeqOfCurve.Append(IntTools_Curve(newc, H1, H1));
6833 @@ -1373,7 +1374,7 @@
6834 mySeqOfCurve.Append(IntTools_Curve(newc, H1, H1));
6837 - }// end of for (i=1; i<=myLConstruct.NbParts(); i++)
6838 + }// for (i=1; i<=aNbParts; i++) {
6839 }// case IntPatch_Lin: case IntPatch_Parabola: case IntPatch_Hyperbola:
6842 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/math/math_Recipes.cxx OCCT-6.8.0_SRC-patch/src/math/math_Recipes.cxx
6843 --- OCCT-6.8.0_SRC/src/math/math_Recipes.cxx 2014-11-11 17:47:18.000000000 +0300
6844 +++ OCCT-6.8.0_SRC-patch/src/math/math_Recipes.cxx 2015-01-16 13:01:25.000000000 +0300
6847 Standard_Real TINY) {
6849 - Standard_Integer i, imax=0, j, k;
6850 + Standard_Integer i, imax=1, j, k;
6851 Standard_Real big, dum, sum, temp;
6853 Standard_Integer n = a.RowNumber();
6854 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/OpenGl/OpenGl_GraphicDriver_7.cxx OCCT-6.8.0_SRC-patch/src/OpenGl/OpenGl_GraphicDriver_7.cxx
6855 --- OCCT-6.8.0_SRC/src/OpenGl/OpenGl_GraphicDriver_7.cxx 2014-11-11 17:46:58.000000000 +0300
6856 +++ OCCT-6.8.0_SRC-patch/src/OpenGl/OpenGl_GraphicDriver_7.cxx 2015-01-16 13:01:24.000000000 +0300
6857 @@ -470,13 +470,6 @@
6861 -void OpenGl_GraphicDriver::Transparency (const Graphic3d_CView& ACView, const Standard_Boolean AFlag)
6863 - const OpenGl_CView *aCView = (const OpenGl_CView *)ACView.ptrView;
6865 - aCView->WS->UseTransparency(AFlag);
6868 // =======================================================================
6869 // function : InvalidateBVHData
6871 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/OpenGl/OpenGl_GraphicDriver.hxx OCCT-6.8.0_SRC-patch/src/OpenGl/OpenGl_GraphicDriver.hxx
6872 --- OCCT-6.8.0_SRC/src/OpenGl/OpenGl_GraphicDriver.hxx 2014-11-11 17:46:58.000000000 +0300
6873 +++ OCCT-6.8.0_SRC-patch/src/OpenGl/OpenGl_GraphicDriver.hxx 2015-01-16 13:01:24.000000000 +0300
6875 Standard_EXPORT void SetClipPlanes (const Graphic3d_CView& theCView);
6876 Standard_EXPORT void SetCamera (const Graphic3d_CView& theCView);
6877 Standard_EXPORT void SetVisualisation (const Graphic3d_CView& ACView);
6878 - Standard_EXPORT void Transparency (const Graphic3d_CView& ACView, const Standard_Boolean AFlag);
6879 Standard_EXPORT Standard_Boolean View (Graphic3d_CView& ACView);
6880 Standard_EXPORT void Environment (const Graphic3d_CView& ACView);
6881 Standard_EXPORT void ZBufferTriedronSetup (const Quantity_NameOfColor XColor = Quantity_NOC_RED, const Quantity_NameOfColor YColor = Quantity_NOC_GREEN, const Quantity_NameOfColor ZColor = Quantity_NOC_BLUE1, const Standard_Real SizeRatio = 0.8, const Standard_Real AxisDiametr = 0.05, const Standard_Integer NbFacettes = 12);
6882 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/OpenGl/OpenGl_View.cxx OCCT-6.8.0_SRC-patch/src/OpenGl/OpenGl_View.cxx
6883 --- OCCT-6.8.0_SRC/src/OpenGl/OpenGl_View.cxx 2014-11-11 17:46:58.000000000 +0300
6884 +++ OCCT-6.8.0_SRC-patch/src/OpenGl/OpenGl_View.cxx 2015-01-16 12:59:55.000000000 +0300
6887 OpenGl_View::OpenGl_View (const CALL_DEF_VIEWCONTEXT &AContext,
6888 OpenGl_StateCounter* theCounter)
6889 -: mySurfaceDetail(Visual3d_TOD_NONE),
6890 +: mySurfaceDetail(Visual3d_TOD_ALL),
6892 myBgTexture(myDefaultBgTexture),
6893 myBgGradient(myDefaultBgGradient),
6894 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/OpenGl/OpenGl_Workspace_5.cxx OCCT-6.8.0_SRC-patch/src/OpenGl/OpenGl_Workspace_5.cxx
6895 --- OCCT-6.8.0_SRC/src/OpenGl/OpenGl_Workspace_5.cxx 2014-11-11 17:46:58.000000000 +0300
6896 +++ OCCT-6.8.0_SRC-patch/src/OpenGl/OpenGl_Workspace_5.cxx 2015-01-16 13:01:24.000000000 +0300
6898 NamedStatus |= OPENGL_NS_2NDPASSNEED;
6901 - if (myUseTransparency && aProps->trans != 1.0f)
6902 + if (aProps->trans != 1.0f)
6904 // render transparent
6905 myMatTmp.Diffuse.a() = aProps->trans;
6908 : (TelCullMode )AspectFace_set->CullingMode();
6909 if (aCullingMode != TelCullNone
6910 - && myUseTransparency && !(NamedStatus & OPENGL_NS_2NDPASSDO))
6911 + && !(NamedStatus & OPENGL_NS_2NDPASSDO))
6913 // disable culling in case of translucent shading aspect
6914 if (AspectFace_set->IntFront().trans != 1.0f)
6915 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/OpenGl/OpenGl_Workspace.cxx OCCT-6.8.0_SRC-patch/src/OpenGl/OpenGl_Workspace.cxx
6916 --- OCCT-6.8.0_SRC/src/OpenGl/OpenGl_Workspace.cxx 2014-11-11 17:46:58.000000000 +0300
6917 +++ OCCT-6.8.0_SRC-patch/src/OpenGl/OpenGl_Workspace.cxx 2015-01-16 13:01:24.000000000 +0300
6919 myTransientDrawToFront (Standard_True),
6920 myBackBufferRestored (Standard_False),
6921 myIsImmediateDrawn (Standard_False),
6922 - myUseTransparency (Standard_False),
6923 myUseZBuffer (Standard_False),
6924 myUseDepthTest (Standard_True),
6925 myUseGLLight (Standard_True),
6926 @@ -255,15 +254,6 @@
6927 return Standard_True;
6930 -// =======================================================================
6931 -// function : UseTransparency
6932 -// purpose : call_togl_transparency
6933 -// =======================================================================
6934 -void OpenGl_Workspace::UseTransparency (const Standard_Boolean theFlag)
6936 - myUseTransparency = theFlag;
6939 //=======================================================================
6940 //function : ResetAppliedAspect
6941 //purpose : Sets default values of GL parameters in accordance with default aspects
6942 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/OpenGl/OpenGl_Workspace.hxx OCCT-6.8.0_SRC-patch/src/OpenGl/OpenGl_Workspace.hxx
6943 --- OCCT-6.8.0_SRC/src/OpenGl/OpenGl_Workspace.hxx 2014-11-11 17:46:58.000000000 +0300
6944 +++ OCCT-6.8.0_SRC-patch/src/OpenGl/OpenGl_Workspace.hxx 2015-01-16 13:01:24.000000000 +0300
6946 Image_PixMap& theImage,
6947 const Graphic3d_BufferType& theBufferType);
6949 - void UseTransparency (const Standard_Boolean theFlag);
6950 Standard_Boolean& UseZBuffer() { return myUseZBuffer; }
6951 Standard_Boolean& UseDepthTest() { return myUseDepthTest; }
6952 Standard_Boolean& UseGLLight() { return myUseGLLight; }
6954 Standard_Boolean myTransientDrawToFront; //!< optimization flag for immediate mode (to render directly to the front buffer)
6955 Standard_Boolean myBackBufferRestored;
6956 Standard_Boolean myIsImmediateDrawn; //!< flag indicates that immediate mode buffer contains some data
6957 - Standard_Boolean myUseTransparency;
6958 Standard_Boolean myUseZBuffer;
6959 Standard_Boolean myUseDepthTest;
6960 Standard_Boolean myUseGLLight;
6961 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/ProjLib/ProjLib_ProjectedCurve.cxx OCCT-6.8.0_SRC-patch/src/ProjLib/ProjLib_ProjectedCurve.cxx
6962 --- OCCT-6.8.0_SRC/src/ProjLib/ProjLib_ProjectedCurve.cxx 2014-11-11 17:47:00.000000000 +0300
6963 +++ OCCT-6.8.0_SRC-patch/src/ProjLib/ProjLib_ProjectedCurve.cxx 2015-01-16 12:59:57.000000000 +0300
6965 #include <Geom2d_TrimmedCurve.hxx>
6966 #include <ElCLib.hxx>
6967 #include <GeomLib.hxx>
6968 +#include <Extrema_ExtPC.hxx>
6970 //=======================================================================
6971 //function : IsoIsDeg
6972 @@ -482,7 +483,16 @@
6973 IsTrimmed[0] = Standard_True;
6975 myCurve = myCurve->Trim(f, l, Precision::Confusion());
6976 - Vsingular[0] = ElCLib::Parameter(L, P);
6977 + // Searching the parameter on the basis curve for surface of revolution
6978 + Extrema_ExtPC anExtr(P, mySurface->BasisCurve()->Curve(), myTolerance);
6979 + if (anExtr.IsDone())
6981 + Standard_Integer anIndex = 1;
6982 + while (!anExtr.IsMin(anIndex) && anIndex < anExtr.NbExt()) anIndex++;
6983 + Vsingular[0] = anExtr.Point(anIndex).Parameter();
6986 + Vsingular[0] = ElCLib::Parameter(L, P);
6987 //SingularCase[0] = 3;
6990 @@ -492,7 +502,16 @@
6991 IsTrimmed[1] = Standard_True;
6993 myCurve = myCurve->Trim(f, l, Precision::Confusion());
6994 - Vsingular[1] = ElCLib::Parameter(L, P);
6995 + // Searching the parameter on the basis curve for surface of revolution
6996 + Extrema_ExtPC anExtr(P, mySurface->BasisCurve()->Curve(), myTolerance);
6997 + if (anExtr.IsDone())
6999 + Standard_Integer anIndex = 1;
7000 + while (!anExtr.IsMin(anIndex) && anIndex < anExtr.NbExt()) anIndex++;
7001 + Vsingular[1] = anExtr.Point(anIndex).Parameter();
7004 + Vsingular[1] = ElCLib::Parameter(L, P);
7005 //SingularCase[1] = 4;
7008 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/QABugs/QABugs_11.cxx OCCT-6.8.0_SRC-patch/src/QABugs/QABugs_11.cxx
7009 --- OCCT-6.8.0_SRC/src/QABugs/QABugs_11.cxx 2014-11-11 17:47:00.000000000 +0300
7010 +++ OCCT-6.8.0_SRC-patch/src/QABugs/QABugs_11.cxx 2015-01-16 13:01:24.000000000 +0300
7011 @@ -236,10 +236,10 @@
7012 anAISCtx->AddOrRemoveCurrentObject(aSh4);
7014 //remove all this objects from context
7015 - anAISCtx->Clear(aSh1, Standard_False);
7016 - anAISCtx->Clear(aSh2, Standard_False);
7017 - anAISCtx->Clear(aSh3, Standard_False);
7018 - anAISCtx->Clear(aSh4, Standard_False);
7019 + anAISCtx->Remove (aSh1, Standard_False);
7020 + anAISCtx->Remove (aSh2, Standard_False);
7021 + anAISCtx->Remove (aSh3, Standard_False);
7022 + anAISCtx->Remove (aSh4, Standard_False);
7026 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/SelectMgr/SelectMgr_EntityOwner.cxx OCCT-6.8.0_SRC-patch/src/SelectMgr/SelectMgr_EntityOwner.cxx
7027 --- OCCT-6.8.0_SRC/src/SelectMgr/SelectMgr_EntityOwner.cxx 2014-11-11 17:47:04.000000000 +0300
7028 +++ OCCT-6.8.0_SRC-patch/src/SelectMgr/SelectMgr_EntityOwner.cxx 2015-01-16 13:00:02.000000000 +0300
7031 TopLoc_Location SelectMgr_EntityOwner::Location() const
7033 - return !HasSelectable() ? TopLoc_Location() : TopLoc_Location(mySelectable->Transformation());
7034 + return !HasLocation() ? TopLoc_Location() : TopLoc_Location(mySelectable->Transformation());
7037 void SelectMgr_EntityOwner::ResetLocation()
7038 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/ShapeFix/ShapeFix_Shape.cdl OCCT-6.8.0_SRC-patch/src/ShapeFix/ShapeFix_Shape.cdl
7039 --- OCCT-6.8.0_SRC/src/ShapeFix/ShapeFix_Shape.cdl 2014-11-11 17:47:05.000000000 +0300
7040 +++ OCCT-6.8.0_SRC-patch/src/ShapeFix/ShapeFix_Shape.cdl 2015-01-16 13:00:03.000000000 +0300
7041 @@ -135,6 +135,12 @@
7043 ---Purpose: Returns (modifiable) the mode for applying
7044 -- ShapeFix::FixVertexPosition before all fixes, by default False.
7046 + FixVertexTolMode (me: mutable) returns Integer;
7049 + ---Purpose: Returns (modifiable) the mode for fixing tolerances of vertices on whole shape
7050 + -- after performing all fixes
7053 myResult : Shape from TopoDS is protected;
7055 myFixWireMode : Integer is protected;
7056 myFixSameParameterMode : Integer is protected;
7057 myFixVertexPositionMode : Integer is protected;
7058 + myFixVertexTolMode : Integer is protected;
7059 myStatus : Integer is protected;
7062 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/ShapeFix/ShapeFix_Shape.cxx OCCT-6.8.0_SRC-patch/src/ShapeFix/ShapeFix_Shape.cxx
7063 --- OCCT-6.8.0_SRC/src/ShapeFix/ShapeFix_Shape.cxx 2014-11-11 17:47:05.000000000 +0300
7064 +++ OCCT-6.8.0_SRC-patch/src/ShapeFix/ShapeFix_Shape.cxx 2015-01-16 13:00:03.000000000 +0300
7067 myFixSameParameterMode = -1;
7068 myFixVertexPositionMode =0;
7069 + myFixVertexTolMode = -1;
7070 myFixSolid = new ShapeFix_Solid;
7074 myFixSameParameterMode = -1;
7075 myFixSolid = new ShapeFix_Solid;
7076 myFixVertexPositionMode =0;
7077 + myFixVertexTolMode = -1;
7082 Standard_Boolean ShapeFix_Shape::Perform(const Handle(Message_ProgressIndicator)& theProgress)
7084 Standard_Integer savFixSmallAreaWireMode = 0;
7086 + Standard_Integer savFixVertexTolMode = myFixVertexTolMode;
7087 Handle(ShapeFix_Face) fft = Handle(ShapeFix_Face)::DownCast( FixFaceTool() );
7088 if ( !fft.IsNull() ) {
7089 savFixSmallAreaWireMode = fft->FixSmallAreaWireMode();
7091 TopoDS_Shape shape = myShape;
7092 Standard_Boolean savFixSameParameterMode = myFixSameParameterMode;
7093 myFixSameParameterMode = Standard_False;
7095 + myFixVertexTolMode = Standard_False;
7096 Standard_Integer aShapesNb = 0;
7097 for ( TopoDS_Iterator anIter(S); anIter.More(); anIter.Next() )
7100 return Standard_False; // aborted execution
7102 myFixSameParameterMode = savFixSameParameterMode;
7103 + myFixVertexTolMode = savFixVertexTolMode;
7107 @@ -242,6 +245,26 @@
7109 SameParameter(myResult, Standard_False, theProgress);
7111 + if( NeedFix( myFixVertexTolMode))
7113 + Standard_Integer nbF = 0;
7114 + TopExp_Explorer anExpF(myResult, TopAbs_FACE);
7115 + for( ; anExpF.More() && nbF <= 1; anExpF.Next())
7119 + //fix for bug 0025455
7120 + // for case when vertex belong to the different faces it is necessary to check vertices tolerances
7121 + //after all fixes.
7122 + //This fix it should be performed for example for case when cutting edge was performed.
7124 + Handle(ShapeFix_Edge) sfe = FixEdgeTool();
7125 + TopExp_Explorer anExpE (myResult, TopAbs_EDGE);
7126 + for ( ; anExpE.More(); anExpE.Next())
7127 + sfe->FixVertexTolerance( TopoDS::Edge (anExpE.Current()));
7132 if ( !fft.IsNull() )
7133 fft->FixSmallAreaWireMode() = savFixSmallAreaWireMode;
7134 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/ShapeFix/ShapeFix_Shape.lxx OCCT-6.8.0_SRC-patch/src/ShapeFix/ShapeFix_Shape.lxx
7135 --- OCCT-6.8.0_SRC/src/ShapeFix/ShapeFix_Shape.lxx 2014-11-11 17:47:05.000000000 +0300
7136 +++ OCCT-6.8.0_SRC-patch/src/ShapeFix/ShapeFix_Shape.lxx 2015-01-16 13:00:03.000000000 +0300
7137 @@ -122,3 +122,13 @@
7139 return myFixVertexPositionMode;
7142 +//=======================================================================
7143 +//function : FixVertexTolMode
7145 +//=======================================================================
7147 +inline Standard_Integer& ShapeFix_Shape::FixVertexTolMode()
7149 + return myFixVertexTolMode;
7151 \ No newline at end of file
7152 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/V3d/V3d_Plane.cxx OCCT-6.8.0_SRC-patch/src/V3d/V3d_Plane.cxx
7153 --- OCCT-6.8.0_SRC/src/V3d/V3d_Plane.cxx 2014-11-11 17:47:15.000000000 +0300
7154 +++ OCCT-6.8.0_SRC-patch/src/V3d/V3d_Plane.cxx 2015-01-16 13:00:15.000000000 +0300
7156 Graphic3d_MaterialAspect aPlastic (Graphic3d_NOM_PLASTIC);
7157 aPlastic.SetColor (theColor);
7158 aPlastic.SetTransparency (0.5);
7159 - theView->SetTransparency (Standard_True);
7160 anAsp->SetFrontMaterial (aPlastic);
7161 anAsp->SetInteriorStyle (Aspect_IS_HATCH);
7162 anAsp->SetHatchStyle (Aspect_HS_GRID_DIAGONAL_WIDE);
7163 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/V3d/V3d_View_2.cxx OCCT-6.8.0_SRC-patch/src/V3d/V3d_View_2.cxx
7164 --- OCCT-6.8.0_SRC/src/V3d/V3d_View_2.cxx 2014-11-11 17:47:15.000000000 +0300
7165 +++ OCCT-6.8.0_SRC-patch/src/V3d/V3d_View_2.cxx 2015-01-16 13:01:25.000000000 +0300
7167 --------------------------------
7168 00-09-92 : GG ; Creation.
7169 24-12-97 : FMN ; Suppression de GEOMLITE
7170 - 21-02-00 : GG ; Add Transparency() method
7171 23-11-00 : GG ; Add IsActiveLight() and IsActivePlane() methods
7173 ************************************************************************/
7174 @@ -102,18 +101,6 @@
7178 -void V3d_View::SetTransparency(const Standard_Boolean AnActivity) {
7180 - MyTransparencyFlag = AnActivity;
7181 - MyView->SetTransparency(AnActivity);
7185 -Standard_Boolean V3d_View::Transparency() const {
7187 - return MyTransparencyFlag;
7190 void V3d_View::InitActiveLights() {
7191 myActiveLightsIterator.Initialize(MyActiveLights);
7193 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/V3d/V3d_View.cdl OCCT-6.8.0_SRC-patch/src/V3d/V3d_View.cdl
7194 --- OCCT-6.8.0_SRC/src/V3d/V3d_View.cdl 2014-11-11 17:47:15.000000000 +0300
7195 +++ OCCT-6.8.0_SRC-patch/src/V3d/V3d_View.cdl 2015-01-16 13:01:25.000000000 +0300
7197 -- -> Add SetProjModel() method.
7198 -- VKH - 15/11/99 : G004
7199 -- -> Add method Dump()
7201 --- -> Add Transparency() method
7202 -- THA - 17/08/00 Thomas HARTL <t-hartl@muenchen.matra-dtv.fr>
7203 -- -> Add Print method (works only under Windows).
7205 @@ -415,10 +413,6 @@
7207 ---Purpose: Returns TRUE when the light is active in this view.
7209 - SetTransparency( me : mutable ; AnActivity : Boolean = Standard_False);
7211 - ---Purpose: Activate/Deactivate the transparency in this view.
7213 SetImmediateUpdate(me: mutable; theImmediateUpdate: Boolean from Standard)
7214 returns Boolean from Standard;
7215 ---Purpose: sets the immediate update mode and returns the previous one.
7216 @@ -1141,10 +1135,6 @@
7218 -- purpose: return the current environment texture used
7220 - Transparency(me) returns Boolean from Standard;
7222 - ---Purpose: Returns the transparency activity.
7224 Visualization ( me ) returns TypeOfVisualization from V3d;
7226 ---Purpose: Returns the current visualisation mode.
7227 @@ -1638,7 +1628,6 @@
7228 MyGridEchoStructure : Structure from Graphic3d;
7229 MyGridEchoGroup : Group from Graphic3d;
7231 - MyTransparencyFlag : Boolean from Standard;
7232 myImmediateUpdate: Boolean from Standard is protected;
7234 myXscreenAxis : Vector from Graphic3d;
7235 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/V3d/V3d_View.cxx OCCT-6.8.0_SRC-patch/src/V3d/V3d_View.cxx
7236 --- OCCT-6.8.0_SRC/src/V3d/V3d_View.cxx 2014-11-11 17:47:15.000000000 +0300
7237 +++ OCCT-6.8.0_SRC-patch/src/V3d/V3d_View.cxx 2015-01-16 13:00:15.000000000 +0300
7239 aCamera->SetProjectionType ((Type == V3d_ORTHOGRAPHIC)
7240 ? Graphic3d_Camera::Projection_Orthographic
7241 : Graphic3d_Camera::Projection_Perspective);
7243 - MyTransparencyFlag = Standard_False;
7246 //=============================================================================
7247 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/ViewerTest/ViewerTest.cxx OCCT-6.8.0_SRC-patch/src/ViewerTest/ViewerTest.cxx
7248 --- OCCT-6.8.0_SRC/src/ViewerTest/ViewerTest.cxx 2014-11-11 17:47:15.000000000 +0300
7249 +++ OCCT-6.8.0_SRC-patch/src/ViewerTest/ViewerTest.cxx 2015-01-16 13:01:25.000000000 +0300
7251 Handle(AIS_InteractiveObject)::DownCast (aMap.Find2 (theName));
7253 if (!anOldObj.IsNull())
7254 - aContextAIS->Clear (anOldObj, Standard_True);
7255 + aContextAIS->Remove (anOldObj, Standard_True);
7257 // remove name and old object from map
7258 aMap.UnBind2 (theName);
7259 @@ -2751,7 +2751,7 @@
7263 - anAISContext->Clear (anIO, Standard_False);
7264 + anAISContext->Remove (anIO, Standard_False);
7265 aTexturedIO = new AIS_TexturedShape (DBRep::Get (theArgv[1]));
7266 GetMapOfAIS().UnBind1 (anIO);
7267 GetMapOfAIS().UnBind2 (aShapeName);
7268 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/Visual3d/Visual3d_ContextView.cxx OCCT-6.8.0_SRC-patch/src/Visual3d/Visual3d_ContextView.cxx
7269 --- OCCT-6.8.0_SRC/src/Visual3d/Visual3d_ContextView.cxx 2014-11-11 17:47:15.000000000 +0300
7270 +++ OCCT-6.8.0_SRC-patch/src/Visual3d/Visual3d_ContextView.cxx 2015-01-16 13:00:15.000000000 +0300
7272 MyVisual (Visual3d_TOV_WIREFRAME),
7275 -MySurfaceDetail(Visual3d_TOD_NONE),
7276 +MySurfaceDetail(Visual3d_TOD_ALL),
7280 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/Visual3d/Visual3d_View.cdl OCCT-6.8.0_SRC-patch/src/Visual3d/Visual3d_View.cdl
7281 --- OCCT-6.8.0_SRC/src/Visual3d/Visual3d_View.cdl 2014-11-11 17:47:15.000000000 +0300
7282 +++ OCCT-6.8.0_SRC-patch/src/Visual3d/Visual3d_View.cdl 2015-01-16 13:00:15.000000000 +0300
7283 @@ -1045,15 +1045,6 @@
7284 -- or insufficient memory.
7285 -- Warning: Works only under Windows.
7287 - SetTransparency ( me : mutable;
7288 - AFlag : Boolean from Standard )
7290 - ---Level: Advanced
7291 - ---Purpose: if <AFlag> is Standard_True then the transparency
7292 - -- is managed in the view <me>.
7293 - -- Default Standard_False
7294 - ---Category: Internal methods
7296 ZBufferIsActivated ( me )
7297 returns Boolean from Standard
7299 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/Visual3d/Visual3d_View.cxx OCCT-6.8.0_SRC-patch/src/Visual3d/Visual3d_View.cxx
7300 --- OCCT-6.8.0_SRC/src/Visual3d/Visual3d_View.cxx 2014-11-11 17:47:15.000000000 +0300
7301 +++ OCCT-6.8.0_SRC-patch/src/Visual3d/Visual3d_View.cxx 2015-01-16 13:00:15.000000000 +0300
7304 myGraphicDriver->ActivateView (MyCView);
7305 myGraphicDriver->Background (MyCView);
7306 - myGraphicDriver->Transparency (MyCView, myViewManager->Transparency());
7310 @@ -1801,22 +1800,6 @@
7313 // =======================================================================
7314 -// function : SetTransparency
7316 -// =======================================================================
7317 -void Visual3d_View::SetTransparency (const Standard_Boolean theActivity)
7326 - myGraphicDriver->Transparency (MyCView, theActivity);
7329 -// =======================================================================
7330 // function : SetZBufferActivity
7332 // =======================================================================
7333 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/Visual3d/Visual3d_ViewManager.cdl OCCT-6.8.0_SRC-patch/src/Visual3d/Visual3d_ViewManager.cdl
7334 --- OCCT-6.8.0_SRC/src/Visual3d/Visual3d_ViewManager.cdl 2014-11-11 17:47:15.000000000 +0300
7335 +++ OCCT-6.8.0_SRC-patch/src/Visual3d/Visual3d_ViewManager.cdl 2015-01-16 13:00:15.000000000 +0300
7336 @@ -411,24 +411,6 @@
7337 -- if <AStructure> is displayed in <AProjector> and TOS_COMPUTED.
7338 ---Category: Private methods
7340 - Transparency ( me )
7341 - returns Boolean from Standard
7343 - ---Level: Advanced
7344 - ---Purpose: Returns Standard_True if the transparency
7345 - -- is activated in all activated views.
7346 - -- Default Standard_False
7347 - ---Category: Internal methods
7349 - SetTransparency ( me : mutable;
7350 - AFlag : Boolean from Standard )
7352 - ---Level: Advanced
7353 - ---Purpose: if <AFlag> is Standard_True then the transparency
7355 - -- Default Standard_False
7356 - ---Category: Internal methods
7359 returns Boolean from Standard
7364 MyZBufferAuto : Boolean from Standard;
7365 - MyTransparency : Boolean from Standard;
7368 myLayerIds : MapOfInteger from TColStd;
7369 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/src/Visual3d/Visual3d_ViewManager.cxx OCCT-6.8.0_SRC-patch/src/Visual3d/Visual3d_ViewManager.cxx
7370 --- OCCT-6.8.0_SRC/src/Visual3d/Visual3d_ViewManager.cxx 2014-11-11 17:47:15.000000000 +0300
7371 +++ OCCT-6.8.0_SRC-patch/src/Visual3d/Visual3d_ViewManager.cxx 2015-01-16 13:01:25.000000000 +0300
7373 Graphic3d_StructureManager (theDriver),
7375 MyViewGenId (View_IDMIN+((View_IDMIN+View_IDMAX)/(Visual3d_ViewManager::Limit ()))*(Visual3d_ViewManager::CurrentId ()-1),View_IDMIN+((View_IDMIN+View_IDMAX)/(Visual3d_ViewManager::Limit ()))*Visual3d_ViewManager::CurrentId ()-1),
7376 -MyZBufferAuto (Standard_False),
7377 -MyTransparency (Standard_False)
7378 +MyZBufferAuto (Standard_False)
7380 // default layer is always presented in display layer sequence
7381 // it can not be removed
7382 @@ -558,24 +557,6 @@
7383 MyViewGenId.Free(aViewId);
7386 -void Visual3d_ViewManager::SetTransparency (const Standard_Boolean AFlag)
7388 - if (MyTransparency && AFlag) return;
7389 - if (! MyTransparency && ! AFlag) return;
7391 - for(int i=1; i<=MyDefinedView.Length(); i++)
7393 - (MyDefinedView.Value(i))->SetTransparency(AFlag);
7396 - MyTransparency = AFlag;
7399 -Standard_Boolean Visual3d_ViewManager::Transparency () const
7401 - return (MyTransparency);
7404 void Visual3d_ViewManager::SetZBufferAuto (const Standard_Boolean AFlag)
7406 if (MyZBufferAuto && AFlag) return;
7407 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/boolean/bcut_complex/N9 OCCT-6.8.0_SRC-patch/tests/boolean/bcut_complex/N9
7408 --- OCCT-6.8.0_SRC/tests/boolean/bcut_complex/N9 2014-11-11 17:47:21.000000000 +0300
7409 +++ OCCT-6.8.0_SRC-patch/tests/boolean/bcut_complex/N9 2015-01-16 13:00:21.000000000 +0300
7411 # Original bug : pro14942
7414 -#CR23958 puts "TODO #22911 ALL: Faulty shapes in variables faulty_1 to faulty_"
7415 -#CR23958 puts "TODO #22911 ALL: Error : The area of the resulting shape is"
7416 +puts "TODO #22911 ALL: Faulty shapes in variables faulty_1 to faulty_"
7417 +puts "TODO #22911 ALL: Error : The area of the resulting shape is"
7419 restore [locate_data_file CTO904_pro14942a.rle] a
7420 restore [locate_data_file pro14942b.rle] b
7421 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/boolean/bfuse_complex/P1 OCCT-6.8.0_SRC-patch/tests/boolean/bfuse_complex/P1
7422 --- OCCT-6.8.0_SRC/tests/boolean/bfuse_complex/P1 2014-11-11 17:47:22.000000000 +0300
7423 +++ OCCT-6.8.0_SRC-patch/tests/boolean/bfuse_complex/P1 2015-01-16 13:00:23.000000000 +0300
7425 puts "TODO ?OCC24157 ALL: Error : The area of the resulting shape is"
7426 +puts "TODO #22911 ALL: Faulty shapes in variables faulty_1 to faulty_"
7429 restore [locate_data_file CTO900_cts17861a.rle] a
7430 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/boolean/bopcommon_complex/J1 OCCT-6.8.0_SRC-patch/tests/boolean/bopcommon_complex/J1
7431 --- OCCT-6.8.0_SRC/tests/boolean/bopcommon_complex/J1 2014-11-11 17:47:23.000000000 +0300
7432 +++ OCCT-6.8.0_SRC-patch/tests/boolean/bopcommon_complex/J1 2015-01-16 13:00:24.000000000 +0300
7434 +puts "TODO #22911 ALL: Error : The bopcommon is not valid. The area is"
7435 +puts "TODO #22911 ALL: Error : The area of the resulting shape is"
7437 restore [locate_data_file a158] a
7438 restore [locate_data_file b148] b
7440 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/begin OCCT-6.8.0_SRC-patch/tests/bugs/begin
7441 --- OCCT-6.8.0_SRC/tests/bugs/begin 2014-11-11 17:47:29.000000000 +0300
7442 +++ OCCT-6.8.0_SRC-patch/tests/bugs/begin 2015-01-16 13:01:25.000000000 +0300
7446 # Check if list of xdistcs-command is valid
7447 -proc checkList {List Tolerance D_good} {
7448 +proc checkList {List Tolerance D_good Limit_Tol} {
7449 set L1 [llength ${List}]
7452 @@ -266,7 +266,14 @@
7453 set D [lindex ${List} ${j2}]
7454 #puts "i=${i} j1=${j1} j2=${j2} T=${T} D=${D}"
7455 if { [expr abs(${D} - ${D_good})] > ${Tolerance} } {
7456 - puts "Error: i=${i} T=${T} D=${D}"
7457 + puts "Error : T=${T} D=${D}"
7460 + if { ${Tolerance} > ${Limit_Tol} } {
7461 + if { [expr abs(${D} - ${D_good})] > ${Limit_Tol}
7462 + && [expr abs(${D} - ${D_good})] <= ${Tolerance} } {
7463 + puts "Attention (critical value of tolerance) : T=${T} D=${D}"
7468 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/heal/bug25455 OCCT-6.8.0_SRC-patch/tests/bugs/heal/bug25455
7469 --- OCCT-6.8.0_SRC/tests/bugs/heal/bug25455 1970-01-01 03:00:00.000000000 +0300
7470 +++ OCCT-6.8.0_SRC-patch/tests/bugs/heal/bug25455 2015-01-16 13:00:32.000000000 +0300
7472 +puts "============"
7474 +puts "============"
7476 +######################################################
7477 +# fixshape works at the second attempt
7478 +######################################################
7480 +restore [locate_data_file bug25455_rx.brep] rx
7484 +set info [checkshape rx]
7488 +if { [regexp {This shape seems to be valid} ${info}] } {
7489 + puts "OK: fixshape works properly"
7491 + puts "Error: fixshape works bad"
7493 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_1/bug16517_1 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_1/bug16517_1
7494 --- OCCT-6.8.0_SRC/tests/bugs/modalg_1/bug16517_1 2014-11-11 17:47:31.000000000 +0300
7495 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_1/bug16517_1 2015-01-16 13:01:25.000000000 +0300
7497 renamevar p_1 result
7500 - set length 110.161
7503 + set length 110.167
7510 set nb_compsol_good 0
7511 set nb_compound_good 0
7512 - set nb_shape_good 9
7513 + set nb_shape_good 3
7516 if { ${mistake} != 0 } {
7517 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_1/bug16517_2 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_1/bug16517_2
7518 --- OCCT-6.8.0_SRC/tests/bugs/modalg_1/bug16517_2 2014-11-11 17:47:31.000000000 +0300
7519 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_1/bug16517_2 2015-01-16 13:01:25.000000000 +0300
7521 renamevar p_2 result
7524 - set length 110.171
7527 + set length 110.167
7534 set nb_compsol_good 0
7535 set nb_compound_good 0
7536 - set nb_shape_good 9
7537 + set nb_shape_good 3
7541 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_2/bug22864 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_2/bug22864
7542 --- OCCT-6.8.0_SRC/tests/bugs/modalg_2/bug22864 2014-11-11 17:47:32.000000000 +0300
7543 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_2/bug22864 2015-01-16 13:00:34.000000000 +0300
7558 set nb_compsol_good 0
7559 set nb_compound_good 1
7560 -set nb_shape_good 29
7561 +set nb_shape_good 8
7566 puts "Faulty ${BugNumber}"
7574 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_2/bug22967 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_2/bug22967
7575 --- OCCT-6.8.0_SRC/tests/bugs/modalg_2/bug22967 2014-11-11 17:47:32.000000000 +0300
7576 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_2/bug22967 2015-01-16 13:00:34.000000000 +0300
7578 ###########################################################################################################
7580 set BugNumber OCC22967
7581 -set check_value 3.46945e-006
7582 +set check_value 8.46459e-006
7584 restore [locate_data_file bug22967_Cylinder_1.brep] b1
7585 restore [locate_data_file bug22967_Scale_1.brep] b2
7587 puts "OK ${BugNumber}"
7594 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_2/bug23218 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_2/bug23218
7595 --- OCCT-6.8.0_SRC/tests/bugs/modalg_2/bug23218 2014-11-11 17:47:32.000000000 +0300
7596 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_2/bug23218 2015-01-16 13:00:35.000000000 +0300
7599 puts "Finish project operation ..."
7601 -set GoodToleranceReached 2.4950140688989345e-006
7602 +set GoodToleranceReached 6.3315853638232248e-007
7603 regexp {Tolerance Reached=([-0-9.+eE]+)} $result full ToleranceReached
7605 proc GetPercent {Value GoodValue} {
7606 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_2/bug472_3 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_2/bug472_3
7607 --- OCCT-6.8.0_SRC/tests/bugs/modalg_2/bug472_3 2014-11-11 17:47:32.000000000 +0300
7608 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_2/bug472_3 2015-01-16 13:00:35.000000000 +0300
7610 #puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_"
7611 #puts "TODO OCC12345 ALL: Error : The square of result shape is"
7612 -puts "TODO OCC12345 ALL: Error : The command is not valid"
7613 -puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must contains"
7614 +#puts "TODO OCC12345 ALL: Error : The command is not valid"
7615 +#puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must contains"
7617 puts "========================"
7631 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_2/bug497_3 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_2/bug497_3
7632 --- OCCT-6.8.0_SRC/tests/bugs/modalg_2/bug497_3 2014-11-11 17:47:32.000000000 +0300
7633 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_2/bug497_3 2015-01-16 13:00:35.000000000 +0300
7641 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug24154 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug24154
7642 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug24154 2014-11-11 17:47:34.000000000 +0300
7643 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug24154 2015-01-16 13:01:25.000000000 +0300
7648 -set square 2.68434e+06
7649 +#set square 2.68434e+06
7650 +set square 5.21269e+06
7651 set volume 7.35468e+07
7653 # Analysis of "nbshapes res"
7663 set nb_compsol_good 0
7664 set nb_compound_good 1
7665 -set nb_shape_good 70
7666 +set nb_shape_good 93
7669 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug24798 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug24798
7670 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug24798 2014-11-11 17:47:34.000000000 +0300
7671 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug24798 2015-01-16 13:00:37.000000000 +0300
7679 # Analysis of "nbshapes res"
7688 set nb_compsol_good 0
7689 set nb_compound_good 1
7690 -set nb_shape_good 175
7691 +set nb_shape_good 165
7694 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug24825_common OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug24825_common
7695 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug24825_common 2014-11-11 17:47:34.000000000 +0300
7696 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug24825_common 2015-01-16 13:00:37.000000000 +0300
7712 set nb_compsol_good 0
7713 set nb_compound_good 1
7714 -set nb_shape_good 899
7715 +set nb_shape_good 659
7718 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug24825_cut OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug24825_cut
7719 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug24825_cut 2014-11-11 17:47:34.000000000 +0300
7720 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug24825_cut 2015-01-16 13:00:37.000000000 +0300
7733 set nb_compsol_good 0
7734 set nb_compound_good 1
7735 -set nb_shape_good 847
7736 +set nb_shape_good 607
7739 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug24825_fuse OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug24825_fuse
7740 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug24825_fuse 2014-11-11 17:47:34.000000000 +0300
7741 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug24825_fuse 2015-01-16 13:00:37.000000000 +0300
7754 set nb_compsol_good 0
7755 set nb_compound_good 1
7756 -set nb_shape_good 843
7757 +set nb_shape_good 603
7760 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug24981 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug24981
7761 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug24981 2014-11-11 17:47:34.000000000 +0300
7762 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug24981 2015-01-16 13:00:37.000000000 +0300
7775 set nb_compsol_good 0
7776 set nb_compound_good 1
7777 -set nb_shape_good 1223
7778 +set nb_shape_good 1027
7781 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_11 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_11
7782 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_11 2014-11-11 17:47:34.000000000 +0300
7783 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_11 2015-01-16 13:00:37.000000000 +0300
7785 # Face/Face intersection algorithm gives different results for different order of the arguments
7786 #######################################################################
7788 +puts "##############################"
7789 +puts "#!!!Search \"Attention\" keyword on this web-page for additional checking!!!"
7790 +puts "##############################"
7796 restore [locate_data_file bug25292_Input_0.brep] b1
7798 #############################
7800 regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log} full Toler NbCurv
7802 +#This value must be equal to the analogical value in bug25292_11 and bug25292_12 of "bugs modalg_5" testgrid.
7805 +#This value must be equal to the analogical value in bug25292_11, bug25292_12, bug25292_15 and bug25292_16 of "bugs modalg_5" testgrid.
7808 if {${Toler} > ${MaxTol}} {
7809 puts "Error: Tolerance is too big!"
7813 if {${NbCurv} != ${GoodNbCurv}} {
7814 puts "Error: Curve Number is bad!"
7816 @@ -34,105 +46,54 @@
7827 -xdistcs c_1 s1 0 1 10
7828 -set Log1 [dlog get]
7830 -set List1 [split ${Log1} {TD= \t\n}]
7831 -set Tolerance 1.0e-7
7833 -checkList ${List1} ${Tolerance} ${D_good}
7837 -puts "Second curve"
7841 -xdistcs c_2 s1 0 1 10
7842 -set Log2 [dlog get]
7844 -set List2 [split ${Log2} {TD= \t\n}]
7845 -set Tolerance 1.0e-7
7847 -checkList ${List2} ${Tolerance} ${D_good}
7855 -xdistcs c_3 s1 0 1 10
7856 -set Log3 [dlog get]
7858 -set List3 [split ${Log3} {TD= \t\n}]
7859 -set Tolerance 1.0e-7
7861 -checkList ${List3} ${Tolerance} ${D_good}
7865 -puts "Fourth curve"
7869 -xdistcs c_4 s1 0 1 10
7870 -set Log4 [dlog get]
7872 -set List4 [split ${Log4} {TD= \t\n}]
7873 -set Tolerance 1.0e-7
7875 -checkList ${List4} ${Tolerance} ${D_good}
7883 -xdistcs c_5 s1 0 1 10
7884 -set Log5 [dlog get]
7886 -set List5 [split ${Log5} {TD= \t\n}]
7887 -set Tolerance 1.0e-7
7889 -checkList ${List5} ${Tolerance} ${D_good}
7897 -xdistcs c_6 s1 0 1 10
7898 -set Log6 [dlog get]
7900 -set List6 [split ${Log6} {TD= \t\n}]
7901 -set Tolerance 1.0e-7
7903 -checkList ${List6} ${Tolerance} ${D_good}
7907 -puts "Seventh curve"
7911 -xdistcs c_7 s1 0 1 10
7912 -set Log7 [dlog get]
7914 -set List7 [split ${Log7} {TD= \t\n}]
7915 -set Tolerance 1.0e-7
7917 -checkList ${List7} ${Tolerance} ${D_good}
7919 +for {set i 1} {$i <= ${NbCurv}} {incr i} {
7920 + set log [dump c_$i]
7922 + regexp {Degree +([-0-9.+eE]+), +([-0-9.+eE]+) Poles, +([-0-9.+eE]+)} ${log} full Degree Poles KnotsPoles
7923 + puts "Degree=${Degree}"
7924 + puts "Poles=${Poles}"
7925 + puts "KnotsPoles=${KnotsPoles}"
7929 + set exp_string "Knots :\n\n +${Knot} : +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
7930 + regexp ${exp_string} ${log} full U1 Mult1
7932 + set Knot ${KnotsPoles}
7933 + set exp_string " +${Knot} : +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
7934 + regexp ${exp_string} ${log} full U2 Mult2
7939 + if {[expr {$U2 - $U1}] < 1.0e-20} {
7940 + puts "Error: Wrong curve's range!"
7945 + xdistcs c_$i s1 ${U1} ${U2} 10
7946 + set Log2 [dlog get]
7947 + set List2 [split ${Log2} {TD= \t\n}]
7948 + set Tolerance 1.0e-7
7949 + set Limit_Tol 1.0e-7
7951 + checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol}
7955 + xdistcs c_$i s2 ${U1} ${U2} 10
7956 + set Log2 [dlog get]
7957 + set List2 [split ${Log2} {TD= \t\n}]
7958 + set Tolerance 1.0e-7
7959 + set Limit_Tol 1.0e-7
7961 + checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol}
7966 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_12 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_12
7967 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_12 2014-11-11 17:47:34.000000000 +0300
7968 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_12 2015-01-16 13:00:37.000000000 +0300
7970 -puts "TODO OCC225404 Debian60-64 Windows: Error: Curve Number is bad!"
7972 puts "================"
7974 puts "================"
7976 # Face/Face intersection algorithm gives different results for different order of the arguments
7977 #######################################################################
7979 +puts "##############################"
7980 +puts "#!!!Search \"Attention\" keyword on this web-page for additional checking!!!"
7981 +puts "##############################"
7987 restore [locate_data_file bug25292_Input_0.brep] b1
7989 #############################
7991 regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log} full Toler NbCurv
7993 +#This value must be equal to the analogical value in bug25292_11 and bug25292_12 of "bugs modalg_5" testgrid.
7996 +#This value must be equal to the analogical value in bug25292_11, bug25292_12, bug25292_15 and bug25292_16 of "bugs modalg_5" testgrid.
7999 if {${Toler} > ${MaxTol}} {
8000 puts "Error: Tolerance is too big!"
8004 if {${NbCurv} != ${GoodNbCurv}} {
8005 puts "Error: Curve Number is bad!"
8007 @@ -36,112 +46,55 @@
8018 -xdistcs c_1 s1 0 1 10
8019 -set Log1 [dlog get]
8021 -set List1 [split ${Log1} {TD= \t\n}]
8022 -set Tolerance 1.0e-7
8024 -checkList ${List1} ${Tolerance} ${D_good}
8028 -puts "Second curve"
8032 -xdistcs c_2 s1 0 1 10
8033 -set Log2 [dlog get]
8035 -set List2 [split ${Log2} {TD= \t\n}]
8036 -set Tolerance 1.0e-7
8038 -checkList ${List2} ${Tolerance} ${D_good}
8046 -xdistcs c_3 s1 0 1 10
8047 -set Log3 [dlog get]
8049 -set List3 [split ${Log3} {TD= \t\n}]
8050 -set Tolerance 1.0e-7
8052 -checkList ${List3} ${Tolerance} ${D_good}
8056 -puts "Fourth curve"
8060 -xdistcs c_4 s1 0 1 10
8061 -set Log4 [dlog get]
8063 -set List4 [split ${Log4} {TD= \t\n}]
8064 -set Tolerance 1.0e-7
8066 -checkList ${List4} ${Tolerance} ${D_good}
8069 -if { [info exist c_5] } {
8075 -xdistcs c_5 s1 0 1 10
8076 -set Log5 [dlog get]
8078 -set List5 [split ${Log5} {TD= \t\n}]
8079 -set Tolerance 1.0e-7
8081 -checkList ${List5} ${Tolerance} ${D_good}
8085 -if { [info exist c_6] } {
8091 -xdistcs c_6 s1 0 1 10
8092 -set Log6 [dlog get]
8094 -set List6 [split ${Log6} {TD= \t\n}]
8095 -set Tolerance 1.0e-7
8097 -checkList ${List6} ${Tolerance} ${D_good}
8098 +for {set i 1} {$i <= ${NbCurv}} {incr i} {
8099 + set log [dump c_$i]
8101 + regexp {Degree +([-0-9.+eE]+), +([-0-9.+eE]+) Poles, +([-0-9.+eE]+)} ${log} full Degree Poles KnotsPoles
8102 + puts "Degree=${Degree}"
8103 + puts "Poles=${Poles}"
8104 + puts "KnotsPoles=${KnotsPoles}"
8108 + set exp_string "Knots :\n\n +${Knot} : +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
8109 + regexp ${exp_string} ${log} full U1 Mult1
8111 + set Knot ${KnotsPoles}
8112 + set exp_string " +${Knot} : +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
8113 + regexp ${exp_string} ${log} full U2 Mult2
8118 + if {[expr {$U2 - $U1}] < 1.0e-20} {
8119 + puts "Error: Wrong curve's range!"
8124 + xdistcs c_$i s1 ${U1} ${U2} 10
8125 + set Log2 [dlog get]
8126 + set List2 [split ${Log2} {TD= \t\n}]
8127 + set Tolerance 1.0e-7
8128 + set Limit_Tol 1.0e-7
8130 + checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol}
8134 + xdistcs c_$i s2 ${U1} ${U2} 10
8135 + set Log2 [dlog get]
8136 + set List2 [split ${Log2} {TD= \t\n}]
8137 + set Tolerance 1.0e-7
8138 + set Limit_Tol 1.0e-7
8140 + checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol}
8144 -if { [info exist c_7] } {
8146 -puts "Seventh curve"
8150 -xdistcs c_7 s1 0 1 10
8151 -set Log7 [dlog get]
8153 -set List7 [split ${Log7} {TD= \t\n}]
8154 -set Tolerance 1.0e-7
8156 -checkList ${List7} ${Tolerance} ${D_good}
8162 set only_screen_axo 1
8163 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_13 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_13
8164 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_13 2014-11-11 17:47:34.000000000 +0300
8165 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_13 2015-01-16 13:00:37.000000000 +0300
8178 set nb_compsol_good 0
8179 set nb_compound_good 1
8180 -set nb_shape_good 57
8181 +set nb_shape_good 51
8184 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_14 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_14
8185 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_14 2014-11-11 17:47:34.000000000 +0300
8186 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_14 2015-01-16 13:00:37.000000000 +0300
8188 -puts "TODO OCC225404 Debian60-64 Windows: Error : Result shape is WRONG because it must contains 12 vertices instead of 9"
8189 -puts "TODO OCC225404 Debian60-64 Windows: Error : Result shape is WRONG because it must contains 18 edges instead of 15"
8190 -puts "TODO OCC225404 Debian60-64 Windows: Error : Result shape is WRONG because it must contains 57 shapes instead of 51"
8192 puts "================"
8194 puts "================"
8207 set nb_compsol_good 0
8208 set nb_compound_good 1
8209 -set nb_shape_good 57
8210 +set nb_shape_good 51
8213 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_15 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_15
8214 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_15 2014-11-11 17:47:34.000000000 +0300
8215 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_15 2015-01-16 13:01:25.000000000 +0300
8217 # Face/Face intersection algorithm gives different results for different order of the arguments
8218 #######################################################################
8220 +proc GetRange { curve } {
8224 + set log [uplevel dump $curve]
8226 + regexp {Degree +([-0-9.+eE]+), +([-0-9.+eE]+) Poles, +([-0-9.+eE]+)} ${log} full Degree Poles KnotsPoles
8227 + puts "Degree=${Degree}"
8228 + puts "Poles=${Poles}"
8229 + puts "KnotsPoles=${KnotsPoles}"
8233 + set exp_string "Knots :\n\n +${Knot} : +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
8234 + regexp ${exp_string} ${log} full U1 Mult1
8236 + set Knot ${KnotsPoles}
8237 + set exp_string " +${Knot} : +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
8238 + regexp ${exp_string} ${log} full U2 Mult2
8241 +puts "##############################"
8242 +puts "#!!!Search \"Attention\" keyword on this web-page for additional checking!!!"
8243 +puts "##############################"
8248 +#This value must be equal to the analogical value in bug25292_11, bug25292_12, bug25292_15 and bug25292_16 of "bugs modalg_5" testgrid.
8251 restore [locate_data_file bug25292_Input_0.brep] b1
8252 restore [locate_data_file bug25292_Input_1.brep] b2
8259 +intersect res s1 s2
8262 -if { [info exist i_7] } {
8263 - puts "OK: Curve Number is good!"
8264 +set che [whatis res]
8265 +set ind [string first "3d curve" $che]
8267 + #Only variable "res" exists
8269 + if { $GoodNbCurv == 1 } {
8270 + puts "OK: Curve Number is good!"
8272 + puts "Error: Curve Number is bad!"
8283 + if {[expr {$U2 - $U1}] < 1.0e-20} {
8284 + puts "Error: Wrong curve's range!"
8289 + xdistcs res s1 ${U1} ${U2} 10
8290 + set Log1 [dlog get]
8291 + set List1 [split ${Log1} {TD= \t\n}]
8292 + set Tolerance 3.0e-7
8293 + set Limit_Tol 1.0e-7
8295 + checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
8299 + xdistcs res s2 ${U1} ${U2} 10
8300 + set Log1 [dlog get]
8301 + set List1 [split ${Log1} {TD= \t\n}]
8302 + set Tolerance 3.0e-7
8303 + set Limit_Tol 1.0e-7
8305 + checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
8307 - puts "Error: Curve Number is bad!"
8309 + set AllowRepeate 1
8310 + while { $AllowRepeate != 0 } {
8311 + set che [whatis res_$ic]
8312 + set ind [string first "3d curve" $che]
8314 + set AllowRepeate 0
8324 + if {[expr {$U2 - $U1}] < 1.0e-20} {
8325 + puts "Error: Wrong curve's range!"
8330 + xdistcs res_$ic s1 ${U1} ${U2} 10
8331 + set Log1 [dlog get]
8332 + set List1 [split ${Log1} {TD= \t\n}]
8333 + set Tolerance 3.0e-7
8334 + set Limit_Tol 1.0e-7
8336 + checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
8340 + xdistcs res_$ic s2 0 1 10
8341 + set Log1 [dlog get]
8342 + set List1 [split ${Log1} {TD= \t\n}]
8343 + set Tolerance 3.0e-7
8344 + set Limit_Tol 1.0e-7
8346 + checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
8352 + if {[expr {$ic - 1}] == $GoodNbCurv} {
8353 + puts "OK: Curve Number is good!"
8355 + puts "Error: Curve Number is bad!"
8358 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_16 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_16
8359 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_16 2014-11-11 17:47:34.000000000 +0300
8360 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_16 2015-01-16 13:01:25.000000000 +0300
8362 -puts "TODO OCC225404 Debian60-64 Windows: Error: Curve Number is bad!"
8364 puts "================"
8366 puts "================"
8368 # Face/Face intersection algorithm gives different results for different order of the arguments
8369 #######################################################################
8371 +proc GetRange { curve } {
8375 + set log [uplevel dump $curve]
8377 + regexp {Degree +([-0-9.+eE]+), +([-0-9.+eE]+) Poles, +([-0-9.+eE]+)} ${log} full Degree Poles KnotsPoles
8378 + puts "Degree=${Degree}"
8379 + puts "Poles=${Poles}"
8380 + puts "KnotsPoles=${KnotsPoles}"
8384 + set exp_string "Knots :\n\n +${Knot} : +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
8385 + regexp ${exp_string} ${log} full U1 Mult1
8387 + set Knot ${KnotsPoles}
8388 + set exp_string " +${Knot} : +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
8389 + regexp ${exp_string} ${log} full U2 Mult2
8392 +puts "##############################"
8393 +puts "#!!!Search \"Attention\" keyword on this web-page for additional checking!!!"
8394 +puts "##############################"
8399 +#This value must be equal to the analogical value in bug25292_11, bug25292_12, bug25292_15 and bug25292_16 of "bugs modalg_5" testgrid.
8402 restore [locate_data_file bug25292_Input_0.brep] b1
8403 restore [locate_data_file bug25292_Input_1.brep] b2
8410 +intersect res s2 s1
8413 -if { [info exist i_7] } {
8414 - puts "OK: Curve Number is good!"
8415 +set che [whatis res]
8416 +set ind [string first "3d curve" $che]
8418 + #Only variable "res" exists
8420 + if { $GoodNbCurv == 1 } {
8421 + puts "OK: Curve Number is good!"
8423 + puts "Error: Curve Number is bad!"
8434 + if {[expr {$U2 - $U1}] < 1.0e-20} {
8435 + puts "Error: Wrong curve's range!"
8440 + xdistcs res s1 ${U1} ${U2} 10
8441 + set Log1 [dlog get]
8442 + set List1 [split ${Log1} {TD= \t\n}]
8443 + set Tolerance 3.0e-7
8444 + set Limit_Tol 1.0e-7
8446 + checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
8450 + xdistcs res s2 ${U1} ${U2} 10
8451 + set Log1 [dlog get]
8452 + set List1 [split ${Log1} {TD= \t\n}]
8453 + set Tolerance 3.0e-7
8454 + set Limit_Tol 1.0e-7
8456 + checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
8458 - puts "Error: Curve Number is bad!"
8460 + set AllowRepeate 1
8461 + while { $AllowRepeate != 0 } {
8462 + set che [whatis res_$ic]
8463 + set ind [string first "3d curve" $che]
8465 + set AllowRepeate 0
8475 + if {[expr {$U2 - $U1}] < 1.0e-20} {
8476 + puts "Error: Wrong curve's range!"
8481 + xdistcs res_$ic s1 ${U1} ${U2} 10
8482 + set Log1 [dlog get]
8483 + set List1 [split ${Log1} {TD= \t\n}]
8484 + set Tolerance 3.0e-7
8485 + set Limit_Tol 1.0e-7
8487 + checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
8491 + xdistcs res_$ic s2 0 1 10
8492 + set Log1 [dlog get]
8493 + set List1 [split ${Log1} {TD= \t\n}]
8494 + set Tolerance 3.0e-7
8495 + set Limit_Tol 1.0e-7
8497 + checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
8503 + if {[expr {$ic - 1}] == $GoodNbCurv} {
8504 + puts "OK: Curve Number is good!"
8506 + puts "Error: Curve Number is bad!"
8509 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_21 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_21
8510 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_21 2014-11-11 17:47:34.000000000 +0300
8511 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_21 2015-01-16 13:00:37.000000000 +0300
8513 # Face/Face intersection algorithm gives different results for different order of the arguments
8514 #######################################################################
8516 +puts "##############################"
8517 +puts "#!!!Search \"Attention\" keyword on this web-page for additional checking!!!"
8518 +puts "##############################"
8524 restore [locate_data_file bug25292_Input_3.brep] b1
8528 #########################
8529 -set log [bopcurves f1 f2]
8530 +set log [bopcurves f1 f2 -2d]
8531 #########################
8533 regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log} full Toler NbCurv
8535 +#This value must be equal to the analogical value in bug25292_21 and bug25292_22 of "bugs modalg_5" testgrid.
8538 +#This value must be equal to the analogical value in bug25292_21, bug25292_22, bug25292_25 and bug25292_26 of "bugs modalg_5" testgrid.
8541 if {${Toler} > ${MaxTol}} {
8542 puts "Error: Tolerance is too big!"
8546 if {${NbCurv} != ${GoodNbCurv}} {
8547 puts "Error: Curve Number is bad!"
8561 -xdistcs c_1 s1 0 1 10
8562 -set Log1 [dlog get]
8564 -set List1 [split ${Log1} {TD= \t\n}]
8565 -set Tolerance 1.0e-7
8567 -checkList ${List1} ${Tolerance} ${D_good}
8571 -puts "Second curve"
8575 -xdistcs c_2 s1 0 1 10
8576 -set Log2 [dlog get]
8578 -set List2 [split ${Log2} {TD= \t\n}]
8579 -set Tolerance 1.0e-7
8581 -checkList ${List2} ${Tolerance} ${D_good}
8589 -xdistcs c_3 s1 0 1 10
8590 -set Log3 [dlog get]
8592 -set List3 [split ${Log3} {TD= \t\n}]
8593 -set Tolerance 1.0e-7
8595 -checkList ${List3} ${Tolerance} ${D_good}
8597 +for {set i 1} {$i <= ${NbCurv}} {incr i} {
8598 + set log [dump c_$i]
8600 + regexp {Degree +([-0-9.+eE]+), +([-0-9.+eE]+) Poles, +([-0-9.+eE]+)} ${log} full Degree Poles KnotsPoles
8601 + puts "Degree=${Degree}"
8602 + puts "Poles=${Poles}"
8603 + puts "KnotsPoles=${KnotsPoles}"
8607 + set exp_string "Knots :\n\n +${Knot} : +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
8608 + regexp ${exp_string} ${log} full U1 Mult1
8610 + set Knot ${KnotsPoles}
8611 + set exp_string " +${Knot} : +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
8612 + regexp ${exp_string} ${log} full U2 Mult2
8617 + if {[expr {$U2 - $U1}] < 1.0e-20} {
8618 + puts "Error: Wrong curve's range!"
8623 + xdistcs c_$i s1 ${U1} ${U2} 10
8624 + set Log2 [dlog get]
8625 + set List2 [split ${Log2} {TD= \t\n}]
8626 + set Tolerance 1.0e-7
8627 + set Limit_Tol 1.0e-7
8629 + checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol}
8633 + xdistcs c_$i s2 ${U1} ${U2} 10
8634 + set Log2 [dlog get]
8635 + set List2 [split ${Log2} {TD= \t\n}]
8636 + set Tolerance 1.0e-7
8637 + set Limit_Tol 1.0e-7
8639 + checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol}
8644 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_22 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_22
8645 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_22 2014-11-11 17:47:34.000000000 +0300
8646 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_22 2015-01-16 13:00:37.000000000 +0300
8648 -puts "TODO OCC225404 Debian60-64 Windows: Error: Curve Number is bad!"
8650 puts "================"
8652 puts "================"
8654 # Face/Face intersection algorithm gives different results for different order of the arguments
8655 #######################################################################
8657 +puts "##############################"
8658 +puts "#!!!Search \"Attention\" keyword on this web-page for additional checking!!!"
8659 +puts "##############################"
8665 restore [locate_data_file bug25292_Input_3.brep] b1
8669 #########################
8670 -set log [bopcurves f2 f1]
8671 +set log [bopcurves f2 f1 -2d]
8672 #########################
8674 regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log} full Toler NbCurv
8676 +#This value must be equal to the analogical value in bug25292_21 and bug25292_22 of "bugs modalg_5" testgrid.
8679 +#This value must be equal to the analogical value in bug25292_21, bug25292_22, bug25292_25 and bug25292_26 of "bugs modalg_5" testgrid.
8682 if {${Toler} > ${MaxTol}} {
8683 puts "Error: Tolerance is too big!"
8687 if {${NbCurv} != ${GoodNbCurv}} {
8688 puts "Error: Curve Number is bad!"
8702 -xdistcs c_1 s1 0 1 10
8703 -set Log1 [dlog get]
8705 -set List1 [split ${Log1} {TD= \t\n}]
8706 -set Tolerance 1.0e-7
8708 -checkList ${List1} ${Tolerance} ${D_good}
8712 -puts "Second curve"
8716 -xdistcs c_2 s1 0 1 10
8717 -set Log2 [dlog get]
8719 -set List2 [split ${Log2} {TD= \t\n}]
8720 -set Tolerance 1.0e-7
8722 -checkList ${List2} ${Tolerance} ${D_good}
8725 -if { [info exist c_3] } {
8731 -xdistcs c_3 s1 0 1 10
8732 -set Log3 [dlog get]
8734 -set List3 [split ${Log3} {TD= \t\n}]
8735 -set Tolerance 1.0e-7
8737 -checkList ${List3} ${Tolerance} ${D_good}
8738 +for {set i 1} {$i <= ${NbCurv}} {incr i} {
8739 + set log [dump c_$i]
8741 + regexp {Degree +([-0-9.+eE]+), +([-0-9.+eE]+) Poles, +([-0-9.+eE]+)} ${log} full Degree Poles KnotsPoles
8742 + puts "Degree=${Degree}"
8743 + puts "Poles=${Poles}"
8744 + puts "KnotsPoles=${KnotsPoles}"
8748 + set exp_string "Knots :\n\n +${Knot} : +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
8749 + regexp ${exp_string} ${log} full U1 Mult1
8751 + set Knot ${KnotsPoles}
8752 + set exp_string " +${Knot} : +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
8753 + regexp ${exp_string} ${log} full U2 Mult2
8758 + if {[expr {$U2 - $U1}] < 1.0e-20} {
8759 + puts "Error: Wrong curve's range!"
8764 + xdistcs c_$i s1 ${U1} ${U2} 10
8765 + set Log2 [dlog get]
8766 + set List2 [split ${Log2} {TD= \t\n}]
8767 + set Tolerance 1.0e-7
8768 + set Limit_Tol 1.0e-7
8770 + checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol}
8774 + xdistcs c_$i s2 ${U1} ${U2} 10
8775 + set Log2 [dlog get]
8776 + set List2 [split ${Log2} {TD= \t\n}]
8777 + set Tolerance 1.0e-7
8778 + set Limit_Tol 1.0e-7
8780 + checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol}
8786 set only_screen_axo 1
8787 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_23 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_23
8788 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_23 2014-11-11 17:47:34.000000000 +0300
8789 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_23 2015-01-16 13:00:37.000000000 +0300
8794 +#These values must be equal to the analogical values in bug25292_23 and bug25292_24 of "bugs modalg_5" testgrid.
8805 set nb_compsol_good 0
8806 set nb_compound_good 1
8807 -set nb_shape_good 64
8808 +set nb_shape_good 62
8811 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_24 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_24
8812 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_24 2014-11-11 17:47:34.000000000 +0300
8813 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_24 2015-01-16 13:00:37.000000000 +0300
8815 -puts "TODO OCC225404 Debian60-64 Windows: Error : Result shape is WRONG because it must contains 11 vertices instead of 10"
8816 -puts "TODO OCC225404 Debian60-64 Windows: Error : Result shape is WRONG because it must contains 20 edges instead of 19"
8817 -puts "TODO OCC225404 Debian60-64 Windows: Error : Result shape is WRONG because it must contains 64 shapes instead of 62"
8820 puts "================"
8822 puts "================"
8827 +#These values must be equal to the analogical values in bug25292_23 and bug25292_24 of "bugs modalg_5" testgrid.
8838 set nb_compsol_good 0
8839 set nb_compound_good 1
8840 -set nb_shape_good 64
8841 +set nb_shape_good 62
8844 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_25 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_25
8845 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_25 2014-11-11 17:47:34.000000000 +0300
8846 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_25 2015-01-16 13:01:25.000000000 +0300
8848 # Face/Face intersection algorithm gives different results for different order of the arguments
8849 #######################################################################
8851 +proc GetRange { curve } {
8855 + set log [uplevel dump $curve]
8857 + regexp {Degree +([-0-9.+eE]+), +([-0-9.+eE]+) Poles, +([-0-9.+eE]+)} ${log} full Degree Poles KnotsPoles
8858 + puts "Degree=${Degree}"
8859 + puts "Poles=${Poles}"
8860 + puts "KnotsPoles=${KnotsPoles}"
8864 + set exp_string "Knots :\n\n +${Knot} : +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
8865 + regexp ${exp_string} ${log} full U1 Mult1
8867 + set Knot ${KnotsPoles}
8868 + set exp_string " +${Knot} : +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
8869 + regexp ${exp_string} ${log} full U2 Mult2
8872 +puts "##############################"
8873 +puts "#!!!Search \"Attention\" keyword on this web-page for additional checking!!!"
8874 +puts "##############################"
8879 +#This value must be equal to the analogical value in bug25292_21, bug25292_22, bug25292_25 and bug25292_26 of "bugs modalg_5" testgrid.
8882 restore [locate_data_file bug25292_Input_3.brep] b1
8883 restore [locate_data_file bug25292_Input_11.brep] b2
8885 @@ -20,11 +49,100 @@
8890 +intersect res s1 s2
8893 -if { [info exist i_3] } {
8894 - puts "OK: Curve Number is good!"
8895 +set che [whatis res]
8896 +set ind [string first "3d curve" $che]
8898 + #Only variable "res" exists
8900 + if { $GoodNbCurv == 1 } {
8901 + puts "OK: Curve Number is good!"
8903 + puts "Error: Curve Number is bad!"
8914 + if {[expr {$U2 - $U1}] < 1.0e-20} {
8915 + puts "Error: Wrong curve's range!"
8920 + xdistcs res s1 ${U1} ${U2} 10
8921 + set Log1 [dlog get]
8922 + set List1 [split ${Log1} {TD= \t\n}]
8923 + set Tolerance 1.1e-7
8924 + set Limit_Tol 1.0e-7
8926 + checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
8930 + xdistcs res s2 ${U1} ${U2} 10
8931 + set Log1 [dlog get]
8932 + set List1 [split ${Log1} {TD= \t\n}]
8933 + set Tolerance 1.1e-7
8934 + set Limit_Tol 1.0e-7
8936 + checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
8938 - puts "Error: Curve Number is bad!"
8940 + set AllowRepeate 1
8941 + while { $AllowRepeate != 0 } {
8942 + set che [whatis res_$ic]
8943 + set ind [string first "3d curve" $che]
8945 + set AllowRepeate 0
8955 + if {[expr {$U2 - $U1}] < 1.0e-20} {
8956 + puts "Error: Wrong curve's range!"
8961 + xdistcs res_$ic s1 ${U1} ${U2} 10
8962 + set Log1 [dlog get]
8963 + set List1 [split ${Log1} {TD= \t\n}]
8964 + set Tolerance 1.1e-7
8965 + set Limit_Tol 1.0e-7
8967 + checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
8971 + xdistcs res_$ic s2 0 1 10
8972 + set Log1 [dlog get]
8973 + set List1 [split ${Log1} {TD= \t\n}]
8974 + set Tolerance 1.1e-7
8975 + set Limit_Tol 1.0e-7
8977 + checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
8983 + if {[expr {$ic - 1}] == $GoodNbCurv} {
8984 + puts "OK: Curve Number is good!"
8986 + puts "Error: Curve Number is bad!"
8990 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_26 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_26
8991 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_26 2014-11-11 17:47:34.000000000 +0300
8992 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_26 2015-01-16 13:01:25.000000000 +0300
8994 -puts "TODO OCC225404 Debian60-64 Windows: Error: Curve Number is bad!"
8996 puts "================"
8998 puts "================"
9000 # Face/Face intersection algorithm gives different results for different order of the arguments
9001 #######################################################################
9003 +proc GetRange { curve } {
9007 + set log [uplevel dump $curve]
9009 + regexp {Degree +([-0-9.+eE]+), +([-0-9.+eE]+) Poles, +([-0-9.+eE]+)} ${log} full Degree Poles KnotsPoles
9010 + puts "Degree=${Degree}"
9011 + puts "Poles=${Poles}"
9012 + puts "KnotsPoles=${KnotsPoles}"
9016 + set exp_string "Knots :\n\n +${Knot} : +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
9017 + regexp ${exp_string} ${log} full U1 Mult1
9019 + set Knot ${KnotsPoles}
9020 + set exp_string " +${Knot} : +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
9021 + regexp ${exp_string} ${log} full U2 Mult2
9024 +puts "##############################"
9025 +puts "#!!!Search \"Attention\" keyword on this web-page for additional checking!!!"
9026 +puts "##############################"
9031 +#This value must be equal to the analogical value in bug25292_21, bug25292_22, bug25292_25 and bug25292_26 of "bugs modalg_5" testgrid.
9034 restore [locate_data_file bug25292_Input_3.brep] b1
9035 restore [locate_data_file bug25292_Input_11.brep] b2
9042 +intersect res s2 s1
9045 -if { [info exist i_3] } {
9046 - puts "OK: Curve Number is good!"
9047 +set che [whatis res]
9048 +set ind [string first "3d curve" $che]
9050 + #Only variable "res" exists
9052 + if { $GoodNbCurv == 1 } {
9053 + puts "OK: Curve Number is good!"
9055 + puts "Error: Curve Number is bad!"
9066 + if {[expr {$U2 - $U1}] < 1.0e-20} {
9067 + puts "Error: Wrong curve's range!"
9072 + xdistcs res s1 ${U1} ${U2} 10
9073 + set Log1 [dlog get]
9074 + set List1 [split ${Log1} {TD= \t\n}]
9075 + set Tolerance 1.1e-7
9076 + set Limit_Tol 1.0e-7
9078 + checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
9082 + xdistcs res s2 ${U1} ${U2} 10
9083 + set Log1 [dlog get]
9084 + set List1 [split ${Log1} {TD= \t\n}]
9085 + set Tolerance 1.1e-7
9086 + set Limit_Tol 1.0e-7
9088 + checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
9090 - puts "Error: Curve Number is bad!"
9092 + set AllowRepeate 1
9093 + while { $AllowRepeate != 0 } {
9094 + set che [whatis res_$ic]
9095 + set ind [string first "3d curve" $che]
9097 + set AllowRepeate 0
9107 + if {[expr {$U2 - $U1}] < 1.0e-20} {
9108 + puts "Error: Wrong curve's range!"
9113 + xdistcs res_$ic s1 ${U1} ${U2} 10
9114 + set Log1 [dlog get]
9115 + set List1 [split ${Log1} {TD= \t\n}]
9116 + set Tolerance 1.1e-7
9117 + set Limit_Tol 1.0e-7
9119 + checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
9123 + xdistcs res_$ic s2 0 1 10
9124 + set Log1 [dlog get]
9125 + set List1 [split ${Log1} {TD= \t\n}]
9126 + set Tolerance 1.1e-7
9127 + set Limit_Tol 1.0e-7
9129 + checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
9135 + if {[expr {$ic - 1}] == $GoodNbCurv} {
9136 + puts "OK: Curve Number is good!"
9138 + puts "Error: Curve Number is bad!"
9142 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_31 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_31
9143 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_31 2014-11-11 17:47:34.000000000 +0300
9144 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_31 2015-01-16 13:01:25.000000000 +0300
9146 # Face/Face intersection algorithm gives different results for different order of the arguments
9147 #######################################################################
9149 +puts "##############################"
9150 +puts "#!!!Search \"Attention\" keyword on this web-page for additional checking!!!"
9151 +puts "##############################"
9157 restore [locate_data_file bug25292_f1.brep] f1
9159 #############################
9161 regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log} full Toler NbCurv
9164 +#This value must be equal to the analogical value in bug25292_31 and bug25292_32 of "bugs modalg_5" testgrid.
9167 +#This value must be equal to the analogical value in bug25292_31 and bug25292_32 of "bugs modalg_5" testgrid.
9170 if {${Toler} > ${MaxTol}} {
9171 puts "Error: Tolerance is too big!"
9174 if {${NbCurv} != ${GoodNbCurv}} {
9175 puts "Error: Curve Number is bad!!"
9189 -xdistcs c_1 s1 0 1 10
9190 -set Log1 [dlog get]
9192 -set List1 [split ${Log1} {TD= \t\n}]
9193 -set Tolerance 1.0e-4
9195 -checkList ${List1} ${Tolerance} ${D_good}
9199 -puts "Second curve"
9203 -xdistcs c_2 s1 0 1 10
9204 -set Log2 [dlog get]
9206 -set List2 [split ${Log2} {TD= \t\n}]
9207 -set Tolerance 1.0e-4
9209 -checkList ${List2} ${Tolerance} ${D_good}
9211 +for {set i 1} {$i <= ${NbCurv}} {incr i} {
9212 + set log [dump c_$i]
9214 + regexp {Degree +([-0-9.+eE]+), +([-0-9.+eE]+) Poles, +([-0-9.+eE]+)} ${log} full Degree Poles KnotsPoles
9215 + puts "Degree=${Degree}"
9216 + puts "Poles=${Poles}"
9217 + puts "KnotsPoles=${KnotsPoles}"
9221 + set exp_string "Knots :\n\n +${Knot} : +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
9222 + regexp ${exp_string} ${log} full U1 Mult1
9224 + set Knot ${KnotsPoles}
9225 + set exp_string " +${Knot} : +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
9226 + regexp ${exp_string} ${log} full U2 Mult2
9231 + if {[expr {$U2 - $U1}] < 1.0e-20} {
9232 + puts "Error: Wrong curve's range!"
9237 + xdistcs c_$i s1 ${U1} ${U2} 10
9238 + set Log2 [dlog get]
9239 + set List2 [split ${Log2} {TD= \t\n}]
9240 + set Tolerance MaxTol
9241 + set Limit_Tol 1.0e-7
9243 + checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol}
9247 + xdistcs c_$i s2 ${U1} ${U2} 10
9248 + set Log2 [dlog get]
9249 + set List2 [split ${Log2} {TD= \t\n}]
9250 + set Tolerance MaxTol
9251 + set Limit_Tol 1.0e-7
9253 + checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol}
9258 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_32 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_32
9259 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_32 2014-11-11 17:47:34.000000000 +0300
9260 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_32 2015-01-16 13:01:25.000000000 +0300
9262 +puts "TODO OCC25331 Debian60-64: Error: Tolerance is too big!"
9264 puts "================"
9266 puts "================"
9268 # Face/Face intersection algorithm gives different results for different order of the arguments
9269 #######################################################################
9271 +puts "##############################"
9272 +puts "#!!!Search \"Attention\" keyword on this web-page for additional checking!!!"
9273 +puts "##############################"
9279 restore [locate_data_file bug25292_f1.brep] f1
9281 #############################
9283 regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log} full Toler NbCurv
9286 +#This value must be equal to the analogical value in bug25292_31 and bug25292_32 of "bugs modalg_5" testgrid.
9289 +#This value must be equal to the analogical value in bug25292_31 and bug25292_32 of "bugs modalg_5" testgrid.
9292 if {${Toler} > ${MaxTol}} {
9293 puts "Error: Tolerance is too big!"
9296 if {${NbCurv} != ${GoodNbCurv}} {
9297 puts "Error: Curve Number is bad!!"
9311 -xdistcs c_1 s1 0 1 10
9312 -set Log1 [dlog get]
9314 -set List1 [split ${Log1} {TD= \t\n}]
9315 -set Tolerance 1.0e-4
9317 -checkList ${List1} ${Tolerance} ${D_good}
9321 -puts "Second curve"
9325 -xdistcs c_2 s1 0 1 10
9326 -set Log2 [dlog get]
9328 -set List2 [split ${Log2} {TD= \t\n}]
9329 -set Tolerance 1.0e-4
9331 -checkList ${List2} ${Tolerance} ${D_good}
9333 +for {set i 1} {$i <= ${NbCurv}} {incr i} {
9334 + set log [dump c_$i]
9336 + regexp {Degree +([-0-9.+eE]+), +([-0-9.+eE]+) Poles, +([-0-9.+eE]+)} ${log} full Degree Poles KnotsPoles
9337 + puts "Degree=${Degree}"
9338 + puts "Poles=${Poles}"
9339 + puts "KnotsPoles=${KnotsPoles}"
9343 + set exp_string "Knots :\n\n +${Knot} : +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
9344 + regexp ${exp_string} ${log} full U1 Mult1
9346 + set Knot ${KnotsPoles}
9347 + set exp_string " +${Knot} : +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
9348 + regexp ${exp_string} ${log} full U2 Mult2
9353 + if {[expr {$U2 - $U1}] < 1.0e-20} {
9354 + puts "Error: Wrong curve's range!"
9359 + xdistcs c_$i s1 ${U1} ${U2} 10
9360 + set Log2 [dlog get]
9361 + set List2 [split ${Log2} {TD= \t\n}]
9362 + set Tolerance MaxTol
9363 + set Limit_Tol 1.0e-7
9365 + checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol}
9369 + xdistcs c_$i s2 ${U1} ${U2} 10
9370 + set Log2 [dlog get]
9371 + set List2 [split ${Log2} {TD= \t\n}]
9372 + set Tolerance MaxTol
9373 + set Limit_Tol 1.0e-7
9375 + checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol}
9380 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_33 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_33
9381 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_33 2014-11-11 17:47:34.000000000 +0300
9382 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_33 2015-01-16 13:00:37.000000000 +0300
9384 # Face/Face intersection algorithm gives different results for different order of the arguments
9385 #######################################################################
9387 +proc GetRange { curve } {
9391 + set log [uplevel dump $curve]
9393 + regexp {Degree +([-0-9.+eE]+), +([-0-9.+eE]+) Poles, +([-0-9.+eE]+)} ${log} full Degree Poles KnotsPoles
9394 + puts "Degree=${Degree}"
9395 + puts "Poles=${Poles}"
9396 + puts "KnotsPoles=${KnotsPoles}"
9400 + set exp_string "Knots :\n\n +${Knot} : +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
9401 + regexp ${exp_string} ${log} full U1 Mult1
9403 + set Knot ${KnotsPoles}
9404 + set exp_string " +${Knot} : +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
9405 + regexp ${exp_string} ${log} full U2 Mult2
9408 +puts "##############################"
9409 +puts "#!!!Search \"Attention\" keyword on this web-page for additional checking!!!"
9410 +puts "##############################"
9415 +#This value must be equal to the analogical value in bug25292_33 and bug25292_34 of "bugs modalg_5" testgrid.
9418 restore [locate_data_file bug25292_f1.brep] f1
9419 restore [locate_data_file bug25292_f2.brep] f2
9426 +intersect res s1 s2
9429 -if { [info exist i] } {
9430 - puts "OK: Curve Number is good!"
9431 +set che [whatis res]
9432 +set ind [string first "3d curve" $che]
9434 + #Only variable "res" exists
9436 + if { $GoodNbCurv == 1 } {
9437 + puts "OK: Curve Number is good!"
9439 + puts "Error: Curve Number is bad!"
9450 + if {[expr {$U2 - $U1}] < 1.0e-20} {
9451 + puts "Error: Wrong curve's range!"
9456 + xdistcs res s1 ${U1} ${U2} 10
9457 + set Log1 [dlog get]
9458 + set List1 [split ${Log1} {TD= \t\n}]
9459 + set Tolerance 1.0e-6
9460 + set Limit_Tol 1.0e-7
9462 + checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
9466 + xdistcs res s2 ${U1} ${U2} 10
9467 + set Log1 [dlog get]
9468 + set List1 [split ${Log1} {TD= \t\n}]
9469 + set Tolerance 1.0e-6
9470 + set Limit_Tol 1.0e-7
9472 + checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
9474 - puts "Error: Curve Number is bad!"
9476 + set AllowRepeate 1
9477 + while { $AllowRepeate != 0 } {
9478 + set che [whatis res_$ic]
9479 + set ind [string first "3d curve" $che]
9481 + set AllowRepeate 0
9491 + if {[expr {$U2 - $U1}] < 1.0e-20} {
9492 + puts "Error: Wrong curve's range!"
9497 + xdistcs res_$ic s1 ${U1} ${U2} 10
9498 + set Log1 [dlog get]
9499 + set List1 [split ${Log1} {TD= \t\n}]
9500 + set Tolerance 1.0e-6
9501 + set Limit_Tol 1.0e-7
9503 + checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
9507 + xdistcs res_$ic s2 0 1 10
9508 + set Log1 [dlog get]
9509 + set List1 [split ${Log1} {TD= \t\n}]
9510 + set Tolerance 1.0e-6
9511 + set Limit_Tol 1.0e-7
9513 + checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
9519 + if {[expr {$ic - 1}] == $GoodNbCurv} {
9520 + puts "OK: Curve Number is good!"
9522 + puts "Error: Curve Number is bad!"
9525 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_34 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_34
9526 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_34 2014-11-11 17:47:34.000000000 +0300
9527 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_34 2015-01-16 13:00:37.000000000 +0300
9529 # Face/Face intersection algorithm gives different results for different order of the arguments
9530 #######################################################################
9532 +proc GetRange { curve } {
9536 + set log [uplevel dump $curve]
9538 + regexp {Degree +([-0-9.+eE]+), +([-0-9.+eE]+) Poles, +([-0-9.+eE]+)} ${log} full Degree Poles KnotsPoles
9539 + puts "Degree=${Degree}"
9540 + puts "Poles=${Poles}"
9541 + puts "KnotsPoles=${KnotsPoles}"
9545 + set exp_string "Knots :\n\n +${Knot} : +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
9546 + regexp ${exp_string} ${log} full U1 Mult1
9548 + set Knot ${KnotsPoles}
9549 + set exp_string " +${Knot} : +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
9550 + regexp ${exp_string} ${log} full U2 Mult2
9553 +puts "##############################"
9554 +puts "#!!!Search \"Attention\" keyword on this web-page for additional checking!!!"
9555 +puts "##############################"
9560 +#This value must be equal to the analogical value in bug25292_33 and bug25292_34 of "bugs modalg_5" testgrid.
9563 restore [locate_data_file bug25292_f1.brep] f1
9564 restore [locate_data_file bug25292_f2.brep] f2
9571 +intersect res s2 s1
9574 -if { [info exist i] } {
9575 - puts "OK: Curve Number is good!"
9576 +set che [whatis res]
9577 +set ind [string first "3d curve" $che]
9579 + #Only variable "res" exists
9581 + if { $GoodNbCurv == 1 } {
9582 + puts "OK: Curve Number is good!"
9584 + puts "Error: Curve Number is bad!"
9595 + if {[expr {$U2 - $U1}] < 1.0e-20} {
9596 + puts "Error: Wrong curve's range!"
9601 + xdistcs res s1 ${U1} ${U2} 10
9602 + set Log1 [dlog get]
9603 + set List1 [split ${Log1} {TD= \t\n}]
9604 + set Tolerance 1.0e-6
9605 + set Limit_Tol 1.0e-7
9607 + checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
9611 + xdistcs res s2 ${U1} ${U2} 10
9612 + set Log1 [dlog get]
9613 + set List1 [split ${Log1} {TD= \t\n}]
9614 + set Tolerance 1.0e-6
9615 + set Limit_Tol 1.0e-7
9617 + checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
9619 - puts "Error: Curve Number is bad!"
9621 + set AllowRepeate 1
9622 + while { $AllowRepeate != 0 } {
9623 + set che [whatis res_$ic]
9624 + set ind [string first "3d curve" $che]
9626 + set AllowRepeate 0
9636 + if {[expr {$U2 - $U1}] < 1.0e-20} {
9637 + puts "Error: Wrong curve's range!"
9642 + xdistcs res_$ic s1 ${U1} ${U2} 10
9643 + set Log1 [dlog get]
9644 + set List1 [split ${Log1} {TD= \t\n}]
9645 + set Tolerance 1.0e-6
9646 + set Limit_Tol 1.0e-7
9648 + checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
9652 + xdistcs res_$ic s2 0 1 10
9653 + set Log1 [dlog get]
9654 + set List1 [split ${Log1} {TD= \t\n}]
9655 + set Tolerance 1.0e-6
9656 + set Limit_Tol 1.0e-7
9658 + checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
9664 + if {[expr {$ic - 1}] == $GoodNbCurv} {
9665 + puts "OK: Curve Number is good!"
9667 + puts "Error: Curve Number is bad!"
9670 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_35 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_35
9671 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_35 2014-11-11 17:47:34.000000000 +0300
9672 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_35 2015-01-16 13:01:25.000000000 +0300
9674 # Face/Face intersection algorithm gives different results for different order of the arguments
9675 #######################################################################
9677 +proc GetRange { curve } {
9681 + set log [uplevel dump $curve]
9683 + regexp {Degree +([-0-9.+eE]+), +([-0-9.+eE]+) Poles, +([-0-9.+eE]+)} ${log} full Degree Poles KnotsPoles
9684 + puts "Degree=${Degree}"
9685 + puts "Poles=${Poles}"
9686 + puts "KnotsPoles=${KnotsPoles}"
9690 + set exp_string "Knots :\n\n +${Knot} : +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
9691 + regexp ${exp_string} ${log} full U1 Mult1
9693 + set Knot ${KnotsPoles}
9694 + set exp_string " +${Knot} : +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
9695 + regexp ${exp_string} ${log} full U2 Mult2
9698 +puts "##############################"
9699 +puts "#!!!Search \"Attention\" keyword on this web-page for additional checking!!!"
9700 +puts "##############################"
9704 # intersect command for trimmed surfaces
9706 +#This value must be equal to the analogical value in bug25292_35 and bug25292_36 of "bugs modalg_5" testgrid.
9709 restore [locate_data_file bug25292_f1.brep] f1
9710 restore [locate_data_file bug25292_f2.brep] f2
9713 trim s2t s2 0. 1.570796326795 -275 275
9716 -intersect k s1t s2t
9717 +intersect res s1t s2t
9720 -if { [info exist k_2] } {
9721 - puts "OK: Curve Number is good!"
9722 +set che [whatis res]
9723 +set ind [string first "3d curve" $che]
9725 + #Only variable "res" exists
9727 + if { $GoodNbCurv == 1 } {
9728 + puts "OK: Curve Number is good!"
9730 + puts "Error: Curve Number is bad!"
9741 + if {[expr {$U2 - $U1}] < 1.0e-20} {
9742 + puts "Error: Wrong curve's range!"
9747 + xdistcs res s1 ${U1} ${U2} 10
9748 + set Log1 [dlog get]
9749 + set List1 [split ${Log1} {TD= \t\n}]
9750 + set Tolerance 3.0e-4
9751 + set Limit_Tol 1.0e-7
9753 + checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
9757 + xdistcs res s2 ${U1} ${U2} 10
9758 + set Log1 [dlog get]
9759 + set List1 [split ${Log1} {TD= \t\n}]
9760 + set Tolerance 3.0e-4
9761 + set Limit_Tol 1.0e-7
9763 + checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
9765 - puts "Error: Curve Number is bad!"
9767 + set AllowRepeate 1
9768 + while { $AllowRepeate != 0 } {
9769 + set che [whatis res_$ic]
9770 + set ind [string first "3d curve" $che]
9772 + set AllowRepeate 0
9782 + if {[expr {$U2 - $U1}] < 1.0e-20} {
9783 + puts "Error: Wrong curve's range!"
9788 + xdistcs res_$ic s1 ${U1} ${U2} 10
9789 + set Log1 [dlog get]
9790 + set List1 [split ${Log1} {TD= \t\n}]
9791 + set Tolerance 3.0e-4
9792 + set Limit_Tol 1.0e-7
9794 + checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
9798 + xdistcs res_$ic s2 0 1 10
9799 + set Log1 [dlog get]
9800 + set List1 [split ${Log1} {TD= \t\n}]
9801 + set Tolerance 3.0e-4
9802 + set Limit_Tol 1.0e-7
9804 + checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
9810 + if {[expr {$ic - 1}] == $GoodNbCurv} {
9811 + puts "OK: Curve Number is good!"
9813 + puts "Error: Curve Number is bad!"
9816 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_36 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_36
9817 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25292_36 2014-11-11 17:47:34.000000000 +0300
9818 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25292_36 2015-01-16 13:01:25.000000000 +0300
9820 # Face/Face intersection algorithm gives different results for different order of the arguments
9821 #######################################################################
9823 +proc GetRange { curve } {
9827 + set log [uplevel dump $curve]
9829 + regexp {Degree +([-0-9.+eE]+), +([-0-9.+eE]+) Poles, +([-0-9.+eE]+)} ${log} full Degree Poles KnotsPoles
9830 + puts "Degree=${Degree}"
9831 + puts "Poles=${Poles}"
9832 + puts "KnotsPoles=${KnotsPoles}"
9836 + set exp_string "Knots :\n\n +${Knot} : +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
9837 + regexp ${exp_string} ${log} full U1 Mult1
9839 + set Knot ${KnotsPoles}
9840 + set exp_string " +${Knot} : +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
9841 + regexp ${exp_string} ${log} full U2 Mult2
9844 +puts "##############################"
9845 +puts "#!!!Search \"Attention\" keyword on this web-page for additional checking!!!"
9846 +puts "##############################"
9850 # intersect command for trimmed surfaces
9852 +#This value must be equal to the analogical value in bug25292_35 and bug25292_36 of "bugs modalg_5" testgrid.
9855 restore [locate_data_file bug25292_f1.brep] f1
9856 restore [locate_data_file bug25292_f2.brep] f2
9859 trim s2t s2 0. 1.570796326795 -275 275
9862 -intersect k s2t s1t
9863 +intersect res s2t s1t
9866 -if { [info exist k_2] } {
9867 - puts "OK: Curve Number is good!"
9868 +set che [whatis res]
9869 +set ind [string first "3d curve" $che]
9871 + #Only variable "res" exists
9873 + if { $GoodNbCurv == 1 } {
9874 + puts "OK: Curve Number is good!"
9876 + puts "Error: Curve Number is bad!"
9887 + if {[expr {$U2 - $U1}] < 1.0e-20} {
9888 + puts "Error: Wrong curve's range!"
9893 + xdistcs res s1 ${U1} ${U2} 10
9894 + set Log1 [dlog get]
9895 + set List1 [split ${Log1} {TD= \t\n}]
9896 + set Tolerance 3.0e-4
9897 + set Limit_Tol 1.0e-7
9899 + checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
9903 + xdistcs res s2 ${U1} ${U2} 10
9904 + set Log1 [dlog get]
9905 + set List1 [split ${Log1} {TD= \t\n}]
9906 + set Tolerance 3.0e-4
9907 + set Limit_Tol 1.0e-7
9909 + checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
9911 - puts "Error: Curve Number is bad!"
9913 + set AllowRepeate 1
9914 + while { $AllowRepeate != 0 } {
9915 + set che [whatis res_$ic]
9916 + set ind [string first "3d curve" $che]
9918 + set AllowRepeate 0
9928 + if {[expr {$U2 - $U1}] < 1.0e-20} {
9929 + puts "Error: Wrong curve's range!"
9934 + xdistcs res_$ic s1 ${U1} ${U2} 10
9935 + set Log1 [dlog get]
9936 + set List1 [split ${Log1} {TD= \t\n}]
9937 + set Tolerance 3.0e-4
9938 + set Limit_Tol 1.0e-7
9940 + checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
9944 + xdistcs res_$ic s2 0 1 10
9945 + set Log1 [dlog get]
9946 + set List1 [split ${Log1} {TD= \t\n}]
9947 + set Tolerance 3.0e-4
9948 + set Limit_Tol 1.0e-7
9950 + checkList ${List1} ${Tolerance} ${D_good} ${Limit_Tol}
9956 + if {[expr {$ic - 1}] == $GoodNbCurv} {
9957 + puts "OK: Curve Number is good!"
9959 + puts "Error: Curve Number is bad!"
9962 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25432 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25432
9963 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25432 1970-01-01 03:00:00.000000000 +0300
9964 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25432 2015-01-16 13:00:38.000000000 +0300
9966 +puts "============"
9968 +puts "============"
9970 +#########################################################################
9971 +# Wrong result obtained by MakerVolume operator.
9972 +#########################################################################
9974 +restore [locate_data_file bug25432_qz.brep] q
9977 +mkvolume result q_1 q_2 q_3 q_4 q_5 q_6 q_7 q_8 q_9 q_10 q_11 -ni
9979 +regexp {Mass +: +([-0-9.+eE]+)} [vprops result] full volume
9981 +set expected_volume 0.26776
9982 +set tol_abs_volume 1.0e-4
9983 +set tol_rel_volume 0.0001
9984 +checkreal "Volume" ${volume} ${expected_volume} ${tol_abs_volume} ${tol_rel_volume}
9994 +set nb_compsol_good 0
9995 +set nb_compound_good 1
9996 +set nb_shape_good 59
9999 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25449 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25449
10000 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25449 1970-01-01 03:00:00.000000000 +0300
10001 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25449 2015-01-16 13:00:38.000000000 +0300
10003 +puts "================"
10005 +puts "================"
10007 +#######################################################################
10008 +# Excess vertex in result of General Fuse operation.
10009 +#######################################################################
10011 +restore [locate_data_file bug25449_fz351.brep] b1
10012 +restore [locate_data_file bug25449_ez679.brep] b2
10021 +set square 21.1115
10029 +set nb_compsol_good 0
10030 +set nb_compound_good 1
10031 +set nb_shape_good 11
10034 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25450_1 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25450_1
10035 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25450_1 1970-01-01 03:00:00.000000000 +0300
10036 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25450_1 2015-01-16 13:00:38.000000000 +0300
10038 +puts "================"
10040 +puts "================"
10042 +####################################
10043 +# Common operation returns wrong shape
10044 +####################################
10046 +restore [locate_data_file bug25450_Shape.brep] a
10049 +bcommon result a_1 a_2
10059 +set nb_compsol_good 0
10060 +set nb_compound_good 1
10061 +set nb_shape_good 30
10064 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25450_2 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25450_2
10065 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25450_2 1970-01-01 03:00:00.000000000 +0300
10066 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25450_2 2015-01-16 13:00:38.000000000 +0300
10068 +puts "================"
10070 +puts "================"
10072 +####################################
10073 +# Common operation returns wrong shape
10074 +####################################
10076 +restore [locate_data_file bug25450_b1.brep] b1
10077 +restore [locate_data_file bug25450_b2.brep] b2
10082 +set square 35538.3
10090 +set nb_compsol_good 0
10091 +set nb_compound_good 1
10092 +set nb_shape_good 12
10095 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25456 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25456
10096 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25456 1970-01-01 03:00:00.000000000 +0300
10097 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25456 2015-01-16 13:00:38.000000000 +0300
10099 +puts "============"
10101 +puts "============"
10103 +###############################
10104 +## BOPAlgo_CheckerSI reports an error on the given shape
10105 +###############################
10107 +restore [locate_data_file bug25456_shape.brep] a
10109 +set info [bopcheck a]
10111 +if {[string compare ${info} " This shape seems to be OK.\n"] == 0} {
10112 + puts "OK: BOPAlgo_CheckerSI report is good"
10114 + puts "Error : BOPAlgo_CheckerSI report is wrong"
10116 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25465_1 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25465_1
10117 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25465_1 1970-01-01 03:00:00.000000000 +0300
10118 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25465_1 2015-01-16 13:00:38.000000000 +0300
10124 +################################################
10125 +# Excess vertex in the result of CUT operation
10126 +################################################
10128 +restore [locate_data_file OCC25465_Gorivo.brep] b1
10129 +restore [locate_data_file OCC25465_Translation_1.brep] b2
10133 +set bug_info [bopcurves b1_3 b2_4]
10137 +# It is strictly forbidden to change nb_v_good and nb_e_good values (see OCC25465)
10144 +set nb_compsol_good 0
10145 +set nb_compound_good 1
10146 +set nb_shape_good 47
10148 +if {[lindex $bug_info 2] != 3} {
10149 + puts "ERROR: OCC25465 is reproduced."
10151 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25465_2 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25465_2
10152 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25465_2 1970-01-01 03:00:00.000000000 +0300
10153 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25465_2 2015-01-16 13:00:38.000000000 +0300
10159 +################################################
10160 +# Excess vertex in the result of CUT operation
10161 +################################################
10163 +restore [locate_data_file OCC25465_t_boite1.brep] b1
10164 +restore [locate_data_file OCC25465_c_cyl.brep] b2
10168 +set bug_info [bopcurves b1_6 b2_1]
10172 +# It is strictly forbidden to change nb_v_good and nb_e_good values (see OCC25465)
10179 +set nb_compsol_good 0
10180 +set nb_compound_good 1
10181 +set nb_shape_good 55
10183 +if {[lindex $bug_info 2] != 2} {
10184 + puts "ERROR: OCC25465 is reproduced."
10186 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25480 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25480
10187 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25480 1970-01-01 03:00:00.000000000 +0300
10188 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25480 2015-01-16 13:00:38.000000000 +0300
10190 +puts "============"
10192 +puts "============"
10194 +#######################################################################
10195 +# Incorrect result of BRepOffsetAPI_MakePipe
10196 +#######################################################################
10198 +restore [locate_data_file bug25480_part1.brep] a
10199 +restore [locate_data_file bug25480_part2.brep] b
10210 +set nb_sol_good 14
10211 +set nb_compsol_good 0
10212 +set nb_compound_good 8
10213 +set nb_shape_good 1044
10216 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25488 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25488
10217 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25488 1970-01-01 03:00:00.000000000 +0300
10218 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25488 2015-01-16 13:01:25.000000000 +0300
10224 +######################################################
10225 +# Wrong result of two trimmed cylinders intersection
10226 +######################################################
10228 +set Tolerance 3.0e-7
10230 +set Limit_Tol 1.0e-7
10232 +restore [locate_data_file OCC25488_sb1_1t.draw] sb1
10233 +restore [locate_data_file OCC25488_sb2_1t.draw] sb2
10235 +set bug_info [intersect res sb1 sb2]
10238 +while {$i != [llength $bug_info]} {
10239 + set res_i [lindex $bug_info $i]
10242 + xdistcs ${res_i} sb1 0 1 10
10243 + set BugLog [dlog get]
10244 + set BugList [split ${BugLog} {TD= \t\n}]
10245 + checkList ${BugList} ${Tolerance} ${D_good} ${Limit_Tol}
10248 + xdistcs ${res_i} sb2 0 1 10
10249 + set BugLog [dlog get]
10250 + set BugList [split ${BugLog} {TD= \t\n}]
10251 + checkList ${BugList} ${Tolerance} ${D_good} ${Limit_Tol}
10252 + set i [expr {$i + 1}]
10254 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25505 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25505
10255 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25505 1970-01-01 03:00:00.000000000 +0300
10256 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25505 2015-01-16 13:00:38.000000000 +0300
10258 +puts "============"
10260 +puts "============"
10262 +###############################
10263 +## General Fuse produces self-intersection shape
10264 +###############################
10266 +restore [locate_data_file bug25505_q.brep] q
10272 +baddobjects q_1 q_2 q_3 q_4
10276 +set info [bopcheck result]
10278 +if {[string compare ${info} " This shape seems to be OK.\n"] == 0} {
10279 + puts "OK: General Fuse produces good shape"
10281 + puts "Error : General Fuse produces self-intersection shape"
10284 +set square 68796.4
10292 +set nb_compsol_good 0
10293 +set nb_compound_good 1
10294 +set nb_shape_good 65
10297 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25592 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25592
10298 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25592 1970-01-01 03:00:00.000000000 +0300
10299 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25592 2015-01-16 13:00:38.000000000 +0300
10301 +puts "============"
10303 +puts "============"
10305 +######################################################
10306 +# Bad result of Fillet operation
10307 +######################################################
10309 +restore [locate_data_file bug25592_tshape.brep] t
10317 +set info1 [bopargcheck r_2 #f]
10318 +if { [regexp "to be valid for BOP" ${info1}] == 1 } {
10319 + puts "1. OK : Good result of Fillet operation\n"
10321 + puts "1. Error : Bad result of Fillet operation\n"
10324 +set info2 [bopargcheck r_1 #f]
10325 +if { [regexp "to be valid for BOP" ${info2}] == 1 } {
10326 + puts "2. OK : Good result of Fillet operation\n"
10328 + puts "2. Error : Bad result of Fillet operation\n"
10331 +set info3 [bopargcheck r_6 #f]
10332 +if { [regexp "to be valid for BOP" ${info3}] == 1 } {
10333 + puts "3. OK : Good result of Fillet operation\n"
10335 + puts "3. Error : Bad result of Fillet operation\n"
10338 +set info4 [bopargcheck r_7 #f]
10339 +if { [regexp "to be valid for BOP" ${info4}] == 1 } {
10340 + puts "4. OK : Good result of Fillet operation\n"
10342 + puts "4. Error : Bad result of Fillet operation\n"
10345 +set info5 [bopargcheck r_9 #f]
10346 +if { [regexp "to be valid for BOP" ${info5}] == 1 } {
10347 + puts "5. OK : Good result of Fillet operation\n"
10349 + puts "5. Error : Bad result of Fillet operation\n"
10351 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25657 OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25657
10352 --- OCCT-6.8.0_SRC/tests/bugs/modalg_5/bug25657 1970-01-01 03:00:00.000000000 +0300
10353 +++ OCCT-6.8.0_SRC-patch/tests/bugs/modalg_5/bug25657 2015-01-16 13:01:25.000000000 +0300
10359 +###########################################################################################
10360 +# Bad result of Fillet operation
10361 +###########################################################################################
10363 +restore [locate_data_file bug25657_r4.brep] r4
10367 +fillet res r4 20 c
10379 +set only_screen_axo 1
10380 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/moddata_2/bug26_1 OCCT-6.8.0_SRC-patch/tests/bugs/moddata_2/bug26_1
10381 --- OCCT-6.8.0_SRC/tests/bugs/moddata_2/bug26_1 2014-11-11 17:47:35.000000000 +0300
10382 +++ OCCT-6.8.0_SRC-patch/tests/bugs/moddata_2/bug26_1 2015-01-16 13:00:39.000000000 +0300
10384 +puts "TODO CR25432 ALL: Error : The square of result shape is"
10386 puts "================"
10388 puts "================"
10389 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/moddata_2/bug26_2 OCCT-6.8.0_SRC-patch/tests/bugs/moddata_2/bug26_2
10390 --- OCCT-6.8.0_SRC/tests/bugs/moddata_2/bug26_2 2014-11-11 17:47:35.000000000 +0300
10391 +++ OCCT-6.8.0_SRC-patch/tests/bugs/moddata_2/bug26_2 2015-01-16 13:00:39.000000000 +0300
10393 +puts "TODO CR25432 ALL: Error : The square of result shape is"
10395 puts "================"
10397 puts "================"
10398 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/moddata_3/bug25494 OCCT-6.8.0_SRC-patch/tests/bugs/moddata_3/bug25494
10399 --- OCCT-6.8.0_SRC/tests/bugs/moddata_3/bug25494 1970-01-01 03:00:00.000000000 +0300
10400 +++ OCCT-6.8.0_SRC-patch/tests/bugs/moddata_3/bug25494 2015-01-16 13:00:40.000000000 +0300
10402 +puts "================"
10404 +puts "================"
10406 +#######################################################################
10407 +# Wrong result obtained by projection algorithm
10408 +#######################################################################
10410 +restore [locate_data_file bug25494_s.draw] s
10411 +restore [locate_data_file bug25494_c.draw] c
10416 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/vis/bug25492 OCCT-6.8.0_SRC-patch/tests/bugs/vis/bug25492
10417 --- OCCT-6.8.0_SRC/tests/bugs/vis/bug25492 1970-01-01 03:00:00.000000000 +0300
10418 +++ OCCT-6.8.0_SRC-patch/tests/bugs/vis/bug25492 2015-01-16 13:00:41.000000000 +0300
10420 +puts "============"
10422 +puts "============"
10424 +#######################################################################
10425 +# The selected subshape does not have topological relationship
10426 +# with orginal shape in OCC680
10427 +#######################################################################
10432 +box aShape 5 5 5 3 3 3
10437 +vpickselected aSub
10441 +for {set i 1} {$i <= 6 } {incr i} {
10442 + set aRes [compare aShape_$i aSub];
10443 + if { [lsearch $aRes equal] != -1} {
10448 +if {$isEqual == 0} {
10449 +puts "Error: No selected sub-shape was found in exploded sub-shapes"
10452 diff -Naur --exclude=CVS --exclude=.git OCCT-6.8.0_SRC/tests/bugs/vis/bug25528 OCCT-6.8.0_SRC-patch/tests/bugs/vis/bug25528
10453 --- OCCT-6.8.0_SRC/tests/bugs/vis/bug25528 1970-01-01 03:00:00.000000000 +0300
10454 +++ OCCT-6.8.0_SRC-patch/tests/bugs/vis/bug25528 2015-01-16 13:00:41.000000000 +0300
10456 +puts "============"
10458 +puts "============"
10460 +####################################################################################
10461 +# Visualization - Exception on removing an interactive object from
10463 +# vremove -local <obj_name> crashes if there is an opened local context
10464 +####################################################################################
10472 +# opening a local context for local selection
10474 +# Select a face just to simulate the scenario used in a real application
10476 +# This line should not lead to exception
10479 +# Screenshot should be empty (box removed successfully)
10480 +vdump ${imagedir}/${casename}.png