yucad3d

File I/O

yucad reads and writes AutoCAD DXF (round-trip fidelity with AutoCAD itself) and its own native .yuc container. The file extension selects the format.

CadFileOpen(dwg, hWin, "in.dxf");     // or in.yuc
CadFileSaveAs(dwg, hWin, "out.dxf");  // or out.yuc

Formats by extension

ExtensionBehaviour
.dxf (or none)AutoCAD DXF (R2000 / AC1015) — the default. Clean-room reader/writer, validated by opening yucad output in AutoCAD.
.yucyucad native container (see below).
.dwgNot yet supported. CadFileSaveAs returns 0 (FALSE) rather than writing DXF content into a .dwg file — an honest failure, not a corrupt file. Real DWG is a planned add-on (external converter / SDK).

The native .yuc format

A versioned binary container. It keeps the drawing at full AutoCAD fidelity (the body is the validated DXF serialization) while adding what DXF can't carry:

Use .yuc for your application's own working files (fastest, loss-less for yucad-specific data); export .dxf for interchange with other CAD tools.

What the reader & writer cover

The layout/viewport and hatch-pattern output were validated by opening yucad-written DXF directly in AutoCAD. When adding to the writer, compare against a genuine AutoCAD export of the same construct rather than guessing group codes.

Raster images

CadAddImage references an external raster file; the DXF carries the IMAGE entity plus the IMAGEDEF/IMAGEDEF_REACTOR objects AutoCAD needs. Formats the underlying image loader already handles include JPG, PNG, BMP, GIF, ICO and SVG.