5/11/11

How to Build a CAD Program

Computer aided design (CAD) programs are used by draftsmen and architects to produce precise graphical specifications which production crews need to construct a building or other product. Building a CAD program usually involves extensive computer programming in a high-level language such as C++ or Java. One particular programming task is that of converting the graphics that the user draws into data that represents a 3-D object. Advantages of building a CAD program include deeper understanding of 3-D geometry and graphics programming.
    • 1

      Download and install several existing open source (free) CAD programs such as Blender, Art of Illusion and Archimedes.

    • 2

      Run each program one by one. As you do so, write down answers to these questions: "What features of this CAD program do I want for my program? What features do I not need?" Write answers to other questions that come to mind. The more precise you can make your answers, the easier it will be to implement these features when writing the source code.

    • 3

      Download, from the site containing the executable CAD program, the program's source code files. The archive file containing these source files will include documentation for building the executable from the source files.

    • 4

      Read the documentation for building the CAD program. The documentation will mention in its beginning paragraphs the language used to develop the program.

    • 5

      Install a compiler for the language that you noted in Step 4. A Java compiler is available from Oracle's JDK (Java Development Kit) download page. A Ruby on Rails compiler is available from the Ruby on Rails site.

    • 6

      Compile the CAD program, using the instructions in the archive you downloaded in Step 3. Read also the compiler's documentation, which you obtained in the Step 5. Run the program to verify that your compilation was successful.

    • 7

      Ope, each of the CAD program's source files in a word processor and print each file.

    • 8

      Type each of the source printouts that you made in the previous step into a new set of source files in your word processor. Read the printed source as you type. Typing the source begins to show you how the program performs the functions available in its user interface. Recompile the CAD program to verify your typing.

    • 9

      Delete any of the source files, then retype as much of it from memory as you can. Repeat this step until you can type the source without reference to the printout. This step will provide enough understanding of the CAD program to let you edit its source code.

    • 10

      Write the source code for one of the features or other program changes that you made notes for in Step 2. Recompile the CAD program, then trace through it (i.e. run each statement one by one) to detect and correct any "bugs" (errors). Read the compiler's documentation for detailed instructions on using the compiler's debugging tools, including its trace execution mode.

    • 11

      Write the source code for the remaining items that you wrote in Step 2 to complete your CAD program.

  • No comments: