mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-28 18:30:36 +05:00
21 lines
482 B
Python
21 lines
482 B
Python
|
# Offset Surface
|
||
|
|
||
|
import geompy
|
||
|
import salome
|
||
|
gg = salome.ImportComponentGUI("GEOM")
|
||
|
|
||
|
# create a box and a sphere
|
||
|
box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
|
||
|
|
||
|
# create a new object as offset of the given object
|
||
|
offset = geompy.MakeOffset(box, 70.)
|
||
|
|
||
|
# add objects in the study
|
||
|
id_box = geompy.addToStudy(box, "Box")
|
||
|
id_offset = geompy.addToStudy(offset, "Offset")
|
||
|
|
||
|
# display the results
|
||
|
gg.createAndDisplayGO(id_box)
|
||
|
gg.setDisplayMode(id_box,1)
|
||
|
gg.createAndDisplayGO(id_offset)
|