- pln_np0 = geompy.MakePlane(p0, v_np0, 300)
-
- part_tool_1 = geompy.MakePartition([b0, pln_0pp, pln_0np, pln_p0p, pln_n0p, pln_pp0, pln_np0],
- [],
- [],
- [b0])
-
- pt_pnt_1 = geompy.MakeVertex( 55, 0, 55)
- pt_pnt_2 = geompy.MakeVertex( 0, 55, 55)
- pt_pnt_3 = geompy.MakeVertex(-55, 0, 55)
- pt_pnt_4 = geompy.MakeVertex( 0, -55, 55)
- pt_pnt_5 = geompy.MakeVertex( 55, 55, 0)
- pt_pnt_6 = geompy.MakeVertex( 55, -55, 0)
- pt_pnt_7 = geompy.MakeVertex(-55, 55, 0)
- pt_pnt_8 = geompy.MakeVertex(-55, -55, 0)
- pt_pnt_9 = geompy.MakeVertex( 55, 0, -55)
- pt_pnt_10 = geompy.MakeVertex( 0, 55, -55)
- pt_pnt_11 = geompy.MakeVertex(-55, 0, -55)
- pt_pnt_12 = geompy.MakeVertex( 0, -55, -55)
-
- pt_face_1 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_1)
- pt_face_2 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_2)
- pt_face_3 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_3)
- pt_face_4 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_4)
- pt_face_5 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_5)
- pt_face_6 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_6)
- pt_face_7 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_7)
- pt_face_8 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_8)
- pt_face_9 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_9)
- pt_face_10 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_10)
- pt_face_11 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_11)
- pt_face_12 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_12)
-
- pt_box = geompy.GetBlockNearPoint(part_tool_1, p0)
-
- part_tool = geompy.MakeCompound([pt_face_1, pt_face_4, pt_face_7, pt_face_10,
- pt_face_2, pt_face_5, pt_face_8, pt_face_11,
- pt_face_3, pt_face_6, pt_face_9, pt_face_12, pt_box])
- id_part_tool = geompy.addToStudy(part_tool, "part_tool")
-
- part = geompy.MakePartition([s0], [part_tool])
+ pln_pn0 = geompy.MakePlane(p0, v_pn0, 300)
+ #
+ #part_objs = [b0, pln_0pp, pln_0np, pln_p0p, pln_n0p, pln_pp0, pln_np0]
+ #part_tool_1 = geompy.MakePartition(part_objs, [], [], [b0])
+ #part_tool_1 = geompy.MakePartition(part_objs)
+ #
+ #id_part_tool_1 = geompy.addToStudy(part_tool_1, "part_tool_1")
+ #
+ #pt_pnt_1 = geompy.MakeVertex( 55, 0, 55)
+ #pt_pnt_2 = geompy.MakeVertex( 0, 55, 55)
+ #pt_pnt_3 = geompy.MakeVertex(-55, 0, 55)
+ #pt_pnt_4 = geompy.MakeVertex( 0, -55, 55)
+ #pt_pnt_5 = geompy.MakeVertex( 55, 55, 0)
+ #pt_pnt_6 = geompy.MakeVertex( 55, -55, 0)
+ #pt_pnt_7 = geompy.MakeVertex(-55, 55, 0)
+ #pt_pnt_8 = geompy.MakeVertex(-55, -55, 0)
+ #pt_pnt_9 = geompy.MakeVertex( 55, 0, -55)
+ #pt_pnt_10 = geompy.MakeVertex( 0, 55, -55)
+ #pt_pnt_11 = geompy.MakeVertex(-55, 0, -55)
+ #pt_pnt_12 = geompy.MakeVertex( 0, -55, -55)
+ #
+ #pt_face_1 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_1)
+ #pt_face_2 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_2)
+ #pt_face_3 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_3)
+ #pt_face_4 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_4)
+ #pt_face_5 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_5)
+ #pt_face_6 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_6)
+ #pt_face_7 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_7)
+ #pt_face_8 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_8)
+ #pt_face_9 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_9)
+ #pt_face_10 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_10)
+ #pt_face_11 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_11)
+ #pt_face_12 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_12)
+ #
+ #pt_box = geompy.GetBlockNearPoint(part_tool_1, p0)
+ #
+ #comp_parts = [pt_face_1, pt_face_4, pt_face_7, pt_face_10,
+ # pt_face_2, pt_face_5, pt_face_8, pt_face_11,
+ # #pt_face_3, pt_face_6, pt_face_9, pt_face_12, pt_box]
+ # pt_face_3, pt_face_6, pt_face_9, pt_face_12]
+ #part_tool = geompy.MakeCompound(comp_parts)
+ #id_part_tool = geompy.addToStudy(part_tool, "part_tool")
+ #
+ #part = geompy.MakePartition([s0], [part_tool])
+ #
+ #part_tools = [pt_face_1, pt_face_4, pt_face_7, pt_face_10,
+ # pt_face_2, pt_face_5, pt_face_8, pt_face_11,
+ # pt_face_3, pt_face_6, pt_face_9, pt_face_12, b0]
+ #part = geompy.MakePartition([s0], part_tools)
+
+ p1 = geompy.MakeVertex(50, 0, 0)
+ p2 = geompy.MakeVertex(-50, 0, 0)
+ p3 = geompy.MakeVertex(0, 50, 0)
+ p4 = geompy.MakeVertex(0, -50, 0)
+ p5 = geompy.MakeVertex(0, 0, 50)
+ p6 = geompy.MakeVertex(0, 0, -50)
+
+ plnX1 = geompy.MakePlane(p1, vx, 300)
+ plnX2 = geompy.MakePlane(p2, vx, 300)
+ plnY1 = geompy.MakePlane(p3, vy, 300)
+ plnY2 = geompy.MakePlane(p4, vy, 300)
+ plnZ1 = geompy.MakePlane(p5, vz, 300)
+ plnZ2 = geompy.MakePlane(p6, vz, 300)
+
+ #part = geompy.MakePartition([s0], [plnX1,plnX2,plnY1,plnY2,plnZ1,plnZ2])
+ part = geompy.MakePartition([s0], [plnX1])
+ part = geompy.MakePartition([part], [plnX2])
+ part = geompy.MakePartition([part], [plnY1])
+ part = geompy.MakePartition([part], [plnY2])
+ part = geompy.MakePartition([part], [plnZ1])
+ part = geompy.MakePartition([part], [plnZ2])