Skip to content
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

feat: geometry objects with new structure #373

Merged
merged 17 commits into from
Jan 23, 2025

Conversation

dogukankaratas
Copy link

This PR splits the geometry objects to different files under geometry/ folder.

image

Addition to that:

  • Helper class for transform added.
  • ITransformable interface added.
  • Manual test files removed and unit tests for all geometric objects added.

Copy link

linear bot commented Jan 14, 2025

@KatKatKateryna
Copy link
Contributor

Thing that came to my mind first: splitting classes to different files will make it behave not like C# (for dev experience), because in Python we cannot assign namespaces. So every import will look slightly redundant: from...object.geometry.point import Point, while in C# it can be just used as Speckle.Geomerty.Point

Not necessarily an issue, but an observation

@JR-Morgan
Copy link
Member

Re-exporting a module could be an option here.
I normally seek input from @gjedlicska on these sorts of design choices, he has a better grasp than I on how to craft a good DX around importing module.

Copy link
Contributor

@KatKatKateryna KatKatKateryna left a comment

Choose a reason for hiding this comment

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

Another general observation, currently we do not calculate bbox on the objects. Should we or should we not, up to you or Gergo.

Overall, great work, I hope I helped to find some small blind spots 🙌

src/specklepy/objects/geometry/polyline.py Outdated Show resolved Hide resolved
src/specklepy/objects/geometry/polyline.py Show resolved Hide resolved
src/specklepy/objects/geometry/point.py Outdated Show resolved Hide resolved
src/specklepy/objects/geometry/point.py Outdated Show resolved Hide resolved
src/specklepy/objects/geometry/arc.py Show resolved Hide resolved
src/specklepy/objects/geometry/mesh.py Outdated Show resolved Hide resolved
src/specklepy/objects/geometry/mesh.py Outdated Show resolved Hide resolved
src/specklepy/objects/geometry/mesh.py Outdated Show resolved Hide resolved
src/specklepy/objects/geometry/mesh.py Outdated Show resolved Hide resolved
src/specklepy/objects/geometry/mesh.py Show resolved Hide resolved
src/specklepy/objects/geometry/mesh.py Outdated Show resolved Hide resolved
src/specklepy/objects/geometry/mesh.py Show resolved Hide resolved
src/specklepy/objects/geometry/mesh.py Show resolved Hide resolved
src/specklepy/objects/geometry/mesh.py Show resolved Hide resolved
src/specklepy/objects/geometry/polyline.py Show resolved Hide resolved
src/specklepy/objects/geometry/vector.py Show resolved Hide resolved
@dogukankaratas dogukankaratas merged commit 85aa938 into v3-dev Jan 23, 2025
2 checks passed
@dogukankaratas dogukankaratas deleted the dogukan/cnx-1006-add-missing-geometry-objects branch January 23, 2025 16:01
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.

3 participants