X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Fsalome%2Fgui%2FGEOM%2Finput%2Ftui_free_faces.doc;h=c0a9286fd6bea6216c9731dcdce393ec04eb7db1;hb=a0e22ed86a0df64143edb095e07295a014b32c88;hp=7fd302288c678f2f87a872fd0eca9a8b6177fa3c;hpb=73555c78ebf12a1fdb85157b8e7934ad566ae90a;p=modules%2Fgeom.git diff --git a/doc/salome/gui/GEOM/input/tui_free_faces.doc b/doc/salome/gui/GEOM/input/tui_free_faces.doc index 7fd302288..c0a9286fd 100644 --- a/doc/salome/gui/GEOM/input/tui_free_faces.doc +++ b/doc/salome/gui/GEOM/input/tui_free_faces.doc @@ -1,52 +1,6 @@ /*! \page tui_free_faces_page Check Free Faces - -\code -import geompy -import salome -gg = salome.ImportComponentGUI("GEOM") - -# create a vertex and a vector -p1 = geompy.MakeVertex(35, 35, 0) -p2 = geompy.MakeVertex(35, 35, 50) -v = geompy.MakeVector(p1, p2) - -# create a cylinder -cylinder = geompy.MakeCone(p1, v, 30, 20, 20) - -# create a cone -cone = geompy.MakeCone(p1, v, 70, 40, 60) - -# make cut -cut = geompy.MakeCut(cone, cylinder) - -# get faces as sub-shapes -faces = [] -faces = geompy.SubShapeAllSortedCentres(cut, geompy.ShapeType["FACE"]) -f_2 = geompy.GetSubShapeID(cut, faces[0]) - -# remove one face from the shape -cut_without_f_2 = geompy.SuppressFaces(cut, [f_2]) - -# suppress the specified wire -result = geompy.GetFreeFacesIDs(cut_without_f_2) -print "A number of free faces is ", len(result) - -# add objects in the study -all_faces = geompy.SubShapeAllSortedCentres(cut_without_f_2, geompy.ShapeType["FACE"]) -for face in all_faces : - sub_shape_id = geompy.GetSubShapeID(cut_without_f_2, face) - if result.count(sub_shape_id) > 0 : - face_name = "Free face %d"%(sub_shape_id) - geompy.addToStudy(face, face_name) - -# in this example all faces from cut_without_f_2 are free -id_cut_without_f_2 = geompy.addToStudy(cut_without_f_2, "Cut without f_2") - -# display the results -gg.createAndDisplayGO(id_cut_without_f_2) -gg.setDisplayMode(id_cut_without_f_2,1) -\endcode +\tui_script{free_faces.py} */