Point On Side¶
Point On Side¶
1# select all visible entities
2active_block.select_all()
3
4# delete the selected entities
5active_block.delete_selected()
6
7# move to position 0,0
8active_block.move_ad(100, 0)
9
10# draw a horizontal line
11line1 = active_block.line_ad(0, 0)
12
13# create a vector
14point = impact.creator.vector(50,-1)
15
16# determine the side of the vector in relation
17# to the line
18entity_side = line1.point_on_side(point)
19
20# output the result to the output tool box
21if entity_side == ipEntitySide.esLeft:
22 impact.gui.output_toolbox.add("ipEntitySide.esLeft")
23elif entity_side == ipEntitySide.esRight:
24 impact.gui.output_toolbox.add("ipEntitySide.esRight")
25else:
26 impact.gui.output_toolbox.add("ipEntitySide.esUndefined")