Intersect Entity¶
Intersect Entity¶
1# Get the active block
2my_block = impact.active_drawing.active_layer.active_block
3
4# Get two entities from the block
5e1 = my_block.entities.item(1)
6e2 = my_block.entities.item(2)
7
8points = None
9i = None
10
11# get the points at which the two entities
12# intersect
13points = e1.intersect_entity(e2, ipIntersectType.itSeg1Seg2)
14
15# display the points
16for i in range(0, len(points) - 1 + 1):
17 impact.gui.output_toolbox.add(points[i].X)
18 impact.gui.output_toolbox.add(points[i].Y)
19