Skip to content

feat: datum point implementation and missing delete apis#2947

Open
jacobrkerstetter wants to merge 28 commits into
mainfrom
feat/datum-point-delete-api-impl
Open

feat: datum point implementation and missing delete apis#2947
jacobrkerstetter wants to merge 28 commits into
mainfrom
feat/datum-point-delete-api-impl

Conversation

@jacobrkerstetter

@jacobrkerstetter jacobrkerstetter commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Description

  • added datum points as a class type and support their import from existing files
  • reworked design points and datum points to accurately represent the different types in SC/Disco
  • adding delete api for design curves, datum points, and coordinate systems
  • cover new functionality with relevant testing

Issue linked

Checklist

  • I have tested my changes locally.
  • I have added necessary documentation or updated existing documentation.
  • I have followed the coding style guidelines of this project.
  • I have added appropriate unit tests.
  • I have reviewed my changes before submitting this pull request.
  • I have linked the issue or issues that are solved to the PR if any.
  • I have assigned this PR to myself.
  • I have added the minimum version decorator to any new backend method implemented.
  • I have made sure that the title of my PR follows Conventional commits style (e.g. feat: extrude circle to cylinder)

@codacy-production

codacy-production Bot commented Jul 16, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 62 complexity · 6 duplication

Metric Results
Complexity 62
Duplication 6

View in Codacy

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.

@github-actions github-actions Bot added the enhancement New features or code improvements label Jul 16, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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 DatumPoint client type, server (de)serialization, and component/design APIs for creating, deleting, and searching datum points.
  • Extends NamedSelection and 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 members parameter docstring line is > line-length limits, and # Noqa: E501 is 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
        -------

Comment thread src/ansys/geometry/core/designer/selection.py Outdated
Comment thread src/ansys/geometry/core/designer/component.py Outdated
Comment thread src/ansys/geometry/core/designer/component.py Outdated
Comment thread src/ansys/geometry/core/designer/component.py Outdated
Comment thread src/ansys/geometry/core/designer/component.py
Comment thread src/ansys/geometry/core/_grpc/_services/v0/points.py Outdated
Comment thread src/ansys/geometry/core/_grpc/_services/v0/points.py Outdated
Comment thread src/ansys/geometry/core/_grpc/_services/v1/designs.py Outdated
@jacobrkerstetter
jacobrkerstetter marked this pull request as draft July 16, 2026 17:16
@github-actions github-actions Bot added the maintenance Package and maintenance related label Jul 16, 2026
@jacobrkerstetter
jacobrkerstetter marked this pull request as ready for review July 17, 2026 17:28
@jacobrkerstetter
jacobrkerstetter requested a review from Copilot July 17, 2026 17:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 23 out of 24 changed files in this pull request and generated 6 comments.

Comment thread src/ansys/geometry/core/designer/selection.py
Comment thread src/ansys/geometry/core/_grpc/_services/v1/coordinate_systems.py
Comment thread src/ansys/geometry/core/_grpc/_services/v0/coordinate_systems.py
Comment thread src/ansys/geometry/core/_grpc/_services/v1/curves.py
Comment thread doc/changelog.d/2947.added.md Outdated
Comment thread src/ansys/geometry/core/designer/component.py
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.30233% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.51%. Comparing base (d467ad4) to head (d680f74).

Files with missing lines Patch % Lines
...c/ansys/geometry/core/_grpc/_services/v0/points.py 44.44% 5 Missing ⚠️
...etry/core/_grpc/_services/v0/coordinate_systems.py 33.33% 4 Missing ⚠️
...c/ansys/geometry/core/_grpc/_services/v0/curves.py 42.85% 4 Missing ⚠️
src/ansys/geometry/core/designer/component.py 96.59% 3 Missing ⚠️
src/ansys/geometry/core/designer/datumpoint.py 93.02% 3 Missing ⚠️
src/ansys/geometry/core/designer/design.py 75.00% 2 Missing ⚠️
.../ansys/geometry/core/_grpc/_services/v0/designs.py 66.66% 1 Missing ⚠️
.../ansys/geometry/core/_grpc/_services/v1/designs.py 66.66% 1 Missing ⚠️
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.
📢 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.

@jacobrkerstetter jacobrkerstetter changed the title feat: datum point implementation and missing delete api's feat: datum point implementation and missing delete apis Jul 17, 2026

@jonahrb jonahrb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@jacobrkerstetter

Copy link
Copy Markdown
Contributor Author

@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.

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

Labels

enhancement New features or code improvements maintenance Package and maintenance related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants