Mate type definitions and geometry references #11

Closed
opened 2026-02-03 16:09:27 +00:00 by forbes · 0 comments
Owner

Phase 1.1

Files: solver/mates/primitives.py (Create), solver/mates/init.py (Create), tests/mates/test_primitives.py (Create)

Scope: MateType enum (COINCIDENT, CONCENTRIC, PARALLEL, PERPENDICULAR, TANGENT, DISTANCE, ANGLE, LOCK) with context-dependent DOF removal. GeometryType enum (FACE, EDGE, POINT, AXIS, PLANE). GeometryRef dataclass (body_id, geometry_type, geometry_id, origin, direction). Mate dataclass (mate_id, mate_type, ref_a, ref_b, value, tolerance) with validate() and to_dict()/from_dict(). dof_removed() function for context-dependent DOF counting.

Acceptance Criteria:

  • MateType enum with all 8 types
  • GeometryType enum with 5 types
  • GeometryRef and Mate dataclasses
  • dof_removed() returns context-dependent DOF count
  • Mate.validate() raises on incompatible geometry
  • to_dict() / from_dict() JSON round-trip
  • Tests, ruff, mypy all pass
## Phase 1.1 **Files:** solver/mates/primitives.py (Create), solver/mates/__init__.py (Create), tests/mates/test_primitives.py (Create) **Scope:** MateType enum (COINCIDENT, CONCENTRIC, PARALLEL, PERPENDICULAR, TANGENT, DISTANCE, ANGLE, LOCK) with context-dependent DOF removal. GeometryType enum (FACE, EDGE, POINT, AXIS, PLANE). GeometryRef dataclass (body_id, geometry_type, geometry_id, origin, direction). Mate dataclass (mate_id, mate_type, ref_a, ref_b, value, tolerance) with validate() and to_dict()/from_dict(). dof_removed() function for context-dependent DOF counting. **Acceptance Criteria:** - [ ] MateType enum with all 8 types - [ ] GeometryType enum with 5 types - [ ] GeometryRef and Mate dataclasses - [ ] dof_removed() returns context-dependent DOF count - [ ] Mate.validate() raises on incompatible geometry - [ ] to_dict() / from_dict() JSON round-trip - [ ] Tests, ruff, mypy all pass
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/solver#11