]> OCCT Git - occt-copy.git/commitdiff
Test for 0023176: Intersection of cylinder and cone produces open curve
authormkv <mkv@opencascade.com>
Fri, 14 Jul 2017 16:56:05 +0000 (19:56 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 21 Jul 2017 09:13:05 +0000 (12:13 +0300)
src/DDocStd/DDocStd_ShapeSchemaCommands.cxx
src/ShapePersistent/ShapePersistent_Geom2d.cxx
src/ShapePersistent/ShapePersistent_TriangleMode.hxx
src/StdObjMgt/StdObjMgt_TransientPersistentMap.hxx
src/StdStorage/StdStorage_HSequenceOfRoots.hxx
src/StdStorage/StdStorage_MapOfRoots.hxx
src/StdStorage/StdStorage_SequenceOfRoots.hxx
src/XDEDRAW/XDEDRAW_Views.hxx
tests/bugs/modalg_7/bug23176 [new file with mode: 0644]

index 649f82fb310d22ce306fa29c3c90eae38f5d35ed..21ead8f997aa680e30a88e5cc9ac47510e734087 100644 (file)
@@ -1,3 +1,17 @@
+// Created on: 2017-03-28
+// Created by: Sergey NIKONOV
+// Copyright (c) 2000-2017 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
 
 #include <DDocStd.hxx>
 #include <DBRep.hxx>
index 45735b1eddfae1426a28eb95c4afd0b405337900..36574476ab67ac28bf1d9f6bfd2175f10da87d32 100644 (file)
@@ -1,3 +1,15 @@
+// Copyright (c) 2017 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
 
 #include <Standard_NullObject.hxx>
 
index 336b7029b7a91b44774f38a1b2104ce5574b9f61..c537d4cf34503f3729f2a5dc4369d446f8ad2ea9 100644 (file)
@@ -1,3 +1,16 @@
+// Copyright (c) 2017 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
 
 #ifndef _ShapePersistent_TriangleMode_HeaderFile
 #define _ShapePersistent_TriangleMode_HeaderFile
index 9af876d8eece0070e95eb75fda4db69308a9abf8..282f5292085552322d68b567dce615b5210c65c8 100644 (file)
@@ -1,3 +1,16 @@
+// Copyright (c) 2015 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
 
 #ifndef _StdObjMgt_TransientPersistentMap_HeaderFile
 #define _StdObjMgt_TransientPersistentMap_HeaderFile
index 62e33a3b340e03a4d399b4e9f1a128605d32de01..d457dd77e4595cbb4867ba8d240f38965af08244 100644 (file)
@@ -1,3 +1,16 @@
+// Copyright (c) 2017 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
 
 #ifndef StdStorage_HSequenceOfRoots_HeaderFile
 #define StdStorage_HSequenceOfRoots_HeaderFile
index a4824945dccf0c718845b52812828669ccb687fe..088d1883ab30384ca595c6d57ae8a1152b53151d 100644 (file)
@@ -1,3 +1,16 @@
+// Copyright (c) 2017 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
 
 #ifndef StdStorage_MapOfRoots_HeaderFile
 #define StdStorage_MapOfRoots_HeaderFile
index 5fe2128ed0806e7028b18b5f15bad846ca68477a..e9a12636dbdbb2f1f2862f98b75e3bdc8ad318c7 100644 (file)
@@ -1,3 +1,16 @@
+// Copyright (c) 2017 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
 
 #ifndef StdStorage_SequenceOfRoots_HeaderFile
 #define StdStorage_SequenceOfRoots_HeaderFile
index ab4793779567dfcf5c51c92e0d413c1b67a27537..feb5d4d10fe46df79449abf6f5c217bdc4f94356 100644 (file)
@@ -2,15 +2,15 @@
 // Created by: Irina KRYLOVA
 // Copyright (c) 2016 OPEN CASCADE SAS
 //
-// This file is part  Open CASCADE Technology software library.
+// This file is part of Open CASCADE Technology software library.
 //
 // This library is free software; you can redistribute it and/or modify it under
-// the terms  the GNU Lesser General Public License version 2.1 as published
+// the terms of the GNU Lesser General Public License version 2.1 as published
 // by the Free Software Foundation, with special exception defined in the file
 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text  the license and disclaimer  any warranty.
+// distribution for complete text of the license and disclaimer of any warranty.
 //
-// Alternatively, this file may be used under the terms  Open CASCADE
+// Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
 #ifndef _XDEDRAW_Views_HeaderFile
diff --git a/tests/bugs/modalg_7/bug23176 b/tests/bugs/modalg_7/bug23176
new file mode 100644 (file)
index 0000000..4544320
--- /dev/null
@@ -0,0 +1,43 @@
+puts "================"
+puts "OCC23176"
+puts "================"
+puts ""
+#######################################################################
+#  Intersection of cylinder and cone produces open curve
+#######################################################################
+
+restore [locate_data_file bug23176_surface1_draw.draw] s1
+restore [locate_data_file bug23176_surface2_draw.draw] s2
+
+intersect result s1 s2
+
+# first result curve
+cvalue result_1 0 x y z
+vertex v0 x y z
+cvalue result_1 1 x y z
+vertex v1 x y z
+
+# second result curve
+cvalue result_2 0 x y z
+vertex v2 x y z
+cvalue result_2 1 x y z
+vertex v3 x y z
+
+set tol_abs_dist 1.0e-7
+set tol_rel_dist 0.001
+
+distmini d_f v0 v1
+regexp {([-0-9.+eE]+)} [dump d_f_val] full dist_1
+set expected_dist_1 408.093320004435
+checkreal "Length first curve" ${dist_1} ${expected_dist_1} ${tol_abs_dist} ${tol_rel_dist}
+
+distmini d_s v2 v3
+regexp {([-0-9.+eE]+)} [dump d_s_val] full dist_2
+set expected_dist_2 408.093320004435
+checkreal "Length second curve" ${dist_2} ${expected_dist_2} ${tol_abs_dist} ${tol_rel_dist}
+
+smallview
+donly result*
+fit
+display s1 s2
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png