3 \page tui_complex_objs_page Complex Objects
5 \anchor tui_creation_prism
6 <br><h2>Creation of a Prism</h2>
11 gg = salome.ImportComponentGUI("GEOM")
13 # create a vertex and a vector
14 p1 = geompy.MakeVertex( 0., 0., 0.)
15 p2 = geompy.MakeVertex( 100., 0., 0.)
16 p3 = geompy.MakeVertex( 100., 100., 0.)
17 p4 = geompy.MakeVertex( 0., 100., 0.)
18 p5 = geompy.MakeVertex( 0., 0., 60.)
19 p6 = geompy.MakeVertex(-100., 0., 0.)
20 p7 = geompy.MakeVertex(-100.,-100., 0.)
21 p8 = geompy.MakeVertex( 0.,-100., 0.)
23 # create a vector from the given components
24 vector = geompy.MakeVectorDXDYDZ(50., 50., 50.)
26 #create vectors from two points
27 vector1_arc1 = geompy.MakeVector(p1, p2)
28 vector2_arc1 = geompy.MakeVector(p1, p4)
29 vector1_arc2 = geompy.MakeVector(p1, p6)
30 vector2_arc2 = geompy.MakeVector(p1, p8)
32 # create arcs from three points
33 arc1 = geompy.MakeArc(p2, p3, p4)
34 arc2 = geompy.MakeArc(p6, p7, p8)
37 wire1 = geompy.MakeWire([vector1_arc1, arc1, vector2_arc1])
38 wire2 = geompy.MakeWire([vector1_arc2, arc2, vector2_arc2])
42 face1 = geompy.MakeFace(wire1, isPlanarWanted)
43 face2 = geompy.MakeFace(wire2, isPlanarWanted)
46 prism1 = geompy.MakePrism(face2, p1, p5)
47 prism2 = geompy.MakePrismVecH(face1, vector, 50)
48 prism3 = geompy.MakePrismVecH2Ways(face1, vector, 50)
50 # add objects in the study
51 id_face1 = geompy.addToStudy(face1,"Face1")
52 id_face2 = geompy.addToStudy(face2,"Face2")
53 id_prism1 = geompy.addToStudy(prism1,"Prism1")
54 id_prism2 = geompy.addToStudy(prism2,"Prism2")
55 id_prism3 = geompy.addToStudy(prism3,"Prism3")
58 gg.createAndDisplayGO(id_face1)
59 gg.setDisplayMode(id_face1,1)
60 gg.createAndDisplayGO(id_face2)
61 gg.setDisplayMode(id_face2,1)
62 gg.createAndDisplayGO(id_prism1)
63 gg.setDisplayMode(id_prism1,1)
64 gg.createAndDisplayGO(id_prism2)
65 gg.setDisplayMode(id_prism2,1)
66 gg.createAndDisplayGO(id_prism3)
67 gg.setDisplayMode(id_prism3,1)
70 \anchor tui_creation_revolution
71 <br><h2>Creation of a Revolution</h2>
76 gg = salome.ImportComponentGUI("GEOM")
78 # create a vertex and a vector
79 p1 = geompy.MakeVertex( 10., 10., 10.)
80 p2 = geompy.MakeVertex( 15., 15., 50.)
81 p3 = geompy.MakeVertex( 40., 40., 0.)
83 #create vectors from two points
84 vector1 = geompy.MakeVector(p1, p2)
85 vector2 = geompy.MakeVector(p1, p3)
87 # create a vector from the given components
88 vector3 = geompy.MakeVectorDXDYDZ(-20., -20., 100.)
91 wire = geompy.MakeWire([vector1, vector2])
94 revolution = geompy.MakeRevolution(wire, vector3, 2.3)
96 # add objects in the study
97 id_vector3 = geompy.addToStudy(vector3,"Axis")
98 id_wire = geompy.addToStudy(wire,"Wire")
99 id_revolution = geompy.addToStudy(revolution,"Revolution")
101 # display the vector, the wire and the revolution
102 gg.createAndDisplayGO(id_vector3)
103 gg.createAndDisplayGO(id_wire)
104 gg.createAndDisplayGO(id_revolution)
105 gg.setDisplayMode(id_revolution,1)
108 \anchor tui_creation_filling
109 <br><h2>Creation of a Filling</h2>
114 gg = salome.ImportComponentGUI("GEOM")
122 # create a vertex and a vector
123 p1 = geompy.MakeVertex( -30., -30., 50.)
124 p2 = geompy.MakeVertex( -60., -60., 30.)
125 p3 = geompy.MakeVertex( -30., -30., 10.)
127 # create an arc from three points
128 arc = geompy.MakeArc(p1, p2, p3)
129 ShapeListCompound = []
132 S = geompy.MakeTranslation(arc, i * 50., 0., 0.)
133 ShapeListCompound.append(S)
136 compound = geompy.MakeCompound(ShapeListCompound)
139 filling = geompy.MakeFilling(compound, mindeg, maxdeg, tol3d, tol2d, nbiter)
141 # add objects in the study
142 id_compound = geompy.addToStudy(compound,"Compound")
143 id_filling = geompy.addToStudy(filling,"Filling")
145 # display the compound and the filling
146 gg.createAndDisplayGO(id_compound)
147 gg.createAndDisplayGO(id_filling)
148 gg.setDisplayMode(id_filling,1)
151 \anchor tui_creation_pipe
152 <br><h2>Creation of a Pipe</h2>
157 gg = salome.ImportComponentGUI("GEOM")
160 p0 = geompy.MakeVertex(0. , 0. , 0. )
161 px = geompy.MakeVertex(100., 0. , 0. )
162 py = geompy.MakeVertex(0. , 100., 0. )
163 pz = geompy.MakeVertex(0. , 0. , 100.)
164 pxyz = geompy.MakeVertex(100., 100., 100.)
166 # create a vector from two points
167 vxy = geompy.MakeVector(px, py)
169 # create an arc from three points
170 arc = geompy.MakeArc(py, pz, px)
173 wire = geompy.MakeWire([vxy, arc])
176 edge = geompy.MakeEdge(p0, pxyz)
179 pipe = geompy.MakePipe(wire, edge)
181 # add objects in the study
182 id_wire = geompy.addToStudy(wire,"Wire")
183 id_edge = geompy.addToStudy(edge,"Edge")
184 id_pipe = geompy.addToStudy(pipe,"Pipe")
186 # display the wire, the edge (path) and the pipe
187 gg.createAndDisplayGO(id_wire)
188 gg.createAndDisplayGO(id_edge)
189 gg.createAndDisplayGO(id_pipe)
190 gg.setDisplayMode(id_pipe,1)
193 \anchor tui_creation_pipe_with_diff_sec
194 <br><h2>Creation of a PipeWithDifferentSections</h2>
199 gg = salome.ImportComponentGUI("GEOM")
201 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])
202 edges = geompy.SubShapeAll(Wire_1, geompy.ShapeType["EDGE"])
203 vertices = geompy.SubShapeAll(Wire_1, geompy.ShapeType["VERTEX"])
207 circles.append(geompy.MakeCircle(vertices[0], edges[0], 20))
208 circles.append(geompy.MakeCircle(vertices[1], edges[0], 40))
209 circles.append(geompy.MakeCircle(vertices[2], edges[2], 30))
210 circles.append(geompy.MakeCircle(vertices[3], edges[2], 20))
213 Pipe = geompy.MakePipeWithDifferentSections(circles, vertices, Wire_1, 0, 0)
215 # add objects in the study
216 geompy.addToStudy(circles[0], "circles1")
217 geompy.addToStudy(circles[1], "circles2")
218 geompy.addToStudy(circles[2], "circles3")
219 geompy.addToStudy(circles[3], "circles4")
220 id_wire = geompy.addToStudy(Wire_1, "Path")
221 id_pipe = geompy.addToStudy(Pipe, "Pipe")
223 # display the wire(path) and the pipe
224 gg.createAndDisplayGO(id_wire)
225 gg.createAndDisplayGO(id_pipe)
226 gg.setDisplayMode(id_pipe,1)
229 \anchor tui_creation_pipe_with_shell_sec
230 <br><h2>Creation of a PipeWithShellSections</h2>
235 gg = salome.ImportComponentGUI("GEOM")
238 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])
240 #=======================================================
241 # Create shell sections
242 #=======================================================
243 ps = [Vertex_1,Vertex_2,Vertex_3,Vertex_4]
244 theLocations = [Vertex_1, Vertex_2, Vertex_3, Vertex_4]
245 VC = geompy.MakeCompound(theLocations)
246 geompy.addToStudy(VC,"VC")
247 vs = [Edge_1,Edge_1,Edge_3,Edge_3]
253 c0 = geompy.PointCoordinates(ps[0])
254 c1 = geompy.PointCoordinates(ps[1])
260 f1 = geompy.MakeSketcher("Sketcher:F 0 0:TT 20 0:TT 20 20:TT 0 20:WF",
261 [c0[0], c0[1], c0[2], nx, ny, nz, 0, 0, 1])
262 f2 = geompy.MakeSketcher("Sketcher:F 0 0:TT 0 20:TT -20 20:TT -20 0:WF",
263 [c0[0], c0[1], c0[2], nx, ny, nz, 0, 0, 1])
264 f3 = geompy.MakeSketcher("Sketcher:F 0 0:TT -20 0:TT -20 -20:TT 0 -20:WF",
265 [c0[0], c0[1], c0[2], nx, ny, nz, 0, 0, 1])
266 f4 = geompy.MakeSketcher("Sketcher:F 0 0:TT 0 -20:TT 20 -20:TT 20 0:WF",
267 [c0[0], c0[1], c0[2], nx, ny, nz, 0, 0, 1])
272 shell = geompy.MakeSewing(faces,1.e-6)
274 faces = geompy.SubShapeAllSortedCentres(shell, geompy.ShapeType["FACE"])
275 subbases.append(faces[0])
280 w = geompy.MakeSketcher("Sketcher:F 20 20:TT 0 20:TT 0 0:TT 20 0",
281 [c1[0], c1[1], c1[2], nx, ny, nz, 0, 0, 1])
282 [e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"])
283 arc = MakeArc(w,3,-1)
284 w = geompy.MakeWire([e1,e2,e3,arc])
285 f1 = geompy.MakeFace(w,1)
287 w = geompy.MakeSketcher("Sketcher:F -20 0:TT 0 0:TT 0 20:TT -20 20",
288 [c1[0], c1[1], c1[2], nx, ny, nz, 0, 0, 1])
289 [e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"])
290 arc = MakeArc(w,3,-1)
291 w = geompy.MakeWire([e1,e2,e3,arc])
292 f2 = geompy.MakeFace(w,1)
294 w = geompy.MakeSketcher("Sketcher:F 20 0:TT 0 0:TT 0 -20:TT 20 -20",
295 [c1[0], c1[1], c1[2], nx, ny, nz, 0, 0, 1])
296 [e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"])
297 arc = MakeArc(w,3,-1)
298 w = geompy.MakeWire([e1,e2,e3,arc])
299 f3 = geompy.MakeFace(w,1)
301 w = geompy.MakeSketcher("Sketcher:F -20 -20:TT 0 -20:TT 0 0:TT -20 0",
302 [c1[0], c1[1], c1[2], nx, ny, nz, 0, 0, 1])
303 [e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"])
304 arc = MakeArc(w,3,-1)
305 w = geompy.MakeWire([e1,e2,e3,arc])
306 f4 = geompy.MakeFace(w,1)
312 shell = geompy.MakeSewing(faces,1.e-6)
314 faces = geompy.SubShapeAllSortedCentres(shell, geompy.ShapeType["FACE"])
315 subbases.append(faces[0])
319 c2 = geompy.PointCoordinates(ps[2])
320 c3 = geompy.PointCoordinates(ps[3])
325 w = geompy.MakeSketcher("Sketcher:F 20 20:TT 0 20:TT 0 0:TT 20 0",
326 [c2[0], c2[1], c2[2], nx, ny, nz, 0, 0, 1])
327 [e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"])
329 w = geompy.MakeWire([e1,e2,e3,arc])
330 f1 = geompy.MakeFace(w,1)
332 w = geompy.MakeSketcher("Sketcher:F -20 0:TT 0 0:TT 0 20:TT -20 20",
333 [c2[0], c2[1], c2[2], nx, ny, nz, 0, 0, 1])
334 [e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"])
336 w = geompy.MakeWire([e1,e2,e3,arc])
337 f2 = geompy.MakeFace(w,1)
339 w = geompy.MakeSketcher("Sketcher:F 20 0:TT 0 0:TT 0 -20:TT 20 -20",
340 [c2[0], c2[1], c2[2], nx, ny, nz, 0, 0, 1])
341 [e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"])
343 w = geompy.MakeWire([e1,e2,e3,arc])
344 f3 = geompy.MakeFace(w,1)
346 w = geompy.MakeSketcher("Sketcher:F -20 -20:TT 0 -20:TT 0 0:TT -20 0",
347 [c2[0], c2[1], c2[2], nx, ny, nz, 0, 0, 1])
348 [e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"])
350 w = geompy.MakeWire([e1,e2,e3,arc])
351 f4 = geompy.MakeFace(w,1)
357 shell = geompy.MakeSewing(faces,1.e-6)
359 faces = geompy.SubShapeAllSortedCentres(shell, geompy.ShapeType["FACE"])
360 subbases.append(faces[2])
369 rad = math.sqrt(nx*nx+ny*ny+nz*nz)
370 vc = geompy.MakeVertex(dx,dy,dz)
371 sph = geompy.MakeSpherePntR(vc,rad/kk)
372 shellsph = geompy.SubShapeAll(sph, geompy.ShapeType["SHELL"])
375 vec = geompy.MakeVectorDXDYDZ(0,0,1)
376 ff = geompy.MakePlane(ps[3],vec,40)
378 vp = geompy.MakeVertex(c3[0],c3[1],c3[2]+20)
379 ff = geompy.MakePlane(vp,vec,40)
381 vp = geompy.MakeVertex(c3[0],c3[1],c3[2]-20)
382 ff = geompy.MakePlane(vp,vec,40)
384 vec = geompy.MakeVectorDXDYDZ(1,0,0)
385 ff = geompy.MakePlane(ps[3],vec,40)
387 vp = geompy.MakeVertex(c3[0]+20,c3[1],c3[2])
388 ff = geompy.MakePlane(vp,vec,40)
390 vp = geompy.MakeVertex(c3[0]-20,c3[1],c3[2])
391 ff = geompy.MakePlane(vp,vec,40)
393 aPartition = geompy.MakePartition(shellsph,fs)
394 fs = geompy.SubShapeAllSortedCentres(aPartition, geompy.ShapeType["FACE"])
400 shell = geompy.MakeSewing(faces,1.e-6)
402 faces = geompy.SubShapeAllSortedCentres(shell, geompy.ShapeType["FACE"])
405 #===========================================================
407 #===========================================================
409 Pipe = geompy.MakePipeWithShellSections(shells, subbases, theLocations, WirePath,
410 theWithContact=0, theWithCorrection=0)
412 # add objects in the study
413 resc = geompy.MakeCompound(shells)
414 id_sec = geompy.addToStudy(resc,"sections")
415 id_wire = geompy.addToStudy(WirePath,"WirePath")
416 id_pipe = geompy.addToStudy(Pipe, "Pipe")
418 # display the wire(path), sections and the pipe
419 gg.createAndDisplayGO(id_wire)
420 gg.createAndDisplayGO(id_sec)
421 gg.createAndDisplayGO(id_pipe)
422 gg.setDisplayMode(id_pipe,1)
426 \anchor tui_creation_pipe_without_path
427 <br><h2>Creation of a PipeShellsWithoutPath</h2>
433 gg = salome.ImportComponentGUI("GEOM")
435 # Add a section based on quadrangles
436 # ----------------------------------
437 def section(s, p1, p2=None, p3=None, p4=None):
441 q = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
444 publish(q, "section")
448 # find distance between two points
449 # -------------------------------
451 c1 = geompy.PointCoordinates(p1)
452 c2 = geompy.PointCoordinates(p2)
453 return math.sqrt( (c2[0]-c1[0])*(c2[0]-c1[0]) +
454 (c2[1]-c1[1])*(c2[1]-c1[1]) +
455 (c2[2]-c1[2])*(c2[2]-c1[2]) )
458 # return middle point
459 # -------------------------------
460 def MiddleVert(p1,p2):
461 c1 = geompy.PointCoordinates(p1)
462 c2 = geompy.PointCoordinates(p2)
463 return geompy.MakeVertex( (c2[0]+c1[0])/2, (c2[1]+c1[1])/2, (c2[2]+c1[2])/2 )
467 # result - 16 quads from lines
468 # pnt - point from path
469 # vec - direction from path
470 def MakeComplexSect(pnt,vec,rmax,rmin,nb):
472 cmax = geompy.MakeCircle(pnt,vec,rmax)
473 cmin = geompy.MakeCircle(pnt,vec,rmin)
475 for i in range(0,2*nb,2):
476 p1 = geompy.MakeVertexOnCurve(cmin,dang*i)
477 p2 = geompy.MakeVertexOnCurve(cmax,dang*(i+1))
478 p3 = geompy.MakeVertexOnCurve(cmin,dang*(i+2))
479 f = geompy.MakeQuad4Vertices(pnt,p1,p2,p3)
482 shell = geompy.MakeSewing(faces,1.e-6)
486 #=======================================================
487 # Create simple path and recieve points
488 # for section creation
489 #=======================================================
490 WirePath = geompy.MakeSketcher("Sketcher:F 0 0:T 60 0:T 40 0:R 0:C 100 90:",
491 [0, 0, 0, 0, 0, 1, 1, 0, 0])
492 vs = geompy.SubShapeAll(WirePath, geompy.ShapeType["VERTEX"])
494 #=======================================================
495 # Create shell sections
496 #=======================================================
502 shell = MakeComplexSect(vs[0], geompy.MakeVectorDXDYDZ(1,0,0), 60, 40, 16)
504 vs1 = geompy.SubShapeAllSortedCentres(shell,geompy.ShapeType["VERTEX"])
508 shell = MakeComplexSect(vs[1], geompy.MakeVectorDXDYDZ(1,0,0), 80, 30, 16)
510 vs2 = geompy.SubShapeAllSortedCentres(shell,geompy.ShapeType["VERTEX"])
514 shell = MakeComplexSect(vs[2], geompy.MakeVectorDXDYDZ(1,0,0), 60, 40, 16)
516 vs3 = geompy.SubShapeAllSortedCentres(shell,geompy.ShapeType["VERTEX"])
520 shell = MakeComplexSect(vs[3], geompy.MakeVectorDXDYDZ(0,1,0), 40, 35, 16)
522 vs4 = geompy.SubShapeAllSortedCentres(shell,geompy.ShapeType["VERTEX"])
526 #===========================================================
528 #===========================================================
530 Pipe = geompy.MakePipeShellsWithoutPath(shells,locs)
532 # add objects in the study
533 resc = geompy.MakeCompound(shells)
534 id_sec = geompy.addToStudy(resc,"sections")
535 resl = geompy.MakeCompound(locs)
536 id_loc = geompy.addToStudy(resl,"locations")
537 id_pipe = geompy.addToStudy(Pipe, "Pipe")
539 # display the sections, locations and pipe
540 gg.createAndDisplayGO(id_sec)
541 gg.createAndDisplayGO(id_loc)
542 gg.createAndDisplayGO(id_pipe)
543 gg.setDisplayMode(id_pipe,1)
546 \anchor tui_creation_pipe_binormal_along_vector
547 <br><h2>Creation of a PipeBiNormalAlongVector</h2>
550 def MakeHelix(radius, height, rotation, direction):
552 radius = 1.0 * radius
553 height = 1.0 * height
554 rotation = 1.0 * rotation
560 from math import sqrt
562 length_xy = radius*rotation
563 length = sqrt(length_z*length_z + length_xy*length_xy)
568 z_step = height / nb_steps
569 angle_step = rotation / nb_steps
573 for n in range(nb_steps+1):
574 from math import cos, sin
575 x = radius * cos(angle)
576 y = radius * sin(angle)
577 p = geompy.MakeVertex(x, y, z)
578 helix_points.append( p )
580 angle += direction * angle_step
582 helix = geompy.MakeInterpol(helix_points)
583 length_test = geompy.BasicProperties(helix)[0]
584 prec = abs(length-length_test)/length
585 # print nb_steps, length_test, prec
592 def MakeSpring(radius, height, rotation, direction, thread_radius, base_rotation=0.0):
594 thread_radius = 1.0 * thread_radius
596 helix = MakeHelix(radius, height, rotation, direction)
597 # base in the (Ox, Oz) plane
599 p0 = geompy.MakeVertex(radius-3*thread_radius, 0.0, -thread_radius)
600 p1 = geompy.MakeVertex(radius+3*thread_radius, 0.0, -thread_radius)
601 p2 = geompy.MakeVertex(radius+3*thread_radius, 0.0, +thread_radius)
602 p3 = geompy.MakeVertex(radius-3*thread_radius, 0.0, +thread_radius)
603 e0 = geompy.MakeEdge(p0, p1)
604 e1 = geompy.MakeEdge(p1, p2)
605 e2 = geompy.MakeEdge(p2, p3)
606 e3 = geompy.MakeEdge(p3, p0)
607 w = geompy.MakeWire([e0, e1, e2, e3])
609 base = geompy.MakeFace(w, True)
610 # create a binormal vector
611 binormal = geompy.MakeVectorDXDYDZ(0.0, 0.0, 10.0)
613 spring = geompy.MakePipeBiNormalAlongVector(base, helix, binormal)
614 # Publish in the study
615 geompy.addToStudy(base, "base")
616 geompy.addToStudy(helix, "helix")
617 geompy.addToStudy(binormal, "binormal")
618 geompy.addToStudy(spring, "spring")
623 spring = MakeSpring(50, 100, 2*pi, 1, 5, pi/2)
627 \anchor tui_creation_pipe_path
628 <br><h2>Creation of a Middle Path</h2>
635 Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
637 # Get two opposite faces
638 [Face_1,Face_2] = geompy.SubShapes(Box_1, [31, 33])
641 Box_1_edge_12 = geompy.GetSubShape(Box_1, [12])
642 Box_1_edge_22 = geompy.GetSubShape(Box_1, [22])
643 Box_1_edge_25 = geompy.GetSubShape(Box_1, [25])
644 Box_1_edge_29 = geompy.GetSubShape(Box_1, [29])
645 Box_1_edge_8 = geompy.GetSubShape(Box_1, [8])
646 Box_1_edge_18 = geompy.GetSubShape(Box_1, [18])
647 Box_1_edge_26 = geompy.GetSubShape(Box_1, [26])
648 Box_1_edge_30 = geompy.GetSubShape(Box_1, [30])
650 # These three calls to RestorePath return the same result
651 Path_1 = geompy.RestorePath(Box_1, Face_1, Face_2)
652 Path_2 = geompy.RestorePathEdges(Box_1, [Face_1], [Face_2])
653 Path_3 = geompy.RestorePathEdges(Box_1,
654 [Box_1_edge_12, Box_1_edge_22, Box_1_edge_25, Box_1_edge_29],
655 [Box_1_edge_8, Box_1_edge_18, Box_1_edge_26, Box_1_edge_30])
657 # Publish created objects
658 geompy.addToStudy( Box_1, 'Box_1' )
659 geompy.addToStudyInFather( Box_1, Face_1, 'Face_1' )
660 geompy.addToStudyInFather( Box_1, Face_2, 'Face_2' )
661 geompy.addToStudyInFather( Box_1, Box_1_edge_25, 'Box_1:edge_25' )
662 geompy.addToStudyInFather( Box_1, Box_1_edge_22, 'Box_1:edge_22' )
663 geompy.addToStudyInFather( Box_1, Box_1_edge_12, 'Box_1:edge_12' )
664 geompy.addToStudyInFather( Box_1, Box_1_edge_29, 'Box_1:edge_29' )
665 geompy.addToStudyInFather( Box_1, Box_1_edge_18, 'Box_1:edge_18' )
666 geompy.addToStudyInFather( Box_1, Box_1_edge_26, 'Box_1:edge_26' )
667 geompy.addToStudyInFather( Box_1, Box_1_edge_8, 'Box_1:edge_8' )
668 geompy.addToStudyInFather( Box_1, Box_1_edge_30, 'Box_1:edge_30' )
669 geompy.addToStudy( Path_1, 'Path_1' )
670 geompy.addToStudy( Path_2, 'Path_2' )
671 geompy.addToStudy( Path_3, 'Path_3' )
674 <br><h2>Creation of Tangent Plane On Face</h2>
679 # Create Vertexes for curve
680 Vertex_1 = geompy.MakeVertex(0, 0, 0)
681 Vertex_2 = geompy.MakeVertex(0, 90, 30)
682 Vertex_3 = geompy.MakeVertex(100, 90, 0)
683 Vertex_4 = geompy.MakeVertex(-100, 90, 0)
685 Curve_1 = geompy.MakeInterpol([Vertex_4, Vertex_2, Vertex_3, Vertex_1])
686 # Create Face by Extrusion of the Curve
687 Extrusion_1 = geompy.MakePrismDXDYDZ(Curve_1, 0, 30, -60)
688 # Make Tangent on this Extrusion (Face)
689 Tangent_1 = geompy.MakeTangentPlaneOnFace(Extrusion_1, 0.7, 0.5, 150)
690 # Publish in the study
691 geompy.addToStudy( Vertex_1, "Vertex_1" )
692 geompy.addToStudy( Vertex_2, "Vertex_2" )
693 geompy.addToStudy( Vertex_3, "Vertex_3" )
694 geompy.addToStudy( Vertex_4, "Vertex_4" )
695 geompy.addToStudy( Curve_1, "Curve_1" )
696 geompy.addToStudy( Extrusion_1, "Extrusion_1" )
697 geompy.addToStudy( Tangent_1, "Tangent_1" )