From: vsr Date: Tue, 9 Feb 2021 07:18:33 +0000 (+0300) Subject: Correct script errors in wogui mode X-Git-Tag: V9_7_0a1~24 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5f1043ebd551fb15cd10a6498074cbced5c20bf5;p=modules%2Fsmesh.git Correct script errors in wogui mode --- diff --git a/doc/salome/examples/test_polyhedron_per_solid.py b/doc/salome/examples/test_polyhedron_per_solid.py index 36fa51026..52fb17c7b 100644 --- a/doc/salome/examples/test_polyhedron_per_solid.py +++ b/doc/salome/examples/test_polyhedron_per_solid.py @@ -19,6 +19,7 @@ geompy = geomBuilder.New() ## Creates a polygon given its centre, external radius and number of sides def makePolygon(p_centre, radius, nb_sides, theName=""): + global geompy, math points = [] x, y, z = geompy.PointCoordinates(p_centre) for i in range(nb_sides): @@ -33,6 +34,7 @@ def makePolygon(p_centre, radius, nb_sides, theName=""): ## Creates a solid by adding a vertex on its top def makeSummitSolid(face, height, theName=""): + global geompy p_cdg = geompy.MakeCDG(face) p_top = geompy.MakeTranslation(p_cdg, 0, 0, height) edges = geompy.SubShapeAll(face, geompy.ShapeType["EDGE"])