feat: datum point implementation and missing delete apis#2947
feat: datum point implementation and missing delete apis#2947jacobrkerstetter wants to merge 28 commits into
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 62 |
| Duplication | 6 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Pull request overview
This PR extends the PyAnsys Geometry client to model Datum Points as first-class design entities (including import from existing designs), integrates them into Named Selections, and adds missing delete/search APIs for several non-body entities via new/updated gRPC service endpoints.
Changes:
- Introduces
DatumPointclient type, server (de)serialization, and component/design APIs for creating, deleting, and searching datum points. - Extends
NamedSelectionand supporting helpers/gRPC to include datum points as selectable members. - Adds delete/search support for coordinate systems and design curves, with new integration tests covering the added behaviors.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/integration/test_design.py | Extends integration coverage for datum points in named selections and updated design __repr__ counts; adds coordinate system delete/search tests. |
| tests/integration/test_datum_point.py | New integration tests for datum point create/delete/search and named-selection membership. |
| tests/integration/test_curves.py | Adds integration tests for design-curve search and delete APIs. |
| src/ansys/geometry/core/misc/auxiliary.py | Adds traversal and ID→object helper for datum points. |
| src/ansys/geometry/core/designer/selection.py | Adds datum points to NamedSelection members, caching/verification, and representation. |
| src/ansys/geometry/core/designer/design.py | Adds datum-point support to named selection creation and existing-design import; expands __repr__ counts. |
| src/ansys/geometry/core/designer/datumpoint.py | New DatumPoint entity implementation, including named-selection lookup and plotting support. |
| src/ansys/geometry/core/designer/component.py | Adds datum-point APIs (create/delete/search) and coordinate-system/design-curve delete/search APIs; updates design-point creation call. |
| src/ansys/geometry/core/designer/init.py | Exposes DatumPlane and new DatumPoint at package level. |
| src/ansys/geometry/core/_grpc/_services/v1/points.py | Adds datum-point create/delete endpoints; reworks v1 design-point creation to use Curve service. |
| src/ansys/geometry/core/_grpc/_services/v1/named_selection.py | Serializes datum-point IDs in named selection get/create responses. |
| src/ansys/geometry/core/_grpc/_services/v1/designs.py | Serializes datum points when reading an existing design. |
| src/ansys/geometry/core/_grpc/_services/v1/curves.py | Adds curve delete endpoint. |
| src/ansys/geometry/core/_grpc/_services/v1/coordinate_systems.py | Fixes returned ID field and adds delete endpoint. |
| src/ansys/geometry/core/_grpc/_services/v1/conversions.py | Renames/consolidates Point3D→gRPC conversions for datum points. |
| src/ansys/geometry/core/_grpc/_services/v0/points.py | Adds datum-point delete endpoint and datum-point create placeholder for v0 services. |
| src/ansys/geometry/core/_grpc/_services/v0/curves.py | Adds curve delete endpoint in v0 services. |
| src/ansys/geometry/core/_grpc/_services/v0/coordinate_systems.py | Adds coordinate-system delete endpoint in v0 services. |
| src/ansys/geometry/core/_grpc/_services/base/points.py | Adds abstract API for datum-point create/delete in the base points service. |
| src/ansys/geometry/core/_grpc/_services/base/curves.py | Adds abstract curve delete API in base curves service. |
| src/ansys/geometry/core/_grpc/_services/base/coordinate_systems.py | Adds abstract coordinate-system delete API in base coordinate-systems service. |
Comments suppressed due to low confidence (1)
src/ansys/geometry/core/designer/selection.py:433
- The
membersparameter docstring line is > line-length limits, and# Noqa: E501is ineffective here (and wrong-cased for standard# noqa). This is likely to fail linting; wrap the docstring text instead and drop the noqa.
members : list of Body, Face, Edge, Beam, DesignPoint, Component, Vertex, DesignCurve, or DatumPoint
The members to remove from the named selection.
Returns
-------
…/ansys/pyansys-geometry into feat/datum-point-delete-api-impl
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2947 +/- ##
==========================================
- Coverage 91.55% 91.51% -0.04%
==========================================
Files 175 176 +1
Lines 15519 15729 +210
==========================================
+ Hits 14208 14395 +187
- Misses 1311 1334 +23 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…/ansys/pyansys-geometry into feat/datum-point-delete-api-impl
jonahrb
left a comment
There was a problem hiding this comment.
My only question is - does create_design_points need to stay for a while and be marked as obsolete, or is it okay to make breaking changes by removing it now
|
@jonahrb The _grpc layer is ok because I swapped everywhere that it is used to appropriately use create_datum_points and create_design_points. The user should never feel this change because they should never call the _grpc layer directly. |
Description
Issue linked
Checklist
feat: extrude circle to cylinder)