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
1 change: 1 addition & 0 deletions doc/changelog.d/617.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Feat: Added API import_parts_to_avl()
1 change: 1 addition & 0 deletions doc/changelog.d/619.miscellaneous.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Feat: Added time filtering to importThermalSignal API.
1 change: 1 addition & 0 deletions doc/changelog.d/621.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Feat: added new PySherlock updateTestPoints API
1 change: 1 addition & 0 deletions doc/changelog.d/622.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Feat: added new Pysherlock updateICTFixtures API
1 change: 1 addition & 0 deletions doc/changelog.d/624.miscellaneous.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated test assertion and test point enums to fix failing unit tests
4 changes: 4 additions & 0 deletions doc/source/api/layer_types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Classes used for the Layer API.
DeletePottingRegionRequest
GetICTFixturesPropertiesRequest
GetTestPointPropertiesRequest
ICTFixtureProperties
PolygonalShape
RectangularShape
SlotShape
Expand All @@ -24,7 +25,10 @@ Classes used for the Layer API.
PottingRegionCopyData
PottingRegionDeleteData
PottingRegionUpdateData
TestPointProperties
UpdateICTFixturesRequest
UpdatePottingRegionRequest
UpdateTestPointsRequest



Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi"

[project]
name = "ansys-sherlock-core"
version = "0.10.dev0"
version = "0.12.dev0"
description = "A python wrapper for Ansys Sherlock"
readme = "README.rst"
requires-python = ">=3.10,<4"
Expand Down
105 changes: 105 additions & 0 deletions src/ansys/sherlock/core/layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
PolygonalShape,
RectangularShape,
SlotShape,
UpdateICTFixturesRequest,
UpdatePottingRegionRequest,
UpdateTestPointsRequest,
)

try:
Expand Down Expand Up @@ -2134,3 +2136,106 @@ def get_ict_fixtures_props(
response = self.stub.getICTFixturesProperties(get_ict_fixture_props_request)

return response

@require_version(261)
def update_test_points(
self, request: UpdateTestPointsRequest
) -> SherlockLayerService_pb2.UpdateTestPointsResponse:
"""Update test point properties of a CCA from input parameters.

Available Since: 2026R1

Parameters
----------
request: UpdateTestPointsRequest
Contains all the information needed to update the properties for one or more
test points.

Returns
-------
SherlockCommonService_pb2.UpdateTestPointsResponse
A status code and message for the update test points request.

Examples
--------
>>> from ansys.sherlock.core.launcher import launch_sherlock
>>> from ansys.sherlock.core.types.layer_types import UpdateTestPointsRequest,
>>> TestPointProperties
>>> from ansys.api.sherlock.v0 import SherlockLayerService_pb2
>>> sherlock = connect()
>>> test_point = TestPointProperties(
>>> id="TP1",
>>> side="BOTTOM",
>>> units="in",
>>> center_x=1.0,
>>> center_y=0.5,
>>> radius=0.2,
>>> load_type=SherlockLayerService_pb2.TestPointProperties.LoadType.Force,
>>> load_value=3.0,
>>> load_units="ozf",
>>> )
>>> response = sherlock.layer.update_test_points(UpdateTestPointsRequest(
>>> project="Tutorial Project",
>>> cca_name="Main Board",
>>> update_test_points=[test_point],
>>> ))
"""
update_request = request._convert_to_grpc()
response = self.stub.updateTestPoints(update_request)
return response

@require_version(261)
def update_ict_fixtures(
self, request: UpdateICTFixturesRequest
) -> SherlockLayerService_pb2.UpdateICTFixturesResponse:
"""Update ict fixture properties of a CCA from input parameters.

Available Since: 2026R1

Parameters
----------
request: UpdateICTFixturesRequest
Contains all the information needed to update the properties for one or more
ict fixtures.

Returns
-------
SherlockCommonService_pb2.UpdateICTFixturesResponse
A status code and message for the update ict fixtures request.

Examples
--------
>>> from ansys.sherlock.core.launcher import launch_sherlock
>>> from ansys.sherlock.core.types.layer_types import UpdateICTFixturesRequest,
>>> ICTFixtureProperties
>>> sherlock = connect()
>>> fixture = ICTFixtureProperties(
>>> id="F1",
>>> type="Mount Hole",
>>> units="in",
>>> side="TOP",
>>> height="0.0",
>>> material="GOLD",
>>> state="DISABLED",
>>> shape="Slot",
>>> x="0.3",
>>> y="-0.4",
>>> length="1.0",
>>> width="0.2",
>>> diameter="0.0",
>>> nodes="10",
>>> rotation="15",
>>> polygon="",
>>> boundary="Outline",
>>> constraints="X-axis translation|Z-axis translation",
>>> chassis_material="SILVER",
>>> )
>>> response = sherlock.layer.update_ict_fixtures(UpdateICTFixturesRequest(
>>> project="Tutorial Project",
>>> cca_name="Main Board",
>>> update_fixtures=[fixture],
>>> ))
"""
update_request = request._convert_to_grpc()
response = self.stub.updateICTFixtures(update_request)
return response
4 changes: 3 additions & 1 deletion src/ansys/sherlock/core/lifecycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -2152,7 +2152,9 @@ def import_thermal_signal(
>>> time_removal= False,
>>> load_range_percentage=0.25,
>>> number_of_bins=0,
>>> filtering_limit=0.0,
>>> temperature_range_filtering_limit=0.0,
>>> time_filtering_limit=72.0,
>>> time_filtering_limit_units="hr",
>>> generated_cycles_label="Second Generated Cycles from Python",
>>> )
>>> )
Expand Down
41 changes: 41 additions & 0 deletions src/ansys/sherlock/core/parts.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

