Notifications
Clear all

[Closed] How to draw a poly

I have a question,

How to draw a poly, drag mouse, Pass two points .

4 Replies

could u eventually discrpe your problem more eyactly???

Sorry, my english is poor

My mean is I want to draw a poly like draw rectangle

i think my english is mutch more worse than yours…

i´ll have a look about it…
TGM

Ok, u have to use the “mouse tool” declared as following:

tool draw_polys
(
on mousePoint button do
(
if button==1 then –left klicked??
(

      )  
 )

)

and then use the “gridPoint” command for getting the position of the mouse klick, safing it into a variable, wait for the next klick, generate the mixed points, i mean p3 = [p1.x, p2.y] p4 = [p2.x, p1.y] or something like this…

then create a quadpoly between this resulting 4 points with the
polyOp.createPolygon <Poly poly> <vertex array>
command

hope this helps
TGM