Feat/add loft sweep#16
Open
akaszynski wants to merge 3 commits into
Open
Conversation
Circular pattern previously mapped set_axis("Z") to the FRONT plane
(whose normal is +Y), rotating patterned features around the wrong
axis; map Z/Y/X to Top/Front/Right and query their faces so the
rotation axis is the plane normal. Linear pattern entity list now
emits one qCreatedBy query per feature ID instead of a single query
with deterministicIds (which does not resolve feature children).
BooleanBuilder now emits featureType "booleanBodies" and parameterId
"operationType" to match the current Onshape API. CircularPattern
gains set_axis_query for callers that need a cylindrical-face axis
rather than a stock plane. Tests updated to match.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add loft and sweep feature tools. Add download artifacts.
Changes
create_loftMCP tool andLoftBuilder— connects 2+ sketch profiles into a solid body, with optional closed/periodic flag andNEW/ADD/REMOVE/INTERSECToperation types.create_sweepMCP tool andSweepBuilder— sweeps a sketch profile along a sketch path, with optionalkeepProfileOrientationand operation type.export_part_studioandexport_assemblytools now support end-to-end export-to-disk: passingoutputPathkicks off the translation, polls until it reaches a terminal state, and writes the binary result to the given path (previously the tool only kicked off the translation and returned a translation id).OnshapeClient.get_bytes()added for binary downloads (translation results would otherwise be corrupted by the JSON parser inget()).ExportManagergainsdownload_external_data,wait_for_translation,export_part_studio_to_file, andexport_assembly_to_file.Type of Change
Testing
pytest -v) — 510 passedtests/builders/test_loft.py— 4 tests (requires >=2 profiles, minimum shape, closed flag, operation type)tests/builders/test_sweep.py— 3 tests (requires profile+path, minimum shape, keep orientation + op type)tests/api/test_export.py— 6 tests (external data download, poll to DONE, poll to FAILED, write-to-file, skip-poll when already DONE, assembly path variant)Loft and sweep builders were additionally live-validated against the Onshape API:
featureStatus: OK.opLoftdirectly via FeatureScript. The feature JSON is accepted; errors only arise from geometrically invalid profile pairs (e.g., perpendicular planes sharing the origin produceLOFT_DIRECTION_ERROR, which is an Onshape regen error rather than a builder issue).Checklist