Files
cadcraft/docs
SBaksa bc7357ffb8 UCS: the UCS command, and points, angles and coordinates in the current UCS (part of #1106)
A current user coordinate system, per space: model space's in the header
(UCSORG, UCSXDIR, UCSYDIR, UCSNAME), each layout's on the layout. The
drawing stays in world coordinates; a UCS changes how points are read and
shown, so drawing and regenerating cost nothing more.

- UCS: origin, then points on the X axis and the XY plane (the default),
  World, Previous (ten per space), NAmed (Restore, Save, Delete, ?), OBject
  (lines, arcs, circles, polylines, points, text, blocks, 2D solids, 3D
  faces, dimensions), View and Z (UCSAXISANG). X, Y, ZAxis and Face tilt the
  UCS out of the XY plane and say they are not available yet. Tools > New
  UCS > World / Origin / 3 Point / View / Z. A UCS change is undone as an
  edit is.
- Typed points are read in the UCS: x,y from its origin along its axes,
  @dx,dy along its axes, polar angles from its X axis, # absolute in the
  UCS, * and @* world. Every direction prompt (and ANGBASE) is measured
  from the UCS X axis; sizes of angles aren't affected. JSON parameters stay
  in world coordinates.
- Dynamic Input reads and shows its values in the UCS; the status bar, ID
  and DIST show coordinates in it (their JSON results keep world values).
- UCSNAME, UCSORG, UCSXDIR, UCSYDIR, WORLDUCS (read-only), UCSAXISANG and
  UCSICON. UCSICON ON/OFF/Noorigin/ORigin; the icon turns with the UCS, sits
  at its origin when that fits on screen, and has the square only in the
  World UCS. View > UCS Icon > Origin. The ViewCube pill shows the UCS name
  and its menu restores World or a named UCS. The icon takes clicks only at
  the Command prompt, so snaps at the origin reach the drawing.
- AutoLISP: getpoint, getcorner, entsel and getangle answer in the UCS,
  command takes UCS points, trans converts between the WCS, the UCS,
  display coordinates and an object's OCS; entity lists stay in WCS.
- Files: model space's UCS in the header and the shown VPORT (110-112),
  each layout's in its LAYOUT object (13, 16, 17, 345 for a named UCS),
  through DXF and DWG. The DWG bridge drops $UCSNAME: a CADCraft XRECORD
  keeps it, used only while the UCS still is that named one. Broken values
  aren't written back.
- A UCS tilted out of the XY plane read from a file is kept and saved as it
  is; points are read in the World UCS meanwhile, and the user is told once.

Tests: engine (command, every option, previous, named, object rules, undo,
paper space, typed input, directions, displays, variables, UCSICON, tilted,
hostile), LISP (trans, getpoint, command, getangle), files (DXF, DWG twice,
named layout UCS, stale name copy, tilted, broken, hostile), Dynamic Input
and the icon.
2026-10-18 12:06:13 +11:00
..