#1776 left its dialog in English outside tr-TR and added the
image_adjust automation action without re-pinning the MCP tool schema
digest, which failed tool_schema_digest_is_pinned.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Translate the 159 Sheet Set Manager strings still in English, using the
terms already in the file: Conjunto de planos, plano, Presentación,
espacio modelo / papel. Variables, NEWSHEETSET and file masks are untouched.
The right-edge toolbar of a REFEDIT session now shows the definition
being edited (REFEDITNAME) as an accent pill with the number of objects
in the working set, Add to / Remove from Working Set buttons with their
own icons (REFSET Add / Remove, straight to object selection), and
Save / Discard in a separate group below a rule.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
REFEDIT opens a dialog after the pick: the nesting chain as chips with a
preview of the chosen definition, all objects or picking them in the
drawing, attribute definitions (offered only when the definition has
them), locking objects outside the working set and unique names for an
external reference's named objects. The settings are remembered.
With unique names an xref's dependent layers, linetypes, text styles and
blocks are checked out as $N$NAME records of their own; without, under
the plain name, sharing a host record of that name. Save writes them back
under the reference's names, and the records made for the session are
removed when it closes. -REFEDIT uses the remembered settings.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
IMAGEADJUST (alias IAD) takes the selected raster images or asks
"Select image(s):", then opens a dialog with a before/after preview of
the first image and brightness, contrast and fade rows (bar plus
stepper, whole numbers 0-100). Apply writes the values to every chosen
image as one undo step; restore defaults sets 50/50/0. Adds the
image_adjust automation action and the image-adjust locale group.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In the Block Editor, BVSTATE makes a new visibility state, makes one
current, renames or deletes one; BVHIDE and BVSHOW hide or show the
picked objects in the current state (BVSHOW shows every object of the
block while they are picked). The first use makes the block dynamic.
The states are stored as the format keeps them: a
BLOCKVISIBILITYPARAMETER in the block's ACAD_ENHANCEDBLOCK evaluation
graph with its visibility grip and the grip's two location expressions,
the round-trip purge preventer, AcDbDynamicBlockTrueName /
AcDbDynamicBlockGUID / AcDbBlockRepETag on the definition and element
tags on each of its objects. The definition shows its first state; a
reference given another state gets its own evaluated *U copy, tagged
AcDbBlockRepBTag and linked back through AcDbBlockRepresentation /
AcDbRepData, so it shows that state and the other references do not
change. Saving the block drops erased objects from the states.
Checked: a block authored this way reads back with its states and
reference link from DWG and DXF, and the ODA converter accepts the DWG.
Closes#1566
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep the product name Open CAD Studio, restore the accents of Colinéaire
and Égal, and use the established French terms for the array commands
(Réseau rectangulaire / polaire / trajectoire) and Lissage for loft.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
REFCLOSE Save on an xref replaced the referenced file's model space with
the working set alone. With the Nested selection method the objects that
were not checked out stay in the definition, but they were deleted from
the file on disk. Write back every object of the saved definition, and
copy the file to .bak first when ISAVEBAK is on, as a drawing save does.
Also translate the new REFEDIT prompts into the other 20 locales; the
catalog test requires every locale.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ARRAYEDIT picks an associative array (or takes the preselected one) and
its Source option opens the objects every item repeats in the Block
Editor; saving there updates all items at once. Counts and spacings stay
in Properties.
Refs #1109
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SECTIONCULL keeps only what the selected section object (or the live
section of the space) shows: solids, surfaces and closed meshes are cut
to it with the same planes the live section uses, open meshes are
clipped face by face, and every other object wholly outside it is
erased. Objects across the boundary that cannot be cut stay whole. One
undo step.
The section's bounding planes are gathered once (section_planes) and
shared by the live section and the cull.
Refs #1407
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three toggles beside the Recent Documents title switch the panel between
the existing list, a grid of thumbnail tiles and one large preview per
file. The choice is kept in the recent section of the app config.
Refs #1494
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
COMPARE picks a drawing (or takes its path) and matches its objects with
this drawing's by what they draw: type, layer and tessellated geometry,
so an unchanged copy matches whatever its handle. Objects only here are
outlined in green, objects only in the other drawing in red, over the
current drawing, and Next / Previous zoom from one difference to the
next with a count in the prompt. A moved or edited object shows as one
of each. eXit (or Esc) clears the overlay.
Refs #970
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the new Associative option on (the default), ARRAYRECT and
ARRAYPOLAR build the array the way the drawing format stores one: the
selected objects move into an anonymous source block, an anonymous
array block holds one ByBlock reference to it per item, an INSERT of
the array block takes their place, and an AcDbAssocAction with an
AcDbAssocArrayActionBody, its three dependencies, the BaseNormal /
Origin / basePoint parameters and the value parameters tie them
together in the model-space network. The array is then edited from
Properties like an array read from a file.
The option flips with AS and is remembered for the session; on a
rotated working plane the commands keep making plain copies. Saving
drops the action of an array whose reference was erased or exploded.
Checked: created arrays reopen as associative with their parameters
and items, and the ODA converter reads the saved DWG without errors.
Refs #1109
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An associative array is an AcDbAssocAction with an
AcDbAssocArrayActionBody, dependencies on the array INSERT, the block
holding the item references and the block holding the source objects,
and value parameters (Items, ItemSpacing, Rows, …). Selecting the array
INSERT now shows its counts and spacings in Properties; changing one
places the items again and rewrites the item references, the body's
item records and the parameter values together, in one undo step, so
the drawing stays associative when saved.
Rectangular arrays follow their RowProfile axis, AxesAngle and base
normal; polar arrays turn about the centre recovered from their first
item, Radius and StartAngle. Both match the stored items of the
associative arrays in the sample drawings (122 of 123 rectangular, all
polar items of the polar samples). Path arrays are shown read-only.
Refs #1109
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FBXEXPORT (also EXPORTFBX) saves every 3D mesh of the drawing (solids,
surfaces and meshes, at full display resolution) as a binary FBX 7.4
file for visualisation tools: one model per object with its geometry,
face normals and a material in its display colour. Axes stay Z-up and
the unit scale follows the drawing's insertion units.
Refs #1502
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Options > Display gains Window Elements with "Show the menu bar"
(MENUBAR) and "Show the ribbon" (RIBBON / RIBBONCLOSE); Options > User
Preferences gains a Hatch switch for HPASSOC. The command line now
starts at 80 % opacity so the drawing shows through it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MENUBAR 1 shows File, Edit, View, Insert, Format, Tools, Draw,
Dimension, Modify, Parametric and Help menus above the ribbon; every
entry runs an existing command, and a test keeps each entry pointing at
a registered command. RIBBONCLOSE hides the ribbon and RIBBON brings it
back, so the menus can replace it. Both choices persist.
Also translates the "File" label, which every locale had left in
English.
Refs #1450
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Opening the block editor brings up a Block Editor ribbon tab with
Edit / Save / Discard, Attribute Definition, and the geometric,
dimensional and parameter tools that drive parametric blocks. The tab
is only listed while a block editor session is open, and leaving the
session returns to the tab that was active before.
Refs #509
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>
COMMANDLINEOPACITY (20-100 percent, default 100) and a slider under
Options > Display make the floating command line's panels see-through,
so the drawing stays visible behind it. The input field stays opaque
for legibility. The value is an application setting that persists.
Refs #1494
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TXTEXP replaces each selected TEXT and MTEXT with one polyline per
glyph contour, on the text's layer and with its properties: a
lightweight polyline for flat text, a 3D polyline for tilted text.
The outlines come from the same glyph tessellation the text renders
with, so stroke fonts give their strokes and outline fonts their
closed contours.
Refs D#1665
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In model space MVSETUP draws the sheet border at the drawing scale
(scale factor, paper width and height) and zooms to it, or switches to
a layout. On a layout it creates viewports in a bounding area (a single
one, a 2x2 engineering set of top/front/right/isometric views, or an
array with spacing), deletes picked objects, and scales picked
viewports to a paper/model unit ratio.
A viewport's fit to the model now measures the model along the
viewport's own view direction, so side and isometric views frame it
too.
Refs #1501
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PASTESPEC offers the formats on the clipboard: Objects and Block for
objects copied in the application (the PASTECLIP and PASTEBLOCK paths),
and Text for the system clipboard's text, placed as multi-line text in
the current text style with its lines as paragraphs.
Refs #645
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DVIEW (alias DV) offers TWist and Undo. TWist rolls the active view
or viewport camera to the typed angle; Undo steps back through the
twists made in the session. The new alias reaches existing profiles
through the alias migration table.
Refs #638
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Typing <angle at a point prompt (e.g. <30) now fixes the direction of
the next point from the last one until a point is placed: the cursor
moves along that direction, and a bare number entered next is the
distance along it. The angle is read in the drawing's angle base and
direction and turned into the current UCS. Works from the command line
and from scripts or the automation token input alike.
Fixes#1464
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"Requires a number." and "Requires 0 or 1 only, or option keyword."
had no catalogue entry, so every locale showed them in English.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The Image tab gains an Adjust card: X/Y offset in pixels (-2000..2000)
and X/Y scale (-10..10, tenth steps, a negative scale mirrors, zero keeps
the image's scale) with spinners and Reset, inactive while the image is
stretched; Keep aspect ratio is a switch and makes both scales follow.
- The preview shows the image at its offset and scale, tiled when tiled,
and a stretched image kept to its aspect ratio covers the view.
- Automation: step=<field>,+1|-1 and reset; offset/scale take any numbers.
- Shaded with edges, Shades of Gray and Sketchy have catalog entries in
every language.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Translate the strings the #1717 port cataloged in English only
(CSV picker, plot-preview task, extraction cap, shared-copy warning)
for every locale, and the whole ported web set for lo-LA, which the
contributor branch predates.
- hu-HU carried twelve keys twice after the port's merge; keep main's.
- The STB container/refusal tests exercised parsing this port did not
bring over; the preview-clamp test now only pins the upper bound, since
main's raster path already clamps preview pages further.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The last high-severity web gap plus a small integration bundle.
In-place save: with the File System Access API (Chromium/Edge), Save
now works like desktop. Plain Save on a tab with a retained handle
writes straight through — no picker, no download, no "(1)" copies.
First save or format change opens showSaveFilePicker AT the confirm
gesture (the worker serialization that follows can outlast the
transient-activation window; retained handles need no activation to
write). Picker cancel cancels the save like desktop; picker or write
failure falls back to the legacy download with a note; Firefox/Safari
keep the download flow untouched (feature-detected). Handles are
keyed by tab id in a thread-local registry (Message must be Send —
JsValue cannot ride in messages or App state); closing a tab drops
its handle; Save As re-picks. Dirty clears only on successful
persistence, same race guard as before.
Image paste: Ctrl+V of a screenshot inserts it as an image reference
— the clipboard reader falls back to image/* items when neither the
entity clipboard nor text has anything (precedence preserved), the
bytes enter the image source registry as pasted-<timestamp>.<ext>,
and attach reuses the IMAGE command's model-creation path verbatim.
Browser print: beforeprint snapshots the WebGL canvas into a print-
only <img> (the capture_canvas technique), so the browser's own print
menu produces the drawing instead of a blank page.
Automation capture on web: the capture op no longer calls the
synchronous GPU-map screenshot (dead on wasm); main's frame-parked
capture waits for a presented frame and reads via capture_canvas — the
same workaround the save-thumbnail path uses — delivering the PNG as a
download.
(cherry picked from commit 6e89b36d)
Ported onto main (#1717 review): the web capture rides main's existing
frame-parked capture (one ControlCaptureFrame path, ignoring the timer
tick on wasm) instead of a second parked-capture state; closing a tab
drops its file handle inside main's on_tab_close.
Session recovery: more than one pending snapshot adds a 'Restore all'
button to the Recover Drawing modal — every snapshot goes through the
exact same guarded path as a single restore (deleted only after its
own open succeeds). The open-tab list and active tab persist to
localStorage on web (open/save/close) and the remembered tab is
re-selected once a restore batch settles; the modal notes how many
drawings the session had. Nothing is auto-opened.
Deep links: ?file=<url|name> opens a drawing at boot. http(s) URLs
must end in .dwg/.dxf and are fetched with the same streaming,
64 MB-capped, 8 s-deadline reader the remote images use, then go
through the guarded open queue; cross-origin opens announce the
origin first. Bare names resolve from the browser's recent storage,
with a hint when absent. Everything else (file:, javascript:, drive
letters, non-drawing tails) is refused with a console note.
Offline PWA: the app was installable (manifest) but downloaded its
55 MB bundle on every visit. A cache-first service worker now serves
the whole bundle from Cache Storage after one online visit —
navigations network-first so updates land, hashed assets
stale-while-revalidate, non-GET/cross-origin passthrough, old caches
cleaned on activate, and the waiting-worker update flow documented.
The Pages workflow stamps the cache version from the bundle hash and
fails if sw.js is missing or unstamped.
(cherry picked from commit 5f9b345e)
Ported onto main (#1717 review): the cache-version stamp moved from the
skipped build-web.sh wrapper into the Pages workflow; the tab-close hook
lands in main's on_tab_close, which also cancels pinned control requests.
Ported from d719fb77 (#1717); the hatch draw-order, PDF and
recovery-settle hunks stay out (main owns those paths).
- La16 was still billed at 4 B/px: the no-conversion special case
keyed on native_bpp == 4, which La16 also is — but only Rgba8 is a
real move in into_rgba8, so La16's decode peak is 8. The case now
keys on the color type, and a table test pins every layout's peak
(plus GIF's screen+frame 8) so the accounting can't silently drift.
- json_values_match: an integer beyond f64 precision no longer matches
a float it merely rounds onto; a mixed pair matches only when the
float is whole and converts back to exactly that integer (also the
fuzz finding of 9262d63f).
- ocs-control.js resolves `ready` with the API object instead of
window.ocsControl, which is still undefined when the bridge already
exists as the script runs (built before the first settle, avoiding
the temporal-dead-zone throw of a later const); DATALINK on web says
the typed path is superseded by the picker instead of silently
discarding it.
(cherry picked from commit d719fb77)
Ported from 2c38de53 (#1717). Main already carries the hatch PDF draw
order fix (#1345), the numeric set_properties compare (#1348) and the
web open from bytes, so those parts stay out; what remains:
#1349 — window.ocsControl.ready/request promise wrapper with an
ocs-ready event (web/ocs-control.js, loaded by the web page), and the
startup donation prompt is suppressed once a control request is seen
(opt-in pre-boot via localStorage["opencadstudio.automation"] = "1").
docs/automation/web.md documents both. The control protocol stays at 1.
DATALINK CSV-to-table works on web (picker + bytes through the session
registry — was std::fs, silently dead); COLORSCHEME accepts System
(prefers-color-scheme on web, AppsUseLightTheme on Windows).
Decode accounting, made honest per the fix-of-fix review: into_rgba8
allocates the RGBA destination while the native buffer is alive for
every non-Rgba8 layout (L8 5, La8 6, Rgb8 7, L16 6, La16 8 B/px
peaks — the formula now says so), GIF bills the screen+frame
coexistence at 8 B/px, and TIFF drops the 3x multipliers both ways —
tiff 0.11 splits the given budget between frame and scratch (a total
ceiling), so the old double-billing refused honest 16-bit GeoTIFFs
~2.25x early while admitting hostile chunk transients at 3x.
(cherry picked from commit 2c38de53)
A second adversarial round (with empirical reproduction against the
vendored image 0.25) found the budget contract still had holes:
- The probe billed 4 bytes/px, but 16-bit formats allocate their
native layout during decode (8/px for RGBA16 PNG; TIFF stacks ~3x
codec scratch on top). In-budget 16-bit images were falsely refused
with self-contradictory notes, and the decode transient could exceed
the budget the tiers claimed to enforce. The probe now reads the
color type alongside the dimensions and bills the real peak (native
layout + RGBA where they coexist, plus the TIFF codec factor), so
refusals are honest and per-platform-correct, and the TIFF allowance
follows the same accounting.
- GIF: the probe reads the LOGICAL SCREEN, but a crafted frame may
declare itself arbitrarily larger (empirically: a 10x10 probed
screen with an 8192x8192 frame — 320 MB and 29 s from a
probe-claimed-400-byte image). The GIF frame buffer is now capped
to the probed size plus slack; frame bombs refuse like any other
oversize.
- Remote bodies on web streamed incrementally with the 64 MB cap
enforced DURING the read (array_buffer() materialized a hostile
chunked reply in full before any check could fire), aborting and
cancelling the reader the moment the cap is crossed.
- Degenerate raster entities (zero/non-finite size or vectors) no
longer produce NaN placement math that aborted whole PDF exports —
they resolve to the broken-reference placeholder.
- Same-name resolution now has a deterministic winner (newest
registration, via insertion order) instead of HashMap iteration
order; URL query strings no longer break by-name matching; the
image pick matches its refusal note by the quoted file name
(substring collisions like a.tif/2011.tif attributed errors to the
wrong file); a dropped remote outcome at the queue cap triggers one
unconditional catch-up re-resolution instead of waiting for another
event; the unknown-size refusal says so instead of printing 0x0;
and the build script fails cleanly when there are no fonts to
verify.
(cherry picked from commit c6db94e8)
Ported onto main (#1717 review): the build-web.sh hunk stays out with
the wrapper; the new messages are cataloged (image refusal under the
file group it is looked up in, plus the extraction cap, shared-copy
warning and plot-preview task title that were missing), and the web
SAVEALL failure reuses the existing SAVEALL message.
Giant rasters (500 MB aerial/GIS TIFFs) decoded whole: multiple GB of
RGBA on a wasm heap is tab death, and even desktop silently failed
past the image crate's 512 MiB default allocation cap. Decoding now
probes the header for dimensions first and runs in tiers — full decode
under a per-target budget (512 MB wasm / 4 GB native, enforced through
the decoder's allocation limits so oversize fails fast instead of
ballooning), Lanczos3 downsample to a display cap (4096² wasm /
8192² native) when the decode fits but the buffer is oversized, and a
clear localized refusal naming the dimensions and the limit when it
cannot. The probed source dimensions stay the entity's sizing truth,
so a downsampled buffer never shrinks the on-paper footprint; PDF
export self-corrects (effective DPI derives from placement × stored
pixels). Refusals surface once per image through the pick, open, and
drop/re-resolve paths.
Decode coverage gains webp and gif (pure Rust in image 0.25 — no C,
no lockfile churn), with the attach picker and drop filters matching.
Remote http(s) raster references now fetch on web: CORS-classified
failures name CORS, HTTP errors name the status, bodies over 64 MB and
8 s deadlines are bounded, and fetched bytes join the session source
registry (so ARCHIVE can package them and re-resolution reads cache).
Georgian and Armenian Noto subsets ship (generation blocks included),
so those scripts render instead of skipping; scripts still without
subsets remain silently skipped, unchanged.
(cherry picked from commit ca0d7b96)
Ported onto main (#1717 review): Armenian and Georgian take the script
indices after Lao, which main added meanwhile.