Salome HOME
projects
/
modules
/
smesh.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
b6b3466
)
Correct script errors in wogui mode
author
vsr
<vsr@opencascade.com>
Tue, 9 Feb 2021 07:18:33 +0000
(10:18 +0300)
committer
vsr
<vsr@opencascade.com>
Tue, 9 Feb 2021 07:18:33 +0000
(10:18 +0300)
doc/salome/examples/test_polyhedron_per_solid.py
patch
|
blob
|
history
diff --git
a/doc/salome/examples/test_polyhedron_per_solid.py
b/doc/salome/examples/test_polyhedron_per_solid.py
index 36fa510268a37e1332eec24a8dd2d6e8342f2608..52fb17c7b5312eef46b8315abec4ba311d9a844e 100644
(file)
--- 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=""):
## 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):
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=""):
## 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"])
p_cdg = geompy.MakeCDG(face)
p_top = geompy.MakeTranslation(p_cdg, 0, 0, height)
edges = geompy.SubShapeAll(face, geompy.ShapeType["EDGE"])