6 from salome.geom
import geomBuilder
7 geompy = geomBuilder.New(salome.myStudy)
10 box = geompy.MakeBoxDXDYDZ(100,100,100)
12 cylinder = geompy.MakeCylinderRH(100, 300)
14 isOk, res1, res2 = geompy.FastIntersect(box, cylinder)
16 raise RuntimeError,
"No intersection!"
18 print "\nTwo lists of indexes of sub-shapes localize the intersection:"
22 Ver1 = geompy.MakeVertex(0, 0, 0)
23 Ver2 = geompy.MakeVertex(100, 100, 100)
24 Ver3 = geompy.MakeVertex(100.1, 0, 0)
25 Ver4 = geompy.MakeVertex(200, 200, 200)
26 box1 = geompy.MakeBoxTwoPnt(Ver1, Ver2)
27 box2 = geompy.MakeBoxTwoPnt(Ver3, Ver4)
29 isOk1, aRes1, aRes2 = geompy.FastIntersect(box1, box2, 1.)
31 raise RuntimeError,
"No gaps!"
33 print "\nTwo lists of indexes of sub-shapes localize the gap:"