forked from 1b-agent/opencadstudio-upstream
fix(dimension): render baked *D fills inside block dimensions
A dimension bakes its geometry into a per-instance *D block, offset into the owning block by the dimension insertion_point. When that dimension sits inside a block (INSERT → block → Dimension → *D), only its top-level form drew; nested it rendered nothing, and once the lines/text/arrow outlines were routed through the block cache the arrowhead FILLS were still missing: - 2D SOLID arrowheads: block_cache's Dimension arm now expands the *D block, translating each sub by insertion_point (WCS → block-local) and routing Insert subs through build_nested_ref, others through tessellate_sub_local (which emits the solid fill_tris). - Insert(hatch) arrowheads (custom arrow blocks = LwPolyline + Hatch): the hatch renders via the separate GPU explosion path, which only descends INSERT→INSERT→Hatch trees and so never reached a hatch behind a Dimension. block_has_hatch now recurses through a Dimension into its *D block, and the fill explosion's new explode_including_dims lifts each dimension child's *D content into the owning block's frame (translate insertion_point, then apply the insert transform) so its arrow inserts / hatches ride the normal walk. Table *T baked blocks get the mirror treatment in block_cache. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1803f10264
commit
3689f0e504
3 files changed
+160
-3
No files matched your search
@@ -4092,6 +4092,14 @@ impl Scene {
|
||||
br.entity_handles.iter().any(|&h| match self.document.get_entity(h) {
|
||||
Some(EntityType::Hatch(_)) => true,
|
||||
Some(EntityType::Insert(ins)) => self.block_has_hatch(&ins.block_name, memo),
|
||||
// A dimension bakes its geometry into a per-instance `*D`
|
||||
// block; a custom filled arrowhead lives there as a nested
|
||||
// Insert(hatch). Recurse so the fill explosion knows to
|
||||
// descend the dimension (see `explode_including_dims`).
|
||||
Some(EntityType::Dimension(dim)) => {
|
||||
!dim.base().block_name.trim().is_empty()
|
||||
&& self.block_has_hatch(&dim.base().block_name, memo)
|
||||
}
|
||||
_ => false,
|
||||
})
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user