From: eap Date: Wed, 18 Feb 2015 13:19:30 +0000 (+0300) Subject: Fix a regression - make SMESH_Nut.py script independent of sub-shapes numbering X-Git-Tag: V7_6_0a1~21 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=0ff64bf0229363667c65fd2a28d0163dba874450 Fix a regression - make SMESH_Nut.py script independent of sub-shapes numbering --- diff --git a/src/SMESH_SWIG/SMESH_Nut.py b/src/SMESH_SWIG/SMESH_Nut.py index 2d0a5de13..fb692941c 100755 --- a/src/SMESH_SWIG/SMESH_Nut.py +++ b/src/SMESH_SWIG/SMESH_Nut.py @@ -86,10 +86,17 @@ geompy.addToStudy(Fillet_1, "Fillet_1") #Chamfer applying print "Chamfer creation..." -Chamfer_1 = geompy.MakeChamferEdge(Fillet_1, 10, 10, 16, 50 ) -geompy.addToStudy(Chamfer_1, "Chamfer_1") -Chamfer_2 = geompy.MakeChamferEdge(Chamfer_1, 10, 10, 21, 31 ) -geompy.addToStudy(Chamfer_2, "Chamfer_2") +cyl_face = geompy.GetFaceNearPoint( Fillet_1, geompy.MakeVertex( 50, 0, 45 ), theName='cyl_face') +cyl_face_id = geompy.GetSubShapeID( Fillet_1, cyl_face ) +top_face = geompy.GetFaceNearPoint( Fillet_1, geompy.MakeVertex( 60, 0, 90 ), theName='top_face') +top_face_id = geompy.GetSubShapeID( Fillet_1, top_face ) +Chamfer_1 = geompy.MakeChamferEdge(Fillet_1, 10, 10, cyl_face_id, top_face_id, theName='Chamfer_1' ) + +cyl_face = geompy.GetFaceNearPoint( Chamfer_1, geompy.MakeVertex( 80, 0, 85 ), theName='cyl_face') +cyl_face_id = geompy.GetSubShapeID( Chamfer_1, cyl_face ) +top_face = geompy.GetFaceNearPoint( Chamfer_1, geompy.MakeVertex( 65, 0, 90 ), theName='top_face') +top_face_id = geompy.GetSubShapeID( Chamfer_1, top_face ) +Chamfer_2 = geompy.MakeChamferEdge(Chamfer_1, 10, 10, cyl_face_id, top_face_id, theName='Chamfer_2' ) #Import of the shape from "slots.brep" print "Import multi-rotation from the DATA_DIR/Shapes/Brep/slots.brep"