autoassembler 0.3.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- autoassembler/.fernignore +7 -0
- autoassembler/__init__.py +537 -0
- autoassembler/_custom/__init__.py +56 -0
- autoassembler/_custom/assemblies.py +226 -0
- autoassembler/_custom/assemblies_api.py +188 -0
- autoassembler/_custom/credentials.py +248 -0
- autoassembler/_custom/http.py +42 -0
- autoassembler/_custom/operations.py +258 -0
- autoassembler/_custom/planning.py +598 -0
- autoassembler/_custom/planning_api.py +225 -0
- autoassembler/_default_clients.py +32 -0
- autoassembler/_version.py +8 -0
- autoassembler/alpha/__init__.py +63 -0
- autoassembler/alpha/client.py +82 -0
- autoassembler/alpha/jobs/__init__.py +39 -0
- autoassembler/alpha/jobs/client.py +338 -0
- autoassembler/alpha/jobs/raw_client.py +641 -0
- autoassembler/alpha/jobs/types/__init__.py +42 -0
- autoassembler/alpha/jobs/types/cancel_job_jobs_response.py +12 -0
- autoassembler/alpha/jobs/types/list_jobs_jobs_response.py +30 -0
- autoassembler/alpha/jobs/types/list_jobs_jobs_response_pagination.py +22 -0
- autoassembler/alpha/jobs/types/retry_job_jobs_response.py +16 -0
- autoassembler/alpha/planning/__init__.py +49 -0
- autoassembler/alpha/planning/client.py +201 -0
- autoassembler/alpha/planning/raw_client.py +268 -0
- autoassembler/alpha/planning/types/__init__.py +47 -0
- autoassembler/alpha/planning/types/apply_ops_planning_request_namespace.py +5 -0
- autoassembler/alpha/planning/types/apply_ops_planning_request_ops_item.py +13 -0
- autoassembler/alpha/planning/types/apply_ops_planning_request_ops_item_op.py +58 -0
- autoassembler/alpha/planning/types/apply_ops_planning_response.py +13 -0
- autoassembler/alpha/raw_client.py +13 -0
- autoassembler/assemblies/__init__.py +73 -0
- autoassembler/assemblies/client.py +1177 -0
- autoassembler/assemblies/raw_client.py +1557 -0
- autoassembler/assemblies/types/__init__.py +71 -0
- autoassembler/assemblies/types/delete_assembly_response.py +12 -0
- autoassembler/assemblies/types/download_assembly_cad_request_namespace.py +5 -0
- autoassembler/assemblies/types/get_assembly_info_request_namespace.py +5 -0
- autoassembler/assemblies/types/get_status_request_namespace.py +5 -0
- autoassembler/assemblies/types/get_status_response.py +16 -0
- autoassembler/assemblies/types/get_status_response_progress.py +13 -0
- autoassembler/assemblies/types/get_status_response_status.py +7 -0
- autoassembler/assemblies/types/get_structure_request_namespace.py +5 -0
- autoassembler/assemblies/types/list_assembly_versions_request_namespace.py +5 -0
- autoassembler/assemblies/types/list_connections_request_namespace.py +5 -0
- autoassembler/assemblies/types/process_request_namespace.py +5 -0
- autoassembler/assemblies/types/update_assembly_info_request_namespace.py +5 -0
- autoassembler/auth/__init__.py +34 -0
- autoassembler/auth/client.py +282 -0
- autoassembler/auth/raw_client.py +413 -0
- autoassembler/auth/types/__init__.py +36 -0
- autoassembler/auth/types/create_access_token_request_grant_type.py +7 -0
- autoassembler/base_client.py +328 -0
- autoassembler/client.py +262 -0
- autoassembler/core/__init__.py +127 -0
- autoassembler/core/api_error.py +23 -0
- autoassembler/core/client_wrapper.py +147 -0
- autoassembler/core/datetime_utils.py +70 -0
- autoassembler/core/file.py +67 -0
- autoassembler/core/force_multipart.py +18 -0
- autoassembler/core/http_client.py +965 -0
- autoassembler/core/http_response.py +63 -0
- autoassembler/core/http_sse/__init__.py +42 -0
- autoassembler/core/http_sse/_api.py +455 -0
- autoassembler/core/http_sse/_decoders.py +74 -0
- autoassembler/core/http_sse/_exceptions.py +7 -0
- autoassembler/core/http_sse/_models.py +17 -0
- autoassembler/core/jsonable_encoder.py +133 -0
- autoassembler/core/logging.py +107 -0
- autoassembler/core/parse_error.py +36 -0
- autoassembler/core/pydantic_utilities.py +486 -0
- autoassembler/core/query_encoder.py +58 -0
- autoassembler/core/remove_none_from_dict.py +11 -0
- autoassembler/core/request_options.py +40 -0
- autoassembler/core/serialization.py +347 -0
- autoassembler/environment.py +7 -0
- autoassembler/errors/__init__.py +56 -0
- autoassembler/errors/bad_request_error.py +10 -0
- autoassembler/errors/conflict_error.py +10 -0
- autoassembler/errors/forbidden_error.py +11 -0
- autoassembler/errors/internal_server_error.py +11 -0
- autoassembler/errors/not_found_error.py +11 -0
- autoassembler/errors/unauthorized_error.py +10 -0
- autoassembler/errors/unprocessable_entity_error.py +11 -0
- autoassembler/operation.py +196 -0
- autoassembler/operations/__init__.py +4 -0
- autoassembler/operations/client.py +209 -0
- autoassembler/operations/raw_client.py +343 -0
- autoassembler/planning/__init__.py +70 -0
- autoassembler/planning/client.py +1174 -0
- autoassembler/planning/raw_client.py +1349 -0
- autoassembler/planning/types/__init__.py +68 -0
- autoassembler/planning/types/adapt_request_namespace.py +5 -0
- autoassembler/planning/types/create_mpp_request_body.py +8 -0
- autoassembler/planning/types/create_mpp_request_namespace.py +5 -0
- autoassembler/planning/types/delete_mpp_request_namespace.py +5 -0
- autoassembler/planning/types/delete_mpp_response.py +12 -0
- autoassembler/planning/types/evaluate_dfa_request_namespace.py +5 -0
- autoassembler/planning/types/get_mpp_request_namespace.py +5 -0
- autoassembler/planning/types/get_mpp_response.py +27 -0
- autoassembler/planning/types/list_mpps_request_namespace.py +5 -0
- autoassembler/planning/types/plan_request_namespace.py +5 -0
- autoassembler/planning/types/validate_request_namespace.py +5 -0
- autoassembler/py.typed +0 -0
- autoassembler/sessions/__init__.py +4 -0
- autoassembler/sessions/client.py +102 -0
- autoassembler/sessions/raw_client.py +126 -0
- autoassembler/types/__init__.py +344 -0
- autoassembler/types/access_token_response.py +14 -0
- autoassembler/types/active_session.py +25 -0
- autoassembler/types/active_session_namespace.py +5 -0
- autoassembler/types/adapt_mpp_accepted.py +26 -0
- autoassembler/types/assembly.py +30 -0
- autoassembler/types/assembly_connection.py +21 -0
- autoassembler/types/assembly_connection_relationship.py +5 -0
- autoassembler/types/assembly_connections_response.py +13 -0
- autoassembler/types/assembly_diff_metadata.py +35 -0
- autoassembler/types/assembly_diff_response.py +34 -0
- autoassembler/types/assembly_info.py +36 -0
- autoassembler/types/assembly_json_response.py +15 -0
- autoassembler/types/assembly_process_metadata.py +32 -0
- autoassembler/types/assembly_process_response.py +18 -0
- autoassembler/types/assembly_search_hit.py +31 -0
- autoassembler/types/assembly_version_summary.py +27 -0
- autoassembler/types/conflict_error_body.py +19 -0
- autoassembler/types/conflict_error_body_error.py +5 -0
- autoassembler/types/create_mpp_request.py +13 -0
- autoassembler/types/device_authorization_response.py +17 -0
- autoassembler/types/diff_accepted.py +42 -0
- autoassembler/types/diff_context_node.py +20 -0
- autoassembler/types/diff_details.py +73 -0
- autoassembler/types/diff_error_response.py +38 -0
- autoassembler/types/diff_flags.py +74 -0
- autoassembler/types/diff_ml_semantics.py +55 -0
- autoassembler/types/diff_node.py +26 -0
- autoassembler/types/diff_node_pair_with_parts.py +90 -0
- autoassembler/types/diff_node_with_parent.py +15 -0
- autoassembler/types/diff_reference_target_nodes.py +25 -0
- autoassembler/types/diff_report.py +24 -0
- autoassembler/types/diff_rigid_alignment.py +30 -0
- autoassembler/types/diff_summary.py +121 -0
- autoassembler/types/diff_summary_assembly_labels.py +44 -0
- autoassembler/types/diff_summary_geometric_diffs.py +24 -0
- autoassembler/types/diff_summary_persistent_edges_congruence.py +24 -0
- autoassembler/types/diff_summary_persistent_edges_congruence_pose.py +24 -0
- autoassembler/types/diff_summary_persistent_nodes_congruence.py +24 -0
- autoassembler/types/diff_summary_persistent_nodes_congruence_pose.py +24 -0
- autoassembler/types/diff_summary_total_parts.py +24 -0
- autoassembler/types/diff_swap.py +65 -0
- autoassembler/types/diff_swap_confidence.py +5 -0
- autoassembler/types/diff_swap_group.py +92 -0
- autoassembler/types/diff_validation_issue.py +38 -0
- autoassembler/types/diff_validation_issue_severity.py +5 -0
- autoassembler/types/diff_validation_result.py +35 -0
- autoassembler/types/diff_warning.py +79 -0
- autoassembler/types/diff_warning_reason.py +18 -0
- autoassembler/types/diff_warning_severity.py +5 -0
- autoassembler/types/error_response.py +30 -0
- autoassembler/types/filter.py +19 -0
- autoassembler/types/filter_field.py +7 -0
- autoassembler/types/filter_operator.py +5 -0
- autoassembler/types/job.py +123 -0
- autoassembler/types/job_progress.py +24 -0
- autoassembler/types/job_status.py +5 -0
- autoassembler/types/list_operations_response.py +25 -0
- autoassembler/types/manufacturing_process_plan.py +57 -0
- autoassembler/types/mpp_adapt_metadata.py +48 -0
- autoassembler/types/mpp_adapt_response.py +22 -0
- autoassembler/types/mpp_evaluate_dfa_metadata.py +47 -0
- autoassembler/types/mpp_evaluate_dfa_response.py +22 -0
- autoassembler/types/mpp_plan_metadata.py +47 -0
- autoassembler/types/mpp_plan_response.py +22 -0
- autoassembler/types/mpp_summary.py +20 -0
- autoassembler/types/mpp_validate_metadata.py +47 -0
- autoassembler/types/mpp_validate_response.py +22 -0
- autoassembler/types/o_auth_error_response.py +14 -0
- autoassembler/types/o_auth_error_response_error.py +18 -0
- autoassembler/types/operation.py +27 -0
- autoassembler/types/operation_error.py +21 -0
- autoassembler/types/operation_metadata.py +148 -0
- autoassembler/types/operation_response.py +94 -0
- autoassembler/types/process_assembly_accepted.py +14 -0
- autoassembler/types/process_assembly_response.py +55 -0
- autoassembler/types/process_assembly_skipped.py +14 -0
- autoassembler/types/search_assemblies_response.py +14 -0
- autoassembler/types/seq_plan_accepted.py +24 -0
- autoassembler/types/sever.py +33 -0
- autoassembler/types/sever_kind.py +5 -0
- autoassembler/types/sever_source.py +5 -0
- autoassembler/types/sort.py +8 -0
- autoassembler/types/upload_response.py +19 -0
- autoassembler/types/user_info.py +19 -0
- autoassembler/types/user_info_response.py +23 -0
- autoassembler/types/user_info_response_providers.py +14 -0
- autoassembler-0.3.1.dist-info/METADATA +209 -0
- autoassembler-0.3.1.dist-info/RECORD +198 -0
- autoassembler-0.3.1.dist-info/WHEEL +4 -0
- autoassembler-0.3.1.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,1174 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
|
+
from ..core.request_options import RequestOptions
|
|
7
|
+
from ..types.adapt_mpp_accepted import AdaptMppAccepted
|
|
8
|
+
from ..types.diff_report import DiffReport
|
|
9
|
+
from ..types.manufacturing_process_plan import ManufacturingProcessPlan
|
|
10
|
+
from ..types.mpp_summary import MppSummary
|
|
11
|
+
from ..types.seq_plan_accepted import SeqPlanAccepted
|
|
12
|
+
from .raw_client import AsyncRawPlanningClient, RawPlanningClient
|
|
13
|
+
from .types.adapt_request_namespace import AdaptRequestNamespace
|
|
14
|
+
from .types.create_mpp_request_body import CreateMppRequestBody
|
|
15
|
+
from .types.create_mpp_request_namespace import CreateMppRequestNamespace
|
|
16
|
+
from .types.delete_mpp_request_namespace import DeleteMppRequestNamespace
|
|
17
|
+
from .types.delete_mpp_response import DeleteMppResponse
|
|
18
|
+
from .types.evaluate_dfa_request_namespace import EvaluateDfaRequestNamespace
|
|
19
|
+
from .types.get_mpp_request_namespace import GetMppRequestNamespace
|
|
20
|
+
from .types.get_mpp_response import GetMppResponse
|
|
21
|
+
from .types.list_mpps_request_namespace import ListMppsRequestNamespace
|
|
22
|
+
from .types.plan_request_namespace import PlanRequestNamespace
|
|
23
|
+
from .types.validate_request_namespace import ValidateRequestNamespace
|
|
24
|
+
|
|
25
|
+
# this is used as the default value for optional parameters
|
|
26
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class PlanningClient:
|
|
30
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
31
|
+
self._raw_client = RawPlanningClient(client_wrapper=client_wrapper)
|
|
32
|
+
|
|
33
|
+
@property
|
|
34
|
+
def with_raw_response(self) -> RawPlanningClient:
|
|
35
|
+
"""
|
|
36
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
37
|
+
|
|
38
|
+
Returns
|
|
39
|
+
-------
|
|
40
|
+
RawPlanningClient
|
|
41
|
+
"""
|
|
42
|
+
return self._raw_client
|
|
43
|
+
|
|
44
|
+
def list_mpps(
|
|
45
|
+
self, namespace: ListMppsRequestNamespace, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
46
|
+
) -> typing.List[MppSummary]:
|
|
47
|
+
"""
|
|
48
|
+
Parameters
|
|
49
|
+
----------
|
|
50
|
+
namespace : ListMppsRequestNamespace
|
|
51
|
+
Assembly URL namespace. `user`, `shared`, and `public` are routed through the same assembly lookup.
|
|
52
|
+
|
|
53
|
+
id : str
|
|
54
|
+
Assembly ID.
|
|
55
|
+
|
|
56
|
+
request_options : typing.Optional[RequestOptions]
|
|
57
|
+
Request-specific configuration.
|
|
58
|
+
|
|
59
|
+
Returns
|
|
60
|
+
-------
|
|
61
|
+
typing.List[MppSummary]
|
|
62
|
+
Process plan summaries for the assembly.
|
|
63
|
+
|
|
64
|
+
Examples
|
|
65
|
+
--------
|
|
66
|
+
from autoassembler import AutoAssembler
|
|
67
|
+
|
|
68
|
+
client = AutoAssembler(
|
|
69
|
+
token="YOUR_TOKEN",
|
|
70
|
+
)
|
|
71
|
+
client.planning.list_mpps(
|
|
72
|
+
namespace="user",
|
|
73
|
+
id="id",
|
|
74
|
+
)
|
|
75
|
+
"""
|
|
76
|
+
_response = self._raw_client.list_mpps(namespace, id, request_options=request_options)
|
|
77
|
+
return _response.data
|
|
78
|
+
|
|
79
|
+
def create_mpp(
|
|
80
|
+
self,
|
|
81
|
+
namespace: CreateMppRequestNamespace,
|
|
82
|
+
id: str,
|
|
83
|
+
*,
|
|
84
|
+
request: CreateMppRequestBody,
|
|
85
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
86
|
+
) -> ManufacturingProcessPlan:
|
|
87
|
+
"""
|
|
88
|
+
Parameters
|
|
89
|
+
----------
|
|
90
|
+
namespace : CreateMppRequestNamespace
|
|
91
|
+
Assembly URL namespace. `user`, `shared`, and `public` are routed through the same assembly lookup.
|
|
92
|
+
|
|
93
|
+
id : str
|
|
94
|
+
Assembly ID.
|
|
95
|
+
|
|
96
|
+
request : CreateMppRequestBody
|
|
97
|
+
|
|
98
|
+
request_options : typing.Optional[RequestOptions]
|
|
99
|
+
Request-specific configuration.
|
|
100
|
+
|
|
101
|
+
Returns
|
|
102
|
+
-------
|
|
103
|
+
ManufacturingProcessPlan
|
|
104
|
+
Created process plan document.
|
|
105
|
+
|
|
106
|
+
Examples
|
|
107
|
+
--------
|
|
108
|
+
from autoassembler import AutoAssembler, CreateMppRequest
|
|
109
|
+
|
|
110
|
+
client = AutoAssembler(
|
|
111
|
+
token="YOUR_TOKEN",
|
|
112
|
+
)
|
|
113
|
+
client.planning.create_mpp(
|
|
114
|
+
namespace="user",
|
|
115
|
+
id="id",
|
|
116
|
+
request=CreateMppRequest(
|
|
117
|
+
name="name",
|
|
118
|
+
),
|
|
119
|
+
)
|
|
120
|
+
"""
|
|
121
|
+
_response = self._raw_client.create_mpp(namespace, id, request=request, request_options=request_options)
|
|
122
|
+
return _response.data
|
|
123
|
+
|
|
124
|
+
def adapt(
|
|
125
|
+
self,
|
|
126
|
+
namespace: AdaptRequestNamespace,
|
|
127
|
+
id: str,
|
|
128
|
+
*,
|
|
129
|
+
reference_mpp_id: str,
|
|
130
|
+
diff: DiffReport,
|
|
131
|
+
name: typing.Optional[str] = OMIT,
|
|
132
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
133
|
+
) -> AdaptMppAccepted:
|
|
134
|
+
"""
|
|
135
|
+
Creates a process plan for the target assembly by adapting a reference assembly's
|
|
136
|
+
process plan. Runs asynchronously and returns immediately with the
|
|
137
|
+
new `mppId` and `jobId`.
|
|
138
|
+
|
|
139
|
+
Parameters
|
|
140
|
+
----------
|
|
141
|
+
namespace : AdaptRequestNamespace
|
|
142
|
+
Assembly URL namespace. `user`, `shared`, and `public` are routed through the same assembly lookup.
|
|
143
|
+
|
|
144
|
+
id : str
|
|
145
|
+
Assembly ID.
|
|
146
|
+
|
|
147
|
+
reference_mpp_id : str
|
|
148
|
+
Process plan for the reference assembly to adapt from.
|
|
149
|
+
|
|
150
|
+
diff : DiffReport
|
|
151
|
+
|
|
152
|
+
name : typing.Optional[str]
|
|
153
|
+
Optional name for the adapted process plan.
|
|
154
|
+
|
|
155
|
+
request_options : typing.Optional[RequestOptions]
|
|
156
|
+
Request-specific configuration.
|
|
157
|
+
|
|
158
|
+
Returns
|
|
159
|
+
-------
|
|
160
|
+
AdaptMppAccepted
|
|
161
|
+
Adaptation queued, with the operation tracking it.
|
|
162
|
+
|
|
163
|
+
Examples
|
|
164
|
+
--------
|
|
165
|
+
from autoassembler import (
|
|
166
|
+
AutoAssembler,
|
|
167
|
+
DiffDetails,
|
|
168
|
+
DiffFlags,
|
|
169
|
+
DiffNode,
|
|
170
|
+
DiffNodePairWithParts,
|
|
171
|
+
DiffReferenceTargetNodes,
|
|
172
|
+
DiffReport,
|
|
173
|
+
DiffSummary,
|
|
174
|
+
DiffSummaryAssemblyLabels,
|
|
175
|
+
DiffSummaryGeometricDiffs,
|
|
176
|
+
DiffSummaryPersistentEdgesCongruence,
|
|
177
|
+
DiffSummaryPersistentEdgesCongruencePose,
|
|
178
|
+
DiffSummaryPersistentNodesCongruence,
|
|
179
|
+
DiffSummaryPersistentNodesCongruencePose,
|
|
180
|
+
DiffSummaryTotalParts,
|
|
181
|
+
DiffSwap,
|
|
182
|
+
)
|
|
183
|
+
|
|
184
|
+
client = AutoAssembler(
|
|
185
|
+
token="YOUR_TOKEN",
|
|
186
|
+
)
|
|
187
|
+
client.planning.adapt(
|
|
188
|
+
namespace="user",
|
|
189
|
+
id="id",
|
|
190
|
+
reference_mpp_id="referenceMppId",
|
|
191
|
+
diff=DiffReport(
|
|
192
|
+
version=4,
|
|
193
|
+
summary=DiffSummary(
|
|
194
|
+
assembly_labels=DiffSummaryAssemblyLabels(
|
|
195
|
+
reference="gearbox-v1",
|
|
196
|
+
reference_name="Gearbox v1",
|
|
197
|
+
target="gearbox-v2",
|
|
198
|
+
target_name="Gearbox v2",
|
|
199
|
+
),
|
|
200
|
+
total_parts=DiffSummaryTotalParts(
|
|
201
|
+
reference=5,
|
|
202
|
+
target=5,
|
|
203
|
+
),
|
|
204
|
+
geometric_diffs=DiffSummaryGeometricDiffs(
|
|
205
|
+
reference=1,
|
|
206
|
+
target=1,
|
|
207
|
+
),
|
|
208
|
+
persistent_nodes_congruence=DiffSummaryPersistentNodesCongruence(
|
|
209
|
+
reference=4,
|
|
210
|
+
target=4,
|
|
211
|
+
),
|
|
212
|
+
persistent_nodes_congruence_pose=DiffSummaryPersistentNodesCongruencePose(
|
|
213
|
+
reference=3,
|
|
214
|
+
target=3,
|
|
215
|
+
),
|
|
216
|
+
persistent_edges_congruence=DiffSummaryPersistentEdgesCongruence(
|
|
217
|
+
reference=3,
|
|
218
|
+
target=3,
|
|
219
|
+
),
|
|
220
|
+
persistent_edges_congruence_pose=DiffSummaryPersistentEdgesCongruencePose(
|
|
221
|
+
reference=2,
|
|
222
|
+
target=2,
|
|
223
|
+
),
|
|
224
|
+
candidate_swaps=2,
|
|
225
|
+
),
|
|
226
|
+
details=DiffDetails(
|
|
227
|
+
geom_diff_nodes=DiffReferenceTargetNodes(
|
|
228
|
+
reference=[
|
|
229
|
+
DiffNode(
|
|
230
|
+
node="ref-old-mount",
|
|
231
|
+
part="old-mount",
|
|
232
|
+
)
|
|
233
|
+
],
|
|
234
|
+
target=[
|
|
235
|
+
DiffNode(
|
|
236
|
+
node="target-new-mount",
|
|
237
|
+
part="new-mount",
|
|
238
|
+
)
|
|
239
|
+
],
|
|
240
|
+
),
|
|
241
|
+
swaps=[
|
|
242
|
+
DiffSwap(
|
|
243
|
+
reference_node="ref-left-cover",
|
|
244
|
+
target_node="target-right-cover",
|
|
245
|
+
reference_parent="ref-housing",
|
|
246
|
+
target_parent="target-housing",
|
|
247
|
+
reference_part="left-cover",
|
|
248
|
+
target_part="right-cover",
|
|
249
|
+
confidence="high",
|
|
250
|
+
),
|
|
251
|
+
DiffSwap(
|
|
252
|
+
reference_node="ref-old-bracket",
|
|
253
|
+
target_node="target-new-bracket",
|
|
254
|
+
reference_part="old-bracket",
|
|
255
|
+
target_part="new-bracket",
|
|
256
|
+
identity_score=0.72,
|
|
257
|
+
confidence="low",
|
|
258
|
+
embedding_similarity=0.9,
|
|
259
|
+
volume_ratio=0.8,
|
|
260
|
+
same_identity_score=0.72,
|
|
261
|
+
volume_ratio_min=0.85,
|
|
262
|
+
),
|
|
263
|
+
],
|
|
264
|
+
moved_pose_pairs=[
|
|
265
|
+
DiffNodePairWithParts(
|
|
266
|
+
reference_node="ref-motor",
|
|
267
|
+
target_node="target-motor",
|
|
268
|
+
reference_parent="ref-housing",
|
|
269
|
+
target_parent="target-housing",
|
|
270
|
+
reference_part="motor",
|
|
271
|
+
target_part="motor",
|
|
272
|
+
)
|
|
273
|
+
],
|
|
274
|
+
flags=DiffFlags(
|
|
275
|
+
same_geom_diff_name_pairs=[DiffNodePairWithParts()],
|
|
276
|
+
same_geom_pose_diff_name_pairs=[DiffNodePairWithParts()],
|
|
277
|
+
same_name_congruent_diff_pose_pairs=[DiffNodePairWithParts()],
|
|
278
|
+
part_revision=[DiffNodePairWithParts()],
|
|
279
|
+
unchanged_pairs=[
|
|
280
|
+
DiffNodePairWithParts(
|
|
281
|
+
reference_node="ref-housing",
|
|
282
|
+
target_node="target-housing",
|
|
283
|
+
reference_parent="ref-root",
|
|
284
|
+
target_parent="target-root",
|
|
285
|
+
)
|
|
286
|
+
],
|
|
287
|
+
),
|
|
288
|
+
),
|
|
289
|
+
),
|
|
290
|
+
)
|
|
291
|
+
"""
|
|
292
|
+
_response = self._raw_client.adapt(
|
|
293
|
+
namespace, id, reference_mpp_id=reference_mpp_id, diff=diff, name=name, request_options=request_options
|
|
294
|
+
)
|
|
295
|
+
return _response.data
|
|
296
|
+
|
|
297
|
+
def get_mpp(
|
|
298
|
+
self,
|
|
299
|
+
namespace: GetMppRequestNamespace,
|
|
300
|
+
id: str,
|
|
301
|
+
mpp_id: str,
|
|
302
|
+
*,
|
|
303
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
304
|
+
) -> GetMppResponse:
|
|
305
|
+
"""
|
|
306
|
+
Parameters
|
|
307
|
+
----------
|
|
308
|
+
namespace : GetMppRequestNamespace
|
|
309
|
+
Assembly URL namespace. `user`, `shared`, and `public` are routed through the same assembly lookup.
|
|
310
|
+
|
|
311
|
+
id : str
|
|
312
|
+
Assembly ID.
|
|
313
|
+
|
|
314
|
+
mpp_id : str
|
|
315
|
+
Manufacturing Process Plan ID.
|
|
316
|
+
|
|
317
|
+
request_options : typing.Optional[RequestOptions]
|
|
318
|
+
Request-specific configuration.
|
|
319
|
+
|
|
320
|
+
Returns
|
|
321
|
+
-------
|
|
322
|
+
GetMppResponse
|
|
323
|
+
Process plan document wrapper.
|
|
324
|
+
|
|
325
|
+
Examples
|
|
326
|
+
--------
|
|
327
|
+
from autoassembler import AutoAssembler
|
|
328
|
+
|
|
329
|
+
client = AutoAssembler(
|
|
330
|
+
token="YOUR_TOKEN",
|
|
331
|
+
)
|
|
332
|
+
client.planning.get_mpp(
|
|
333
|
+
namespace="user",
|
|
334
|
+
id="id",
|
|
335
|
+
mpp_id="mppId",
|
|
336
|
+
)
|
|
337
|
+
"""
|
|
338
|
+
_response = self._raw_client.get_mpp(namespace, id, mpp_id, request_options=request_options)
|
|
339
|
+
return _response.data
|
|
340
|
+
|
|
341
|
+
def delete_mpp(
|
|
342
|
+
self,
|
|
343
|
+
namespace: DeleteMppRequestNamespace,
|
|
344
|
+
id: str,
|
|
345
|
+
mpp_id: str,
|
|
346
|
+
*,
|
|
347
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
348
|
+
) -> DeleteMppResponse:
|
|
349
|
+
"""
|
|
350
|
+
Parameters
|
|
351
|
+
----------
|
|
352
|
+
namespace : DeleteMppRequestNamespace
|
|
353
|
+
Assembly URL namespace. `user`, `shared`, and `public` are routed through the same assembly lookup.
|
|
354
|
+
|
|
355
|
+
id : str
|
|
356
|
+
Assembly ID.
|
|
357
|
+
|
|
358
|
+
mpp_id : str
|
|
359
|
+
Manufacturing Process Plan ID.
|
|
360
|
+
|
|
361
|
+
request_options : typing.Optional[RequestOptions]
|
|
362
|
+
Request-specific configuration.
|
|
363
|
+
|
|
364
|
+
Returns
|
|
365
|
+
-------
|
|
366
|
+
DeleteMppResponse
|
|
367
|
+
Delete status.
|
|
368
|
+
|
|
369
|
+
Examples
|
|
370
|
+
--------
|
|
371
|
+
from autoassembler import AutoAssembler
|
|
372
|
+
|
|
373
|
+
client = AutoAssembler(
|
|
374
|
+
token="YOUR_TOKEN",
|
|
375
|
+
)
|
|
376
|
+
client.planning.delete_mpp(
|
|
377
|
+
namespace="user",
|
|
378
|
+
id="id",
|
|
379
|
+
mpp_id="mppId",
|
|
380
|
+
)
|
|
381
|
+
"""
|
|
382
|
+
_response = self._raw_client.delete_mpp(namespace, id, mpp_id, request_options=request_options)
|
|
383
|
+
return _response.data
|
|
384
|
+
|
|
385
|
+
def plan(
|
|
386
|
+
self,
|
|
387
|
+
namespace: PlanRequestNamespace,
|
|
388
|
+
id: str,
|
|
389
|
+
mpp_id: str,
|
|
390
|
+
*,
|
|
391
|
+
station_ids: typing.Sequence[str],
|
|
392
|
+
overwrite: typing.Optional[bool] = OMIT,
|
|
393
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
394
|
+
) -> SeqPlanAccepted:
|
|
395
|
+
"""
|
|
396
|
+
Plans the Station graph from scratch, computing a suitable process plan (Step graph)
|
|
397
|
+
for each of the requested stations. The run overwrites any pre-existing plan; deciding which
|
|
398
|
+
stations have to be re-planned is the caller's responsibility.
|
|
399
|
+
Pass `overwrite: false` to have a station that already has a plan left alone instead.
|
|
400
|
+
|
|
401
|
+
**Async** — returns 202 immediately.
|
|
402
|
+
|
|
403
|
+
Parameters
|
|
404
|
+
----------
|
|
405
|
+
namespace : PlanRequestNamespace
|
|
406
|
+
Assembly URL namespace. `user`, `shared`, and `public` are routed through the same assembly lookup.
|
|
407
|
+
|
|
408
|
+
id : str
|
|
409
|
+
Assembly ID.
|
|
410
|
+
|
|
411
|
+
mpp_id : str
|
|
412
|
+
Manufacturing Process Plan ID.
|
|
413
|
+
|
|
414
|
+
station_ids : typing.Sequence[str]
|
|
415
|
+
IDs of the Station nodes to plan. All must exist in the process plan's station graph and have a supported input/output boundary.
|
|
416
|
+
|
|
417
|
+
overwrite : typing.Optional[bool]
|
|
418
|
+
Whether the run may replace a plan a requested station already has. Checked per station, so one station never blocks another.
|
|
419
|
+
|
|
420
|
+
request_options : typing.Optional[RequestOptions]
|
|
421
|
+
Request-specific configuration.
|
|
422
|
+
|
|
423
|
+
Returns
|
|
424
|
+
-------
|
|
425
|
+
SeqPlanAccepted
|
|
426
|
+
Planning jobs accepted and running in the background.
|
|
427
|
+
|
|
428
|
+
Examples
|
|
429
|
+
--------
|
|
430
|
+
from autoassembler import AutoAssembler
|
|
431
|
+
|
|
432
|
+
client = AutoAssembler(
|
|
433
|
+
token="YOUR_TOKEN",
|
|
434
|
+
)
|
|
435
|
+
client.planning.plan(
|
|
436
|
+
namespace="user",
|
|
437
|
+
id="id",
|
|
438
|
+
mpp_id="mppId",
|
|
439
|
+
station_ids=["stationIds"],
|
|
440
|
+
)
|
|
441
|
+
"""
|
|
442
|
+
_response = self._raw_client.plan(
|
|
443
|
+
namespace, id, mpp_id, station_ids=station_ids, overwrite=overwrite, request_options=request_options
|
|
444
|
+
)
|
|
445
|
+
return _response.data
|
|
446
|
+
|
|
447
|
+
def validate(
|
|
448
|
+
self,
|
|
449
|
+
namespace: ValidateRequestNamespace,
|
|
450
|
+
id: str,
|
|
451
|
+
mpp_id: str,
|
|
452
|
+
*,
|
|
453
|
+
station_ids: typing.Sequence[str],
|
|
454
|
+
fix_directions: typing.Optional[bool] = OMIT,
|
|
455
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
456
|
+
) -> SeqPlanAccepted:
|
|
457
|
+
"""
|
|
458
|
+
**Feasibility validation** — checks structural consistency of the entire process plan,
|
|
459
|
+
then validates geometrical feasibility of assembly steps for the requested
|
|
460
|
+
stations. When a blocked step has a workspace-free alternative direction,
|
|
461
|
+
`fixDirections` (off by default) writes it onto the step graph and the
|
|
462
|
+
persisted verdict reflects the repaired plan.
|
|
463
|
+
|
|
464
|
+
**Async** — returns 202 with `{ queued }`.
|
|
465
|
+
|
|
466
|
+
Parameters
|
|
467
|
+
----------
|
|
468
|
+
namespace : ValidateRequestNamespace
|
|
469
|
+
Assembly URL namespace. `user`, `shared`, and `public` are routed through the same assembly lookup.
|
|
470
|
+
|
|
471
|
+
id : str
|
|
472
|
+
Assembly ID.
|
|
473
|
+
|
|
474
|
+
mpp_id : str
|
|
475
|
+
Manufacturing Process Plan ID.
|
|
476
|
+
|
|
477
|
+
station_ids : typing.Sequence[str]
|
|
478
|
+
IDs of the Station nodes to validate. All must exist in the process plan's station graph and stations without persisted assembly steps are accepted and reported as skipped.
|
|
479
|
+
|
|
480
|
+
fix_directions : typing.Optional[bool]
|
|
481
|
+
Apply each blocked step's workspace-free alternative direction onto the step graph, so the persisted verdict describes the repaired plan. Absent, the step graph is untouched.
|
|
482
|
+
|
|
483
|
+
request_options : typing.Optional[RequestOptions]
|
|
484
|
+
Request-specific configuration.
|
|
485
|
+
|
|
486
|
+
Returns
|
|
487
|
+
-------
|
|
488
|
+
SeqPlanAccepted
|
|
489
|
+
Validation jobs accepted and running in the background.
|
|
490
|
+
|
|
491
|
+
Examples
|
|
492
|
+
--------
|
|
493
|
+
from autoassembler import AutoAssembler
|
|
494
|
+
|
|
495
|
+
client = AutoAssembler(
|
|
496
|
+
token="YOUR_TOKEN",
|
|
497
|
+
)
|
|
498
|
+
client.planning.validate(
|
|
499
|
+
namespace="user",
|
|
500
|
+
id="id",
|
|
501
|
+
mpp_id="mppId",
|
|
502
|
+
station_ids=["stationIds"],
|
|
503
|
+
)
|
|
504
|
+
"""
|
|
505
|
+
_response = self._raw_client.validate(
|
|
506
|
+
namespace,
|
|
507
|
+
id,
|
|
508
|
+
mpp_id,
|
|
509
|
+
station_ids=station_ids,
|
|
510
|
+
fix_directions=fix_directions,
|
|
511
|
+
request_options=request_options,
|
|
512
|
+
)
|
|
513
|
+
return _response.data
|
|
514
|
+
|
|
515
|
+
def evaluate_dfa(
|
|
516
|
+
self,
|
|
517
|
+
namespace: EvaluateDfaRequestNamespace,
|
|
518
|
+
id: str,
|
|
519
|
+
mpp_id: str,
|
|
520
|
+
*,
|
|
521
|
+
station_ids: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
522
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
523
|
+
) -> SeqPlanAccepted:
|
|
524
|
+
"""
|
|
525
|
+
Projects each sequential assembly addend directly from the persisted Step
|
|
526
|
+
graph into an explicit state-of-assembly transition, evaluates DFA, and
|
|
527
|
+
persists per-station reports under `plan.dfa`. Runs asynchronously.
|
|
528
|
+
|
|
529
|
+
Parameters
|
|
530
|
+
----------
|
|
531
|
+
namespace : EvaluateDfaRequestNamespace
|
|
532
|
+
Assembly URL namespace. `user`, `shared`, and `public` are routed through the same assembly lookup.
|
|
533
|
+
|
|
534
|
+
id : str
|
|
535
|
+
Assembly ID.
|
|
536
|
+
|
|
537
|
+
mpp_id : str
|
|
538
|
+
Manufacturing Process Plan ID.
|
|
539
|
+
|
|
540
|
+
station_ids : typing.Optional[typing.Sequence[str]]
|
|
541
|
+
Stations to score. Omitted means every station with assembly steps, and then a station that is not ready is skipped rather than refused. A station named here must be planned and hold a feasible validation verdict, or the whole request is refused with 409. Named stations without assembly steps are accepted and reported as skipped.
|
|
542
|
+
|
|
543
|
+
request_options : typing.Optional[RequestOptions]
|
|
544
|
+
Request-specific configuration.
|
|
545
|
+
|
|
546
|
+
Returns
|
|
547
|
+
-------
|
|
548
|
+
SeqPlanAccepted
|
|
549
|
+
DFA evaluation accepted (or nothing to evaluate). `skipped` lists requested stations that were not queued — no assembly steps, or, for an unfiltered request, not yet validated.
|
|
550
|
+
|
|
551
|
+
Examples
|
|
552
|
+
--------
|
|
553
|
+
from autoassembler import AutoAssembler
|
|
554
|
+
|
|
555
|
+
client = AutoAssembler(
|
|
556
|
+
token="YOUR_TOKEN",
|
|
557
|
+
)
|
|
558
|
+
client.planning.evaluate_dfa(
|
|
559
|
+
namespace="user",
|
|
560
|
+
id="id",
|
|
561
|
+
mpp_id="mppId",
|
|
562
|
+
)
|
|
563
|
+
"""
|
|
564
|
+
_response = self._raw_client.evaluate_dfa(
|
|
565
|
+
namespace, id, mpp_id, station_ids=station_ids, request_options=request_options
|
|
566
|
+
)
|
|
567
|
+
return _response.data
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
class AsyncPlanningClient:
|
|
571
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
572
|
+
self._raw_client = AsyncRawPlanningClient(client_wrapper=client_wrapper)
|
|
573
|
+
|
|
574
|
+
@property
|
|
575
|
+
def with_raw_response(self) -> AsyncRawPlanningClient:
|
|
576
|
+
"""
|
|
577
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
578
|
+
|
|
579
|
+
Returns
|
|
580
|
+
-------
|
|
581
|
+
AsyncRawPlanningClient
|
|
582
|
+
"""
|
|
583
|
+
return self._raw_client
|
|
584
|
+
|
|
585
|
+
async def list_mpps(
|
|
586
|
+
self, namespace: ListMppsRequestNamespace, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
587
|
+
) -> typing.List[MppSummary]:
|
|
588
|
+
"""
|
|
589
|
+
Parameters
|
|
590
|
+
----------
|
|
591
|
+
namespace : ListMppsRequestNamespace
|
|
592
|
+
Assembly URL namespace. `user`, `shared`, and `public` are routed through the same assembly lookup.
|
|
593
|
+
|
|
594
|
+
id : str
|
|
595
|
+
Assembly ID.
|
|
596
|
+
|
|
597
|
+
request_options : typing.Optional[RequestOptions]
|
|
598
|
+
Request-specific configuration.
|
|
599
|
+
|
|
600
|
+
Returns
|
|
601
|
+
-------
|
|
602
|
+
typing.List[MppSummary]
|
|
603
|
+
Process plan summaries for the assembly.
|
|
604
|
+
|
|
605
|
+
Examples
|
|
606
|
+
--------
|
|
607
|
+
import asyncio
|
|
608
|
+
|
|
609
|
+
from autoassembler import AsyncAutoAssembler
|
|
610
|
+
|
|
611
|
+
client = AsyncAutoAssembler(
|
|
612
|
+
token="YOUR_TOKEN",
|
|
613
|
+
)
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
async def main() -> None:
|
|
617
|
+
await client.planning.list_mpps(
|
|
618
|
+
namespace="user",
|
|
619
|
+
id="id",
|
|
620
|
+
)
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
asyncio.run(main())
|
|
624
|
+
"""
|
|
625
|
+
_response = await self._raw_client.list_mpps(namespace, id, request_options=request_options)
|
|
626
|
+
return _response.data
|
|
627
|
+
|
|
628
|
+
async def create_mpp(
|
|
629
|
+
self,
|
|
630
|
+
namespace: CreateMppRequestNamespace,
|
|
631
|
+
id: str,
|
|
632
|
+
*,
|
|
633
|
+
request: CreateMppRequestBody,
|
|
634
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
635
|
+
) -> ManufacturingProcessPlan:
|
|
636
|
+
"""
|
|
637
|
+
Parameters
|
|
638
|
+
----------
|
|
639
|
+
namespace : CreateMppRequestNamespace
|
|
640
|
+
Assembly URL namespace. `user`, `shared`, and `public` are routed through the same assembly lookup.
|
|
641
|
+
|
|
642
|
+
id : str
|
|
643
|
+
Assembly ID.
|
|
644
|
+
|
|
645
|
+
request : CreateMppRequestBody
|
|
646
|
+
|
|
647
|
+
request_options : typing.Optional[RequestOptions]
|
|
648
|
+
Request-specific configuration.
|
|
649
|
+
|
|
650
|
+
Returns
|
|
651
|
+
-------
|
|
652
|
+
ManufacturingProcessPlan
|
|
653
|
+
Created process plan document.
|
|
654
|
+
|
|
655
|
+
Examples
|
|
656
|
+
--------
|
|
657
|
+
import asyncio
|
|
658
|
+
|
|
659
|
+
from autoassembler import AsyncAutoAssembler, CreateMppRequest
|
|
660
|
+
|
|
661
|
+
client = AsyncAutoAssembler(
|
|
662
|
+
token="YOUR_TOKEN",
|
|
663
|
+
)
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
async def main() -> None:
|
|
667
|
+
await client.planning.create_mpp(
|
|
668
|
+
namespace="user",
|
|
669
|
+
id="id",
|
|
670
|
+
request=CreateMppRequest(
|
|
671
|
+
name="name",
|
|
672
|
+
),
|
|
673
|
+
)
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
asyncio.run(main())
|
|
677
|
+
"""
|
|
678
|
+
_response = await self._raw_client.create_mpp(namespace, id, request=request, request_options=request_options)
|
|
679
|
+
return _response.data
|
|
680
|
+
|
|
681
|
+
async def adapt(
|
|
682
|
+
self,
|
|
683
|
+
namespace: AdaptRequestNamespace,
|
|
684
|
+
id: str,
|
|
685
|
+
*,
|
|
686
|
+
reference_mpp_id: str,
|
|
687
|
+
diff: DiffReport,
|
|
688
|
+
name: typing.Optional[str] = OMIT,
|
|
689
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
690
|
+
) -> AdaptMppAccepted:
|
|
691
|
+
"""
|
|
692
|
+
Creates a process plan for the target assembly by adapting a reference assembly's
|
|
693
|
+
process plan. Runs asynchronously and returns immediately with the
|
|
694
|
+
new `mppId` and `jobId`.
|
|
695
|
+
|
|
696
|
+
Parameters
|
|
697
|
+
----------
|
|
698
|
+
namespace : AdaptRequestNamespace
|
|
699
|
+
Assembly URL namespace. `user`, `shared`, and `public` are routed through the same assembly lookup.
|
|
700
|
+
|
|
701
|
+
id : str
|
|
702
|
+
Assembly ID.
|
|
703
|
+
|
|
704
|
+
reference_mpp_id : str
|
|
705
|
+
Process plan for the reference assembly to adapt from.
|
|
706
|
+
|
|
707
|
+
diff : DiffReport
|
|
708
|
+
|
|
709
|
+
name : typing.Optional[str]
|
|
710
|
+
Optional name for the adapted process plan.
|
|
711
|
+
|
|
712
|
+
request_options : typing.Optional[RequestOptions]
|
|
713
|
+
Request-specific configuration.
|
|
714
|
+
|
|
715
|
+
Returns
|
|
716
|
+
-------
|
|
717
|
+
AdaptMppAccepted
|
|
718
|
+
Adaptation queued, with the operation tracking it.
|
|
719
|
+
|
|
720
|
+
Examples
|
|
721
|
+
--------
|
|
722
|
+
import asyncio
|
|
723
|
+
|
|
724
|
+
from autoassembler import (
|
|
725
|
+
AsyncAutoAssembler,
|
|
726
|
+
DiffDetails,
|
|
727
|
+
DiffFlags,
|
|
728
|
+
DiffNode,
|
|
729
|
+
DiffNodePairWithParts,
|
|
730
|
+
DiffReferenceTargetNodes,
|
|
731
|
+
DiffReport,
|
|
732
|
+
DiffSummary,
|
|
733
|
+
DiffSummaryAssemblyLabels,
|
|
734
|
+
DiffSummaryGeometricDiffs,
|
|
735
|
+
DiffSummaryPersistentEdgesCongruence,
|
|
736
|
+
DiffSummaryPersistentEdgesCongruencePose,
|
|
737
|
+
DiffSummaryPersistentNodesCongruence,
|
|
738
|
+
DiffSummaryPersistentNodesCongruencePose,
|
|
739
|
+
DiffSummaryTotalParts,
|
|
740
|
+
DiffSwap,
|
|
741
|
+
)
|
|
742
|
+
|
|
743
|
+
client = AsyncAutoAssembler(
|
|
744
|
+
token="YOUR_TOKEN",
|
|
745
|
+
)
|
|
746
|
+
|
|
747
|
+
|
|
748
|
+
async def main() -> None:
|
|
749
|
+
await client.planning.adapt(
|
|
750
|
+
namespace="user",
|
|
751
|
+
id="id",
|
|
752
|
+
reference_mpp_id="referenceMppId",
|
|
753
|
+
diff=DiffReport(
|
|
754
|
+
version=4,
|
|
755
|
+
summary=DiffSummary(
|
|
756
|
+
assembly_labels=DiffSummaryAssemblyLabels(
|
|
757
|
+
reference="gearbox-v1",
|
|
758
|
+
reference_name="Gearbox v1",
|
|
759
|
+
target="gearbox-v2",
|
|
760
|
+
target_name="Gearbox v2",
|
|
761
|
+
),
|
|
762
|
+
total_parts=DiffSummaryTotalParts(
|
|
763
|
+
reference=5,
|
|
764
|
+
target=5,
|
|
765
|
+
),
|
|
766
|
+
geometric_diffs=DiffSummaryGeometricDiffs(
|
|
767
|
+
reference=1,
|
|
768
|
+
target=1,
|
|
769
|
+
),
|
|
770
|
+
persistent_nodes_congruence=DiffSummaryPersistentNodesCongruence(
|
|
771
|
+
reference=4,
|
|
772
|
+
target=4,
|
|
773
|
+
),
|
|
774
|
+
persistent_nodes_congruence_pose=DiffSummaryPersistentNodesCongruencePose(
|
|
775
|
+
reference=3,
|
|
776
|
+
target=3,
|
|
777
|
+
),
|
|
778
|
+
persistent_edges_congruence=DiffSummaryPersistentEdgesCongruence(
|
|
779
|
+
reference=3,
|
|
780
|
+
target=3,
|
|
781
|
+
),
|
|
782
|
+
persistent_edges_congruence_pose=DiffSummaryPersistentEdgesCongruencePose(
|
|
783
|
+
reference=2,
|
|
784
|
+
target=2,
|
|
785
|
+
),
|
|
786
|
+
candidate_swaps=2,
|
|
787
|
+
),
|
|
788
|
+
details=DiffDetails(
|
|
789
|
+
geom_diff_nodes=DiffReferenceTargetNodes(
|
|
790
|
+
reference=[
|
|
791
|
+
DiffNode(
|
|
792
|
+
node="ref-old-mount",
|
|
793
|
+
part="old-mount",
|
|
794
|
+
)
|
|
795
|
+
],
|
|
796
|
+
target=[
|
|
797
|
+
DiffNode(
|
|
798
|
+
node="target-new-mount",
|
|
799
|
+
part="new-mount",
|
|
800
|
+
)
|
|
801
|
+
],
|
|
802
|
+
),
|
|
803
|
+
swaps=[
|
|
804
|
+
DiffSwap(
|
|
805
|
+
reference_node="ref-left-cover",
|
|
806
|
+
target_node="target-right-cover",
|
|
807
|
+
reference_parent="ref-housing",
|
|
808
|
+
target_parent="target-housing",
|
|
809
|
+
reference_part="left-cover",
|
|
810
|
+
target_part="right-cover",
|
|
811
|
+
confidence="high",
|
|
812
|
+
),
|
|
813
|
+
DiffSwap(
|
|
814
|
+
reference_node="ref-old-bracket",
|
|
815
|
+
target_node="target-new-bracket",
|
|
816
|
+
reference_part="old-bracket",
|
|
817
|
+
target_part="new-bracket",
|
|
818
|
+
identity_score=0.72,
|
|
819
|
+
confidence="low",
|
|
820
|
+
embedding_similarity=0.9,
|
|
821
|
+
volume_ratio=0.8,
|
|
822
|
+
same_identity_score=0.72,
|
|
823
|
+
volume_ratio_min=0.85,
|
|
824
|
+
),
|
|
825
|
+
],
|
|
826
|
+
moved_pose_pairs=[
|
|
827
|
+
DiffNodePairWithParts(
|
|
828
|
+
reference_node="ref-motor",
|
|
829
|
+
target_node="target-motor",
|
|
830
|
+
reference_parent="ref-housing",
|
|
831
|
+
target_parent="target-housing",
|
|
832
|
+
reference_part="motor",
|
|
833
|
+
target_part="motor",
|
|
834
|
+
)
|
|
835
|
+
],
|
|
836
|
+
flags=DiffFlags(
|
|
837
|
+
same_geom_diff_name_pairs=[DiffNodePairWithParts()],
|
|
838
|
+
same_geom_pose_diff_name_pairs=[DiffNodePairWithParts()],
|
|
839
|
+
same_name_congruent_diff_pose_pairs=[
|
|
840
|
+
DiffNodePairWithParts()
|
|
841
|
+
],
|
|
842
|
+
part_revision=[DiffNodePairWithParts()],
|
|
843
|
+
unchanged_pairs=[
|
|
844
|
+
DiffNodePairWithParts(
|
|
845
|
+
reference_node="ref-housing",
|
|
846
|
+
target_node="target-housing",
|
|
847
|
+
reference_parent="ref-root",
|
|
848
|
+
target_parent="target-root",
|
|
849
|
+
)
|
|
850
|
+
],
|
|
851
|
+
),
|
|
852
|
+
),
|
|
853
|
+
),
|
|
854
|
+
)
|
|
855
|
+
|
|
856
|
+
|
|
857
|
+
asyncio.run(main())
|
|
858
|
+
"""
|
|
859
|
+
_response = await self._raw_client.adapt(
|
|
860
|
+
namespace, id, reference_mpp_id=reference_mpp_id, diff=diff, name=name, request_options=request_options
|
|
861
|
+
)
|
|
862
|
+
return _response.data
|
|
863
|
+
|
|
864
|
+
async def get_mpp(
|
|
865
|
+
self,
|
|
866
|
+
namespace: GetMppRequestNamespace,
|
|
867
|
+
id: str,
|
|
868
|
+
mpp_id: str,
|
|
869
|
+
*,
|
|
870
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
871
|
+
) -> GetMppResponse:
|
|
872
|
+
"""
|
|
873
|
+
Parameters
|
|
874
|
+
----------
|
|
875
|
+
namespace : GetMppRequestNamespace
|
|
876
|
+
Assembly URL namespace. `user`, `shared`, and `public` are routed through the same assembly lookup.
|
|
877
|
+
|
|
878
|
+
id : str
|
|
879
|
+
Assembly ID.
|
|
880
|
+
|
|
881
|
+
mpp_id : str
|
|
882
|
+
Manufacturing Process Plan ID.
|
|
883
|
+
|
|
884
|
+
request_options : typing.Optional[RequestOptions]
|
|
885
|
+
Request-specific configuration.
|
|
886
|
+
|
|
887
|
+
Returns
|
|
888
|
+
-------
|
|
889
|
+
GetMppResponse
|
|
890
|
+
Process plan document wrapper.
|
|
891
|
+
|
|
892
|
+
Examples
|
|
893
|
+
--------
|
|
894
|
+
import asyncio
|
|
895
|
+
|
|
896
|
+
from autoassembler import AsyncAutoAssembler
|
|
897
|
+
|
|
898
|
+
client = AsyncAutoAssembler(
|
|
899
|
+
token="YOUR_TOKEN",
|
|
900
|
+
)
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
async def main() -> None:
|
|
904
|
+
await client.planning.get_mpp(
|
|
905
|
+
namespace="user",
|
|
906
|
+
id="id",
|
|
907
|
+
mpp_id="mppId",
|
|
908
|
+
)
|
|
909
|
+
|
|
910
|
+
|
|
911
|
+
asyncio.run(main())
|
|
912
|
+
"""
|
|
913
|
+
_response = await self._raw_client.get_mpp(namespace, id, mpp_id, request_options=request_options)
|
|
914
|
+
return _response.data
|
|
915
|
+
|
|
916
|
+
async def delete_mpp(
|
|
917
|
+
self,
|
|
918
|
+
namespace: DeleteMppRequestNamespace,
|
|
919
|
+
id: str,
|
|
920
|
+
mpp_id: str,
|
|
921
|
+
*,
|
|
922
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
923
|
+
) -> DeleteMppResponse:
|
|
924
|
+
"""
|
|
925
|
+
Parameters
|
|
926
|
+
----------
|
|
927
|
+
namespace : DeleteMppRequestNamespace
|
|
928
|
+
Assembly URL namespace. `user`, `shared`, and `public` are routed through the same assembly lookup.
|
|
929
|
+
|
|
930
|
+
id : str
|
|
931
|
+
Assembly ID.
|
|
932
|
+
|
|
933
|
+
mpp_id : str
|
|
934
|
+
Manufacturing Process Plan ID.
|
|
935
|
+
|
|
936
|
+
request_options : typing.Optional[RequestOptions]
|
|
937
|
+
Request-specific configuration.
|
|
938
|
+
|
|
939
|
+
Returns
|
|
940
|
+
-------
|
|
941
|
+
DeleteMppResponse
|
|
942
|
+
Delete status.
|
|
943
|
+
|
|
944
|
+
Examples
|
|
945
|
+
--------
|
|
946
|
+
import asyncio
|
|
947
|
+
|
|
948
|
+
from autoassembler import AsyncAutoAssembler
|
|
949
|
+
|
|
950
|
+
client = AsyncAutoAssembler(
|
|
951
|
+
token="YOUR_TOKEN",
|
|
952
|
+
)
|
|
953
|
+
|
|
954
|
+
|
|
955
|
+
async def main() -> None:
|
|
956
|
+
await client.planning.delete_mpp(
|
|
957
|
+
namespace="user",
|
|
958
|
+
id="id",
|
|
959
|
+
mpp_id="mppId",
|
|
960
|
+
)
|
|
961
|
+
|
|
962
|
+
|
|
963
|
+
asyncio.run(main())
|
|
964
|
+
"""
|
|
965
|
+
_response = await self._raw_client.delete_mpp(namespace, id, mpp_id, request_options=request_options)
|
|
966
|
+
return _response.data
|
|
967
|
+
|
|
968
|
+
async def plan(
|
|
969
|
+
self,
|
|
970
|
+
namespace: PlanRequestNamespace,
|
|
971
|
+
id: str,
|
|
972
|
+
mpp_id: str,
|
|
973
|
+
*,
|
|
974
|
+
station_ids: typing.Sequence[str],
|
|
975
|
+
overwrite: typing.Optional[bool] = OMIT,
|
|
976
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
977
|
+
) -> SeqPlanAccepted:
|
|
978
|
+
"""
|
|
979
|
+
Plans the Station graph from scratch, computing a suitable process plan (Step graph)
|
|
980
|
+
for each of the requested stations. The run overwrites any pre-existing plan; deciding which
|
|
981
|
+
stations have to be re-planned is the caller's responsibility.
|
|
982
|
+
Pass `overwrite: false` to have a station that already has a plan left alone instead.
|
|
983
|
+
|
|
984
|
+
**Async** — returns 202 immediately.
|
|
985
|
+
|
|
986
|
+
Parameters
|
|
987
|
+
----------
|
|
988
|
+
namespace : PlanRequestNamespace
|
|
989
|
+
Assembly URL namespace. `user`, `shared`, and `public` are routed through the same assembly lookup.
|
|
990
|
+
|
|
991
|
+
id : str
|
|
992
|
+
Assembly ID.
|
|
993
|
+
|
|
994
|
+
mpp_id : str
|
|
995
|
+
Manufacturing Process Plan ID.
|
|
996
|
+
|
|
997
|
+
station_ids : typing.Sequence[str]
|
|
998
|
+
IDs of the Station nodes to plan. All must exist in the process plan's station graph and have a supported input/output boundary.
|
|
999
|
+
|
|
1000
|
+
overwrite : typing.Optional[bool]
|
|
1001
|
+
Whether the run may replace a plan a requested station already has. Checked per station, so one station never blocks another.
|
|
1002
|
+
|
|
1003
|
+
request_options : typing.Optional[RequestOptions]
|
|
1004
|
+
Request-specific configuration.
|
|
1005
|
+
|
|
1006
|
+
Returns
|
|
1007
|
+
-------
|
|
1008
|
+
SeqPlanAccepted
|
|
1009
|
+
Planning jobs accepted and running in the background.
|
|
1010
|
+
|
|
1011
|
+
Examples
|
|
1012
|
+
--------
|
|
1013
|
+
import asyncio
|
|
1014
|
+
|
|
1015
|
+
from autoassembler import AsyncAutoAssembler
|
|
1016
|
+
|
|
1017
|
+
client = AsyncAutoAssembler(
|
|
1018
|
+
token="YOUR_TOKEN",
|
|
1019
|
+
)
|
|
1020
|
+
|
|
1021
|
+
|
|
1022
|
+
async def main() -> None:
|
|
1023
|
+
await client.planning.plan(
|
|
1024
|
+
namespace="user",
|
|
1025
|
+
id="id",
|
|
1026
|
+
mpp_id="mppId",
|
|
1027
|
+
station_ids=["stationIds"],
|
|
1028
|
+
)
|
|
1029
|
+
|
|
1030
|
+
|
|
1031
|
+
asyncio.run(main())
|
|
1032
|
+
"""
|
|
1033
|
+
_response = await self._raw_client.plan(
|
|
1034
|
+
namespace, id, mpp_id, station_ids=station_ids, overwrite=overwrite, request_options=request_options
|
|
1035
|
+
)
|
|
1036
|
+
return _response.data
|
|
1037
|
+
|
|
1038
|
+
async def validate(
|
|
1039
|
+
self,
|
|
1040
|
+
namespace: ValidateRequestNamespace,
|
|
1041
|
+
id: str,
|
|
1042
|
+
mpp_id: str,
|
|
1043
|
+
*,
|
|
1044
|
+
station_ids: typing.Sequence[str],
|
|
1045
|
+
fix_directions: typing.Optional[bool] = OMIT,
|
|
1046
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1047
|
+
) -> SeqPlanAccepted:
|
|
1048
|
+
"""
|
|
1049
|
+
**Feasibility validation** — checks structural consistency of the entire process plan,
|
|
1050
|
+
then validates geometrical feasibility of assembly steps for the requested
|
|
1051
|
+
stations. When a blocked step has a workspace-free alternative direction,
|
|
1052
|
+
`fixDirections` (off by default) writes it onto the step graph and the
|
|
1053
|
+
persisted verdict reflects the repaired plan.
|
|
1054
|
+
|
|
1055
|
+
**Async** — returns 202 with `{ queued }`.
|
|
1056
|
+
|
|
1057
|
+
Parameters
|
|
1058
|
+
----------
|
|
1059
|
+
namespace : ValidateRequestNamespace
|
|
1060
|
+
Assembly URL namespace. `user`, `shared`, and `public` are routed through the same assembly lookup.
|
|
1061
|
+
|
|
1062
|
+
id : str
|
|
1063
|
+
Assembly ID.
|
|
1064
|
+
|
|
1065
|
+
mpp_id : str
|
|
1066
|
+
Manufacturing Process Plan ID.
|
|
1067
|
+
|
|
1068
|
+
station_ids : typing.Sequence[str]
|
|
1069
|
+
IDs of the Station nodes to validate. All must exist in the process plan's station graph and stations without persisted assembly steps are accepted and reported as skipped.
|
|
1070
|
+
|
|
1071
|
+
fix_directions : typing.Optional[bool]
|
|
1072
|
+
Apply each blocked step's workspace-free alternative direction onto the step graph, so the persisted verdict describes the repaired plan. Absent, the step graph is untouched.
|
|
1073
|
+
|
|
1074
|
+
request_options : typing.Optional[RequestOptions]
|
|
1075
|
+
Request-specific configuration.
|
|
1076
|
+
|
|
1077
|
+
Returns
|
|
1078
|
+
-------
|
|
1079
|
+
SeqPlanAccepted
|
|
1080
|
+
Validation jobs accepted and running in the background.
|
|
1081
|
+
|
|
1082
|
+
Examples
|
|
1083
|
+
--------
|
|
1084
|
+
import asyncio
|
|
1085
|
+
|
|
1086
|
+
from autoassembler import AsyncAutoAssembler
|
|
1087
|
+
|
|
1088
|
+
client = AsyncAutoAssembler(
|
|
1089
|
+
token="YOUR_TOKEN",
|
|
1090
|
+
)
|
|
1091
|
+
|
|
1092
|
+
|
|
1093
|
+
async def main() -> None:
|
|
1094
|
+
await client.planning.validate(
|
|
1095
|
+
namespace="user",
|
|
1096
|
+
id="id",
|
|
1097
|
+
mpp_id="mppId",
|
|
1098
|
+
station_ids=["stationIds"],
|
|
1099
|
+
)
|
|
1100
|
+
|
|
1101
|
+
|
|
1102
|
+
asyncio.run(main())
|
|
1103
|
+
"""
|
|
1104
|
+
_response = await self._raw_client.validate(
|
|
1105
|
+
namespace,
|
|
1106
|
+
id,
|
|
1107
|
+
mpp_id,
|
|
1108
|
+
station_ids=station_ids,
|
|
1109
|
+
fix_directions=fix_directions,
|
|
1110
|
+
request_options=request_options,
|
|
1111
|
+
)
|
|
1112
|
+
return _response.data
|
|
1113
|
+
|
|
1114
|
+
async def evaluate_dfa(
|
|
1115
|
+
self,
|
|
1116
|
+
namespace: EvaluateDfaRequestNamespace,
|
|
1117
|
+
id: str,
|
|
1118
|
+
mpp_id: str,
|
|
1119
|
+
*,
|
|
1120
|
+
station_ids: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
1121
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1122
|
+
) -> SeqPlanAccepted:
|
|
1123
|
+
"""
|
|
1124
|
+
Projects each sequential assembly addend directly from the persisted Step
|
|
1125
|
+
graph into an explicit state-of-assembly transition, evaluates DFA, and
|
|
1126
|
+
persists per-station reports under `plan.dfa`. Runs asynchronously.
|
|
1127
|
+
|
|
1128
|
+
Parameters
|
|
1129
|
+
----------
|
|
1130
|
+
namespace : EvaluateDfaRequestNamespace
|
|
1131
|
+
Assembly URL namespace. `user`, `shared`, and `public` are routed through the same assembly lookup.
|
|
1132
|
+
|
|
1133
|
+
id : str
|
|
1134
|
+
Assembly ID.
|
|
1135
|
+
|
|
1136
|
+
mpp_id : str
|
|
1137
|
+
Manufacturing Process Plan ID.
|
|
1138
|
+
|
|
1139
|
+
station_ids : typing.Optional[typing.Sequence[str]]
|
|
1140
|
+
Stations to score. Omitted means every station with assembly steps, and then a station that is not ready is skipped rather than refused. A station named here must be planned and hold a feasible validation verdict, or the whole request is refused with 409. Named stations without assembly steps are accepted and reported as skipped.
|
|
1141
|
+
|
|
1142
|
+
request_options : typing.Optional[RequestOptions]
|
|
1143
|
+
Request-specific configuration.
|
|
1144
|
+
|
|
1145
|
+
Returns
|
|
1146
|
+
-------
|
|
1147
|
+
SeqPlanAccepted
|
|
1148
|
+
DFA evaluation accepted (or nothing to evaluate). `skipped` lists requested stations that were not queued — no assembly steps, or, for an unfiltered request, not yet validated.
|
|
1149
|
+
|
|
1150
|
+
Examples
|
|
1151
|
+
--------
|
|
1152
|
+
import asyncio
|
|
1153
|
+
|
|
1154
|
+
from autoassembler import AsyncAutoAssembler
|
|
1155
|
+
|
|
1156
|
+
client = AsyncAutoAssembler(
|
|
1157
|
+
token="YOUR_TOKEN",
|
|
1158
|
+
)
|
|
1159
|
+
|
|
1160
|
+
|
|
1161
|
+
async def main() -> None:
|
|
1162
|
+
await client.planning.evaluate_dfa(
|
|
1163
|
+
namespace="user",
|
|
1164
|
+
id="id",
|
|
1165
|
+
mpp_id="mppId",
|
|
1166
|
+
)
|
|
1167
|
+
|
|
1168
|
+
|
|
1169
|
+
asyncio.run(main())
|
|
1170
|
+
"""
|
|
1171
|
+
_response = await self._raw_client.evaluate_dfa(
|
|
1172
|
+
namespace, id, mpp_id, station_ids=station_ids, request_options=request_options
|
|
1173
|
+
)
|
|
1174
|
+
return _response.data
|