From 12e1afbe9aff0db7c09769e74d8f253691fd8a28 Mon Sep 17 00:00:00 2001 From: jfa Date: Mon, 5 Feb 2024 13:12:06 +0000 Subject: [PATCH] Porting to OCCT 7.8.0: modify test to workaround Netgen instability. --- test/ex_MakePolyLine.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/test/ex_MakePolyLine.py b/test/ex_MakePolyLine.py index a7fb6a7e7..46115fccf 100644 --- a/test/ex_MakePolyLine.py +++ b/test/ex_MakePolyLine.py @@ -25,12 +25,21 @@ if not isDone: # define arguments for MakePolyLine segments = [] + # between nodes 20 and 1, default plane segments.append( SMESH.PolySegment( 20, 0, SMESH.PointStruct(-1, -1, -1), 1, 0, SMESH.PointStruct(-1, -1, -1), smesh.MakeDirStruct(0,0,0) )) + # between nodes 1 and 100, default plane segments.append( SMESH.PolySegment( 1, 0, SMESH.PointStruct(-1, -1, -1), 200, 0, SMESH.PointStruct(-1, -1, -1), smesh.MakeDirStruct(0,0,0) )) -# between nodes 200 and edge (578, 577), plane includes vector (1,1,1) -segments.append( SMESH.PolySegment( 200, 0, SMESH.PointStruct(-1, -1, -1), 578, 577, SMESH.PointStruct(-1, -1, -1), smesh.MakeDirStruct(1,1,1) )) + +# between node 200 and edge (578, 577), plane includes vector (1,1,1) +#segments.append( SMESH.PolySegment( 200, 0, SMESH.PointStruct(-1, -1, -1), 578, 577, SMESH.PointStruct(-1, -1, -1), smesh.MakeDirStruct(1,1,1) )) +# nodes 578 and 577 are not always neighbour, so, use another approach + +# between node 200 and an edge, close to point (200, 90, 70), plane includes vector (1,1,1) +elems = Mesh_1.FindElementsByPoint(200, 90, 70, SMESH.FACE) +nodes = Mesh_1.GetElemNodes(elems[0]) +segments.append( SMESH.PolySegment( 200, 0, SMESH.PointStruct(-1, -1, -1), nodes[0], nodes[1], SMESH.PointStruct(-1, -1, -1), smesh.MakeDirStruct(1,1,1) )) Mesh_1.MakePolyLine( segments, "1D group") -- 2.39.2