-
Notifications
You must be signed in to change notification settings - Fork 114
Add scale component handling to Shape and PlanarSurface transformations #1494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: gonzalocasas <933277+gonzalocasas@users.noreply.github.com>
Co-authored-by: gonzalocasas <933277+gonzalocasas@users.noreply.github.com>
Co-authored-by: gonzalocasas <933277+gonzalocasas@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1494 +/- ##
==========================================
+ Coverage 62.26% 62.35% +0.09%
==========================================
Files 208 208
Lines 22452 22510 +58
==========================================
+ Hits 13979 14037 +58
Misses 8473 8473 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@copilot run the ruff linter (through |
Co-authored-by: gonzalocasas <933277+gonzalocasas@users.noreply.github.com>
Fixed all ruff linting issues. Removed 3 unused variables from test file (commit 0a2be4d). |
|
@copilot rebase on top of current |
|
if we are re-adding these implementations, we should remove the frame transformation from the base class, and raise a |
|
@copilot please also do this for |
…e.transform() - Changed Shape.transform() to raise NotImplementedError like other transformation methods (scale, etc.) - Added transform() implementation to PlanarSurface that extracts scale components - PlanarSurface.transform() applies X,Y scale factors to xsize, ysize respectively - Added comprehensive tests for PlanarSurface transformations - All linting checks pass Co-authored-by: gonzalocasas <933277+gonzalocasas@users.noreply.github.com>
Added transform() implementation to PlanarSurface with scale component handling and comprehensive tests (commit fd3dd45).
Changed Shape.transform() to raise NotImplementedError for consistency with other transformation methods like scale() (commit fd3dd45). |
Description
This PR fixes the issue where scale components in transformations were being ignored when applied to
ShapeandSurfacesubclasses. Previously, calling.transform()or.transformed()with a transformation containing a scale component would only transform the shape's frame while leaving dimensional parameters unchanged.Changes Made
Shape Subclasses
PlanarSurface
Base Class Changes
NotImplementedErrorfor consistency with other transformation methods likescale()transform()to decompose transformations and extract scale components before applying them to dimensional parametersTesting
tests/compas/geometry/test_shapes_transformations.pywith 29 tests covering:transform()andtransformed()methodsWhat type of change is this?
Checklist
CHANGELOG.mdfile in theUnreleasedsection under the most fitting heading (e.g.Added,Changed,Removed).invoke test).invoke lint).compas.datastructures.Mesh.Fixes #1493
Original prompt
Fixes #1493
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.