Skip to content

Conversation

@mozandsal
Copy link
Collaborator

@mozandsal mozandsal commented Dec 16, 2025

Add Shapely-based polygon computation backend,

  • Implement ShapelyBackend class with local polygon operations using Shapely library
  • Add arc tessellation with configurable chord error, angle, and point limits
  • Support for all polygon operations: area, convex hull, intersections, transformations
  • Implement geometry predicates: is_convex, is_circle, is_box, is_inside
  • Add polygon set operations: unite, intersect, subtract, xor
  • Support polygon modifications: move, rotate, scale, mirror, expand, defeature
  • Add helper methods for closest points, bounding boxes, and circle intersections
  • Include comprehensive test suite covering all backend operations
  • Add test fixtures and utilities for polygon creation with arcs and holes
  • Support both server and Shapely backends with configurable selection

Add pluggable computation backend architecture for geometry operations,

  • Introduce Config class for managing computation backend selection
  • Add abstract PolygonBackend base class defining geom that delegates operations to RPC server
  • Add backend_factoryetry operation interface
  • Implement ServerBackend for dynamic backend selection based on configuration
  • Refactor PolygonData to use backend abstraction instead of direct server calls
  • Support configuration via PYEDB_COMPUTATION_BACKEND environment variable
  • Backend selection: 'server' (gRPC), 'shapely' (local), 'auto' (default: server)

- Introduce Config class for managing computation backend selection
- Add abstract PolygonBackend base class defining geom that delegates operations to RPC server
- Add backend_factoryetry operation interface
- Implement ServerBackend for dynamic backend selection based on configuration
- Refactor PolygonData to use backend abstraction instead of direct server calls
- Support configuration via PYEDB_COMPUTATION_BACKEND environment variable
- Backend selection: 'server' (gRPC), 'shapely' (local), 'auto' (default: server)
@mozandsal mozandsal requested a review from drewm102 as a code owner December 16, 2025 22:36
@mozandsal mozandsal changed the base branch from I641_mz_dev_3 to main December 16, 2025 22:37
@mozandsal mozandsal changed the title FEATURE: Add Shapely-based polygon computation backend with comprehensive tests FEATURE: Add Shapely-based polygon computation backend Dec 16, 2025
- Implement ShapelyBackend class with local polygon operations using Shapely library
- Add arc tessellation with configurable chord error, angle, and point limits
- Support for all polygon operations: area, convex hull, intersections, transformations
- Implement geometry predicates: is_convex, is_circle, is_box, is_inside
- Add polygon set operations: unite, intersect, subtract, xor
- Support polygon modifications: move, rotate, scale, mirror, expand, defeature
- Add helper methods for closest points, bounding boxes, and circle intersections
- Include comprehensive test suite covering all backend operations
- Add test fixtures and utilities for polygon creation with arcs and holes
- Support both server and Shapely backends with configurable selection
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.

2 participants