CAD CAM EDM DRO - Yahoo Group Archive

Re: [CAD_CAM_EDM_DRO] Algorithm

on 2002-07-10 12:10:33 UTC
Luc, If you want to do all the work by yourself, the long way would be
to enter the co-ordinates into a 2-column spreadsheet, then do a sort
on the set of columns, based upon the first col, then the second col.
You will quickly see which endpoints 'line up'. Should work for
linears... don't know how you'd handle arcs, etc. But it must be able
to be done, because as far back as version 4.0a, (ca. 1992) DesignCAD
had the capabilities to convert DXF files into line drawings, to exact
scale.

RayHex

----------
> From: Luc Vercruysse <luc.vercruysse@...>
> Hi all,
>
> I do'nt know if this is the right place to put my question ?
> I 'm writing an application that will convert DXF (2D) to G-code
for
> cuttong out contours on a plasma cutter.
>
> I have a list of lines (X,Y coordinates) and I want to find out if
those
> lines make part of a closed contour (so if the endpoint of the
previous line
> fits to the startpoint of the next line). The coordinates are not
sorted.
> Following is an example of two closed rectangles. How do I sort those
> coordinates ?
>
> Line : (26.00,43.50) => (114.00,43.50) (could also be
(114.00,43.50) =>
> (26.00,43.50))
> Line : (114.00,6.50) => (26.00,6.50)
> Line : (140.00,0.00) => (0.00,0.00)
> Line : (0.00,50.00) => (140.00,50.00)
> Line : (0.00,0.00) => (0.00,50.00)
> Line : (26.00,6.50) => (26.00,43.50)
> Line : (114.00,43.50) =>(114.00,6.50)
> Line : (140.00,50.00) => (140.00,0.00)

Discussion Thread

Luc Vercruysse 2002-07-09 14:26:01 UTC Algorithm dumbdrive 2002-07-09 18:23:21 UTC Re: Algorithm Raymond Heckert 2002-07-10 12:10:33 UTC Re: [CAD_CAM_EDM_DRO] Algorithm Luc Vercruysse 2002-07-10 12:34:52 UTC Re: [CAD_CAM_EDM_DRO] Algorithm