Moving from the ODA SDK or LibreDWG
What maps to what, what Rulingpen cannot do yet, and how to check that your drawings come through. Read the gaps first: if you need to write DWG today, stay where you are for now.
Check the gaps first
- Reading and plotting: DWG from Release 1.x to the 2018 format, DXF, plots to PDF, SVG and PNG. This is what Rulingpen does today.
- Not yet: writing DWG, editing, compare, 3D solid modelling, loading external references, C++, .NET, Python or Java bindings. The library is Rust; the command line can be driven from any language.
- Fonts: open stand-ins for AutoCAD's SHX fonts are built in. If your output must match AutoCAD's lettering exactly, supply the fonts you are licensed for (
FontStore::add_dir).
All limitations Supported versions
From the ODA SDK
If your code is built around a database object that you open from a file, walk through tables and object ids, and send to a rendering device, the shape carries over directly; there is less of it.
| You have | In Rulingpen |
|---|---|
| Application services you initialise before anything else | Nothing to initialise. Fonts come from a FontStore you pass to the renderer. |
| A database opened from a file | read_dwg(&bytes, &opts) or read_dxf, giving a plain Drawing value you own. No smart pointers, no open and close modes. |
| Object ids and opening objects by id | Handle (the number AutoCAD shows). Entities sit inside their Block; non-graphical objects are in drawing.objects, found with drawing.object(handle). |
| Symbol tables and their records | drawing.layers, linetypes, text_styles, dim_styles and the rest, referred to by name and compared without regard to case. |
| Block table records, model and paper space | drawing.blocks; drawing.model_space(); drawing.layouts() for paper layouts in tab order. |
| Entity classes and casting | One enum EntityKind: match on Line, Circle, MText and the rest. Common properties are in entity.common. |
| Custom objects you cannot decode | Kept as Other records with every group code (and, for DWG, the raw bytes), so nothing is lost. |
| Audit and recover | Recovery is the default: problems come back as Diagnostics next to the drawing. ReadOptions { strict: true, .. } stops at the first one instead. |
| A vectorisation device for screen or plot | rulingpen_render::render gives a DisplayList; rulingpen_out writes it as PDF, SVG or PNG. To draw on your own canvas, walk the display list. |
| Annual membership, distribution rights tied to it | A yearly licence at a published price; see pricing and the licence agreement. |
From LibreDWG
Most projects use LibreDWG through its programs. These are the nearest rp commands:
| LibreDWG program | Rulingpen |
|---|---|
dwgread with JSON output | rp dump file.dwg: JSON Lines, one record per line, the same shape for DWG and DXF. |
dwglayers | rp dump file.dwg | jq -r 'select(.kind=="layer") | .data.name' |
dwg2SVG | rp plot file.dwg -o file.svg, or -o file.pdf / -o file.png. On the render judge's sample, Rulingpen's picture is closer to AutoCAD's own thumbnail than dwg2SVG's; see the render numbers. |
dwgbmp (the saved preview) | The viewer shows it in its File panel; in the library, rulingpen_dwg::thumbnail(&bytes). |
dwg2dxf, dxf2dwg, dwgwrite | No equivalent yet: Rulingpen does not convert or write DWG. |
The licence is the other difference: LibreDWG is under the GNU GPL; Rulingpen is under a commercial licence written for use inside closed software.
Check your own drawings
- Open a few of your hardest drawings in the free viewer. It names the version of any file it cannot read, and lists what the reader noticed.
- Run
rp infoon a folder of them (free). Exit status 2 marks a file that did not read. - Plot them to PNG (free) and compare with what you get today.
- For a field-by-field comparison, a Developer licence unlocks
rp dump; diff it against your current tool's output.
Questions about a migration: support@rulingpen.dev.