diff --git a/crates/engine/src/cmd/draw2/commands.rs b/crates/engine/src/cmd/draw2/commands.rs index 3c05f35bcc..050e477295 100644 --- a/crates/engine/src/cmd/draw2/commands.rs +++ b/crates/engine/src/cmd/draw2/commands.rs @@ -74,7 +74,7 @@ pub fn specs() -> Vec { "Split Path", [], None, - "{id, subpath?, segment, t} or {id, subpath?, anchor}: closed paths open there, open paths become two; one of the two new end points is left selected → {ids}", + "{id, subpath?, segment, t: 0–1 (0.5)} or {id, subpath?, anchor}: closed paths open there, open paths become two; one of the two new end points is left selected → {ids}. A t outside 0–1 is refused with an error, and nothing changes", has_doc, split ), @@ -92,7 +92,7 @@ pub fn specs() -> Vec { "Eraser", [], None, - "{points: [[x,y]…] or [[x,y,pressure]…] or [[x,y,pressure,tiltX,tiltY,rotation]…] (pen pressure 0..1, tilt −90..90°, barrel rotation 0..360° clockwise; pen values are checked as path.freehand checks them), size?: pt (10; from 0.1 to 1000), angle?: ° (0: the tip's long axis counter-clockwise from level), roundness?: % (100, kept within 1–100), angleMode?, roundnessMode?, sizeMode?: \"fixed\" (default) | \"random\" | \"pressure\" | \"tilt\" | \"bearing\" | \"rotation\" (Eraser Tool Options' variation menus; a varied angle turns either way, clockwise or counter-clockwise), angleVariation?: ° (0–180, default 0, either way: clockwise or counter-clockwise), roundnessVariation?: % (0–100, default 0), sizeVariation?: pt (0–1000, default 0)} or {rect: [x, y, width, height] (pt; the Eraser's Alt-drag marquee)} erase the stroke of an elliptical tip from paths (selected, or all) → {ids}. The tip is `size` across its long axis, which runs at `angle` counter-clockwise from horizontal; its short axis is `roundness` percent of the long one. A value whose mode is not fixed varies by up to its variation either way: random draws one value for the drag; pressure goes from the value less the variation where the pen presses lightest to the value plus it where it presses hardest (size on pressure as path.blob); tilt from less with the pen lying flat to more with it upright; bearing and rotation from less at −180° to more at 180° of the pen's lean direction or barrel turn. A drag without that pen reading (a mouse) erases at the value itself. An unknown mode, or a variation below 0 or past its range, is an error and erases nothing. `rect` in place of `points` erases everything inside the rectangle: closed paths lose its area, and open paths are cut where they cross its edges; the tip's size, angle, roundness and variations do not apply. A width or height of 0 or less, a value that is not a finite number, or `points` and `rect` together is an error. When nothing is erased, no undo step is added", + "{points: [[x,y]…] or [[x,y,pressure]…] or [[x,y,pressure,tiltX,tiltY,rotation]…] (pen pressure 0..1, tilt −90..90°, barrel rotation 0..360° clockwise; pen values are checked as path.freehand checks them), size?: pt (10; from 0.1 to 1000), angle?: ° (0, −180–180: the tip's long axis counter-clockwise from level), roundness?: % (100, 1–100), angleMode?, roundnessMode?, sizeMode?: \"fixed\" (default) | \"random\" | \"pressure\" | \"tilt\" | \"bearing\" | \"rotation\" (Eraser Tool Options' variation menus; a varied angle turns either way, clockwise or counter-clockwise), angleVariation?: ° (0–180, default 0, either way: clockwise or counter-clockwise), roundnessVariation?: % (0–100, default 0), sizeVariation?: pt (0–1000, default 0)} or {rect: [x, y, width, height] (pt; the Eraser's Alt-drag marquee)} erase the stroke of an elliptical tip from paths (selected, or all) → {ids}. The tip is `size` across its long axis, which runs at `angle` counter-clockwise from horizontal; its short axis is `roundness` percent of the long one. A value whose mode is not fixed varies by up to its variation either way: random draws one value for the drag; pressure goes from the value less the variation where the pen presses lightest to the value plus it where it presses hardest (size on pressure as path.blob); tilt from less with the pen lying flat to more with it upright; bearing and rotation from less at −180° to more at 180° of the pen's lean direction or barrel turn. A drag without that pen reading (a mouse) erases at the value itself. An angle or roundness outside its range, an unknown mode, or a variation below 0 or past its range is refused with an error and erases nothing. `rect` in place of `points` erases everything inside the rectangle: closed paths lose its area, and open paths are cut where they cross its edges; the tip's size, angle, roundness and variations do not apply. A width or height of 0 or less, a value that is not a finite number, or `points` and `rect` together is an error. When nothing is erased, no undo step is added", has_doc, erase_region ), diff --git a/crates/engine/src/cmd/draw2/cut.rs b/crates/engine/src/cmd/draw2/cut.rs index ae150c7bb4..bb75329765 100644 --- a/crates/engine/src/cmd/draw2/cut.rs +++ b/crates/engine/src/cmd/draw2/cut.rs @@ -196,6 +196,9 @@ pub(super) fn split(s: &mut Session, p: &Value) -> Result { if !t.is_finite() || p.get("t").is_some_and(|v| !v.is_f64() && !v.is_i64() && !v.is_u64()) { return Err(bad(C, "invalid t")); } + if !(0.0..=1.0).contains(&t) { + return Err(bad(C, "`t` must be from 0 to 1")); + } let ids = s.edit("Split Path", |d, sel| { let path = path_mut(d, id)?; let mut sp = path.subpaths.get(si).cloned().ok_or_else(|| EngineError::Other("no such subpath".into()))?; @@ -295,7 +298,13 @@ pub(super) fn erase_region(s: &mut Session, p: &Value) -> Result { let samples = samples_param(p, "points", C)?; let size = ranged(p, "size", 10.0, SIZES, C)?; let angle = number_or(p, "angle", 0.0, C)?; + if !(-180.0..=180.0).contains(&angle) { + return Err(bad(C, "`angle` must be from -180 to 180 degrees")); + } let roundness = number_or(p, "roundness", 100.0, C)?; + if !(1.0..=100.0).contains(&roundness) { + return Err(bad(C, "`roundness` must be from 1 to 100%")); + } let vary = eraser_variations(p, C)?; if varies_beyond_size_pressure(&vary) { return erase_varied(s, &samples, [angle, roundness, size], vary); @@ -305,7 +314,7 @@ pub(super) fn erase_region(s: &mut Session, p: &Value) -> Result { let r = size / 2.0; // The tip's short axis (its narrowest with Pressure): an open path is sampled at least every half of it. let narrowest = pressure.as_ref().map_or(size, |(_, v)| vectorcraft_tools::draw2::pressure_size(size, *v, 0.0)); - let short = narrowest * roundness.clamp(1.0, 100.0) / 100.0; + let short = narrowest * roundness / 100.0; let st = s.doc()?; // A point is under the tip when, with the tip squashed back into a circle, it is within the // circle's radius of the squashed drag. diff --git a/crates/engine/src/tests/draw2.rs b/crates/engine/src/tests/draw2.rs index 54364915da..8674750c19 100644 --- a/crates/engine/src/tests/draw2.rs +++ b/crates/engine/src/tests/draw2.rs @@ -1504,9 +1504,76 @@ fn the_eraser_tip_takes_its_angle_and_roundness() { // At 45°, half axes 10 and 2.5: the band is 2·√((10² + 2.5²) / 2), about 14.58 pt, and the // chord 2 / √(0.5 / 10² + 0.5 / 2.5²), about 6.86 pt. close(erase(json!({"angle": 45, "roundness": 25})), 2.0 * ((100.0f64 + 6.25) / 2.0).sqrt(), 2.0 / (0.5f64 / 100.0 + 0.5 / 6.25).sqrt()); - // A roundness past 100 is kept to 100, and one below 1 to 1. - close(erase(json!({"angle": 90, "roundness": 400})), 20.0, 20.0); - close(erase(json!({"angle": 90, "roundness": 0})), 0.2, 0.2); + // The ends of the Roundness range: 100% is round, and 1% leaves a tip 0.2 pt across. + close(erase(json!({"angle": 90, "roundness": 100})), 20.0, 20.0); + close(erase(json!({"angle": 90, "roundness": 1})), 0.2, 0.2); +} + +/// The Eraser refuses an `angle` outside -180 to 180 degrees and a `roundness` outside 1 to 100%, +/// naming the key and the range, and erases nothing. The ends of each range erase, and a key left +/// out or null takes its default: 0 degrees and 100%. +#[test] +fn the_eraser_refuses_an_angle_or_roundness_outside_its_range() { + let mut s = session(); + rect(&mut s, 100.0, 100.0, 100.0, 100.0); + s.execute("select.none", &json!({})).unwrap(); + let stroke = json!({"points": [[90, 150], [210, 150]], "size": 10}); + for angle in [json!(-181), json!(-180.001), json!(180.001), json!(200), json!(1e300), json!(-1e300)] { + refuses_with(&mut s, "path.eraseRegion", &with(&stroke, json!({"angle": angle})), "`angle` must be from -180 to 180 degrees"); + } + for roundness in [json!(0), json!(0.999), json!(-25), json!(100.001), json!(400), json!(1e300)] { + refuses_with(&mut s, "path.eraseRegion", &with(&stroke, json!({"roundness": roundness})), "`roundness` must be from 1 to 100%"); + } + // A key out of its range is refused when the other key is in range. + refuses_with(&mut s, "path.eraseRegion", &with(&stroke, json!({"angle": 90, "roundness": 400})), "`roundness` must be from 1 to 100%"); + refuses_with(&mut s, "path.eraseRegion", &with(&stroke, json!({"angle": 540, "roundness": 25})), "`angle` must be from -180 to 180 degrees"); + // The pieces a stroke leaves, undone again. + let mut erased = |tip: serde_json::Value| { + let r = s.execute("path.eraseRegion", &with(&stroke, tip.clone())).unwrap(); + assert_eq!(r["ids"].as_array().map(Vec::len), Some(2), "{tip}: the stroke cuts the square in two: {r}"); + let pieces: Vec = paths(&s).into_iter().map(|p| p.1).collect(); + s.execute("edit.undo", &json!({})).unwrap(); + s.execute("select.none", &json!({})).unwrap(); + pieces + }; + // Both ends of each range are inside it. + for tip in [json!({"angle": -180}), json!({"angle": 180}), json!({"angle": 90, "roundness": 1}), json!({"roundness": 100})] { + erased(tip); + } + let default = erased(json!({})); + assert_eq!(erased(json!({"angle": 0, "roundness": 100})), default, "left out, the tip is round at 0 degrees"); + assert_eq!(erased(json!({"angle": null, "roundness": null})), default, "null is read as a key left out"); + assert!(erased(json!({"angle": 0, "roundness": 25})) != default, "a quarter-round level tip erases a narrower band"); +} + +/// The Scissors command refuses a `t` outside 0 to 1 instead of cutting at the nearer end of the +/// segment, with or without an `anchor` beside it; 0 and 1 cut at the segment's two anchors. +#[test] +fn scissors_refuse_a_t_outside_the_segment() { + let mut s = session(); + let id = rect(&mut s, 100.0, 100.0, 100.0, 100.0); + let before = path(&s, id); + for t in [json!(-0.1), json!(-1e-9), json!(1.000001), json!(1.1), json!(1e300), json!(-1e300)] { + refuses_with(&mut s, "path.split", &json!({"id": id.0, "segment": 0, "t": t}), "`t` must be from 0 to 1"); + refuses_with(&mut s, "path.split", &json!({"id": id.0, "anchor": 1, "t": t}), "`t` must be from 0 to 1"); + } + // 0 opens the square at the segment's first anchor, 1 at its second, and 0.5 at a new anchor + // between them. + for (t, anchors, start) in [ + (json!(0), 5, before.subpaths[0].anchors[0].p), + (json!(1), 5, before.subpaths[0].anchors[1].p), + (json!(0.5), 6, before.subpaths[0].anchors[0].p.midpoint(before.subpaths[0].anchors[1].p)), + ] { + s.execute("path.split", &json!({"id": id.0, "segment": 0, "t": t})).unwrap(); + let cut = path(&s, id); + assert!(!cut.subpaths[0].closed && cut.subpaths[0].anchors.len() == anchors, "t {t}: {cut:?}"); + assert!((cut.subpaths[0].anchors[0].p - start).hypot() < 1e-9, "t {t}: the cut starts at {:?}", cut.subpaths[0].anchors[0].p); + s.execute("edit.undo", &json!({})).unwrap(); + assert_eq!(path(&s, id), before, "t {t}: undo"); + } + // Left out, `t` is 0.5. + s.execute("path.split", &json!({"id": id.0, "segment": 0})).unwrap(); + assert_eq!(path(&s, id).subpaths[0].anchors.len(), 6); } #[test] diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index 2345917591..1705aa6811 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -7790,6 +7790,8 @@ breakText Glyphs Glifs @msg No bridge of this width fits across the selected art Cap pont d’aquesta amplada no cap a la il·lustració seleccionada @msg Some islands could not be joined to the area around the art Algunes illes no s’han pogut unir a l’àrea que envolta la il·lustració @msg `width` must be from {lo} to {hi} pt `width` ha d’estar entre {lo} i {hi} pt +@msg `angle` must be from -180 to 180 degrees `angle` ha d’estar entre -180 i 180 graus +@msg `roundness` must be from 1 to 100% `roundness` ha d’estar entre 1 i 100% @msg `count` must be a whole number from 1 to {MAX_BRIDGES_PER_ISLAND} `count` ha de ser un nombre enter d’1 a {MAX_BRIDGES_PER_ISLAND} Weed Box and Lines… Caixa i línies de pelat… Weed Box and Lines Caixa i línies de pelat diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index dfbb6432df..3ce4d6f0a5 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -7884,6 +7884,8 @@ breakText Glyphs Glyfy @msg No bridge of this width fits across the selected art Přes vybranou kresbu se nevejde žádný můstek této šířky @msg Some islands could not be joined to the area around the art Některé ostrůvky nebylo možné připojit k oblasti kolem kresby @msg `width` must be from {lo} to {hi} pt `width` musí být od {lo} do {hi} pt +@msg `angle` must be from -180 to 180 degrees `angle` musí být od -180 do 180 stupňů +@msg `roundness` must be from 1 to 100% `roundness` musí být od 1 do 100 % @msg `count` must be a whole number from 1 to {MAX_BRIDGES_PER_ISLAND} `count` musí být celé číslo od 1 do {MAX_BRIDGES_PER_ISLAND} Weed Box and Lines… Rámeček a linie pro vybírání… Weed Box and Lines Rámeček a linie pro vybírání diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv index a6089d01d5..69db2c7136 100644 --- a/crates/ui-egui/src/i18n/da.tsv +++ b/crates/ui-egui/src/i18n/da.tsv @@ -706,6 +706,8 @@ liquify-list-end {0}, {1} {0} og {1} @msg No bridge of this width fits across the selected art Ingen bro med denne bredde passer hen over den markerede grafik @msg Some islands could not be joined to the area around the art Nogle øer kunne ikke forbindes med området omkring grafikken @msg `width` must be from {lo} to {hi} pt `width` skal være fra {lo} til {hi} pt +@msg `angle` must be from -180 to 180 degrees `angle` skal være fra -180 til 180 grader +@msg `roundness` must be from 1 to 100% `roundness` skal være fra 1 til 100 % @msg `count` must be a whole number from 1 to {MAX_BRIDGES_PER_ISLAND} `count` skal være et heltal fra 1 til {MAX_BRIDGES_PER_ISLAND} File Filer diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index 6d64734242..9adc5e4da1 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -7359,6 +7359,8 @@ breakText Glyphs Glyphen @msg No bridge of this width fits across the selected art Kein Steg dieser Breite passt über das ausgewählte Bildmaterial @msg Some islands could not be joined to the area around the art Einige Inseln konnten nicht mit der Fläche um das Bildmaterial verbunden werden @msg `width` must be from {lo} to {hi} pt `width` muss zwischen {lo} und {hi} pt liegen +@msg `angle` must be from -180 to 180 degrees `angle` muss zwischen -180 und 180 Grad liegen +@msg `roundness` must be from 1 to 100% `roundness` muss zwischen 1 und 100 % liegen @msg `count` must be a whole number from 1 to {MAX_BRIDGES_PER_ISLAND} `count` muss eine ganze Zahl von 1 bis {MAX_BRIDGES_PER_ISLAND} sein Weed Box and Lines… Entgitterrahmen und -linien… Weed Box and Lines Entgitterrahmen und -linien diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index cd4b178c86..2bb03c51e9 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -7763,6 +7763,8 @@ breakText Glyphs Γλύφοι @msg No bridge of this width fits across the selected art Καμία γέφυρα αυτού του πλάτους δεν χωράει στο επιλεγμένο γραφικό @msg Some islands could not be joined to the area around the art Ορισμένες νησίδες δεν ήταν δυνατό να συνδεθούν με την περιοχή γύρω από το γραφικό @msg `width` must be from {lo} to {hi} pt Το `width` πρέπει να είναι από {lo} έως {hi} pt +@msg `angle` must be from -180 to 180 degrees Το `angle` πρέπει να είναι από -180 έως 180 μοίρες +@msg `roundness` must be from 1 to 100% Το `roundness` πρέπει να είναι από 1 έως 100% @msg `count` must be a whole number from 1 to {MAX_BRIDGES_PER_ISLAND} Το `count` πρέπει να είναι ακέραιος από 1 έως {MAX_BRIDGES_PER_ISLAND} Weed Box and Lines… Πλαίσιο και γραμμές αφαίρεσης περισσευμάτων… Weed Box and Lines Πλαίσιο και γραμμές αφαίρεσης περισσευμάτων diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index bd4dfed931..fc63c72e93 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -7867,6 +7867,8 @@ breakText Glyphs Glifos @msg No bridge of this width fits across the selected art Ningún puente de este ancho cabe en la ilustración seleccionada @msg Some islands could not be joined to the area around the art Algunas islas no se pudieron unir al área que rodea la ilustración @msg `width` must be from {lo} to {hi} pt `width` debe estar entre {lo} y {hi} pt +@msg `angle` must be from -180 to 180 degrees `angle` debe estar entre -180 y 180 grados +@msg `roundness` must be from 1 to 100% `roundness` debe estar entre 1 y 100 % @msg `count` must be a whole number from 1 to {MAX_BRIDGES_PER_ISLAND} `count` debe ser un número entero entre 1 y {MAX_BRIDGES_PER_ISLAND} Weed Box and Lines… Caja y líneas de pelado… Weed Box and Lines Caja y líneas de pelado diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index 432dcd99bf..59aa73a6b8 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -7844,6 +7844,8 @@ breakText Glyphs Merkit @msg No bridge of this width fits across the selected art Näin leveä silta ei mahdu valitun grafiikan poikki @msg Some islands could not be joined to the area around the art Joitakin saarekkeita ei voitu yhdistää grafiikkaa ympäröivään alueeseen @msg `width` must be from {lo} to {hi} pt `width`-arvon on oltava {lo}–{hi} pt +@msg `angle` must be from -180 to 180 degrees `angle`-arvon on oltava -180–180 astetta +@msg `roundness` must be from 1 to 100% `roundness`-arvon on oltava 1–100 % @msg `count` must be a whole number from 1 to {MAX_BRIDGES_PER_ISLAND} `count` on oltava kokonaisluku 1–{MAX_BRIDGES_PER_ISLAND} Weed Box and Lines… Karsintakehys ja -viivat… Weed Box and Lines Karsintakehys ja -viivat diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index dce4f93e5d..14a0be4478 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -7763,6 +7763,8 @@ breakText Glyphs Glyphes @msg No bridge of this width fits across the selected art Aucun pont de cette largeur ne tient en travers de l’illustration sélectionnée @msg Some islands could not be joined to the area around the art Certains îlots n’ont pas pu être reliés à la zone autour de l’illustration @msg `width` must be from {lo} to {hi} pt `width` doit être compris entre {lo} et {hi} pt +@msg `angle` must be from -180 to 180 degrees `angle` doit être compris entre -180 et 180 degrés +@msg `roundness` must be from 1 to 100% `roundness` doit être compris entre 1 et 100 % @msg `count` must be a whole number from 1 to {MAX_BRIDGES_PER_ISLAND} `count` doit être un nombre entier compris entre 1 et {MAX_BRIDGES_PER_ISLAND} Weed Box and Lines… Cadre et lignes d’échenillage… Weed Box and Lines Cadre et lignes d’échenillage diff --git a/crates/ui-egui/src/i18n/hi.tsv b/crates/ui-egui/src/i18n/hi.tsv index 29b2c8a52d..447b652288 100644 --- a/crates/ui-egui/src/i18n/hi.tsv +++ b/crates/ui-egui/src/i18n/hi.tsv @@ -9190,6 +9190,8 @@ theme Appearance अपीयरेंस @msg No bridge of this width fits across the selected art इस चौड़ाई का कोई ब्रिज चुने गए आर्टवर्क के पार नहीं आता @msg Some islands could not be joined to the area around the art कुछ आइलैंड आर्टवर्क के आसपास के क्षेत्र से नहीं जोड़े जा सके @msg `width` must be from {lo} to {hi} pt `width` {lo} से {hi} pt तक होना चाहिए +@msg `angle` must be from -180 to 180 degrees `angle` -180 से 180 डिग्री तक होना चाहिए +@msg `roundness` must be from 1 to 100% `roundness` 1 से 100% तक होना चाहिए @msg `count` must be a whole number from 1 to {MAX_BRIDGES_PER_ISLAND} `count` 1 से {MAX_BRIDGES_PER_ISLAND} तक पूरी संख्या होना चाहिए Weed Box and Lines… वीड बॉक्स और लाइनें… Weed Box and Lines वीड बॉक्स और लाइनें diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index d59ce686de..e081c882b6 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -7753,6 +7753,8 @@ breakText Glyphs Glifák @msg No bridge of this width fits across the selected art Ilyen széles híd nem fér el a kijelölt grafikán @msg Some islands could not be joined to the area around the art Egyes szigeteket nem sikerült összekötni a grafikát körülvevő területtel @msg `width` must be from {lo} to {hi} pt A `width` értéke {lo} és {hi} pt között lehet +@msg `angle` must be from -180 to 180 degrees Az `angle` értéke -180 és 180 fok között lehet +@msg `roundness` must be from 1 to 100% A `roundness` értéke 1 és 100% között lehet @msg `count` must be a whole number from 1 to {MAX_BRIDGES_PER_ISLAND} `count`: 1 és {MAX_BRIDGES_PER_ISLAND} közötti egész szám kell Weed Box and Lines… Gyomláló keret és vonalak… Weed Box and Lines Gyomláló keret és vonalak diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index 3ad325b05e..b294b7da3a 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -7395,6 +7395,8 @@ breakText Glyphs Glifi @msg No bridge of this width fits across the selected art Nessun ponte di questa larghezza entra nella grafica selezionata @msg Some islands could not be joined to the area around the art Non è stato possibile collegare alcune isole all’area intorno alla grafica @msg `width` must be from {lo} to {hi} pt `width` deve essere compreso tra {lo} e {hi} pt +@msg `angle` must be from -180 to 180 degrees `angle` deve essere compreso tra -180 e 180 gradi +@msg `roundness` must be from 1 to 100% `roundness` deve essere compreso tra 1 e 100% @msg `count` must be a whole number from 1 to {MAX_BRIDGES_PER_ISLAND} `count` deve essere un numero intero compreso tra 1 e {MAX_BRIDGES_PER_ISLAND} Weed Box and Lines… Riquadro e linee di spellicolatura… Weed Box and Lines Riquadro e linee di spellicolatura diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index a452d68de9..56c1c1e5ec 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -9274,6 +9274,8 @@ breakText Glyphs 字形 @msg No bridge of this width fits across the selected art この幅のブリッジは選択したアートワークに収まりません @msg Some islands could not be joined to the area around the art 一部のアイランドをアートワークの周囲の領域につなげられませんでした @msg `width` must be from {lo} to {hi} pt `width` は {lo}~{hi} pt の範囲で指定してください +@msg `angle` must be from -180 to 180 degrees `angle` は -180~180 度の範囲で指定してください +@msg `roundness` must be from 1 to 100% `roundness` は 1~100% の範囲で指定してください @msg `count` must be a whole number from 1 to {MAX_BRIDGES_PER_ISLAND} `count` には 1 から {MAX_BRIDGES_PER_ISLAND} の整数を指定してください Weed Box and Lines… カス取り枠とライン… Weed Box and Lines カス取り枠とライン diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index 6fb070c74a..0f18e63a1a 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -9971,6 +9971,8 @@ font-script Japanese იაპონური @msg No bridge of this width fits across the selected art ამ სიგანის ხიდი მონიშნულ ნახატზე არ ეტევა @msg Some islands could not be joined to the area around the art ზოგიერთი კუნძული ვერ დაუკავშირდა ნახატის გარშემო არეს @msg `width` must be from {lo} to {hi} pt `width` უნდა იყოს {lo}-დან {hi} pt-მდე +@msg `angle` must be from -180 to 180 degrees `angle` უნდა იყოს -180-დან 180 გრადუსამდე +@msg `roundness` must be from 1 to 100% `roundness` უნდა იყოს 1-დან 100%-მდე @msg `count` must be a whole number from 1 to {MAX_BRIDGES_PER_ISLAND} `count` უნდა იყოს მთელი რიცხვი 1-დან {MAX_BRIDGES_PER_ISLAND}-მდე Weed Box and Lines… ნარჩენის მოსაცილებელი ჩარჩო და ხაზები… Weed Box and Lines ნარჩენის მოსაცილებელი ჩარჩო და ხაზები diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index d9693d4abf..8e5a3799a5 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -7359,6 +7359,8 @@ breakText Glyphs 글리프 @msg No bridge of this width fits across the selected art 이 너비의 브리지가 선택한 아트워크에 들어가지 않습니다 @msg Some islands could not be joined to the area around the art 일부 섬을 아트워크 주변 영역에 연결할 수 없습니다 @msg `width` must be from {lo} to {hi} pt `width`는 {lo}에서 {hi}pt 사이여야 합니다 +@msg `angle` must be from -180 to 180 degrees `angle`는 -180도에서 180도 사이여야 합니다 +@msg `roundness` must be from 1 to 100% `roundness`는 1%에서 100% 사이여야 합니다 @msg `count` must be a whole number from 1 to {MAX_BRIDGES_PER_ISLAND} `count`는 1에서 {MAX_BRIDGES_PER_ISLAND} 사이의 정수여야 합니다 Weed Box and Lines… 위딩 상자 및 선… Weed Box and Lines 위딩 상자 및 선 diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index 0628333b68..96e9e6a985 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -575,6 +575,8 @@ liquify-list-end {0}, {1} {0} en {1} @msg No bridge of this width fits across the selected art Geen brug van deze breedte past over de geselecteerde illustratie @msg Some islands could not be joined to the area around the art Sommige eilanden konden niet worden verbonden met het gebied rond de illustratie @msg `width` must be from {lo} to {hi} pt `width` moet van {lo} tot {hi} pt zijn +@msg `angle` must be from -180 to 180 degrees `angle` moet van -180 tot 180 graden zijn +@msg `roundness` must be from 1 to 100% `roundness` moet van 1 tot 100% zijn @msg `count` must be a whole number from 1 to {MAX_BRIDGES_PER_ISLAND} `count` moet een geheel getal van 1 tot {MAX_BRIDGES_PER_ISLAND} zijn File Bestand diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index ec879a9297..487283e406 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -7624,6 +7624,8 @@ breakText Glyphs Glify @msg No bridge of this width fits across the selected art Żaden mostek o tej szerokości nie mieści się w zaznaczonej grafice @msg Some islands could not be joined to the area around the art Niektórych wysp nie udało się połączyć z obszarem wokół grafiki @msg `width` must be from {lo} to {hi} pt `width` musi mieścić się w zakresie od {lo} do {hi} pt +@msg `angle` must be from -180 to 180 degrees `angle` musi mieścić się w zakresie od -180 do 180 stopni +@msg `roundness` must be from 1 to 100% `roundness` musi mieścić się w zakresie od 1 do 100% @msg `count` must be a whole number from 1 to {MAX_BRIDGES_PER_ISLAND} `count` musi być liczbą całkowitą od 1 do {MAX_BRIDGES_PER_ISLAND} Weed Box and Lines… Ramka i linie do wybierania… Weed Box and Lines Ramka i linie do wybierania diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index 49b89d752f..e1a8bcb11c 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -7954,6 +7954,8 @@ swatch Yellow Green Verde-amarelado @msg No bridge of this width fits across the selected art Nenhuma ponte desta largura cabe na arte selecionada @msg Some islands could not be joined to the area around the art Algumas ilhas não puderam ser unidas à área ao redor da arte @msg `width` must be from {lo} to {hi} pt `width` deve estar entre {lo} e {hi} pt +@msg `angle` must be from -180 to 180 degrees `angle` deve estar entre -180 e 180 graus +@msg `roundness` must be from 1 to 100% `roundness` deve estar entre 1 e 100% @msg `count` must be a whole number from 1 to {MAX_BRIDGES_PER_ISLAND} `count` deve ser um número inteiro de 1 a {MAX_BRIDGES_PER_ISLAND} Weed Box and Lines… Caixa e Linhas de Descasque… Weed Box and Lines Caixa e Linhas de Descasque diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index 3c9c23aaf5..f443922dd7 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -7870,6 +7870,8 @@ shape Open Открытый @msg No bridge of this width fits across the selected art Мостик такой ширины не помещается поперёк выделенной графики @msg Some islands could not be joined to the area around the art Некоторые островки не удалось соединить с областью вокруг графики @msg `width` must be from {lo} to {hi} pt `width` должно быть от {lo} до {hi} pt +@msg `angle` must be from -180 to 180 degrees `angle` должно быть от -180 до 180 градусов +@msg `roundness` must be from 1 to 100% `roundness` должно быть от 1 до 100% @msg `count` must be a whole number from 1 to {MAX_BRIDGES_PER_ISLAND} `count` должно быть целым числом от 1 до {MAX_BRIDGES_PER_ISLAND} Weed Box and Lines… Рамка и линии выборки… Weed Box and Lines Рамка и линии выборки diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index 2a6b6f7c4c..f4277b7fd6 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -9234,6 +9234,8 @@ digits Hindi Hindi @msg No bridge of this width fits across the selected art Ingen brygga med den här bredden får plats över den markerade teckningen @msg Some islands could not be joined to the area around the art Vissa öar kunde inte förbindas med området runt teckningen @msg `width` must be from {lo} to {hi} pt `width` måste vara från {lo} till {hi} pt +@msg `angle` must be from -180 to 180 degrees `angle` måste vara från -180 till 180 grader +@msg `roundness` must be from 1 to 100% `roundness` måste vara från 1 till 100 % @msg `count` must be a whole number from 1 to {MAX_BRIDGES_PER_ISLAND} `count` måste vara ett heltal från 1 till {MAX_BRIDGES_PER_ISLAND} Weed Box and Lines… Rensningsram och rensningslinjer… Weed Box and Lines Rensningsram och rensningslinjer diff --git a/crates/ui-egui/src/i18n/tests.rs b/crates/ui-egui/src/i18n/tests.rs index ef5211d4e6..33a6584e3b 100644 --- a/crates/ui-egui/src/i18n/tests.rs +++ b/crates/ui-egui/src/i18n/tests.rs @@ -2851,6 +2851,36 @@ fn three_d_refusals_are_translated_in_every_complete_catalog() { assert!(missing.is_empty(), "{} 3D messages have no @msg row:\n{}", missing.len(), missing.join("\n")); } +/// The Eraser's range refusals (`path.eraseRegion` `angle` and `roundness`) and the Scissors' (`path.split` +/// `t`) show in every complete-message language with the key and the range numbers as given; the +/// error the command returns stays English. +#[test] +fn eraser_and_scissors_range_refusals_translate_with_their_values() { + use serde_json::json; + let mut s = vectorcraft_engine::Session::new(); + s.execute("file.new", &json!({"width": 100, "height": 100})).unwrap(); + let id = s.execute("shape.rectangle", &json!({"x": 10, "y": 10, "width": 50, "height": 50})).unwrap()["id"].clone(); + let refusals = [ + ("path.eraseRegion", json!({"points": [[10, 10], [60, 10]], "angle": 200}), "`angle`", ["-180", "180"]), + ("path.eraseRegion", json!({"points": [[10, 10], [60, 10]], "roundness": 0}), "`roundness`", ["1", "100"]), + ("path.split", json!({"id": id, "segment": 0, "t": 1.5}), "`t`", ["0", "1"]), + ]; + for (cmd, p, key, numbers) in &refusals { + let e = s.execute(cmd, p).unwrap_err().to_string(); + assert!(e.starts_with(&format!("invalid parameters for `{cmd}`: ")) && e.contains(key) && e.contains(" must be from "), "{e}"); + assert_eq!(message(Lang::EN, &e), e); + for code in COMPLETE_MESSAGES { + let shown = message(Lang::from_code(code).expect("registered"), &e); + assert!(!shown.contains(" must be from ") && shown.contains(&format!("`{cmd}`")) && shown.contains(key), "{code}: {e} -> {shown}"); + assert!(numbers.iter().all(|n| shown.contains(n)), "{code}: {e} -> {shown}"); + } + } + assert_eq!( + message(de(), &s.execute("path.eraseRegion", &json!({"points": [[10, 10], [60, 10]], "roundness": 101})).unwrap_err().to_string()), + "ungültige Parameter für `path.eraseRegion`: `roundness` muss zwischen 1 und 100 % liegen" + ); +} + /// A 3D effect's refusal shows in the interface language whole, with the effect's translated /// name, and with its numbers, the parameter keys it names and a symbol's name as given; the /// error the command returns stays English. diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index 6dd60c8ef4..afd8cdce9a 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -9648,6 +9648,8 @@ breakText Glyphs Glifler @msg No bridge of this width fits across the selected art Bu genişlikte bir köprü seçili çizime sığmıyor @msg Some islands could not be joined to the area around the art Bazı adalar çizimin çevresindeki alana bağlanamadı @msg `width` must be from {lo} to {hi} pt `width` {lo} ile {hi} pt arasında olmalıdır +@msg `angle` must be from -180 to 180 degrees `angle` -180 ile 180 derece arasında olmalıdır +@msg `roundness` must be from 1 to 100% `roundness` %1 ile %100 arasında olmalıdır @msg `count` must be a whole number from 1 to {MAX_BRIDGES_PER_ISLAND} `count` 1 ile {MAX_BRIDGES_PER_ISLAND} arasında bir tam sayı olmalıdır Weed Box and Lines… Ayıklama Kutusu ve Çizgileri… Weed Box and Lines Ayıklama Kutusu ve Çizgileri diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index 56c1db1260..682edcbd4b 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -7493,6 +7493,8 @@ breakText Glyphs Гліфи @msg No bridge of this width fits across the selected art Місток такої ширини не вміщується впоперек виділеної графіки @msg Some islands could not be joined to the area around the art Деякі острівці не вдалося з’єднати з областю навколо графіки @msg `width` must be from {lo} to {hi} pt `width` має бути від {lo} до {hi} pt +@msg `angle` must be from -180 to 180 degrees `angle` має бути від -180 до 180 градусів +@msg `roundness` must be from 1 to 100% `roundness` має бути від 1 до 100% @msg `count` must be a whole number from 1 to {MAX_BRIDGES_PER_ISLAND} `count` має бути цілим числом від 1 до {MAX_BRIDGES_PER_ISLAND} Weed Box and Lines… Рамка й лінії вибірки… Weed Box and Lines Рамка й лінії вибірки diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index 71d478d5a1..7cbc02163d 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -7420,6 +7420,8 @@ breakText Glyphs Glyph @msg No bridge of this width fits across the selected art Không có cầu nối nào rộng như vậy vừa với hình vẽ đã chọn @msg Some islands could not be joined to the area around the art Không thể nối một số đảo với vùng xung quanh hình vẽ @msg `width` must be from {lo} to {hi} pt `width` phải từ {lo} đến {hi} pt +@msg `angle` must be from -180 to 180 degrees `angle` phải từ -180 đến 180 độ +@msg `roundness` must be from 1 to 100% `roundness` phải từ 1 đến 100% @msg `count` must be a whole number from 1 to {MAX_BRIDGES_PER_ISLAND} `count` phải là số nguyên từ 1 đến {MAX_BRIDGES_PER_ISLAND} Weed Box and Lines… Khung và đường bóc phần thừa… Weed Box and Lines Khung và đường bóc phần thừa diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index 51cd22746f..b445c6b44f 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -7606,6 +7606,8 @@ breakText Glyphs 字形 @msg No bridge of this width fits across the selected art 此宽度的连接桥无法放入所选图稿 @msg Some islands could not be joined to the area around the art 部分孤岛无法连接到图稿周围的区域 @msg `width` must be from {lo} to {hi} pt `width` 必须介于 {lo} 到 {hi} pt 之间 +@msg `angle` must be from -180 to 180 degrees `angle` 必须介于 -180 到 180 度之间 +@msg `roundness` must be from 1 to 100% `roundness` 必须介于 1 到 100% 之间 @msg `count` must be a whole number from 1 to {MAX_BRIDGES_PER_ISLAND} `count` 必须是 1 到 {MAX_BRIDGES_PER_ISLAND} 之间的整数 Weed Box and Lines… 除废框和除废线… Weed Box and Lines 除废框和除废线 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index 64fbb5f25c..6f8e18baf0 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -7415,6 +7415,8 @@ breakText Glyphs 字符 @msg No bridge of this width fits across the selected art 此寬度的連接橋無法放入所選圖稿 @msg Some islands could not be joined to the area around the art 部分孤島無法連接到圖稿周圍的區域 @msg `width` must be from {lo} to {hi} pt `width` 必須介於 {lo} 到 {hi} pt 之間 +@msg `angle` must be from -180 to 180 degrees `angle` 必須介於 -180 到 180 度之間 +@msg `roundness` must be from 1 to 100% `roundness` 必須介於 1 到 100% 之間 @msg `count` must be a whole number from 1 to {MAX_BRIDGES_PER_ISLAND} `count` 必須是介於 1 到 {MAX_BRIDGES_PER_ISLAND} 的整數 Weed Box and Lines… 除廢框與除廢線… Weed Box and Lines 除廢框與除廢線 diff --git a/docs/mcp.md b/docs/mcp.md index 3b47e809a2..74ea95519a 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -5953,6 +5953,12 @@ rotation that is neither a number nor null with `` `pressure` must be a number, (`pressure`, `tiltX`, `tiltY` or `rotation`). `path.close` refuses an `at`, `in` or `out` that is not `[x, y]` with `` `in` must be [x, y] ``, naming the key. +`path.eraseRegion` refuses an `angle` outside -180° to 180° with `` `angle` must be from -180 to 180 degrees `` and a +`roundness` outside 1% to 100% with `` `roundness` must be from 1 to 100% ``. `path.split` refuses a `t` outside 0 to 1 +with `` `t` must be from 0 to 1 ``, with `segment` or with `anchor`. The document does not change and no undo step is +recorded. Left out or null, `angle` is 0° and `roundness` is 100%; left out, `t` is 0.5. The Eraser's ranges are +VectorCraft's own values. + These commands refuse a string, a number or another value that is not true or false with `` `closed` must be true or false ``, naming the key; the document does not change and no undo step is recorded: `independent` in `path.close` and `path.setHandle`; `patterns` in `path.moveAnchors`; `closed`, `keepSelected` and diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index cc3d3ceadb..cc4082ad68 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -1203,6 +1203,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur Alt-drag with the Knife cuts in a straight line, and Shift+Alt-drag cuts at 45° or 90°, as [Cut objects using the Knife and Scissors tools](https://web.archive.org/web/20260926095638/https://helpx.adobe.com/illustrator/desktop/manage-objects/edit-objects/cut-objects.html) and [Default keyboard shortcuts](https://web.archive.org/web/20260726060015/https://helpx.adobe.com/illustrator/using/default-keyboard-shortcuts.html) describe. Alt counts only when held at the press; the dashed line runs from the press point to the pointer, stays straight after Alt is let go, and release sends `path.knife` with those two points. Alt pressed after the press leaves the cut freehand. Shift+Alt keeps the endpoint at 45° steps from the horizontal and vertical, whatever the Constrain Angle. With Smart Guides on, a straight Knife cut snaps to anchor points and paths: [Cut objects using the Knife and Scissors tools](https://helpx.adobe.com/illustrator/desktop/manage-objects/edit-objects/cut-objects.html) describes the Knife snapping to anchor points and paths while Smart Guides are on. Its ends snap as the ends of the Pencil's straight line do, to anchor points and path segments of art that is shown: the press, and the release of an Alt-drag. Shift+Alt steps 45° from the snapped press, and its release stays on that step. With Smart Guides off, or with Snap to Pixel or Snap to Grid on, the cut is not snapped. The dashed line and `path.knife` use the snapped points. Eraser Tool Options has Angle and Roundness besides Size, as [Erase paths using the Eraser tool](https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/modify-paths/erase-paths-using-eraser-tool.html) describes: the Eraser's tip is an ellipse Size across, its long axis at Angle and its short axis Roundness percent of the long one, and a drag with a tip that is not round shows the outline of the area it erases (`path.eraseRegion` `angle` and `roundness`). + `path.eraseRegion` refuses an Angle outside −180° to 180° and a Roundness outside 1% to 100% with an error and leaves the document unchanged; a key left out or null takes its default (0° and 100%). The help page gives no range for the two options, so the ranges are VectorCraft's own values. `path.split` refuses a `t` outside 0 to 1 in the same way. Eraser Tool Options gives Angle, Roundness and Size each a menu of Fixed, Random, Pressure, Tilt, Bearing and Rotation with a Variation field, as the same page describes: the tip varies by up to the Variation either way, Random once per drag and the others with what the pen reads at each point of the drag, and the tip outline at the pointer follows the pen while it erases. The outline of the area a drag shows takes, at each step, the tip the pen's readings give halfway along it, with a Random value shown as the value itself, and a mouse drag erases at the set values (`path.eraseRegion` `angleMode`, `roundnessMode`, `sizeMode` and their variations). The outline a Blob Brush or Eraser drag shows is built a bounded amount per frame, so a long stroke does not slow the canvas: each frame takes at most 256 new points of the drag and outlines again only the pieces of up to 32 segments they change, and the parts of a piece's outline inside the rest of the area are removed a limited amount at a time. While work is left, the canvas draws again with the pointer still, the points not outlined yet show as a thin line, and the tip shows at the pointer. When the tip varies with the pen (Size set to Pressure, or an Eraser mode that follows the pen), each step is its own piece and the outline also shows only the edge of the whole area. The release sends the whole stroke as before (`path.blob`, `path.eraseRegion`). The settled part of that outline is kept in paths of up to 64 pieces each. A path is shared from one frame to the next until a piece in it changes, and the canvas keeps the triangles it drew the path with while the view stays the same, so a frame does not copy, flatten or tessellate a settled path again; a pan, zoom or rotation draws each one once more. This is VectorCraft's own rule. The line that a drag of more than 64 segments shows with a round Eraser tip, the Knife, the Path Eraser or the Pencil with Live preview off is kept the same way, in pieces of 64 segments: a frame builds again only the last piece, and the Knife's dashes run on from one piece to the next. With the Eraser's Size set to a mode that follows the pen, each step of such a drag is kept as its own path and a frame builds only a new step. A smoothing drag's band is kept until it changes. The canvas still copies the kept triangles of every piece into each frame.