Conversation
Shape.transform() (the base for Box/Sphere/...) only ever applies to the shape's frame and explicitly does not support scale, so applying a TransformControls scale-mode gizmo drag straight to geometry.transform() silently dropped the resize's effect on frame.point, and applying only the rigid (translation * rotation) part of the delta - as the old code path effectively did - could land the object's pivot a full grid unit away from where the gizmo showed it for a real-world resize amount. _apply_transform_with_scale now decomposes the incoming delta and, for a Shape being resized, applies the FULL delta (translation and scale together) to frame.point while only the rotation part goes to the frame's axes, then resizes via Shape.scale(). Non-Shape geometry (Point/Mesh/ Polyline) isn't scale-blind the way Shape is, so it keeps getting the full delta applied directly via its own .transform(). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Shape.transform()(the base for Box/Sphere/...) applies only to the shape's frame and ignores scale. A scale-mode TransformControls drag therefore lost the resize's effect onframe.point, and the object's pivot could end up a full grid unit away from where the gizmo showed it.Inbox._apply_transform_with_scalenow decomposes the delta. For aShapeit applies the full delta (translation + scale) toframe.pointand only the rotation to the frame axes, then resizes viaShape.scale(). Non-Shape geometry (Point/Mesh/Polyline) keeps getting the full delta through its own.transform().Stacked on #58 (WebSocket max frame size); merge that first. Frontend counterpart: compas-dev/compas_threejs_ts#33.
Test plan
pytest(newtests/test_object_transform_scale.py)🤖 Generated with Claude Code