ebylmz / GTUCAD

πŸ“ 2D CAD Library written in C

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ“ GTUCAD

A CAD Library for drawing and manipulating 2D shapes.

alt text

πŸ› οΈ COMPILING

To compile the library and test files, use the provided makefile.

🧱 IMPLEMENTATION

The repository features a variety of data structures, including:

  • πŸ›οΈ CAD2D: This data structure holds CAD content and handles export/import operations.

  • 🌳 Hierarchy: It establishes hierarchical relationships among CAD entities, ensuring uniqueness through Hash-Table with linear probing.

  • ✏️ Entity: Entities like polylines, rectangles, and text are stored here, each with a unique label for customization.

  • 🏷️ Label: Data structures to specify entities, ensuring uniqueness through Hash-Table.

CAD content can be exported in EPS or GTUCAD formats, while GTUCAD format is used for importing.

πŸ§ͺ Testing & Examples

All code has been rigorously tested with the Evince application. View test results in the "examples" folder.

After compilation, execute the "test" executable to generate outputs with *.eps and *.gtucad extensions. To view the result of the first test, use the bash command evince test0.eps. To view all examples at once, use evince test*eps.

πŸš€ Optimization

While basic snapping functions are provided, advanced purposes may require additional optimization in the future. Stay tuned for better-snapping functions.

About

πŸ“ 2D CAD Library written in C

License:MIT License


Languages

Language:C 99.8%Language:Makefile 0.2%