forked from 1b-agent/opencadstudio-upstream
fix(bpt): compare rotation rows across angle wrap
This commit is contained in:
1 parent
f74e1e8bd3
commit
9d2f4e592a
3 files changed
+33
-4
No files matched your search
+15
-1
@@ -221,7 +221,21 @@ impl OpenCADStudio {
|
||||
.then(|| {
|
||||
view.rows
|
||||
.iter()
|
||||
.position(|r| r.iter().zip(&values).all(|(a, b)| (a - b).abs() <= 1e-9))
|
||||
.position(|row| {
|
||||
row.iter().zip(&values).zip(&view.columns).all(
|
||||
|((row_value, value), column)| {
|
||||
let difference = if column
|
||||
.connection_name
|
||||
.eq_ignore_ascii_case("UpdatedAngle")
|
||||
{
|
||||
crate::scene::block_actions::angle_distance(*row_value, *value)
|
||||
} else {
|
||||
(row_value - value).abs()
|
||||
};
|
||||
difference <= 1e-9
|
||||
},
|
||||
)
|
||||
})
|
||||
})
|
||||
.flatten();
|
||||
self.tabs[i].selected_grips.push(GripDef {
|
||||
|
||||
Reference in new issue
Block a user