forked from 1b-agent/opencadstudio-upstream
Merge pull request #1301: Add associative viewport dimensions
Refresh associations after complete SpaceMouse camera updates and recognize imported paper-space owners without Layout objects. Use kernel containment, intersection, perpendicular and spline tangent solving; pin cadkernel 7ce27f2 and add regressions.
This commit is contained in:
commit
d10a0cf798
35 files changed
+7077
-85
No files matched your search
@@ -1277,6 +1277,35 @@ impl OpenCADStudio {
|
||||
&self.tabs[i].scene.document,
|
||||
d.base().common.handle,
|
||||
);
|
||||
let statuses = self.tabs[i]
|
||||
.scene
|
||||
.dimension_association_status(d.base().common.handle);
|
||||
let slots = self.tabs[i]
|
||||
.scene
|
||||
.dimension_association_slot_points(d.base().common.handle)
|
||||
.len();
|
||||
let status = if statuses.is_empty() {
|
||||
t!("Nonassociative")
|
||||
} else if statuses.iter().any(|(_, status)| {
|
||||
matches!(status, crate::scene::ReferenceStatus::Broken(_))
|
||||
}) {
|
||||
t!("Broken reference")
|
||||
} else if statuses.iter().any(|(_, status)| {
|
||||
matches!(status, crate::scene::ReferenceStatus::Unresolved)
|
||||
}) {
|
||||
t!("Unresolved reference")
|
||||
} else if statuses.len() < slots {
|
||||
t!("Partially associated")
|
||||
} else {
|
||||
t!("Associated")
|
||||
};
|
||||
general.props.push(crate::scene::model::object::Property {
|
||||
label: t!("Association status").into_owned(),
|
||||
field: "association_status",
|
||||
value: crate::scene::model::object::PropValue::ReadOnly(
|
||||
status.into_owned(),
|
||||
),
|
||||
});
|
||||
general.props.push(crate::scene::model::object::Property {
|
||||
label: t!("Associative").into_owned(),
|
||||
field: "associative",
|
||||
|
||||
Reference in new issue
Block a user