forked from 1b-agent/opencadstudio-upstream
fix(viewcube): deterministic horizon for obliques, generic opposite
Top Front Right/Left kept Y (north) as up when starting from Top, tilting the base because orbit is turntable (never banks). Make snap_to_direction deterministic: world +Z horizon except near +-Z where north +Y is used, sign-preserved only for intentionally inverted views. Expand opposite() from faces-only to all 26 regions so already-there flip works for edges/corners.
This commit is contained in:
1 parent
5ba72ec3e4
commit
4fdef48502
3 files changed
+50
-49
No files matched your search
@@ -5511,9 +5511,10 @@ properties={:.1}ms picked={}",
|
||||
}
|
||||
let eye_dir = r_ucs.transform_vector3(region.snap_direction());
|
||||
|
||||
// Faces snap to a canonical upright orientation (never upside
|
||||
// down); edges/corners keep the current up-sense so they spin
|
||||
// smoothly around the clicked feature.
|
||||
// Faces and edges/corners all snap deterministically (world +Z
|
||||
// horizon, north +Y for top/bottom) so a cube click is repeatable
|
||||
// and matches the turntable orbit; snap_to_direction preserves an
|
||||
// intentional upside-down sense by sign-flipping only.
|
||||
let is_face = matches!(region, scene::CubeRegion::Face(_));
|
||||
if self.tabs[i].scene.active_viewport.is_some() {
|
||||
if is_face {
|
||||
|
||||
Reference in new issue
Block a user