fix(scene): hatch pattern scale and per-entity annotative check
- Hatch pattern_scale multiplied by annotation_scale in model space so pattern density stays consistent when CANNOSCALE changes - Annotative check now uses AcAnnoPO xdata (R2007+ marker) instead of relying solely on group-code-293 flag; falls back to is_annotative for files with no xdata (old DXF backward compat) - acadrust patched to local path for is_annotative field Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
0e5dec0948
commit
b83c982bc2
4 changed files with 22 additions and 3 deletions
|
|
@ -62,6 +62,25 @@ pub fn tessellate(
|
|||
};
|
||||
let name = handle.value().to_string();
|
||||
|
||||
// Determine effective annotation scale for this entity.
|
||||
// AutoCAD marks annotative objects with "AcAnnoPO" xdata (R2007+).
|
||||
// If no xdata at all: old file without annotation system → treat as annotative.
|
||||
// If xdata present but no "AcAnnoPO": R2007+ file, entity is non-annotative → no scaling.
|
||||
let anno_scale = {
|
||||
let xdata = &entity.common().extended_data;
|
||||
let is_annotative = if xdata.is_empty() {
|
||||
// Old DXF / no annotation metadata — fall back to group-code-293 flag.
|
||||
match entity {
|
||||
EntityType::Text(t) => t.is_annotative,
|
||||
EntityType::MText(m) => m.is_annotative,
|
||||
_ => true,
|
||||
}
|
||||
} else {
|
||||
xdata.get_record("AcAnnoPO").is_some()
|
||||
};
|
||||
if is_annotative { anno_scale } else { 1.0 }
|
||||
};
|
||||
|
||||
// MultiLeader/Leader need anno_scale for arrow/dogleg/text — handle before generic path.
|
||||
if let EntityType::MultiLeader(ml) = entity {
|
||||
return tessellate_multileader_single(
|
||||
|
|
|
|||
Loading…
Reference in a new issue