sketchgraphs.onshape.call¶
Simple command line utilties for interacting with Onshape API.
A sketch is considered a feature of an Onshape PartStudio. This script enables adding a sketch to a part (add_feature), retrieving all features from a part including sketches (get_features), and retrieving the possibly updated state of each sketch’s entities/primitives post constraint solving (get_info).
Functions
-
sketchgraphs.onshape.call.
add_feature
(url, sketch_dict, sketch_name=None, logging=False)¶ Adds a sketch to a part.
- Parameters
- Returns
- Return type
-
sketchgraphs.onshape.call.
get_features
(url, logging=False)¶ Retrieves features from a part.
-
sketchgraphs.onshape.call.
get_info
(url, sketch_name=None, logging=False)¶ Retrieves possibly updated states of entities in a part’s sketches.
- Parameters
- Returns
sketch_info – A dictionary containing entity info for sketches
- Return type
-
sketchgraphs.onshape.call.
get_states
(url, logging=False)¶ Retrieves states of sketches in a part.
If there are no issues with a sketch, the feature state is
OK
. If there are issues, e.g., unsolved constraints, the state isWARNING
. All sketches in the queried PartStudio must have unique names.
-
sketchgraphs.onshape.call.
main
()¶