forked from 1b-agent/opencadstudio-upstream
chore: bump codec d28fd71, kernel a03e4f0, graph 79bdc4b
Codec: PRs #71-#74 merged (MPOLYGON layout, multiline ATTDEF/ATTRIB DXF, DXF MATERIAL/ACSH matrix, restorable SAT/SAB + history roots) and issues #55 #64-#69 fixed. EntityType now boxes Surface, Extended, Table, MultiLeader and Helix (2344 B -> 848 B per entity): construction sites wrap in Box, the entity traits forward through Box, and the python plugin generator converts with into(). Kernel: PR #70 (cuboid ring winding). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8c1471078d
commit
443b935a3f
31 files changed
+147
-84
No files matched your search
+18
-20
@@ -3052,10 +3052,10 @@ impl Scene {
|
||||
let is_insert = matches!(entity, EntityType::Insert(_));
|
||||
let is_section = matches!(
|
||||
entity,
|
||||
EntityType::Extended(codec::entities::ExtendedEntity {
|
||||
data: codec::entities::ExtendedEntityData::SectionObject(_),
|
||||
..
|
||||
})
|
||||
EntityType::Extended(extended) if matches!(
|
||||
extended.data,
|
||||
codec::entities::ExtendedEntityData::SectionObject(_)
|
||||
)
|
||||
);
|
||||
if self.meshes.contains_key(&handle)
|
||||
|| self.block_meshes.contains_key(&handle)
|
||||
@@ -7691,16 +7691,14 @@ impl Scene {
|
||||
CACHE_CATEGORY_MESH,
|
||||
|h| {
|
||||
self.meshes.contains_key(&h)
|
||||
|| matches!(
|
||||
self.document.get_entity(h),
|
||||
Some(EntityType::Insert(_))
|
||||
| Some(EntityType::Extended(
|
||||
codec::entities::ExtendedEntity {
|
||||
data: codec::entities::ExtendedEntityData::SectionObject(_),
|
||||
..
|
||||
}
|
||||
))
|
||||
)
|
||||
|| match self.document.get_entity(h) {
|
||||
Some(EntityType::Insert(_)) => true,
|
||||
Some(EntityType::Extended(extended)) => matches!(
|
||||
extended.data,
|
||||
codec::entities::ExtendedEntityData::SectionObject(_)
|
||||
),
|
||||
_ => false,
|
||||
}
|
||||
},
|
||||
) =>
|
||||
{
|
||||
@@ -12153,15 +12151,15 @@ mod section_tests {
|
||||
#[test]
|
||||
fn adding_and_erasing_a_section_keeps_its_object_graph_consistent() {
|
||||
let mut scene = Scene::new();
|
||||
let handle = scene.add_entity(EntityType::Extended(ExtendedEntity {
|
||||
let handle = scene.add_entity(EntityType::Extended(Box::new(ExtendedEntity {
|
||||
common: EntityCommon::new(),
|
||||
data: ExtendedEntityData::SectionObject(section(1, 0.0)),
|
||||
}));
|
||||
})));
|
||||
let settings_handle = match scene.document.get_entity(handle).unwrap() {
|
||||
EntityType::Extended(ExtendedEntity {
|
||||
data: ExtendedEntityData::SectionObject(data),
|
||||
..
|
||||
}) => data.settings_handle,
|
||||
EntityType::Extended(extended) => match &extended.data {
|
||||
ExtendedEntityData::SectionObject(data) => data.settings_handle,
|
||||
_ => unreachable!(),
|
||||
},
|
||||
_ => unreachable!(),
|
||||
};
|
||||
assert!(matches!(
|
||||
|
||||
Reference in new issue
Block a user