mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-27 15:40:32 +05:00
PR: update documentation and examples
This commit is contained in:
parent
a12132f9b7
commit
f53962865a
@ -1,7 +1,10 @@
|
|||||||
# 3D Sketcher
|
# 3D Sketcher
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# Create a 3D sketcher (wire) on the given points coordinates
|
# Create a 3D sketcher (wire) on the given points coordinates
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of PipeTShape
|
# Creation of PipeTShape
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create PipeTShape object
|
# create PipeTShape object
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
# Creation of DividedDisk
|
# Creation of DividedDisk
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
import GEOM
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create DividedDisk object
|
# create DividedDisk object
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
# Creation of DividedCylinder
|
# Creation of DividedCylinder
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
import GEOM
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create DividedCylinder object
|
# create DividedCylinder object
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
import salome
|
import salome
|
||||||
salome.salome_init()
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
import math
|
import math
|
||||||
import geompy
|
|
||||||
geompy.init_geom(salome.myStudy)
|
|
||||||
|
|
||||||
OX = geompy.MakeVectorDXDYDZ(10, 0,0)
|
OX = geompy.MakeVectorDXDYDZ(10, 0,0)
|
||||||
OXY = geompy.MakeVectorDXDYDZ(10,10,0)
|
OXY = geompy.MakeVectorDXDYDZ(10,10,0)
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of a Point
|
# Creation of a Point
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create vertices
|
# create vertices
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of a Line
|
# Creation of a Line
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create vertices
|
# create vertices
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of a Circle
|
# Creation of a Circle
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create vertices
|
# create vertices
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of an Ellipse
|
# Creation of an Ellipse
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create vertices
|
# create vertices
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of an Arc
|
# Creation of an Arc
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create vertices
|
# create vertices
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of a Curve
|
# Creation of a Curve
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create vertices and vectors
|
# create vertices and vectors
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of a Vector
|
# Creation of a Vector
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create vertices
|
# create vertices
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of a Plane
|
# Creation of a Plane
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create vertices
|
# create vertices
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of a Local Coordinate System
|
# Creation of a Local Coordinate System
|
||||||
|
|
||||||
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
import GEOM
|
import GEOM
|
||||||
import geompy
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
import math
|
import math
|
||||||
import SALOMEDS
|
import SALOMEDS
|
||||||
|
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Partition
|
# Partition
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create a vertex and a vector
|
# create a vertex and a vector
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Archimede
|
# Archimede
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create a vertex and a vector
|
# create a vertex and a vector
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
# Restore presentation parameters and sub-shapes
|
# Restore presentation parameters and sub-shapes
|
||||||
|
|
||||||
import geompy
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
import GEOM
|
import GEOM
|
||||||
import SALOMEDS
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
|
mport SALOMEDS
|
||||||
|
|
||||||
# create a box and a cylinder
|
# create a box and a cylinder
|
||||||
box = geompy.MakeBoxDXDYDZ(200, 200, 200)
|
box = geompy.MakeBoxDXDYDZ(200, 200, 200)
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
# Basic Properties
|
# Basic Properties
|
||||||
|
|
||||||
import geompy
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
import math
|
import math
|
||||||
|
|
||||||
# create a box
|
# create a box
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Multi Transformation
|
# Multi Transformation
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create vertices
|
# create vertices
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Explode on Blocks
|
# Explode on Blocks
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create a box and a sphere
|
# create a box and a sphere
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Propagate
|
# Propagate
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
|
|
||||||
# create a box
|
# create a box
|
||||||
check_box = geompy.MakeBoxDXDYDZ(200, 200, 200)
|
check_box = geompy.MakeBoxDXDYDZ(200, 200, 200)
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Fuse
|
# Fuse
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create a vertex and a vector
|
# create a vertex and a vector
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Common
|
# Common
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create a vertex and a vector
|
# create a vertex and a vector
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Cut
|
# Cut
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create a vertex and a vector
|
# create a vertex and a vector
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Section
|
# Section
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create a vertex and a vector
|
# create a vertex and a vector
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
# Bounding Box
|
# Bounding Box
|
||||||
|
|
||||||
import geompy
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
|
|
||||||
# create a box
|
# create a box
|
||||||
box = geompy.MakeBoxDXDYDZ(100,30,100)
|
box = geompy.MakeBoxDXDYDZ(100,30,100)
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Quadrangle Face
|
# Quadrangle Face
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create vertices
|
# create vertices
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Hexagonal Solid
|
# Hexagonal Solid
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create vertices
|
# create vertices
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
# Center of masses
|
# Center of masses
|
||||||
|
|
||||||
import geompy
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
import math
|
import math
|
||||||
|
|
||||||
# create a box
|
# create a box
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Check Compound of Blocks
|
# Check Compound of Blocks
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create boxes
|
# create boxes
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
# Detect Self-intersections
|
# Detect Self-intersections
|
||||||
|
|
||||||
import geompy
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
|
|
||||||
# create a box
|
# create a box
|
||||||
box = geompy.MakeBoxDXDYDZ(100,30,100)
|
box = geompy.MakeBoxDXDYDZ(100,30,100)
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
# Check Shape
|
# Check Shape
|
||||||
|
|
||||||
import geompy
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
|
|
||||||
# create a box
|
# create a box
|
||||||
box = geompy.MakeBoxDXDYDZ(100,30,100)
|
box = geompy.MakeBoxDXDYDZ(100,30,100)
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of a Prism
|
# Creation of a Prism
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create a vertex and a vector
|
# create a vertex and a vector
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of a Revolution
|
# Creation of a Revolution
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create a vertex and a vector
|
# create a vertex and a vector
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of a Filling
|
# Creation of a Filling
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
mindeg = 2
|
mindeg = 2
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of a Pipe
|
# Creation of a Pipe
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create vertices
|
# create vertices
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of a PipeWithDifferentSections
|
# Creation of a PipeWithDifferentSections
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
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])
|
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])
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of a PipeWithShellSections
|
# Creation of a PipeWithShellSections
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
import math
|
import math
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of a PipeShellsWithoutPath
|
# Creation of a PipeShellsWithoutPath
|
||||||
|
|
||||||
import geompy
|
import salome
|
||||||
import math
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
import salome
|
import salome
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
# Creation of a PipeBiNormalAlongVector
|
# Creation of a PipeBiNormalAlongVector
|
||||||
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
|
|
||||||
def MakeHelix(radius, height, rotation, direction):
|
def MakeHelix(radius, height, rotation, direction):
|
||||||
# - create a helix -
|
# - create a helix -
|
||||||
@ -14,7 +19,6 @@ def MakeHelix(radius, height, rotation, direction):
|
|||||||
length_z = height
|
length_z = height
|
||||||
length_xy = radius*rotation
|
length_xy = radius*rotation
|
||||||
length = sqrt(length_z*length_z + length_xy*length_xy)
|
length = sqrt(length_z*length_z + length_xy*length_xy)
|
||||||
import geompy
|
|
||||||
nb_steps = 1
|
nb_steps = 1
|
||||||
epsilon = 1.0e-6
|
epsilon = 1.0e-6
|
||||||
while 1:
|
while 1:
|
||||||
@ -48,7 +52,6 @@ def MakeSpring(radius, height, rotation, direction, thread_radius, base_rotation
|
|||||||
# create a helix
|
# create a helix
|
||||||
helix = MakeHelix(radius, height, rotation, direction)
|
helix = MakeHelix(radius, height, rotation, direction)
|
||||||
# base in the (Ox, Oz) plane
|
# base in the (Ox, Oz) plane
|
||||||
import geompy
|
|
||||||
p0 = geompy.MakeVertex(radius-3*thread_radius, 0.0, -thread_radius)
|
p0 = geompy.MakeVertex(radius-3*thread_radius, 0.0, -thread_radius)
|
||||||
p1 = geompy.MakeVertex(radius+3*thread_radius, 0.0, -thread_radius)
|
p1 = geompy.MakeVertex(radius+3*thread_radius, 0.0, -thread_radius)
|
||||||
p2 = geompy.MakeVertex(radius+3*thread_radius, 0.0, +thread_radius)
|
p2 = geompy.MakeVertex(radius+3*thread_radius, 0.0, +thread_radius)
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of a Middle Path
|
# Creation of a Middle Path
|
||||||
|
|
||||||
import salome
|
import salome
|
||||||
import geompy
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
|
|
||||||
# Create a box
|
# Create a box
|
||||||
Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
|
Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of Tangent Plane On Face
|
# Creation of Tangent Plane On Face
|
||||||
|
|
||||||
import salome
|
import salome
|
||||||
import geompy
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
|
|
||||||
# Create Vertexes for curve
|
# Create Vertexes for curve
|
||||||
Vertex_1 = geompy.MakeVertex(0, 0, 0)
|
Vertex_1 = geompy.MakeVertex(0, 0, 0)
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
# Check Free Boundaries
|
# Check Free Boundaries
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create boxes
|
# create boxes
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Check Free Faces
|
# Check Free Faces
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create a vertex and a vector
|
# create a vertex and a vector
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Get Non Blocks
|
# Get Non Blocks
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
|
|
||||||
# create solids
|
# create solids
|
||||||
box = geompy.MakeBoxDXDYDZ(100, 100, 100)
|
box = geompy.MakeBoxDXDYDZ(100, 100, 100)
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Import/Export
|
# Import/Export
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
|
|
||||||
# Example of import from IGES using various formats
|
# Example of import from IGES using various formats
|
||||||
|
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Inertia
|
# Inertia
|
||||||
|
|
||||||
import geompy
|
import salome
|
||||||
import math
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
|
|
||||||
# create a box
|
# create a box
|
||||||
box = geompy.MakeBoxDXDYDZ(100,30,100)
|
box = geompy.MakeBoxDXDYDZ(100,30,100)
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
# Minimal Distance
|
# Minimal Distance
|
||||||
|
|
||||||
import geompy
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
|
|
||||||
# Create two curves with three closest points
|
# Create two curves with three closest points
|
||||||
Vertex_1 = geompy.MakeVertex(0, 0, 0)
|
Vertex_1 = geompy.MakeVertex(0, 0, 0)
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
# Normal to a Face
|
# Normal to a Face
|
||||||
|
|
||||||
import geompy
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
import math
|
import math
|
||||||
|
|
||||||
# create a box
|
# create a box
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Using SALOME NoteBook
|
# Using SALOME NoteBook
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
import salome_notebook
|
import salome_notebook
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
# Point Coordinates
|
# Point Coordinates
|
||||||
|
|
||||||
import math
|
import math
|
||||||
import geompy
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
|
|
||||||
# create a point
|
# create a point
|
||||||
point = geompy.MakeVertex(15., 23., 80.)
|
point = geompy.MakeVertex(15., 23., 80.)
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of a Box
|
# Creation of a Box
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create vertices
|
# create vertices
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of a Cylinder
|
# Creation of a Cylinder
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
|
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of a Sphere
|
# Creation of a Sphere
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create a vertex
|
# create a vertex
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of a Torus
|
# Creation of a Torus
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create a vertex and a vector
|
# create a vertex and a vector
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of a Cone
|
# Creation of a Cone
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create a vertex and a vector
|
# create a vertex and a vector
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of a Disk
|
# Creation of a Disk
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create vertices
|
# create vertices
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of a Rectangle
|
# Creation of a Rectangle
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create vertices
|
# create vertices
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Shape Processing
|
# Shape Processing
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create vertices, an edge, an arc, a wire, a face and a prism
|
# create vertices, an edge, an arc, a wire, a face and a prism
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Suppress Faces
|
# Suppress Faces
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create a box
|
# create a box
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Close Contour
|
# Close Contour
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create vertices and vectors
|
# create vertices and vectors
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Suppress Internal Wires
|
# Suppress Internal Wires
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create a vertex and a vector
|
# create a vertex and a vector
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
# Suppress Holes
|
# Suppress Holes
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
import GEOM
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create a vertex and a vector
|
# create a vertex and a vector
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Sewing
|
# Sewing
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
import math
|
import math
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Glue Faces
|
# Glue Faces
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create boxes
|
# create boxes
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Glue Edges
|
# Glue Edges
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create boxes
|
# create boxes
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Limit Tolerance
|
# Limit Tolerance
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# import initial topology with bad tolerances (more than 1e-07)
|
# import initial topology with bad tolerances (more than 1e-07)
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Add Point on Edge
|
# Add Point on Edge
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
|
|
||||||
# create vertices
|
# create vertices
|
||||||
p1 = geompy.MakeVertex(0,0,50)
|
p1 = geompy.MakeVertex(0,0,50)
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Fuse Collinear Edges within a Wire
|
# Fuse Collinear Edges within a Wire
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
|
|
||||||
# create vertices
|
# create vertices
|
||||||
p1 = geompy.MakeVertex(0, 0, 0)
|
p1 = geompy.MakeVertex(0, 0, 0)
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# 2D Sketcher
|
# 2D Sketcher
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create vertices
|
# create vertices
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
# Tolerance
|
# Tolerance
|
||||||
|
|
||||||
import geompy
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
|
|
||||||
# create a box
|
# create a box
|
||||||
box = geompy.MakeBoxDXDYDZ(100,30,100)
|
box = geompy.MakeBoxDXDYDZ(100,30,100)
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of an Edge
|
# Creation of an Edge
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of a Wire
|
# Creation of a Wire
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create vertices
|
# create vertices
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of a Face
|
# Creation of a Face
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create vertices
|
# create vertices
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of a Shell
|
# Creation of a Shell
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
#create vertices
|
#create vertices
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of a Solid
|
# Creation of a Solid
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
#create vertices
|
#create vertices
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of a Compound
|
# Creation of a Compound
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create a vertex and a vector
|
# create a vertex and a vector
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Translation
|
# Translation
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create a vertex and a vector
|
# create a vertex and a vector
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Rotation
|
# Rotation
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
import math
|
import math
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Modify Location
|
# Modify Location
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
import math
|
import math
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Mirror Image
|
# Mirror Image
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create a box
|
# create a box
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Scale Transform
|
# Scale Transform
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create a box and a sphere
|
# create a box and a sphere
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Offset Surface
|
# Offset Surface
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create a box and a sphere
|
# create a box and a sphere
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Projection
|
# Projection
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
|
|
||||||
# create a cylindric face and a curve(edge)
|
# create a cylindric face and a curve(edge)
|
||||||
cylinder = geompy.MakeCylinderRH(100, 300)
|
cylinder = geompy.MakeCylinderRH(100, 300)
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Multi Translation
|
# Multi Translation
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create vertices and vectors
|
# create vertices and vectors
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Multi Rotation
|
# Multi Rotation
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
import math
|
import math
|
||||||
|
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Fillet 2D
|
# Fillet 2D
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create a face in OXY plane
|
# create a face in OXY plane
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Fillet 1D
|
# Fillet 1D
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create box
|
# create box
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Fillet
|
# Fillet
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
radius = 10.
|
radius = 10.
|
||||||
ShapeTypeEdge = geompy.ShapeType["EDGE"]
|
ShapeTypeEdge = geompy.ShapeType["EDGE"]
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Chamfer
|
# Chamfer
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
d1 = 10.
|
d1 = 10.
|
||||||
d2 = 10.
|
d2 = 10.
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Changing Display Mode
|
# Changing Display Mode
|
||||||
|
|
||||||
import salome
|
import salome
|
||||||
import geompy
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
box = geompy.MakeBox(0,0,0, 50,50,50)
|
box = geompy.MakeBox(0,0,0, 50,50,50)
|
||||||
box2 = geompy.MakeBox(-50,-50,-50, 0,0,0)
|
box2 = geompy.MakeBox(-50,-50,-50, 0,0,0)
|
||||||
|
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Changing Color
|
# Changing Color
|
||||||
|
|
||||||
import salome
|
import salome
|
||||||
import geompy
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
box = geompy.MakeBox(0,0,0, 50,50,50)
|
box = geompy.MakeBox(0,0,0, 50,50,50)
|
||||||
|
|
||||||
sphere = geompy.MakeSphere(50,50,50, 30)
|
sphere = geompy.MakeSphere(50,50,50, 30)
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Changing Transparency
|
# Changing Transparency
|
||||||
|
|
||||||
import salome
|
import salome
|
||||||
import geompy
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
|
|
||||||
box = geompy.MakeBox(0,0,0, 50,50,50)
|
box = geompy.MakeBox(0,0,0, 50,50,50)
|
||||||
sphere = geompy.MakeSphere(50,50,50, 30)
|
sphere = geompy.MakeSphere(50,50,50, 30)
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
# Set Point Marker
|
# Set Point Marker
|
||||||
|
|
||||||
import salome
|
import salome
|
||||||
import geompy
|
salome.salome_init()
|
||||||
import GEOM
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
|
|
||||||
texture = geompy.LoadTexture(os.getenv("DATA_DIR")+"/Textures/texture1.dat")
|
texture = geompy.LoadTexture(os.getenv("DATA_DIR")+"/Textures/texture1.dat")
|
||||||
|
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
# What Is
|
# What Is
|
||||||
|
|
||||||
import geompy
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
|
|
||||||
# create a box
|
# create a box
|
||||||
box = geompy.MakeBoxDXDYDZ(100,30,100)
|
box = geompy.MakeBoxDXDYDZ(100,30,100)
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Creation of a group
|
# Creation of a group
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create two vertices
|
# create two vertices
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Adding an object to the group
|
# Adding an object to the group
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create two vertices
|
# create two vertices
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Removing an object from the group
|
# Removing an object from the group
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
gg = salome.ImportComponentGUI("GEOM")
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
# create two vertices
|
# create two vertices
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Union Groups
|
# Union Groups
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
|
|
||||||
# create a box and some groups of faces on it
|
# create a box and some groups of faces on it
|
||||||
Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
|
Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Intersect Groups
|
# Intersect Groups
|
||||||
|
|
||||||
import geompy
|
|
||||||
import salome
|
import salome
|
||||||
|
salome.salome_init()
|
||||||
|
import GEOM
|
||||||
|
from salome.geom import geomBuilder
|
||||||
|
geompy = geomBuilder.New(salome.myStudy)
|
||||||
|
|
||||||
# create a box and some groups of faces on it
|
# create a box and some groups of faces on it
|
||||||
Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
|
Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user