Anonymous | Login 2021-07-30 22:31 MSK Project: All Projects Community Open CASCADE
 My View | View Issues | Change Log | Roadmap

 View Revisions: Issue #31047 Summary 0031047: Modeling Algorithms - BRepExtrema_DistShapeShape gives wrong result Revision 2021-07-06 13:32 by ifv Steps To Reproduce Test case bugs modalg_7 bug31047 Revision 2019-10-14 16:28 by msv Steps To Reproduce #script 1 - test DistShapeShape restore Face.brep f vertex v1 -79 -282.7 0 copy v1 v2 ttranslate v2 0 0.1 0 distmini d1 f v1 distmini d2 f v2 set dist1 [dval d1_val] set dist2 [dval d2_val] puts "dist1=\$dist1" puts "dist2=\$dist2" if {\$dist1 != \$dist2} {   puts "Error: both distances must be equal to 0" } #script 2 - test BRepClass_FaceClassifier restore Face.brep f point p1 -79 -282.7 point p2 -79 -282.6 if ![regexp "IN" [b2dclassify f p1]] {   puts "Error: inner point p1 is classified as OUT" } if ![regexp "IN" [b2dclassify f p2]] {   puts "Error: inner point p2 is classified as OUT" } Revision 2019-10-14 16:06 by msv Steps To Reproduce restore Face.brep f vertex v1 -79 -282.7 0 copy v1 v2 ttranslate v2 0 0.1 0 distmini d1 f v1 distmini d2 f v2 set dist1 [dval d1_val] set dist2 [dval d2_val] puts "dist1=\$dist1" puts "dist2=\$dist2" if {\$dist1 != \$dist2} {   puts "Error: both distances must be equal to 0" } Revision 2019-10-08 17:39 by BenjaminBihler Steps To Reproduce #include #include #include #include #include #include #include #include #include #include #include int main(int, char*[]) {     BRep_Builder builder;     TopoDS_Shape face;     BRepTools::Read(face, "Face.brep", builder);     gp_Pnt testPoint(-79.14602309143586467143904883414507,             -282.66130124109884036442963406443596,             0.00000000000000000000000000000000);     BRepExtrema_DistShapeShape distanceComputer(face,             BRepBuilderAPI_MakeVertex(testPoint));     if (distanceComputer.IsDone())     {         std::cout << "Calculated Distance = " << distanceComputer.Value()                 << std::endl;         if (distanceComputer.Value() > Precision::Confusion())         {             std::cout << "This is wrong! The distance should be (close to) zero."                     << std::endl;         }     }     else     {         std::cout << "Calculation failed." << std::endl;     }     return 0; }