e420af665cc13420b1a02bbd033cf2d8bbf8483c
Stefan Schuermans CAD drawing of first example

Stefan Schuermans authored 11 years ago

1) <?xml version="1.0" encoding="utf-8"?>
Stefan Schuermans first few lines of document...

Stefan Schuermans authored 11 years ago

2) 
Stefan Schuermans CAD drawing of first example

Stefan Schuermans authored 11 years ago

3) <article xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
Stefan Schuermans first few lines of document...

Stefan Schuermans authored 11 years ago

4) 
5)   <title>DXF to NGC Converter: dxfncg</title>
6) 
7) 
Stefan Schuermans CAD drawing of first example

Stefan Schuermans authored 11 years ago

8)   <sect1 xml:id="introduction">
Stefan Schuermans first few lines of document...

Stefan Schuermans authored 11 years ago

9) 
10)     <title>Introduction</title>
11) 
12)     <para>
13) 
Stefan Schuermans CAD drawing of first example

Stefan Schuermans authored 11 years ago

14)       The DXF to NGC converter <emphasis>dxfngc</emphasis> provides a
15)       means to convert 2D technical drawings in DXF file format to G-code
16)       in NGC format used by CNC mills or routers (e.g. LinuxCNC).
Stefan Schuermans first few lines of document...

Stefan Schuermans authored 11 years ago

17) 
18)     </para>
19) 
20)     <para>
21) 
22)       Usually, the 2D drawings in DXF format do not contain enough information
23)       for G-code creation, e.g. about which lines describe the border of a part
Stefan Schuermans CAD drawing of first example

Stefan Schuermans authored 11 years ago

24)       and which lines describe holes.  The diameter of the cutting tool and the
25)       depth of the cut are other examples.  Therefore, dxfngc relies on a
26)       script file to control the G-code generation.  This script is the input
27)       to the tool.  It sets all required parameters, reads the drawing,
28)       controls generation of the G-code and finally writes the output file.
Stefan Schuermans first few lines of document...

Stefan Schuermans authored 11 years ago

29) 
30)     </para>
31) 
32)   </sect1>
33) 
Stefan Schuermans CAD drawing of first example

Stefan Schuermans authored 11 years ago

34)   <sect1 xml:id="first_example">
Stefan Schuermans first few lines of document...

Stefan Schuermans authored 11 years ago

35) 
36)     <title>A first example</title>
37) 
38)     <para>
39) 
Stefan Schuermans CAD drawing of first example

Stefan Schuermans authored 11 years ago

40)       To illustrate the usage of dxfngc, suppose a stencil for a logo shall be
41)       cut with a CNC mill.  The basic shape of the stencil is a circle.  The
42)       logo is formed by two holes with a specific shape (see <xref
43)       linkend="logo_stencil"/>).
Stefan Schuermans first few lines of document...

Stefan Schuermans authored 11 years ago

44) 
45)     </para>
46) 
Stefan Schuermans CAD drawing of first example

Stefan Schuermans authored 11 years ago

47)     <figure xml:id="logo_stencil">
48)       <title>Logo Stencil</title>
49)       <mediaobject>
50)         <imageobject>
51)           <imagedata fileref="logo_stencil.svg" format="SVG" width="30%"/>
52)         </imageobject>
53)       </mediaobject>
54)       <caption>The logo stencil to be cut on the CNC mill.</caption>
55)     </figure>
56) 
Stefan Schuermans first few lines of document...

Stefan Schuermans authored 11 years ago

57)     <para>
58) 
Stefan Schuermans CAD drawing of first example

Stefan Schuermans authored 11 years ago

59)       First, the 2D drawing is created with a CAD program in DXF format.  The
60)       circular border is drawn on layer <parameter>border</parameter> and the
61)       two holes are drawn on layer <parameter>holes</parameter> (see <xref
62)       linkend="logo_drawing"/>).
Stefan Schuermans first few lines of document...

Stefan Schuermans authored 11 years ago

63) 
64)     </para>
65) 
Stefan Schuermans CAD drawing of first example

Stefan Schuermans authored 11 years ago

66)     <figure xml:id="logo_drawing">
67)       <title>Logo Drawing</title>
68)       <mediaobject>
69)         <imageobject>
Stefan Schuermans add grid to CAD drawing

Stefan Schuermans authored 11 years ago

70)           <imagedata fileref="logo_drawing.svg" format="SVG" width="42%"/>
Stefan Schuermans CAD drawing of first example

Stefan Schuermans authored 11 years ago

71)         </imageobject>
72)       </mediaobject>
Stefan Schuermans add grid to CAD drawing

Stefan Schuermans authored 11 years ago

73)       <caption>The CAD drawing of the logo stencil on 10mm grid.
Stefan Schuermans CAD drawing of first example

Stefan Schuermans authored 11 years ago

74)                Border and holes are on separate layers.</caption>
75)     </figure>
76) 
77)     <programlisting>
78) foo();
79) bar();
80)     </programlisting>
81)