Merge from BR_plugins_pbyacs 03/04/2013

This commit is contained in:
vsr 2013-04-04 07:06:43 +00:00
parent a745b833f8
commit 3f9390adf4
144 changed files with 1005 additions and 505 deletions

View File

@ -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

View File

@ -0,0 +1,16 @@
# --- salome initialization
import salome
salome.salome_init()
# --- geom Python interface
import GEOM
from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy)
# --- Create a box and publish it into the salome study
Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
geompy.addToStudy( Box_1, 'Box_1' )
# --- update the study object browser
if salome.sg.hasDesktop():
salome.sg.updateObjBrowser(1)

View File

@ -74,6 +74,7 @@ GOOD_TESTS = \
complex_objs_ex10.py \
free_boundaries.py \
free_faces.py \
GEOM_box.py \
get_non_blocks.py \
import_export.py \
inertia.py \

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
@ -27,13 +30,13 @@ interpol = geompy.MakeInterpol([p0, p1, p2, p3, p4], False)
interpol_tangents = geompy.MakeInterpolWithTangents([p0, p1, p2, p3, p4], v1, v2)
#create a polyline using parametric definition of the basic points
param_polyline = geompy.MakeCurveParametric("t", "sin(t)", "cos(t)", 0., 100., 100, geompy.GEOM.Polyline, theNewMethod=True)
param_polyline = geompy.MakeCurveParametric("t", "sin(t)", "cos(t)", 0., 100., 100, GEOM.Polyline, theNewMethod=True)
# create a bezier curve using parametric definition of the basic points
param_bezier = geompy.MakeCurveParametric("t", "sin(t)", "cos(t)", 0., 100., 20, geompy.GEOM.Bezier, theNewMethod=True)
param_bezier = geompy.MakeCurveParametric("t", "sin(t)", "cos(t)", 0., 100., 20, GEOM.Bezier, theNewMethod=True)
#create a b-spline curve using parametric definition of the basic points
param_interpol = geompy.MakeCurveParametric("t", "sin(t)", "cos(t)", 0., 100., 100, geompy.GEOM.Interpolation, theNewMethod=True)
param_interpol = geompy.MakeCurveParametric("t", "sin(t)", "cos(t)", 0., 100., 100, GEOM.Interpolation, theNewMethod=True)
# add objects in the study

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,7 +1,10 @@
# Restore presentation parameters and sub-shapes
import geompy
import salome
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy)
import SALOMEDS
# create a box and a cylinder

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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])

View File

@ -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")

View File

@ -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")

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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")

View File

@ -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.)

View File

@ -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

View File

@ -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")

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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")

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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")
#

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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")

View File

@ -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")

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
@ -13,7 +16,9 @@ Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
# make fillet at given wire vertices with giver radius
Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
id_Wire_1 = geompy.addToStudy(Wire_1, "Wire_1")
id_Fillet_1D_1= geompy.addToStudy(Fillet_1D_1, "Fillet_1D_1")
# display disks
gg.createAndDisplayGO(Wire_1)
gg.createAndDisplayGO(Fillet_1D_1)
gg.createAndDisplayGO(id_Wire_1)
gg.createAndDisplayGO(id_Fillet_1D_1)

View File

@ -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"]

View File

@ -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.

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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")

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

Some files were not shown because too many files have changed in this diff Show More