salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# Create a 3D sketcher (wire) on the given points coordinates
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# a box
# --- geom Python interface
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
# --- Create a box and publish it into the salome study
Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create PipeTShape object
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create DividedDisk object
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create DividedCylinder object
import salome, GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
# create a could of points
points = [
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
import math
OX = geompy.MakeVectorDXDYDZ(10, 0,0)
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
Circle_1 = geompy.MakeCircle(None, None, 100)
Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create vertices
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create vertices
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create vertices
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create vertices
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create vertices
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create vertices and vectors
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create vertices
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create vertices
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
import math
import SALOMEDS
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
import math
import SALOMEDS
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create a vertex and a vector
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create a vertex and a vector
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
import SALOMEDS
# create a box and a cylinder
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
import SALOMEDS
# create a box and partigion it by two planes
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
import math
# create a box
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create vertices
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create a box and a sphere
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
# create a box
check_box = geompy.MakeBoxDXDYDZ(200, 200, 200)
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create a vertex and a vector
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create a vertex and a vector
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create a vertex and a vector
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create a vertex and a vector
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
# create a box
box = geompy.MakeBoxDXDYDZ(100,30,100)
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create vertices
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create vertices
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
import math
# create a box
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create boxes
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
# create a box
box = geompy.MakeBoxDXDYDZ(100,100,100)
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
# create a box
box = geompy.MakeBoxDXDYDZ(100,100,100)
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
# create a box
box = geompy.MakeBoxDXDYDZ(100,30,100)
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create a vertex and a vector
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create a vertex and a vector
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
mindeg = 2
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create vertices
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
Wire_1 = geompy.MakeSketcher("Sketcher:F 0 0:TT 100 0:R 0:C 100 90:T 0 200", [0, 0, 0, 0, 0, 1, 1, 0, -0])
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
import math
gg = salome.ImportComponentGUI("GEOM")
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
import salome
gg = salome.ImportComponentGUI("GEOM")
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
def MakeHelix(radius, height, rotation, direction):
# - create a helix -
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
# Create a box
Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
# Create Vertexes for curve
Vertex_1 = geompy.MakeVertex(0, 0, 0)
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create box
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
# create a box
box = geompy.MakeBoxDXDYDZ(100,100,100)
import salome
salome.salome_init()
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
# create a shape
box1 = geompy.MakeBox(0, 0, 0, 100, 100, 100)
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create a vertex and a vector
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
# create solids
box = geompy.MakeBoxDXDYDZ(100, 100, 100)
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
import tempfile, os
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
# create a box
box = geompy.MakeBoxDXDYDZ(100,30,100)
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
# Create two curves with three closest points
Vertex_1 = geompy.MakeVertex(0, 0, 0)
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
import math
# create a box
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
import salome_notebook
gg = salome.ImportComponentGUI("GEOM")
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
# create a point
point = geompy.MakeVertex(15., 23., 80.)
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create vertices
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create vertices
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create a vertex
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create a vertex and a vector
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create a vertex and a vector
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create vertices
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create vertices
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create vertices, an edge, an arc, a wire, a face and a prism
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create a box
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create vertices and vectors
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create a vertex and a vector
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create a vertex and a vector
salome.salome_init()
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create base points
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create boxes
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create boxes
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# import initial topology with bad tolerances (more than 1e-07)
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
# Variant 1: using DivideEdge()
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
# create vertices
p1 = geompy.MakeVertex(0, 0, 0)
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
# create solids with some coincident faces
Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create vertices
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
# create a box
box = geompy.MakeBoxDXDYDZ(100,30,100)
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
#
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create vertices
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create vertices
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
#create vertices
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
#create vertices
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create a vertex and a vector
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create a box
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create a vertex and a vector
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
import math
gg = salome.ImportComponentGUI("GEOM")
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
import math
gg = salome.ImportComponentGUI("GEOM")
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create a box
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create a box and a sphere
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create a box and a sphere
import salome
salome.salome_init()
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
# create a cylindric face and a curve(edge)
cylinder = geompy.MakeCylinderRH(100, 300)
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create vertices and vectors
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
import math
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create a face in OXY plane
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create box
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
radius = 10.
ShapeTypeEdge = geompy.ShapeType["EDGE"]
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
d1 = 10.
d2 = 10.
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create vertices
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
box = geompy.MakeBox(0,0,0, 50,50,50)
box2 = geompy.MakeBox(-50,-50,-50, 0,0,0)
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
box = geompy.MakeBox(0,0,0, 50,50,50)
sphere = geompy.MakeSphere(50,50,50, 30)
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
box = geompy.MakeBox(0,0,0, 50,50,50)
sphere = geompy.MakeSphere(50,50,50, 30)
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
texture_file = os.path.join(os.getenv("GEOM_ROOT_DIR"), "share", "salome", "resources", "geom", "textures", "texture1.dat")
texture = geompy.LoadTexture(texture_file)
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
# create a box
box = geompy.MakeBoxDXDYDZ(100,30,100)
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create two vertices
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create two vertices
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
# create two vertices
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
# create a box and some groups of faces on it
Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
# create a box and some groups of faces on it
Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
# create a box and some groups of faces on it
Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
box = geompy.MakeBoxDXDYDZ(10,10,10)
type = geompy.ShapeIdToType(box.GetType())
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
box = geompy.MakeBoxDXDYDZ(10,10,10)
type = box.GetShapeType()
\n the old mode:
\code
import geompy
-geompy.init_geom(theStudy)
+geompy.init_geom()
\endcode
\n the new mode:
\code
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
\endcode
salome.salome_init()
from salome.geom import geomBuilder
-geompy = geomBuilder.New(theStudy)
+geompy = geomBuilder.New()
\endcode
With this initialization, the geometry engine runs in the default container,
import salome
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
gg = salome.ImportComponentGUI("GEOM")
if( isMultiFile )
aScript += "def RebuildData():";
- aScript += "\n\tgeompy = geomBuilder.New(salome.myStudy)\n";
+ aScript += "\n\tgeompy = geomBuilder.New()\n";
AddTextures(aScript);
except:
pass
-_geompy = geomBuilder.New(salome.myStudy)
+_geompy = geomBuilder.New()
## Return an object behaving exactly like geompy module.
# \ingroup geomtools
# Put it in the study
from salome.geom import geomBuilder
- geompy = geomBuilder.New(salome.myStudy)
+ geompy = geomBuilder.New()
geompy.addToStudy( wire, 'mysketch' )
Additionnal examples can be found as unit tests in the source code.
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
- geompy = geomBuilder.New(salome.myStudy)
+ geompy = geomBuilder.New()
pass
pass
except:
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
- geompy = geomBuilder.New(salome.myStudy)
+ geompy = geomBuilder.New()
import SALOMEDS
- geompy.init_geom(salome.myStudy)
+ geompy.init_geom()
Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
edges = geompy.SubShapeAllSorted(Box_1, geompy.ShapeType["EDGE"])
geompy.addToStudy(Box_1, "Box_1")
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
#Sketcher_1 creation
Sketcher_1 = geompy.MakeSketcher("Sketcher:F 100 -57.7:TT 100 57.7:TT 0 115.47:TT -100 57.7:TT -100 -57.7:TT 0 -115.47:WW")
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
# Create several objects
obj1 = geompy.MakeVertex(0.,0.,0.)
barier_height = 7.0
barier_radius = 5.6 / 2 # Rayon de la bariere
colis_radius = 1.0 / 2 # Rayon du colis
-colis_step = 2.0 # Distance s\89parant deux colis
+colis_step = 2.0 # Distance s�parant deux colis
cc_width = 0.11 # Epaisseur du complement de colisage
# --
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
boolean_common = 1
boolean_cut = 2
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
vecx = geompy.MakeVectorDXDYDZ(1.,0.,0.)
vecy = geompy.MakeVectorDXDYDZ(0.,1.,0.)
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
vecx = geompy.MakeVectorDXDYDZ(1.,0.,0.)
# import couplex2_01_GEOM
# reload(couplex2_01_GEOM)
# Dimensions de alveolus
-# Parall\89pip\88de rectangle de taille alDx, alDy, alDz
+# Parall�pip�de rectangle de taille alDx, alDy, alDz
#
alDx = 2.5
alDy = 20.0
alSepx = 18.0
# Dimensions de backfill
-# Parall\89pip\88de rectangle de taille baDx, baDy, baDz
+# Parall�pip�de rectangle de taille baDx, baDy, baDz
baDx = 27.0
baDy = 4.8
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
# -- Construction de backfill
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
-# -- Dimensions de la boite enti\88re
+# -- Dimensions de la boite enti�re
LX, LY, LZ = 300.0, 150.0, 150.0
p0 = geompy.MakeVertex(0.,0.,0.)
vy = geompy.MakeVectorDXDYDZ(0.,1.,0.)
-# -- D\89finition du plan de sym\89trie (O,Ox,Oz)
+# -- D�finition du plan de sym�trie (O,Ox,Oz)
symPlane = geompy.MakePlane(p0, vy, 10.0)
# -- Galerie perpendiculaire
# -- Dimensions de la galerie perpendiculaire
-# -- La longueur est compt\89e \80 partir du centre
+# -- La longueur est compt�e � partir du centre
# -- de la galerie principale
gpe_long, gpe_diam = 200.0, 60.0
gpe = geompy.MakeTranslation(gpe, gpe_x, 0, 0)
# -- Dimensions d'une alveole
-# -- Construction d'une alv\89ole
+# -- Construction d'une alv�ole
alv_long, alv_diam = 60.0, 18.0
alv01 = geompy.MakeCylinder(p0, vy, alv_diam/2, alv_long)
alv02 = geompy.MakeMirrorByPlane(alv01, symPlane)
alv0 = geompy.MakeCompound([alv01, alv02])
-# -- Construction des alv\89oles
+# -- Construction des alv�oles
alv_del, alv_sep = 40.0, 35.0
alv1 = geompy.MakeTranslation(alv0, gal_x-gal_diam/2-alv_sep, 0.0, 0.0)
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
#SKETCHER INFOS
#Init Sketcher
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
import math
import GEOM_Spanner
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
geomgui = salome.ImportComponentGUI("GEOM")
import salome_ComponentGUI
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
ind = 0
boxlist = []
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
import math
geom = salome.lcc.FindOrLoadComponent("FactoryServer", "GEOM")
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
import math
from time import sleep
import salome_ComponentGUI
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
import math
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
#Create Points
BasicOp = geompy.GetIBasicOperations()
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
ind = 1
circlelist = []
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
data_dir = os.getenv('DATA_DIR')
if data_dir:
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
import math
#Variables modifiables
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
# Interface with geometry
# -----------------------
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
#
# base de l'assemblage
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
#
# base de l'assemblage
#
#
import salome
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
import math
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
#Points creation (2.2)
Vertex_1 = geompy.MakeVertex(0, 0, 0)
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
import os
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
# Stage 2: "Creation of geometry"
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
#Points creation (2.2)
Vertex_1 = geompy.MakeVertex(0, 0, 0)
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
#Box creation (2.2)
Box_1 = geompy.MakeBoxDXDYDZ(200, 400, 300)
## @code
## import salome
## from salome.geom import geomBuilder
-## geompy = geomBuilder.New(salome.myStudy)
+## geompy = geomBuilder.New()
## box = geompy.MakeBoxDXDYDZ(100, 100, 100) # box is not published in the study yet
## geompy.addToStudy(box, "box") # explicit publishing
## @endcode
## @code
## import salome
## from salome.geom import geomBuilder
-## geompy = geomBuilder.New(salome.myStudy)
+## geompy = geomBuilder.New()
## geompy.addToStudyAuto() # enable automatic publication
## box = geompy.MakeBoxDXDYDZ(100, 100, 100)
## # the box is created and published in the study with default name
## @code
## import salome
## from salome.geom import geomBuilder
-## geompy = geomBuilder.New(salome.myStudy)
+## geompy = geomBuilder.New()
## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "Box")
## # the box was created and published in the study
## folder = geompy.NewFolder("Primitives")
## For example,
## \code
## from salome.geom import geomBuilder
-## geompy = geomBuilder.New(salome.myStudy)
+## geompy = geomBuilder.New()
## texture = geompy.readtexture('mytexture.dat')
## texture = geompy.AddTexture(*texture)
## obj.SetMarkerTexture(texture)
Example of usage:
from salome.geom import geomBuilder
- geompy = geomBuilder.New(salome.myStudy)
+ geompy = geomBuilder.New()
texture = geompy.readtexture('mytexture.dat')
texture = geompy.AddTexture(*texture)
obj.SetMarkerTexture(texture)
# import salome
# salome.salome_init()
# from salome.geom import geomBuilder
-# geompy = geomBuilder.New(salome.myStudy)
+# geompy = geomBuilder.New()
# \endcode
-# @param study SALOME study, generally obtained by salome.myStudy.
# @param instance CORBA proxy of GEOM Engine. If None, the default Engine is used.
# @return geomBuilder instance
-def New( study, instance=None):
+def New( instance=None):
"""
Create a new geomBuilder instance.The geomBuilder class provides the Python
interface to GEOM operations.
import salome
salome.salome_init()
from salome.geom import geomBuilder
- geompy = geomBuilder.New(salome.myStudy)
+ geompy = geomBuilder.New()
Parameters:
- study SALOME study, generally obtained by salome.myStudy.
instance CORBA proxy of GEOM Engine. If None, the default Engine is used.
Returns:
geomBuilder instance
doLcc = True
geom = geomBuilder()
assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
- geom.init_geom(study)
+ geom.init_geom()
return geom
try:
# get GEOM engine and initialize GEOM with current study
engineGeom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
- geom = geomBuilder.New(salome.myStudy, engineGeom)
+ geom = geomBuilder.New(engineGeom)
# export the methods of geomBuilder
for k in dir( geom ):
-------
import geompy
-geompy.init_geom(theStudy)
+geompy.init_geom()
with
----
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
See also GEOM User's Guide for more details
# @code
# import GEOM
# from salome.geom import geomBuilder
-# geompy = geomBuilder.New(salome.myStudy)
+# geompy = geomBuilder.New()
#
# # create a wire for sketcher
# geomObj_1 = geompy.MakeMarker(0, 0, 0, 1, 0, 0, 0, 1, 0)
with_solid = True
global geompy
- geompy = geomBuilder.New(salome.myStudy)
+ geompy = geomBuilder.New()
O = geompy.MakeVertex(0, 0, 0)
OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
def test_t_shape_builder():
"""For testing purpose"""
salome.salome_init()
- geompy = geomBuilder.New(salome.myStudy)
+ geompy = geomBuilder.New()
for r1 in [1., 100.]:
for r2 in [0.9*r1, 0.5*r1, 0.1*r1, 0.05*r1]:
for thickness in [r1/100., r1/10., r1/2.]: