mirror of
https://github.com/bherbruck/solidcraft.git
synced 2026-11-04 11:05:56 +00:00
Patch: the continuity choice's hover text says the corners stay tangent where the faces round them clash
The Patch dialog's continuity row keeps each order's hover line and adds one: the patch meets the faces round it at the chosen continuity along each side, and at a corner where those faces meet each other with different curvatures it stays tangent (G1) there. New text in assets/locales/pending/patch-continuity-corners.json, in English and the complete catalogs (Arabic, Hebrew, Japanese, Chinese), German and Korean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"en": {
|
||||
"ui.patch_continuity_corner_tip": "The patch meets the faces round it at the chosen continuity along each side. At a corner where those faces meet each other with different curvatures, it stays tangent (G1) there."
|
||||
},
|
||||
"ar": {
|
||||
"ui.patch_continuity_corner_tip": "تلتقي الرقعة بالأوجه المحيطة بها بالاستمرارية المختارة على طول كل جانب. وعند زاوية تلتقي فيها تلك الأوجه بعضها ببعض بانحناءات مختلفة، تبقى مماسّة (G1) هناك."
|
||||
},
|
||||
"de": {
|
||||
"ui.patch_continuity_corner_tip": "Der Patch schließt entlang jeder Seite mit der gewählten Stetigkeit an die umgebenden Flächen an. An einer Ecke, an der diese Flächen mit unterschiedlicher Krümmung aufeinandertreffen, bleibt er dort tangential (G1)."
|
||||
},
|
||||
"he": {
|
||||
"ui.patch_continuity_corner_tip": "הטלאי פוגש את הפאות שסביבו ברציפות שנבחרה לאורך כל צלע. בפינה שבה הפאות האלה נפגשות זו עם זו בעקמומיות שונה, הוא נשאר משיק (G1) שם."
|
||||
},
|
||||
"ja": {
|
||||
"ui.patch_continuity_corner_tip": "パッチは各辺に沿って、周囲の面と選んだ連続性でつながります。周囲の面どうしが異なる曲率で接するコーナーでは、そこで接線 (G1) にとどまります。"
|
||||
},
|
||||
"ko": {
|
||||
"ui.patch_continuity_corner_tip": "패치는 각 변을 따라 주변 면과 선택한 연속성으로 이어집니다. 주변 면끼리 서로 다른 곡률로 만나는 모서리에서는 그곳에서 접선(G1)으로 유지됩니다."
|
||||
},
|
||||
"zh": {
|
||||
"ui.patch_continuity_corner_tip": "补面沿每条边以所选的连续性与周围的面相接。在周围的面彼此以不同曲率相接的角上,补面在该处保持相切 (G1)。"
|
||||
}
|
||||
}
|
||||
@@ -144,6 +144,13 @@ fn patch_orders() -> Vec<Continuity> {
|
||||
Construction::Patch.offered()
|
||||
}
|
||||
|
||||
/// The patch's hover text: each order's line, then what the patch reaches at a corner whose
|
||||
/// faces meet each other with different curvatures (tangent only: no surface smooth at the corner
|
||||
/// has both curvatures there).
|
||||
fn patch_continuity_tip() -> String {
|
||||
format!("{}\n{}", ui_kit::continuity_tip(&patch_orders()), crate::i18n::tr("ui.patch_continuity_corner_tip"))
|
||||
}
|
||||
|
||||
fn blend_orders() -> Vec<Continuity> {
|
||||
Construction::Bridge.offered()
|
||||
}
|
||||
@@ -284,7 +291,7 @@ pub fn rows(ui: &mut egui::Ui, k: &mut Surf) -> bool {
|
||||
ui_kit::options(ui, "untrim_options", &mut [("Restore outer boundary", outer), ("In place (surfaces)", in_place)]);
|
||||
}
|
||||
Surf::Patch { continuity } => {
|
||||
ui_kit::continuity_row(ui, "Continuity", "pa_cont", continuity, &patch_orders());
|
||||
ui_kit::continuity_row_explained(ui, "Continuity", "pa_cont", continuity, &patch_orders(), &patch_continuity_tip());
|
||||
}
|
||||
Surf::Blend { continuity, bulge, stitch } => {
|
||||
let [from, to] = continuity;
|
||||
@@ -1116,5 +1123,9 @@ mod tests {
|
||||
}
|
||||
}
|
||||
assert_eq!(ui_kit::continuity_tip(&blend_orders()).lines().count(), 4);
|
||||
// The patch's hover text adds what it does at a corner whose faces' curvatures differ.
|
||||
let tip = patch_continuity_tip();
|
||||
assert_eq!(tip.lines().count(), patch_orders().len() + 1, "{tip}");
|
||||
assert!(tip.lines().last().is_some_and(|l| l.contains("corner") && l.contains("G1")), "{tip}");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user