{
TopoDS_Vertex CV, V11, V12, V21, V22;
TopExp::CommonVertex( CurEdge, anEdge, CV );
- Standard_Boolean IsAutonomCV = IsAutonomVertex( CV, pDS, F1, F2 );
+ Standard_Boolean IsAutonomCV = Standard_False;
+ if (!CV.IsNull())
+ {
+ IsAutonomCV = IsAutonomVertex(CV, pDS, F1, F2);
+ }
if (IsAutonomCV)
{
aGlueTol = BRep_Tool::Tolerance(CV);
mySqDist.Clear();
Standard_Integer i, j;
Standard_Integer NbT, NbU, NbV;
- NbT = NbU = NbV = 10;
+ NbT = 12; NbU = NbV = 10;
GeomAbs_CurveType myCtype = C.GetType();
myDone = Standard_False;
}
GeomAdaptor_Curve aGACurve(aCurve, anarg1, anarg2);
- Extrema_ExtCS theExtCS(aGACurve, aGASurface, Tol, Tol);
+ Extrema_ExtCS theExtCS;
+ theExtCS.Initialize(aGASurface, myUMinParameter, myUMaxParameter,
+ myVMinParameter, myVMaxParameter, Tol, Tol);
+ Standard_Real first = aCurve->FirstParameter(), last = aCurve->LastParameter();
+ if (aCurve->IsPeriodic() ||
+ (anarg1 >= first - Precision::PConfusion() && anarg2 <= last + Precision::PConfusion()))
+ {
+ //Extrema_ExtCS theExtCS(aGACurve, aGASurface, Tol, Tol);
+ theExtCS.Perform(aGACurve, anarg1, anarg2);
+ }
+
myExtrema = theExtCS;
if(myExtrema.IsDone() && (myExtrema.NbExt() || myExtrema.IsParallel())) {
Standard_Boolean FromLastU = Standard_False,
isSplitsComputed = Standard_False;
- const Standard_Real aTol3D = Precision::Confusion();
- Extrema_ExtCS CExt(myCurve->Curve(), mySurface->Surface(), aTol3D, aTol3D);
+ const Standard_Real aTolExt = Precision::PConfusion();
+ Extrema_ExtCS CExt(myCurve->Curve(), mySurface->Surface(), aTolExt, aTolExt);
if (CExt.IsDone() && CExt.NbExt())
{
// Search for the minimum solution.
checkprops result -s 1706.51
checkshape result
-checknbshapes result -vertex 5 -edge 6 -wire 2 -face 2 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 17
+checknbshapes result -vertex 4 -edge 5 -wire 2 -face 2 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 15
checkview -display result -2d -path ${imagedir}/${test_image}.png
--- /dev/null
+puts "========"
+puts "OCC27087"
+puts "========"
+puts ""
+#######################################################
+# [Regression to OCCT 6.7.1] BRepExtrema_DistShapeShape gives wrong result
+#######################################################
+
+smallview
+restore [locate_data_file bug27087.brep] a
+explode a
+distmini r a_1 a_2
+if { [dval r_val] > 0.0001 } { puts "Error: too big deviation, should be 0!" }
+
+fit
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png