1 // File: BRepCheck_Edge.cxx
2 // Created: Mon Dec 11 13:42:44 1995
3 // Author: Jacques GOUSSARD
7 #include <BRepCheck_Edge.ixx>
8 #include <TColStd_Array1OfTransient.hxx>
10 #include <BRepCheck_ListOfStatus.hxx>
11 #include <BRepCheck_ListIteratorOfListOfStatus.hxx>
13 #include <BRep_TEdge.hxx>
14 #include <BRep_TFace.hxx>
16 #include <BRep_CurveRepresentation.hxx>
17 #include <BRep_ListOfCurveRepresentation.hxx>
18 #include <BRep_ListIteratorOfListOfCurveRepresentation.hxx>
19 #include <BRep_GCurve.hxx>
20 #include <BRep_CurveOnSurface.hxx>
22 #include <BRep_Tool.hxx>
24 #include <TopExp_Explorer.hxx>
26 #include <Geom_Surface.hxx>
27 #include <Geom_RectangularTrimmedSurface.hxx>
28 #include <Geom_Plane.hxx>
29 #include <Geom_TrimmedCurve.hxx>
30 #include <Geom2d_Curve.hxx>
32 #include <Geom2dAdaptor_HCurve.hxx>
33 #include <GeomAdaptor_Curve.hxx>
34 #include <GeomAdaptor_HCurve.hxx>
35 #include <GeomAdaptor_HSurface.hxx>
36 #include <Adaptor3d_CurveOnSurface.hxx>
37 #include <Adaptor3d_HCurveOnSurface.hxx>
39 #include <ProjLib_ProjectedCurve.hxx>
40 #include <GeomProjLib.hxx>
41 #include <Extrema_LocateExtPC.hxx>
43 #include <BRepCheck.hxx>
44 #include <Geom2dAdaptor.hxx>
46 #include <TopAbs_ShapeEnum.hxx>
47 #include <TopoDS_Face.hxx>
48 #include <Precision.hxx>
51 //modified by NIZNHY-PKV Thu May 05 09:01:57 2011f
53 Standard_Boolean Validate(const Adaptor3d_Curve&,
54 const Adaptor3d_CurveOnSurface&,
56 const Standard_Boolean);
58 void PrintProblematicPoint(const gp_Pnt&,
63 Standard_Real Prec(const Adaptor3d_Curve& aAC3D,
64 const Adaptor3d_CurveOnSurface& aACS);
66 Standard_Real PrecCurve(const Adaptor3d_Curve& aAC3D);
68 Standard_Real PrecSurface(const Adaptor3d_CurveOnSurface& aACS);
70 //static Standard_Boolean Validate(const Adaptor3d_Curve&,
71 // const Adaptor3d_Curve&,
72 // const Standard_Real,
73 // const Standard_Boolean);
74 //modified by NIZNHY-PKV Thu May 05 09:02:01 2011t
78 //=======================================================================
79 //function : BRepCheck_Edge
81 //=======================================================================
83 BRepCheck_Edge::BRepCheck_Edge(const TopoDS_Edge& E)
86 myGctrl = Standard_True;
89 //=======================================================================
92 //=======================================================================
94 void BRepCheck_Edge::Minimum()
98 BRepCheck_ListOfStatus thelist;
99 myMap.Bind(myShape, thelist);
100 BRepCheck_ListOfStatus& lst = myMap(myShape);
103 // Existence et unicite d`une representation 3D
104 Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*)&myShape.TShape());
105 BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves());
106 Standard_Boolean exist = Standard_False;
107 Standard_Boolean unique = Standard_True;
108 // Search for a 3D reference. If no existent one, creates it with the
109 // first encountered CurveOnSurf; if multiple, chooses the first one...
111 Standard_Boolean Degenerated = TE->Degenerated();
112 Standard_Boolean SameParameter = TE->SameParameter();
113 Standard_Boolean SameRange = TE->SameRange();
114 if (!SameRange && SameParameter) {
115 BRepCheck::Add(lst,BRepCheck_InvalidSameParameterFlag);
117 // Handle(Geom_Curve) C3d;
119 while (itcr.More()) {
120 const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
121 if (cr->IsCurve3D()) {
123 exist = Standard_True;
126 unique = Standard_False;
128 if (myCref.IsNull() && !cr->Curve3D().IsNull()) {
136 BRepCheck::Add(lst,BRepCheck_No3DCurve);
140 BRepCheck::Add(lst,BRepCheck_Multiple3DCurve);
143 if (myCref.IsNull() && !Degenerated) {
144 itcr.Initialize(TE->Curves());
145 while (itcr.More()) {
146 const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
147 if (cr->IsCurveOnSurface()) {
154 else if (!myCref.IsNull() && Degenerated){
155 BRepCheck::Add(lst,BRepCheck_InvalidDegeneratedFlag);
158 if (!myCref.IsNull()) {
159 const Handle(BRep_GCurve)& GCref = *((Handle(BRep_GCurve)*)&myCref);
160 Standard_Real First,Last;
161 GCref->Range(First,Last);
164 BRepCheck::Add(lst,BRepCheck_InvalidRange);
167 if (myCref->IsCurve3D()) {
168 // eap 6 Jun 2002 occ332
169 // better transform C3d instead of transforming Surf upto C3d initial location,
170 // on transformed BSpline surface 'same parameter' may seem wrong
171 TopLoc_Location L = myShape.Location() * myCref->Location();
172 Handle(Geom_Curve) C3d = Handle(Geom_Curve)::DownCast
173 (myCref->Curve3D()->Transformed
174 (/*myCref->Location()*/L.Transformation()));
175 GeomAdaptor_Curve GAC3d(C3d,First,Last);
176 myHCurve = new GeomAdaptor_HCurve(GAC3d);
178 else { // curve on surface
179 Handle(Geom_Surface) Sref = myCref->Surface();
180 Sref = Handle(Geom_Surface)::DownCast
181 (Sref->Transformed(myCref->Location().Transformation()));
182 const Handle(Geom2d_Curve)& PCref = myCref->PCurve();
183 Handle(GeomAdaptor_HSurface) GAHSref = new GeomAdaptor_HSurface(Sref);
184 Handle(Geom2dAdaptor_HCurve) GHPCref =
185 new Geom2dAdaptor_HCurve(PCref,First,Last);
186 Adaptor3d_CurveOnSurface ACSref(GHPCref,GAHSref);
187 myHCurve = new Adaptor3d_HCurveOnSurface(ACSref);
192 lst.Append(BRepCheck_NoError);
194 myMin = Standard_True;
199 //=======================================================================
200 //function : InContext
202 //=======================================================================
204 void BRepCheck_Edge::InContext(const TopoDS_Shape& S)
206 if (myMap.IsBound(S)) {
209 BRepCheck_ListOfStatus thelist;
210 myMap.Bind(S, thelist);
211 BRepCheck_ListOfStatus& lst = myMap(S);
213 Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*)&myShape.TShape());
214 Standard_Real Tol = BRep_Tool::Tolerance(TopoDS::Edge(myShape));
216 TopAbs_ShapeEnum styp = S.ShapeType();
217 // for (TopExp_Explorer exp(S,TopAbs_EDGE); exp.More(); exp.Next()) {
218 TopExp_Explorer exp(S,TopAbs_EDGE) ;
219 for ( ; exp.More(); exp.Next()) {
220 if (exp.Current().IsSame(myShape)) {
225 BRepCheck::Add(lst,BRepCheck_SubshapeNotInShape);
231 if (!myCref.IsNull()) {
233 Standard_Boolean SameParameter = TE->SameParameter();
234 Standard_Boolean SameRange = TE->SameRange();
235 // Modified by skv - Tue Apr 27 11:48:13 2004 Begin
236 if (!SameParameter || !SameRange) {
238 BRepCheck::Add(lst,BRepCheck_InvalidSameParameterFlag);
240 BRepCheck::Add(lst,BRepCheck_InvalidSameRangeFlag);
244 // Modified by skv - Tue Apr 27 11:48:14 2004 End
245 Standard_Real First = myHCurve->FirstParameter();
246 Standard_Real Last = myHCurve->LastParameter();
248 Handle(BRep_TFace)& TF = *((Handle(BRep_TFace)*) &S.TShape());
249 const TopLoc_Location& Floc = S.Location();
250 const TopLoc_Location& TFloc = TF->Location();
251 const Handle(Geom_Surface)& Su = TF->Surface();
252 TopLoc_Location L = (Floc * TFloc).Predivided(myShape.Location());
253 Standard_Boolean pcurvefound = Standard_False;
255 BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves());
256 while (itcr.More()) {
257 const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
258 if (cr != myCref && cr->IsCurveOnSurface(Su,L)) {
259 pcurvefound = Standard_True;
260 const Handle(BRep_GCurve)& GC = *((Handle(BRep_GCurve)*)&cr);
264 // Modified by skv - Tue Apr 27 11:50:35 2004 Begin
265 // if (SameRange && (fabs(f-First) > Precision::PConfusion() || fabs(l-Last)> Precision::PConfusion())) { //f != First || l != Last)) { gka OCC
266 if (fabs(f-First) > Precision::PConfusion() ||
267 fabs(l-Last) > Precision::PConfusion()) {
268 BRepCheck::Add(lst,BRepCheck_InvalidSameRangeFlag);
269 BRepCheck::Add(lst,BRepCheck_InvalidSameParameterFlag);
270 // if (SameParameter) {
271 // BRepCheck::Add(lst,BRepCheck_InvalidSameParameterFlag);
274 // Modified by skv - Tue Apr 27 11:50:37 2004 End
276 Handle(Geom_Surface) Sb = cr->Surface();
277 Sb = Handle(Geom_Surface)::DownCast
278 // (Su->Transformed(L.Transformation()));
279 (Su->Transformed(/*L*/(Floc * TFloc).Transformation()));
280 Handle(Geom2d_Curve) PC = cr->PCurve();
281 Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(Sb);
282 Handle(Geom2dAdaptor_HCurve) GHPC = new Geom2dAdaptor_HCurve(PC,f,l);
283 Adaptor3d_CurveOnSurface ACS(GHPC,GAHS);
284 Standard_Boolean ok =
285 Validate(myHCurve->Curve(),ACS,Tol,SameParameter);
287 if (cr->IsCurveOnClosedSurface()) {
288 BRepCheck::Add(lst,BRepCheck_InvalidCurveOnClosedSurface);
291 BRepCheck::Add(lst,BRepCheck_InvalidCurveOnSurface);
293 // Modified by skv - Tue Apr 27 11:53:00 2004 Begin
294 BRepCheck::Add(lst,BRepCheck_InvalidSameParameterFlag);
295 // if (SameParameter) {
296 // BRepCheck::Add(lst,BRepCheck_InvalidSameParameterFlag);
298 // Modified by skv - Tue Apr 27 11:53:01 2004 End
300 if (cr->IsCurveOnClosedSurface()) {
301 GHPC->ChangeCurve2d().Load(cr->PCurve2(),f,l); // same bounds
302 ACS.Load(GAHS); // sans doute inutile
303 ACS.Load(GHPC); // meme remarque...
304 ok = Validate(myHCurve->Curve(),ACS,Tol,SameParameter);
306 BRepCheck::Add(lst,BRepCheck_InvalidCurveOnClosedSurface);
307 // Modified by skv - Tue Apr 27 11:53:20 2004 Begin
309 BRepCheck::Add(lst,BRepCheck_InvalidSameParameterFlag);
311 // Modified by skv - Tue Apr 27 11:53:23 2004 End
320 Handle(Geom_Plane) P;
321 Handle(Standard_Type) dtyp = Su->DynamicType();
322 if (dtyp == STANDARD_TYPE(Geom_RectangularTrimmedSurface)) {
323 P = Handle(Geom_Plane)::DownCast
324 (Handle(Geom_RectangularTrimmedSurface)::
325 DownCast(Su)->BasisSurface());
328 P = Handle(Geom_Plane)::DownCast(Su);
330 if (P.IsNull()) { // not a plane
331 BRepCheck::Add(lst,BRepCheck_NoCurveOnSurface);
333 else { // on fait la projection a la volee, comme BRep_Tool
336 P = Handle(Geom_Plane)::
337 DownCast(P->Transformed(/*L*/(Floc * TFloc).Transformation()));// eap occ332
338 //on projette Cref sur ce plan
339 Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(P);
341 // Dub - Normalement myHCurve est une GeomAdaptor_HCurve
342 GeomAdaptor_Curve& Gac =
343 Handle(GeomAdaptor_HCurve)::DownCast(myHCurve)->ChangeCurve();
344 Handle(Geom_Curve) C3d = Gac.Curve();
345 Handle(Geom_Curve) ProjOnPlane =
346 GeomProjLib::ProjectOnPlane(new Geom_TrimmedCurve(C3d,First,Last),
347 P, P->Position().Direction(),
349 Handle(GeomAdaptor_HCurve) aHCurve =
350 new GeomAdaptor_HCurve(ProjOnPlane);
352 ProjLib_ProjectedCurve proj(GAHS,aHCurve);
353 Handle(Geom2d_Curve) PC = Geom2dAdaptor::MakeCurve(proj);
354 Handle(Geom2dAdaptor_HCurve) GHPC =
355 new Geom2dAdaptor_HCurve(PC,
356 myHCurve->FirstParameter(),
357 myHCurve->LastParameter());
359 Adaptor3d_CurveOnSurface ACS(GHPC,GAHS);
361 Standard_Boolean ok = Validate(myHCurve->Curve(),ACS,
362 Tol,Standard_True); // voir dub...
364 BRepCheck::Add(lst,BRepCheck_InvalidCurveOnSurface);
373 // on verifie que l`edge est bien connectee 2 fois (pas de bord libre)
374 Standard_Integer nbconnection = 0;
375 //TopExp_Explorer exp;
376 for (exp.Init(S,TopAbs_FACE); exp.More(); exp.Next()) {
377 const TopoDS_Face& fac = TopoDS::Face(exp.Current());
378 TopExp_Explorer exp2;
379 for (exp2.Init(fac,TopAbs_EDGE); exp2.More(); exp2.Next()) {
380 if (exp2.Current().IsSame(myShape)) {
385 if (nbconnection < 2 && !TE->Degenerated()) {
386 BRepCheck::Add(myMap(S),BRepCheck_FreeEdge);
388 else if (nbconnection > 2) {
389 BRepCheck::Add(myMap(S),BRepCheck_InvalidMultiConnexity);
392 BRepCheck::Add(myMap(S),BRepCheck_NoError);
399 if (myMap(S).IsEmpty()) {
400 myMap(S).Append(BRepCheck_NoError);
405 //=======================================================================
408 //=======================================================================
410 void BRepCheck_Edge::Blind()
412 // Modified by skv - Tue Apr 27 11:36:01 2004 Begin
413 // The body of this function is removed because of its useless.
415 myBlind = Standard_True;
417 // Modified by skv - Tue Apr 27 11:36:02 2004 End
421 //=======================================================================
422 //function : GeometricControls
424 //=======================================================================
426 void BRepCheck_Edge::GeometricControls(const Standard_Boolean B)
432 //=======================================================================
433 //function : GeometricControls
435 //=======================================================================
437 Standard_Boolean BRepCheck_Edge::GeometricControls() const
445 //=======================================================================
446 //function : Tolerance
448 //=======================================================================
450 Standard_Real BRepCheck_Edge::Tolerance()
452 Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*)&myShape.TShape());
453 Standard_Integer it, iRep=1, nbRep=(TE->Curves()).Extent();
455 return Precision::Confusion();
457 TColStd_Array1OfTransient theRep(1, nbRep*2);
458 Standard_Real First, Last;
459 if (!myHCurve.IsNull()) {
460 First = myHCurve->FirstParameter();
461 Last= myHCurve->LastParameter();
464 BRep_Tool::Range(TopoDS::Edge(myShape), First, Last);
467 BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves());
468 for (; itcr.More(); itcr.Next()) {
469 const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
470 if (cr->IsCurve3D() && !TE->Degenerated()) {
471 //// modified by jgv, 20.03.03 ////
472 TopLoc_Location Loc = myShape.Location() * cr->Location();
473 Handle(Geom_Curve) C3d = Handle(Geom_Curve)::DownCast
474 (cr->Curve3D()->Transformed( Loc.Transformation() ));
475 ///////////////////////////////////
476 GeomAdaptor_Curve GAC3d(C3d,First,Last);
479 theRep(iRep)=theRep(1);
482 theRep(it) = new GeomAdaptor_HCurve(GAC3d);
485 else if (cr->IsCurveOnSurface()) {
487 Handle(Geom_Surface) Sref = cr->Surface();
488 //// modified by jgv, 20.03.03 ////
489 TopLoc_Location Loc = myShape.Location() * cr->Location();
490 Sref = Handle(Geom_Surface)::DownCast
491 (Sref->Transformed( Loc.Transformation() ));
492 ///////////////////////////////////
493 const Handle(Geom2d_Curve)& PCref = cr->PCurve();
494 Handle(GeomAdaptor_HSurface) GAHSref = new GeomAdaptor_HSurface(Sref);
495 Handle(Geom2dAdaptor_HCurve) GHPCref =
496 new Geom2dAdaptor_HCurve(PCref,First,Last);
497 Adaptor3d_CurveOnSurface ACSref(GHPCref,GAHSref);
498 theRep(iRep) = new Adaptor3d_HCurveOnSurface(ACSref);
501 if (cr->IsCurveOnClosedSurface()) {
502 Handle(Geom_Surface) Sref = cr->Surface();
503 Sref = Handle(Geom_Surface)::DownCast
504 (Sref->Transformed(cr->Location().Transformation()));
505 const Handle(Geom2d_Curve)& PCref = cr->PCurve2();
506 Handle(GeomAdaptor_HSurface) GAHSref = new GeomAdaptor_HSurface(Sref);
507 Handle(Geom2dAdaptor_HCurve) GHPCref =
508 new Geom2dAdaptor_HCurve(PCref,First,Last);
509 Adaptor3d_CurveOnSurface ACSref(GHPCref,GAHSref);
510 theRep(iRep) = new Adaptor3d_HCurveOnSurface(ACSref);
520 Standard_Real dist2, tol2, tolCal=0., prm;
522 Standard_Integer i, imax;
523 for (i= 0; i< NCONTROL; i++) {
524 prm = ((NCONTROL-1-i)*First + i*Last)/(NCONTROL-1);
526 center=(*(Handle(Adaptor3d_HCurve)*)&theRep(1))->Value(prm);
527 for (iRep=2; iRep<=nbRep; iRep++) {
528 othP=(*(Handle(Adaptor3d_HCurve)*)&theRep(iRep))->Value(prm);
529 dist2=center.SquareDistance(othP);
530 if (dist2>tolCal) tolCal=dist2;
537 // On prend 5% de marge car au dessus on crontrole severement
538 return sqrt(tolCal)*1.05;
541 //=======================================================================
542 //function : Validate
544 //=======================================================================
545 Standard_Boolean Validate(const Adaptor3d_Curve& CRef,
546 const Adaptor3d_CurveOnSurface& Other,
547 const Standard_Real Tol,
548 const Standard_Boolean SameParameter)
550 Standard_Boolean Status, proj;
551 Standard_Real aPC, First, Last, Error;
552 gp_Pnt problematic_point ;
554 Status = Standard_True;
556 First = CRef.FirstParameter();
557 Last = CRef.LastParameter();
559 aPC=Precision::PConfusion();
560 proj = (!SameParameter ||
561 fabs(Other.FirstParameter()-First) > aPC ||
562 fabs( Other.LastParameter()-Last) > aPC);
565 Standard_Real Tol2, prm, dD;
567 //modified by NIZNHY-PKV Thu May 05 09:06:41 2011f
569 dD=Prec(CRef, Other);//3.e-15;
573 //modified by NIZNHY-PKV Thu May 05 09:06:47 2011t
575 for (i = 0; i< NCONTROL; ++i) {
576 prm = ((NCONTROL-1-i)*First + i*Last)/(NCONTROL-1);
577 pref = CRef.Value(prm);
578 pother = Other.Value(prm);
579 if (pref.SquareDistance(pother) > Tol2) {
580 problematic_point = pref ;
581 Status = Standard_False;
582 Error = pref.Distance(pother);
583 PrintProblematicPoint(problematic_point, Error, Tol);
590 Extrema_LocateExtPC refd,otherd;
591 Standard_Real OFirst = Other.FirstParameter();
592 Standard_Real OLast = Other.LastParameter();
593 gp_Pnt pd = CRef.Value(First);
594 gp_Pnt pdo = Other.Value(OFirst);
595 Standard_Real distt = pd.SquareDistance(pdo);
596 if (distt > Tol*Tol) {
597 problematic_point = pd ;
598 Status = Standard_False ;
600 PrintProblematicPoint(problematic_point, Error, Tol);
604 pd = CRef.Value(Last);
605 pdo = Other.Value(OLast);
606 distt = pd.SquareDistance(pdo);
607 if (distt > Tol*Tol) {
608 problematic_point = pd ;
609 Status = Standard_False ;
611 PrintProblematicPoint(problematic_point, Error, Tol);
616 refd.Initialize(CRef,First,Last,CRef.Resolution(Tol));
617 otherd.Initialize(Other,OFirst,OLast,Other.Resolution(Tol));
618 for (Standard_Integer i = 2; i< NCONTROL-1; i++) {
619 Standard_Real rprm = ((NCONTROL-1-i)*First + i*Last)/(NCONTROL-1);
620 gp_Pnt pref = CRef.Value(rprm);
621 Standard_Real oprm = ((NCONTROL-1-i)*OFirst + i*OLast)/(NCONTROL-1);
622 gp_Pnt pother = Other.Value(oprm);
623 refd.Perform(pother,rprm);
624 if (!refd.IsDone() || refd.SquareDistance() > Tol * Tol) {
625 problematic_point = pref ;
626 Status = Standard_False ;
628 Error = sqrt (refd.SquareDistance());
633 PrintProblematicPoint(problematic_point, Error, Tol);
637 otherd.Perform(pref,oprm);
638 if (!otherd.IsDone() || otherd.SquareDistance() > Tol * Tol) {
639 problematic_point = pref ;
640 Status = Standard_False ;
641 if (otherd.IsDone()) {
642 Error = sqrt (otherd.SquareDistance());
647 PrintProblematicPoint(problematic_point, Error, Tol);
657 cout << " **** probleme de SameParameter au point :" << endl;
658 cout << " " << problematic_point.Coord(1) << " "
659 << problematic_point.Coord(2) << " "
660 << problematic_point.Coord(3) << endl ;
661 cout << " Erreur detectee :" << Error << " Tolerance :" << Tol << endl;
669 //=======================================================================
672 //=======================================================================
673 Standard_Real Prec(const Adaptor3d_Curve& aAC3D,
674 const Adaptor3d_CurveOnSurface& aACS)
676 Standard_Real aXEmax, aXC, aXS;
678 aXC=PrecCurve(aAC3D);
679 aXS=PrecSurface(aACS);
680 aXEmax=(aXC>aXS) ? aXC: aXS;
683 //=======================================================================
684 //function : PrecCurve
686 //=======================================================================
687 Standard_Real PrecCurve(const Adaptor3d_Curve& aAC3D)
689 Standard_Real aXEmax;
690 GeomAbs_CurveType aCT;
692 aXEmax=RealEpsilon();
695 if (aCT==GeomAbs_Ellipse) {
697 Standard_Real aX[5], aXE;
699 gp_Elips aEL3D=aAC3D.Ellipse();
700 aEL3D.Location().Coord(aX[0], aX[1], aX[2]);
701 aX[3]=aEL3D.MajorRadius();
702 aX[4]=aEL3D.MinorRadius();
704 for (i=0; i<5; ++i) {
713 }//if (aCT=GeomAbs_Ellipse) {
717 //=======================================================================
718 //function : PrecSurface
720 //=======================================================================
721 Standard_Real PrecSurface(const Adaptor3d_CurveOnSurface& aACS)
723 Standard_Real aXEmax;
724 GeomAbs_SurfaceType aST;
726 aXEmax=RealEpsilon();
728 const Handle(Adaptor3d_HSurface)& aAHS=aACS.GetSurface();
730 if (aST==GeomAbs_Cone) {
731 gp_Cone aCone=aAHS->Cone();
733 Standard_Real aX[4], aXE;
735 aCone.Location().Coord(aX[0], aX[1], aX[2]);
736 aX[3]=aCone.RefRadius();
738 for (i=0; i<4; ++i) {
747 }//if (aST==GeomAbs_Cone) {
750 //=======================================================================
751 //function : PrintProblematicPoint
753 //=======================================================================
755 void PrintProblematicPoint(const gp_Pnt& problematic_point,
756 const Standard_Real Error,
757 const Standard_Real Tol)
759 cout << " **** probleme de SameParameter au point :" << endl;
760 cout << " " << problematic_point.Coord(1) << " "
761 << problematic_point.Coord(2) << " " << problematic_point.Coord(3) << endl ;
762 cout << " Erreur detectee :" << Error << " Tolerance :" << Tol << endl;
765 void PrintProblematicPoint(const gp_Pnt&,