forked from 1b-agent/opencadstudio-upstream
fix(blocks): each dashed line in a block starts its own pattern
Block children of one style are batched into a single wire, and a plinegen wire carries its dash distance across the joins. Every LINE wire is plinegen, so each line in a block began mid-dash wherever the previous one had stopped. PLINEGEN governs a wire's own breaks; a member without any now enters its batch as non-plinegen. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
1f5a7e97a1
commit
95a4419d0d
1 file changed
+11
-2
Vendored
+11
-2
@@ -2630,6 +2630,15 @@ fn emit_wire(
|
||||
&& lw.plot_visible
|
||||
&& (!lw.plot_l0 || ctx.l0_plottable);
|
||||
|
||||
// Batched wires share one dash distance, which runs on across the NaN
|
||||
// joins only for plinegen wires. PLINEGEN is about a wire's own breaks;
|
||||
// a member without any (every LINE) must not carry its pattern into the
|
||||
// next member, or each line in a block starts mid-dash where the last
|
||||
// one stopped (#898). A member with stations keeps its own flag.
|
||||
let plinegen = lw.plinegen
|
||||
&& (has_stations
|
||||
|| transformed_stations.is_some()
|
||||
|| lw.points.iter().any(|point| point[0].is_nan()));
|
||||
let key = style_key(
|
||||
final_color,
|
||||
lw.contrast_bg,
|
||||
@@ -2642,7 +2651,7 @@ fn emit_wire(
|
||||
final_world_width,
|
||||
point_marker,
|
||||
final_aci,
|
||||
lw.plinegen,
|
||||
plinegen,
|
||||
lw.is_fill_only,
|
||||
lw.fill_is_2d_solid,
|
||||
lw.fill_is_3d,
|
||||
@@ -2679,7 +2688,7 @@ fn emit_wire(
|
||||
final_world_width,
|
||||
point_marker,
|
||||
final_aci,
|
||||
lw.plinegen,
|
||||
plinegen,
|
||||
lw.is_fill_only,
|
||||
lw.fill_is_2d_solid,
|
||||
lw.fill_is_3d,
|
||||
|
||||
Reference in new issue
Block a user