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