Working with coordinates in scripts

Do you have a question you want to ask an existing QCAD user about QCAD and what you can do with it? Do you want to know if a particular feature exists? This is the place to ask.

Moderator: andrew

Working with coordinates in scripts

Postby ortizj » Sun Jun 28, 2009 8:25 am

I am considering purchasing the professional version of QCad and would like to clarify the issue of the subject before purchase.

Is it possible to use scripts to create a function that allows selection of a number of 'points' (end-points, intersections, etc...) from an existing drawing in order to process them -within the script- and to create a text file containing the coordinates (X,Y) of the selected points in an specific format?

e.g.
1) Drawing containing a rectangle (I intend to create scripts to deal with more complex drawings)
2) Rectangle coordinates are <0,0>, <10,0>, <10,4>, <0,4>
3) I wish to create a script that allow me to sequentially select, using the snap options, the four corners of the rectangle. Once I finish selecting points, the script is meant to process the information of the coordinates and to produce a text file like this:

'Beginning of text fle
# Selected coordinates:
V1: X[0], Y[0]
V2: X[10], Y[0]
V3: X[10], Y[4]
V4: X[0], Y[4]
# End of Vertex
'End of text file

This is a simplification of the feature I need. I would also like to configure the script to ask for scale factors, name to assign to collection of vertex, etc... The script would add this information to the text file or would modify the coordinates values with the relevant scale factor, etc...

Thank you for considering this issue. Hope I didn't get into unnecessary details.

Regards,

ortizj
ortizj
Registered Member
 
Posts: 1
Joined: Sun Jun 28, 2009 8:02 am

Return to Pre-sales Questions

Who is online

Users browsing this forum: No registered users and 1 guest

cron