The codec now holds wide EntityType variants boxed (MText, Helix,
Dimension, Hatch, Viewport, MultiLeader, Surface, Table, Ole2Frame,
Light, Extended). Constructors box their entity; nested patterns reach
a dimension through entities::dimension::as_dimension(_mut). Also
follows BlockAction::action_ids, LineTypeComplexData::source_flags and
the decimal tab stop with an explicit character.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A block whose content is only 3D solids leaves a marker wire carrying
its insertion snap, and that point counted as drawing extent: a
georeferenced block inserted at the origin made ZOOM E frame the
origin and the model together, 860 km wide. Extents now skip those
markers; the solids count through their meshes. The marker's snap also
took the insertion point straight from the OCS, so a mirrored insert's
snap sat on the far side of the origin.
ZOOM All fitted the limits alone. In a 3D view it is now Zoom
Extents, and in plan it frames the limits together with the extents.
Instanced solids summed their rotated point and translation in f32
before meeting the eye, which cost up to half a metre at survey
coordinates; the large terms now cancel first.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The dimension style, multileader style and Properties pickers listed
every block of the drawing as an arrowhead, and nothing else. They now
list the 19 standard arrowheads (Closed filled, Open, Dot, Architectural
tick, Oblique, Right angle, Datum triangle, …), followed by any user
arrow block the dimension or style already uses. Picking one creates
its block (`_Open`, `_ArchTick`, …) with the geometry the reference
program writes, so other programs draw the same arrow; ODA reads the
saved file cleanly.
`_Small` now draws as the reference's "Dot small blank", a hollow circle
half the arrow size, instead of a small filled triangle.
Also drops a duplicated "DGN Import" catalog entry left by #1810/#1812.
(#1820, #1821)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A radius placed its text where it was clicked, on the line through the
centre and the arc point, whatever DIMTAD said; outside the circle the
line stopped at the text's near edge, so the text sat on the end of the
line. DIMTAD now lifts aligned radius text off that line as it already
does on a diameter, and an outside line runs on under the text to its far
end. A text point already off the line (a file saved elsewhere) is kept
as the text's middle. (#1675)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TEXT and MTEXT objects are merged into one MTEXT (top-down or in
selection order, word-wrapped or one paragraph per object, with the
original pitch kept as line spacing) or each TEXT and MTEXT line becomes
an MTEXT of its own. The SEttings option opens the Combine Text settings
dialog; the settings persist as profile values and are exposed as the
TXT2MTXT* variables and the txt2mtxt_settings automation action.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Gradient stops keep their DWG color book name and book; RGB wins over
ACI in a DXF gradient block in either tag order.
- MTEXT decimal tab stops keep their alignment character.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A dynamic dimension is drawn by its constraint at screen size; without
the constraint it is a bare dimension with stretched extension lines.
Those orphans now stay undrawn and unplotted, as in a viewer (#992).
- First-release drawings keep dynamic dimensions on
*LayerNameForDynamicConstraint; it counts as the dynamic layer.
- The hidden set is refreshed when constraints load, and the loader's
prepared wires (built before that) are not installed while it holds
anything.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Typing a length keeps the start angle and moves the end along the
circle; a length outside (0, 2πr) is ignored (#1408).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An annotative dimension style still stores a DIMSCALE (100 in ACA
templates), but its features are sized by the annotation scale. Using
the stored value drew 3 mm dimension text 300 units tall, burying the
plan under giant digits.
Some templates also store their ratio scales already converted to the
drawing unit (a metre drawing's "1:50" as 1 paper = 0.05 drawing, with
CANNOSCALEVALUE 20). Applying the INSUNITS conversion on top shrank
the annotation multiplier a thousandfold.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dragging a radius dimension's text left the point on the arc where it
was and kinked the line to reach the text. The point on the arc now
follows the text round the centre, as the diameter's already does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reference-only entities (plugin API v9): a scene-scoped, in-memory
designation for plugin-owned display geometry, plus HostNotification
dispatch to native plugins so they can re-mark on DocumentOpened.
Resolves the new DeltaSnapshot site in block_editor.rs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Per the upstream review of the XDATA-based storage: the host no longer writes
its own state into the saved file. The marker record under the host-owned OCS
APPID, the on-first-use APPID registration and the verbatim-EED rewrite
handling are removed; the single source of truth is a scene-scoped in-memory
set of entity handles (Scene::reference_only) that dies with the drawing tab,
so a reopened file starts undesignated and the owning plugin re-marks on the
document-opened notification.
All behaviour sites are unchanged, driven by the set: the wire stamp moves
from an XDATA read to a set lookup threaded through the tessellation
pipelines (tessellate_entity and the dimension text path take the handle set
as a plain parameter), and the pick filters, selection retains and
update/erase refusals read Scene::is_reference_only.
Undo keeps the entity-write contract: set mutations are recorded as explicit
first-touch before/after values on each history delta (the parametric-
constraints channel pattern). A designation inside a plugin push_undo scope
joins it, a scope-less change is one step of its own, an idempotent re-mark
records nothing, erasing a designated entity drops the set entry with the
entity, and undo/redo restores entity and designation together.
The round-trip test is inverted: reference_only_designation_is_not_written_
to_dwg_or_dxf now asserts the marker appears in neither format's bytes, that
no OCS APPID or marker record survives a reload, and that the designation
stays live in memory.
A section volume now shows grips on its top and bottom faces, so its
height is pushed and pulled in place like its sides, not only through
the Properties palette. Live sectioning also cuts MESH, polygon mesh and
polyface mesh objects that close a volume, drawing each as the capped
solid it bounds in every visual style.
Refs #1407
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SLICE now takes MESH, polygon mesh and polyface mesh objects. A mesh
that closes a volume is sliced as a solid, so each side is capped and
becomes a 3D solid. An open mesh, such as a pipe run imported without
end caps, is clipped face by face and each side stays a mesh, open
along the cut. Keeping one side or both works as for solids, in one
undo step.
Refs #1398
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ADJUST gathers raster images or PDF/DWF/DGN underlays (other objects are
dropped silently, pickfirst is used, a mixed set is refused), then asks the
image option (Brightness default) or the underlay option (last used), with
value prompts that offer the image's own value or the session's last
underlay fade/contrast, and Monochrome Yes/No. Invalid values re-prompt.
One undo step. -IMAGEADJUST, PDFADJUST, DWFADJUST and DGNADJUST take one
kind each. Raster image Brightness/Contrast/Fade move to an Image Adjust
section as whole numbers with 0-100 validation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A non-associative hatch's boundary vertex grips now offer Add Vertex and
Remove Vertex next to Stretch, on polyline boundaries and on boundaries
made of line edges alike. Add Vertex inserts the vertex after the picked
one, halfway along the next segment (on the arc for a bulged polyline
segment, splitting its bulge), and lets it be placed like any grip.
Remove Vertex drops it while keeping at least a triangle.
Line-edge boundaries used to show two grips at every corner (one line's
end, the next one's start), so dragging one opened the loop; each corner
is now one grip that moves both ends.
The automation grip_menu_pick action chooses an entry of the open grip
menu, so these edits can be scripted and checked.
Fixes#1058
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every further reference to an already expanded block (a translated copy
of the same definition, at the top level or nested) was materialised as
a full copy of every wire, although the GPU already draws those copies
from one shared source with a per-copy offset. Such a copy is now a
single stub wire holding the shared prototype and its offset (stubs nest
inside prototypes, so nested repeats collapse too).
- The block renderer expands stubs into instance references while it
groups by source, so drawing is unchanged.
- Interaction queries expand only the stubs near the query, so snapping,
picking, window and crossing selection see each copy's geometry.
- Plot, boundary detection, viewport projection and entity_wires() get
fully expanded wires; count and reference-edit recolouring expand the
set while they are active.
- OCS_NO_BLOCK_STUBS turns it off.
A drawing with 480 references to a block of 100 nested 50-line blocks
(2.4M lines) now opens with 11k wires instead of 2.4M: peak memory
5.4 GB -> 0.37 GB, wire assembly 2.4 s -> 36 ms, interaction index
3.7 s -> 23 ms. The viewport, a plotted PDF, snaps and selections are
identical with and without stubs, and on five real drawings the view
renders the same.
Refs #1698, #1542
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Host side of HostApi::set_reference_only: plugin-owned display geometry that
renders and snaps normally but must not be edited or picked by the person at
the screen, while the owning plugin keeps full write access through the host.
- Storage: a human-readable marker value in an XDATA record under the
host-owned OCS APPID (registered on first use; foreign values survive
verbatim; stale verbatim DWG EED is dropped on rewrite), so the flag
round-trips DWG and DXF with the entity and cannot collide with plugin
APPID namespaces.
- Grips: refresh_selected_grips yields none for a reference-only entity and
an active grip edit on a newly designated target is cancelled like a
locked-layer one.
- Picking: a reference-only wire flag extends the snap_only skips in every
hit test, so a click passes through to the editable entity underneath, and
box, window, lasso, fence and select-all gathers skip the designation;
fills, solids and instanced meshes are excluded through the shared
candidate handle set.
- Write policy: built-in user paths treat a reference-only entity like a
locked-layer one (Scene::update_entity / update_entities refuse,
erase_entities skips), while the plugin-owned variants
(update_entity_plugin / erase_entities_plugin, mirroring the
remove_entities editor split) and the whole HostSession surface write
through. The MCP entities read exposes a top-level reference_only boolean
and set_properties refuses with the reference_only failure code.
- Undo: the entity-write contract - a change joins a plugin-opened push_undo
scope, a scope-less change is one undo step of its own, refusals and
idempotent re-marks record nothing.
- Known limit: entities nested inside block instances (the block cache
rebuilds instance wires without the flag).
Evidence: marking_flags_and_unmarking_clears,
foreign_values_under_the_host_app_id_survive, other_apps_are_untouched,
reference_only_refusals_record_no_undo_step,
reference_only_designation_composes_undo_like_entity_writes,
reference_only_survives_dxf_and_dwg_round_trips,
user_paths_refuse_and_plugin_paths_write_reference_only_entities,
select_all_visible_skips_reference_only_entities,
clicks_pass_through_reference_only_wires,
box_selections_skip_reference_only_wires,
entities_records_expose_the_reference_only_designation.
A region's loop area sums its pieces with Curve::chain_area, the
composable share: enclosed_area closes an open polyline by its chord.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- refresh_associative_sweeps runs on every edit and scanned the xdata of
every entity; it now returns at once when no associative swept surface
exists (its application is not registered) and looks at surfaces only.
- An arc's end angle was raised by TAU in a loop, which never ends on a
huge angle from a damaged file; the sweep is taken with rem_euclid.
- The sweep DELOBJ test expected surface sweeps to delete their sources,
which #1663 changed on purpose: an associative surface keeps them.
- codec c9ffcac (opencadcodec #103) adds an explicit viewport-off bit: the
viewport on state is read with is_on() and set with turn_on()/turn_off()
everywhere, so a viewport the file marks off shows off and can be turned
back on from Properties.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The text was placed by its alignment rather than its attachment point,
so text on the left of the landing ran over the leader. It now attaches
by the attachment point, and putting the text on a side (on creation or
by a grip) turns left- or right-justified text to read away from the
leader.
Fixes#1646
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With SOLIDHIST on, UNION, SUBTRACT and INTERSECT no longer reduce the
result's history to a frozen body: each solid's history joins the
result's under a boolean step, in the order the result applied them.
The Properties palette lists a composite's solids under Operand; the one
chosen shows its own geometry rows and grips, placed where it sits in
the composite, and editing it replays the whole tree. A composite read
from a file keeps its saved body; the tree is replayed only on edits.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Center and Quadrant found nothing on a polyline's bulge segments: the
lightweight and heavy polylines carried no snap points for them, and a
polyline split into several wires kept its points on one piece whose box
the others' never reached. Each arc segment now carries its centre and
quadrants, hovering the segment offers its centre, and a wire's box
covers its snap points.
Fixes#1640
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sweep history records in the reference layout.
Pins resolved to upstream: codec bff95f5 (#93, #94, #95, #96, #97 and
review fixes), kernel 6146d31 (#75 and review fixes), graph 9635ba7.
- main already rebuilt an edited table's block; the PR added a second
loop after it that could never fire. Formula refresh and the block
cache bump now live in the one loop.
- Formula refresh copies the drawing only for a table that has a field.
- A field cell lays its text out once and boxes it from those cells.
- A zero text height at one level falls through to the next instead of
ending the lookup.
- Field box constants and BACKGROUND keep their own doc comments.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- One visible-named LRM constant (ttf_glyph) instead of two invisible
literals. Stroke and SDF text skip it, so a right-to-left script the
shaper does not handle no longer gets a 6-unit gap per mark; vertical
MTEXT does not insert it at all.
- Shaped cells keep a cluster the shaper merged into the leading mark.
- The always-false RTL paragraph flag, its indent/anchor branches and the
unused reorder_line_atoms are gone; its test now covers reorder_rtl_runs.
- Underline, overline and strike follow each drawn run of a mixed word.
- Justify/distribute count only the gaps the measured width holds.
- The two RTL alignment tests assert the new left-to-right behaviour;
glyph_boxes keeps its own doc comment.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- UPDATEFIELD stays the command main already had (Select objects, undo,
locale strings); it now takes the PR's reach — a block reference's
attributes and block definition, a table's cell texts — and reports
the fields that really changed. The PR's second implementation and its
duplicate registration are gone.
- FIELDEVAL's range error goes through the locale catalog.
- Field boxes: no slicing inside a character, one layout per multi-line
attribute, and TEXT boxes scale about the annotative reference point
like the glyphs do. Comment and indentation put back where they belong.
- bump_text_hosts classifies every host in one pass over the drawing
instead of scanning all layouts and blocks per host.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The ROMANS advance list was pasted twice; once is enough.
- The stroke-font golden checksum follows TXT's new advances (segment and
vertex counts unchanged).
- The tolerance compartment test checks ink against pen only for symbol
cells: text fonts now advance by the reference's pen, not their ink.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixes:
- Font prompt no longer lists bundled ltypeshp/qcadshp shape files (#1626)
- Wide polylines step at a discontinuous segment width; PEDIT marks the
current vertex; keyword steps refresh the command preview (#1628)
- Radius-0 fillet drops the zero-length segment it left, so the corner
fillets again (#1422)
- FILLET Trim / No trim option (#1558)
- True-colour wires plot in their own colour; colour picker stores the
value it shows (#1621)
- Model tab keeps its page setup; "Save changes to layout" in Model (#1620)
- QNEW default template in Options > Files; .dwt in the open dialog
(#1134, #1113)
- GRIDUNIT / GRIDMODE / PERSPECTIVE variables (#1618, #1524)
- PTYPE (#1433)
- ZOOM nX / nXP (#1465)
- CHSPACE between model and paper space through a viewport (#1428)
- Moving a dimension keeps its automatic text placement
- Shell icon; "&&" button labels (#1554)
- LINETYPE Load from a .lin file (#1588)
- XLINE / RAY hide the crosshair arms (#1437)
- Dynamic-input boxes keep clear of the crosshair and each other (#1546)
- Snap marker colour setting, dark default on light canvases
(#1497, #1229, #1128)
- Dimension style precision as a 0.00 pattern dropdown (#1426)
- Node graph nodes left of the origin no longer clip away (#1592)
- Collapse button in the command history header (#1094)
- Freeze-in-current-viewport toggle in the ribbon layer list (#1466)
- Geometric Center object snap for closed polylines (#1369)
New strings translated in all 21 locales.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New sweep records store the source and placed profile frames, the
default mitred joint, groups 292-294 and a 3D polyline path as a wire
body, so the reference re-evaluates them. Builds against the sweep
history codec and kernel revisions.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The letter spacing after a line's last stroke-font glyph is left out of
the width used for centring and right alignment, so a right-aligned
line's last stroke sits on the edge as in the reference.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>