Skip to content

Conversation

tomvanmele
Copy link
Member

What type of change is this?

  • Bug fix in a backwards-compatible manner.
  • New feature in a backwards-compatible manner.
  • Breaking change: bug fix or new feature that involve incompatible API changes.
  • Other (e.g. doc update, configuration, etc)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I added a line to the CHANGELOG.md file in the Unreleased section under the most fitting heading (e.g. Added, Changed, Removed).
  • I ran all tests on my computer and it's all green (i.e. invoke test).
  • I ran lint on my computer and there are no errors (i.e. invoke lint).
  • I added new functions/classes and made them available on a second-level import, e.g. compas.datastructures.Mesh.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added necessary documentation (if appropriate)

@tomvanmele
Copy link
Member Author

fix for #1301

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug in the PlanarSurface.point_at method where it was not properly scaling the UV coordinates by the surface dimensions, returning incorrect point locations.

  • Fixed the point_at method to multiply UV coordinates by the surface's xsize and ysize
  • Added comprehensive test coverage for the corrected behavior
  • Updated changelog to document the bug fix

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/compas/geometry/surfaces/planar.py Fixed bug in point_at method to properly scale UV coordinates by surface dimensions
tests/compas/geometry/test_surfaces_plane.py Added test cases for surface sizing and mesh conversion functionality
CHANGELOG.md Added changelog entry for the bug fix
tasks.py Updated import path and removed unused grasshopper function
Comments suppressed due to low confidence (1)

src/compas/geometry/surfaces/planar.py:1

  • This commented-out code should be removed as it's no longer needed and creates clutter.
from __future__ import absolute_import

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

from compas_invocations2 import tests
from compas_invocations2 import grasshopper
from invoke import Collection
from invoke.collection import Collection
Copy link

Copilot AI Oct 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Import should use from invoke import Collection instead of the specific submodule path. This is the recommended import pattern for invoke.

Suggested change
from invoke.collection import Collection
from invoke import Collection

Copilot uses AI. Check for mistakes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my editor suggests the opposite...

Copy link

codecov bot commented Oct 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.04%. Comparing base (b8cef0d) to head (2ace77e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1485      +/-   ##
==========================================
+ Coverage   62.00%   62.04%   +0.04%     
==========================================
  Files         208      208              
  Lines       22427    22427              
==========================================
+ Hits        13905    13914       +9     
+ Misses       8522     8513       -9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tomvanmele
Copy link
Member Author

only question is if the surface should be centered around the origin...

@tomvanmele
Copy link
Member Author

although i was inclined to do so, it makes the UV space rather unintuitive...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant