Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ classifiers = [
]

dependencies = [
"ansys-api-geometry==0.2.3",
"ansys-api-geometry==0.2.4",
"beartype>=0.11.0",
"google-api-python-client>=1.7.11",
"googleapis-common-protos>=1.52.0",
Expand Down
8 changes: 5 additions & 3 deletions src/ansys/geometry/core/designer/body.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def add_midsurface_thickness(self, thickness: Quantity) -> None:
if self.is_surface:
self._commands_stub.AssignMidSurfaceThickness(
AssignMidSurfaceThicknessRequest(
bodiesOrFaces=[self.id], thickness=thickness.m_as(DEFAULT_UNITS.SERVER_LENGTH)
bodies_or_faces=[self.id], thickness=thickness.m_as(DEFAULT_UNITS.SERVER_LENGTH)
)
)
self._surface_thickness = thickness
Expand All @@ -251,7 +251,9 @@ def add_midsurface_offset(self, offset: MidSurfaceOffsetType) -> None:
"""
if self.is_surface:
self._commands_stub.AssignMidSurfaceOffsetType(
AssignMidSurfaceOffsetTypeRequest(bodiesOrFaces=[self.id], offsetType=offset.value)
AssignMidSurfaceOffsetTypeRequest(
bodies_or_faces=[self.id], offset_type=offset.value
)
)
self._surface_offset = offset
else:
Expand Down Expand Up @@ -357,7 +359,7 @@ def project_curves(
body=self._id,
curves=curves,
direction=unit_vector_to_grpc_direction(direction),
closestFace=closest_face,
closest_face=closest_face,
)
)

Expand Down
2 changes: 1 addition & 1 deletion src/ansys/geometry/core/designer/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def set_shared_topology(self, share_type: SharedTopologyType) -> None:
f"Setting shared topology type {share_type.value} on {self.id}."
)
self._component_stub.SetSharedTopology(
SetSharedTopologyRequest(id=self.id, shareType=share_type.value)
SetSharedTopologyRequest(id=self.id, share_type=share_type.value)
)

# Store the SharedTopologyType set on the client
Expand Down
8 changes: 4 additions & 4 deletions src/ansys/geometry/core/designer/design.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ def add_material(self, material: Material) -> None:
AddToDocumentRequest(
material=GRPCMaterial(
name=material.name,
materialProperties=[
material_properties=[
GRPCMaterialProperty(
id=property.type.value,
displayName=property.name,
display_name=property.name,
value=property.quantity.m,
units=format(property.quantity.units),
)
Expand Down Expand Up @@ -397,7 +397,7 @@ def add_midsurface_thickness(self, thickness: Quantity, bodies: List[Body]) -> N
# Assign mid-surface thickness
self._commands_stub.AssignMidSurfaceThickness(
AssignMidSurfaceThicknessRequest(
bodiesOrFaces=ids, thickness=thickness.m_as(DEFAULT_UNITS.SERVER_LENGTH)
bodies_or_faces=ids, thickness=thickness.m_as(DEFAULT_UNITS.SERVER_LENGTH)
)
)

Expand Down Expand Up @@ -435,7 +435,7 @@ def add_midsurface_offset(self, offset_type: MidSurfaceOffsetType, bodies: List[

# Assign mid-surface offset type
self._commands_stub.AssignMidSurfaceOffsetType(
AssignMidSurfaceOffsetTypeRequest(bodiesOrFaces=ids, offsetType=offset_type.value)
AssignMidSurfaceOffsetTypeRequest(bodies_or_faces=ids, offset_type=offset_type.value)
)

# Once the assignment has gone fine, store the values
Expand Down
12 changes: 6 additions & 6 deletions src/ansys/geometry/core/designer/face.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,17 +180,17 @@ def loops(self) -> List[FaceLoop]:
length = Quantity(grpc_loop.length, DEFAULT_UNITS.SERVER_LENGTH)
min = Point3D(
[
grpc_loop.boundingBox.min.x,
grpc_loop.boundingBox.min.y,
grpc_loop.boundingBox.min.z,
grpc_loop.bounding_box.min.x,
grpc_loop.bounding_box.min.y,
grpc_loop.bounding_box.min.z,
],
DEFAULT_UNITS.SERVER_LENGTH,
)
max = Point3D(
[
grpc_loop.boundingBox.max.x,
grpc_loop.boundingBox.max.y,
grpc_loop.boundingBox.max.z,
grpc_loop.bounding_box.max.x,
grpc_loop.bounding_box.max.y,
grpc_loop.bounding_box.max.z,
],
DEFAULT_UNITS.SERVER_LENGTH,
)
Expand Down