BAD_TESTS = \
3dsketcher.py \
angle.py \
- blocks_operations_ex03.py \
complex_objs_ex06.py \
- free_boundaries.py \
- import_export.py \
- primitives_ex06.py \
- repairing_operations_ex05.py \
- repairing_operations_ex09.py \
- viewing_geom_objs_ex04.py
+ repairing_operations_ex09.py
GOOD_TESTS = \
advanced_geom_objs_ex01.py \
basic_properties.py \
blocks_operations_ex01.py \
blocks_operations_ex02.py \
+ blocks_operations_ex03.py \
boolean_operations_ex01.py \
boolean_operations_ex02.py \
boolean_operations_ex03.py \
complex_objs_ex08.py \
complex_objs_ex09.py \
complex_objs_ex10.py \
+ free_boundaries.py \
free_faces.py \
get_non_blocks.py \
+ import_export.py \
inertia.py \
min_distance.py \
normal_face.py \
primitives_ex03.py \
primitives_ex04.py \
primitives_ex05.py \
+ primitives_ex06.py \
primitives_ex07.py \
repairing_operations_ex01.py \
repairing_operations_ex02.py \
repairing_operations_ex03.py \
repairing_operations_ex04.py \
+ repairing_operations_ex05.py \
repairing_operations_ex06.py \
repairing_operations_ex07.py \
repairing_operations_ex08.py \
viewing_geom_objs_ex01.py \
viewing_geom_objs_ex02.py \
viewing_geom_objs_ex03.py \
+ viewing_geom_objs_ex04.py \
whatis.py \
working_with_groups_ex01.py \
working_with_groups_ex02.py \
import salome
# create a box
-box = geompy.MakeBoxDXDYDZ(200, 200, 200)
+check_box = geompy.MakeBoxDXDYDZ(200, 200, 200)
# build all possible propagation groups
listChains = geompy.Propagate(check_box)
# create path
WirePath = 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])
+# get sub-shapes
+edges = geompy.SubShapeAll(WirePath, geompy.ShapeType["EDGE"])
+vertices = geompy.SubShapeAll(WirePath, geompy.ShapeType["VERTEX"])
+
+
#=======================================================
# Create shell sections
#=======================================================
-ps = [Vertex_1,Vertex_2,Vertex_3,Vertex_4]
-theLocations = [Vertex_1, Vertex_2, Vertex_3, Vertex_4]
+ps = [vertices[0],vertices[1],vertices[2],vertices[3]]
+theLocations = [vertices[0],vertices[1],vertices[2],vertices[3]]
VC = geompy.MakeCompound(theLocations)
geompy.addToStudy(VC,"VC")
-vs = [Edge_1,Edge_1,Edge_3,Edge_3]
+vs = [edges[0],edges[0],edges[2],edges[2]]
hs = [20,40,30,20]
shells = []
subbases = []
w = geompy.MakeSketcher("Sketcher:F 20 20:TT 0 20:TT 0 0:TT 20 0",
[c1[0], c1[1], c1[2], nx, ny, nz, 0, 0, 1])
[e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"])
-arc = MakeArc(w,3,-1)
+arc = geompy.MakeArc(w,3,-1)
w = geompy.MakeWire([e1,e2,e3,arc])
f1 = geompy.MakeFace(w,1)
# display disks
gg.createAndDisplayGO(id_vxy)
gg.createAndDisplayGO(id_disk1)
-gg.createAndDisplayGO(id_diks2)
-gg.createAndDisplayGO(id_diks3)
+gg.createAndDisplayGO(id_disk2)
+gg.createAndDisplayGO(id_disk3)
# remove one face from the shape
cut_without_f_2 = geompy.SuppressFaces(cut, [f_2])
-# get wires as sub-shapes
-wires = []
-wires = geompy.SubShapeAllSortedCentres(cut_without_f_2, geompy.ShapeType["WIRE"])
-w_0 = geompy.GetSubShapeID(cut_without_f_2, wires[0])
+# get edges as sub-shapes
+edges = []
+edges = geompy.SubShapeAllSortedCentres(cut_without_f_2, geompy.ShapeType["EDGE"])
+e_2 = geompy.GetSubShapeID(cut_without_f_2, edges[2])
-# suppress the selected wire
-result = geompy.SuppressHoles(cut_without_f_2, [w_0])
+# suppress a hole using the selected edge
+result = geompy.SuppressHoles(cut_without_f_2, [e_2])
# add objects in the study
id_cut = geompy.addToStudy(cut, "Cut")
# Limit Tolerance
import geompy
+import salome
gg = salome.ImportComponentGUI("GEOM")
# import initial topology
import salome
import geompy
+import GEOM
-texture = geompy.LoadTexture("/users/user/mytexture.dat")
+texture = geompy.LoadTexture(os.getenv("DATA_DIR")+"/Textures/texture1.dat")
v1 = geompy.MakeVertex(0, 0, 0)
v2 = geompy.MakeVertex(100, 0, 0)