Sketch: infinite construction lines (#1359) (#1547)

Thanks @DuBearte.
This commit is contained in:
DuBearte authored and GitHub committed 2026-10-15 22:54:16 -04:00
1 parent bd17eeef0c
commit 987f0be21e
27 files changed
+435 -28

No files matched your search

+7 -1
View File
@@ -2244,11 +2244,14 @@ fn construction(s: &mut Session, p: &Value) -> Result<Value> {
let mut n = 0;
for c in cs {
if let Some(cu) = sk.curves.get_mut(c)
&& (cu.construction != to || to && cu.centerline)
&& (cu.construction != to || to && cu.centerline || !to && cu.infinite)
{
cu.construction = to;
if to {
cu.centerline = false;
} else {
// A normal line is a finite one.
cu.infinite = false;
}
n += 1;
}
@@ -2512,6 +2515,9 @@ mod drag_live_tests;
#[path = "sketch_ids_tests.rs"]
mod ids_tests;
#[cfg(test)]
#[path = "sketch_infinite_tests.rs"]
mod infinite_tests;
#[cfg(test)]
#[path = "sketch_redundant_tests.rs"]
mod redundant_tests;
#[cfg(test)]