Importing a batch of xy coordinates?

Use this forum to ask questions about how to do things in QCAD 2.1/2.2.

Moderator: andrew

Importing a batch of xy coordinates?

Postby shawner » Sat Sep 13, 2008 3:45 am

Hi- I'm new to CAD and love QCAD so far. I'm designing a kayak, and am trying to use QCAD to 'loft' the form sections; ie, create printable templates. I have a spreadsheet with the cooridinates for each form outline (like this) and would like to be able to import them all at once to plot them, but can't seem to figure out how. Is this possible with QCAD? I've done half of the 18 forms by hand already, but- kind of tedious! Many thanks-
shawner
Registered Member
 
Posts: 2
Joined: Sat Sep 13, 2008 3:30 am
Location: Volcano, Hawaii

Postby andrew » Sat Sep 13, 2008 10:24 am

This depends a lot on the tools you have at hand and what tools and commands you are familiar with.

I would probably convert the spreadsheet to CSV (standard plain text table format) and convert that into a simple DXF file (also plain text). This could be relatively easily done using either macros in a powerful text editor (such as 'vim' or 'Emacs') or with command line utilities (such as 'sed').

In any case, if you can get your point data somehow into this plain text format, you can load this with QCAD:

Code: Select all
0
POINT
10
[X-coordinate of point]
20
[Y-coordinate of point]


For example for two points at (50.0,150.0) and (12.5,25.4), your text file 'example.dxf' would look like this:

Code: Select all
0
POINT
10
50.0
20
150.0
0
POINT
10
12.5
20
25.4
User avatar
andrew
Site Admin
 
Posts: 2515
Joined: Fri Mar 30, 2007 6:07 am

Should of mentioned I'm on OS X 10.5

Postby shawner » Sat Sep 13, 2008 10:42 am

Hmmm. Thanks Andrew- I'll have to snoop around for a Mac text editor that can convert the CSV to a DXF. I'm assuming Word can. I'll give it a try.
shawner
Registered Member
 
Posts: 2
Joined: Sat Sep 13, 2008 3:30 am
Location: Volcano, Hawaii

Re: Should of mentioned I'm on OS X 10.5

Postby andrew » Sat Sep 13, 2008 10:48 am

shawner wrote:I'm assuming Word can. I'll give it a try.


No. I'm talking macro editing here. Of course vim is also available in the Terminal of Mac, but judging from your response I guess you are not familiar with powerful plain text editing tools which probably means you will have to go a manual route.
User avatar
andrew
Site Admin
 
Posts: 2515
Joined: Fri Mar 30, 2007 6:07 am


Return to QCAD 2.1/2.2 'How Do I' Questions

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest