|
24 | 24 | from abc import abstractmethod |
25 | 25 | from typing import TYPE_CHECKING |
26 | 26 |
|
27 | | -from ansys.api.geometry.v0.repairtools_pb2_grpc import RepairToolsStub |
28 | | -from google.protobuf.wrappers_pb2 import Int32Value |
29 | | - |
30 | 27 | import ansys.geometry.core as pyansys_geom |
31 | 28 | from ansys.geometry.core.connection import GrpcClient |
32 | 29 | from ansys.geometry.core.misc.auxiliary import ( |
@@ -57,8 +54,6 @@ class ProblemArea: |
57 | 54 | def __init__(self, id: str, grpc_client: GrpcClient): |
58 | 55 | """Initialize a new instance of a problem area class.""" |
59 | 56 | self._id = id |
60 | | - self._grpc_id = Int32Value(value=int(id)) |
61 | | - self._repair_stub = RepairToolsStub(grpc_client.channel) |
62 | 57 | self._grpc_client = grpc_client |
63 | 58 |
|
64 | 59 | @property |
@@ -138,7 +133,7 @@ def fix(self) -> RepairToolMessage: |
138 | 133 |
|
139 | 134 | parent_design = get_design_from_face(self.faces[0]) |
140 | 135 | response = self._grpc_client.services.repair_tools.fix_duplicate_faces( |
141 | | - duplicate_face_problem_area_id=self._grpc_id |
| 136 | + duplicate_face_problem_area_id=self.id |
142 | 137 | ) |
143 | 138 |
|
144 | 139 | if not pyansys_geom.USE_TRACKER_TO_UPDATE_DESIGN: |
@@ -192,7 +187,7 @@ def fix(self) -> RepairToolMessage: |
192 | 187 |
|
193 | 188 | parent_design = get_design_from_edge(self.edges[0]) |
194 | 189 | response = self._grpc_client.services.repair_tools.fix_missing_faces( |
195 | | - missing_face_problem_area_id=self._grpc_id |
| 190 | + missing_face_problem_area_id=self.id |
196 | 191 | ) |
197 | 192 |
|
198 | 193 | if not pyansys_geom.USE_TRACKER_TO_UPDATE_DESIGN: |
@@ -247,7 +242,7 @@ def fix(self) -> RepairToolMessage: |
247 | 242 | parent_design = get_design_from_edge(self.edges[0]) |
248 | 243 |
|
249 | 244 | response = self._grpc_client.services.repair_tools.fix_inexact_edges( |
250 | | - inexact_edge_problem_area_id=self._grpc_id |
| 245 | + inexact_edge_problem_area_id=self.id |
251 | 246 | ) |
252 | 247 |
|
253 | 248 | if not pyansys_geom.USE_TRACKER_TO_UPDATE_DESIGN: |
@@ -301,7 +296,7 @@ def fix(self) -> RepairToolMessage: |
301 | 296 |
|
302 | 297 | parent_design = get_design_from_edge(self.edges[0]) |
303 | 298 | response = self._grpc_client.services.repair_tools.fix_extra_edges( |
304 | | - extra_edge_problem_area_id=self._grpc_id |
| 299 | + extra_edge_problem_area_id=self.id |
305 | 300 | ) |
306 | 301 |
|
307 | 302 | if not pyansys_geom.USE_TRACKER_TO_UPDATE_DESIGN: |
@@ -355,7 +350,7 @@ def fix(self) -> RepairToolMessage: |
355 | 350 |
|
356 | 351 | parent_design = get_design_from_edge(self.edges[0]) |
357 | 352 | response = self._grpc_client.services.repair_tools.fix_short_edges( |
358 | | - short_edge_problem_area_id=self._grpc_id |
| 353 | + short_edge_problem_area_id=self.id |
359 | 354 | ) |
360 | 355 |
|
361 | 356 | if not pyansys_geom.USE_TRACKER_TO_UPDATE_DESIGN: |
@@ -409,7 +404,7 @@ def fix(self) -> RepairToolMessage: |
409 | 404 |
|
410 | 405 | parent_design = get_design_from_face(self.faces[0]) |
411 | 406 | response = self._grpc_client.services.repair_tools.fix_small_faces( |
412 | | - small_face_problem_area_id=self._grpc_id |
| 407 | + small_face_problem_area_id=self.id |
413 | 408 | ) |
414 | 409 |
|
415 | 410 | if not pyansys_geom.USE_TRACKER_TO_UPDATE_DESIGN: |
@@ -463,7 +458,7 @@ def fix(self) -> RepairToolMessage: |
463 | 458 |
|
464 | 459 | parent_design = get_design_from_edge(self.edges[0]) |
465 | 460 | response = self._grpc_client.services.repair_tools.fix_split_edges( |
466 | | - split_edge_problem_area_id=self._grpc_id |
| 461 | + split_edge_problem_area_id=self.id |
467 | 462 | ) |
468 | 463 |
|
469 | 464 | if not pyansys_geom.USE_TRACKER_TO_UPDATE_DESIGN: |
@@ -517,7 +512,7 @@ def fix(self) -> RepairToolMessage: |
517 | 512 |
|
518 | 513 | parent_design = get_design_from_body(self.bodies[0]) |
519 | 514 | response = self._grpc_client.services.repair_tools.fix_stitch_faces( |
520 | | - stitch_face_problem_area_id=self._grpc_id |
| 515 | + stitch_face_problem_area_id=self.id |
521 | 516 | ) |
522 | 517 |
|
523 | 518 | if not pyansys_geom.USE_TRACKER_TO_UPDATE_DESIGN: |
@@ -566,7 +561,7 @@ def fix(self) -> RepairToolMessage: |
566 | 561 |
|
567 | 562 | parent_design = get_design_from_face(self.faces[0]) |
568 | 563 | response = self._grpc_client.services.repair_tools.fix_unsimplified_faces( |
569 | | - adjust_simplify_problem_area_id=self._grpc_id |
| 564 | + adjust_simplify_problem_area_id=self.id |
570 | 565 | ) |
571 | 566 |
|
572 | 567 | if not pyansys_geom.USE_TRACKER_TO_UPDATE_DESIGN: |
@@ -620,7 +615,7 @@ def fix(self) -> RepairToolMessage: |
620 | 615 |
|
621 | 616 | parent_design = get_design_from_body(self.bodies[0]) |
622 | 617 | response = self._grpc_client.services.repair_tools.fix_interference( |
623 | | - interference_problem_area_id=self._grpc_id |
| 618 | + interference_problem_area_id=self.id |
624 | 619 | ) |
625 | 620 |
|
626 | 621 | if not pyansys_geom.USE_TRACKER_TO_UPDATE_DESIGN: |
|
0 commit comments