mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-04-12 15:57:27 +05:00
Correct script errors in wogui mode
This commit is contained in:
parent
b6b3466755
commit
5f1043ebd5
@ -19,6 +19,7 @@ geompy = geomBuilder.New()
|
|||||||
|
|
||||||
## Creates a polygon given its centre, external radius and number of sides
|
## Creates a polygon given its centre, external radius and number of sides
|
||||||
def makePolygon(p_centre, radius, nb_sides, theName=""):
|
def makePolygon(p_centre, radius, nb_sides, theName=""):
|
||||||
|
global geompy, math
|
||||||
points = []
|
points = []
|
||||||
x, y, z = geompy.PointCoordinates(p_centre)
|
x, y, z = geompy.PointCoordinates(p_centre)
|
||||||
for i in range(nb_sides):
|
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
|
## Creates a solid by adding a vertex on its top
|
||||||
def makeSummitSolid(face, height, theName=""):
|
def makeSummitSolid(face, height, theName=""):
|
||||||
|
global geompy
|
||||||
p_cdg = geompy.MakeCDG(face)
|
p_cdg = geompy.MakeCDG(face)
|
||||||
p_top = geompy.MakeTranslation(p_cdg, 0, 0, height)
|
p_top = geompy.MakeTranslation(p_cdg, 0, 0, height)
|
||||||
edges = geompy.SubShapeAll(face, geompy.ShapeType["EDGE"])
|
edges = geompy.SubShapeAll(face, geompy.ShapeType["EDGE"])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user