"""Module containing all parts management capabilities."""
try:
import SherlockCommonService_pb2
import SherlockPartsService_pb2
import SherlockPartsService_pb2_grpc
except ModuleNotFoundError:
from ansys.api.sherlock.v0 import SherlockCommonService_pb2
from ansys.api.sherlock.v0 import SherlockPartsService_pb2
from ansys.api.sherlock.v0 import SherlockPartsService_pb2_grpc

Expand All @@ -29,6 +31,7 @@
AVLPartNum,
DeletePartsFromPartsListRequest,
GetPartsListPropertiesRequest,
ImportPartsToAVLRequest,
PartLocation,
PartsListSearchDuplicationMode,
UpdatePadPropertiesRequest,
Expand Down Expand Up @@ -1191,3 +1194,41 @@ def delete_parts_from_parts_list(
delete_request = request._convert_to_grpc()

return list(self.stub.deletePartsFromPartsList(delete_request))

@require_version(261)
def import_parts_to_avl(
self,
request: ImportPartsToAVLRequest,
) -> SherlockCommonService_pb2.ReturnCode:
"""Import a parts list into the Approved Vendor List (AVL).

Available Since: 2026R1

Parameters
----------
request : ImportPartsToAVLRequest
Contains the file path and import mode to use for the AVL parts import.

Returns
-------
SherlockCommonService_pb2.ReturnCode
Return code indicating the result of the AVL parts import.

Examples
--------
>>> from ansys.sherlock.core.types.part_types import ImportPartsToAVLRequest
>>> from ansys.api.sherlock.v0 import SherlockPartsService_pb2
>>> from ansys.sherlock.core.launcher import launch_sherlock
>>>
>>> sherlock = launch_sherlock()
>>> return_code = sherlock.project.import_parts_to_avl(
>>> ImportPartsToAVLRequest(
>>> import_file="C:/path/to/AVL_parts_file.xls",
>>> import_type=SherlockPartsService_pb2.AVLImportType.Update
>>> )
>>> )
"""
if not self._is_connection_up():
raise SherlockNoGrpcConnectionException()

return self.stub.importPartsToAVL(request._convert_to_grpc())
Loading
Loading