cad-editor/assets/ocad.pgp
Karim Jerbi 236b7756f8 feat(draworder): HATCHTOBACK command and interactive DRAWORDER workflows
Implement the AutoCAD compatible HATCHTOBACK (HB) command and enhance the interactive DRAWORDER command pipeline with comprehensive verb selection and viewport entity picking.

Key implementations and architectural details:

1. HATCHTOBACK command execution
   * Isolates entities belonging to the active layout block record or global space.
   * Filters out entities residing on locked layers using an efficient hash set lookup.
   * Records targeted delta undo operations on SortEntitiesTable objects (~100 bytes) rather than snapshotting full document structures.
   * Performs granular draw depth cache invalidation via Scene::invalidate_draw_depth, preserving existing geometry tessellations and spatial indices.
   * Emits localized user notifications when no qualifying hatch entities are found.

2. Interactive DrawOrderCommand state machine
   * Supports preselected entities as well as interactive on demand selection gathering.
   * Implements subverb selection supporting single character shortcuts (A for Above, U for Under, F for Front, B for Back) and case insensitive keyword parsing.
   * Enables interactive reference object picking directly in the viewport via needs_entity_pick and on_entity_pick callbacks.
   * Supports hexadecimal handle specification directly from the command line interface.

3. Ecosystem and system integration
   * Bumps DEFAULT_ALIASES_VERSION from 2 to 3 to register the HB alias while preserving existing user overrides.
   * Integrates HATCHTOBACK and HB into dynamic autocomplete registries.
   * Adds localized message strings across all 20 Fluent translation catalogs.
   * Corrects hatch boundary serialization flags to ensure outermost boundary rings consistently carry the external attribute.
2026-08-23 18:56:01 +01:00

183 lines
5 KiB
Text

; OpenCADStudio command aliases.
; Format: ALIAS,*COMMAND (lines starting with ';' are comments)
; Edit here or via the ALIASEDIT command. One alias per line.
;
; This file is the single source of truth for command-line aliases. It is
; copied to your user config folder on first launch; edit that copy (or use
; ALIASEDIT) to add, remap, or remove aliases.
; ── Draw ──────────────────────────────────────────────────────────────────
L, *LINE
ML, *MLINE
PL, *PLINE
A, *ARC
C, *CIRCLE
B, *BLOCK
I, *INSERT
DO, *DONUT
EL, *ELLIPSE
PO, *POINT
SPL, *SPLINE
H, *HATCH
BH, *HATCH
HE, *HATCHEDIT
HB, *HATCHTOBACK
BO, *BOUNDARY
GD, *GRADIENT
XL, *XLINE
POL, *POLYGON
REC, *RECT
SO, *SOLID
WO, *WIPEOUT
; ── Modify ────────────────────────────────────────────────────────────────
M, *MOVE
CO, *COPY
CP, *COPY
RO, *ROTATE
SC, *SCALE
MI, *MIRROR
E, *ERASE
X, *EXPLODE
SS, *STRETCH
S, *STRETCH
O, *OFFSET
TR, *TRIM
EX, *EXTEND
F, *FILLET
CHA, *CHAMFER
J, *JOIN
BR, *BREAK
BAP, *BREAKATPOINT
PE, *PEDIT
SPE, *SPLINEDIT
LEN, *LENGTHEN
AL, *ALIGN
AR, *ARRAY
MA, *MATCHPROP
ATE, *ATTEDIT
; ── Clipboard ─────────────────────────────────────────────────────────────
CC, *COPYCLIP
CX, *CUTCLIP
PC, *PASTECLIP
; ── Blocks / references ───────────────────────────────────────────────────
ATT, *ATTDEF
BE, *BEDIT
IAT, *IMAGEATTACH
XA, *XATTACH
XR, *XREF
ADC, *ADCENTER
W, *WBLOCK
; ── Layers / groups ───────────────────────────────────────────────────────
LA, *LAYERS
G, *GROUP
UG, *UNGROUP
; ── Dimensions / annotation ───────────────────────────────────────────────
D, *DIMSTYLE
DAL, *DIMALIGNED
DAN, *DIMANGULAR
DDI, *DIMDIAMETER
DLI, *DIMLINEAR
DRA, *DIMRADIUS
DOR, *DIMORDINATE
DBA, *DIMBASELINE
DCO, *DIMCONTINUE
DED, *DIMEDIT
DBR, *DIMBREAK
DJL, *DIMJOGLINE
DJO, *DIMJOGGED
JOG, *DIMJOGGED
DCE, *DIMCENTER
LE, *LEADER
QL, *QLEADER
MLD, *MLEADER
MLA, *MLEADERADD
MLR, *MLEADERREMOVE
MLAL, *MLEADERALIGN
MLC, *MLEADERCOLLECT
MLS, *MLEADERSTYLE
MT, *MTEXT
DT, *TEXT
T, *TEXT
ED, *DDEDIT
TOL, *TOLERANCE
TB, *TABLE
ST, *STYLE
; ── Inquiry / selection ───────────────────────────────────────────────────
AA, *AREA
DI, *DIST
DIV, *DIVIDE
ME, *MEASURE
MEA, *MEASUREGEOM
LI, *LIST
SA, *SELECTALL
DE, *DESELECT
QS, *QSELECT
FI, *FILTER
; ── View / display ────────────────────────────────────────────────────────
Z, *ZOOM
P, *PAN
U, *UNDO
PR, *PROPERTIES
CH, *PROPERTIES
MO, *PROPERTIES
UN, *UNITS
TP, *TOOLPALETTES
SSM, *SHEETSET
HI, *HIDE
R, *REDRAW
RA, *REDRAWALL
RE, *REGEN
REA, *REGENALL
3O, *3DORBIT
ORBIT, *3DORBIT
MV, *MVIEW
MS, *MSPACE
PS, *PSPACE
PW, *PLOTWINDOW
QP, *QUICKPRINT
V, *VIEW
VSM, *VISUALSTYLES
CUBE, *NAVVCUBE
FSHOT, *FLATSHOT
SHA, *SHADEMODE
; ── Settings / properties
COL, *COLOR
DR, *DRAWORDER
DS, *DSETTINGS
LT, *LINETYPE
LTS, *LTSCALE
OS, *OSNAP
PU, *PURGE
REN, *RENAME
SET, *SETVAR
SN, *SNAP
TH, *THICKNESS
UNHIDE, *UNISOLATEOBJECTS
; ── File / data
DL, *DATALINK
DX, *DATAEXTRACTION
EPDF, *EXPORTPDF
EXP, *EXPORT
ZIP, *ETRANSMIT
; ── 3D solids ─────────────────────────────────────────────────────────────
EXT, *EXTRUDE
REV, *REVOLVE
INF, *INTERFERE
CYL, *CYLINDER
IN, *INTERSECT
PSOLID, *POLYSOLID
SEC, *SECTION
SU, *SUBTRACT
TOR, *TORUS
UNI, *UNION
WE, *WEDGE