You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gRPC service of Sensor does not support SensorBySolidModel
Error before updating the _LINKABLE_ENTITY_TYPES of the sensor
TypeError: List items must be of type Fabric, Stackup, SubLaminate, ElementSet, OrientedSelectionSet, ModelingPly, not SolidModel.
grpc server error after updating _LINKABLE_ENTITY_TYPES:
RuntimeError: Internal error: Invalid path type for resource path 'models/0c0e31f4-f6a3-445e-a7d0-265f40f2b453/solid_models/c47555f3-599b-4b19-9a4b-91bc226d01d9'.
Tasks
Update linkable entity types of Sensor (pyACP)
ensure that grpc layer support SolidModel and ImportedSolidModel as valid entities for SensorBySolidModel (ACP Core)
🔍 Before submitting the issue
🐞 Description of the bug
gRPC service of
Sensor
does not supportSensorBySolidModel
Error before updating the
_LINKABLE_ENTITY_TYPES
of the sensorTypeError: List items must be of type Fabric, Stackup, SubLaminate, ElementSet, OrientedSelectionSet, ModelingPly, not SolidModel.
grpc server error after updating
_LINKABLE_ENTITY_TYPES
:RuntimeError: Internal error: Invalid path type for resource path 'models/0c0e31f4-f6a3-445e-a7d0-265f40f2b453/solid_models/c47555f3-599b-4b19-9a4b-91bc226d01d9'.
Tasks
"""
elset_wing_1 = model.element_sets["els_wing_1"]
solid_model = model.create_solid_model(
name="Wing 1",
element_sets=[elset_wing_1]
)
sensor_by_solid_model = model.create_sensor(
name="By Solid Model",
sensor_type=SensorType.SENSOR_BY_SOLID_MODEL,
entities=[solid_model],
)
model.update()
print_measures(sensor_by_solid_model)
plotter = pyvista.Plotter()
plotter.add_mesh(solid_model.solid_mesh.to_pyvista(), show_edges=False, opacity=1, color="turquoise")
plotter.add_mesh(model.mesh.to_pyvista(), show_edges=False, opacity=0.2)
plotter.camera_position = camera
plotter.show()
"""
📝 Steps to reproduce
import pathlib
import tempfile
import numpy as np
import pyvista
import ansys.acp.core
from ansys.acp.core import launch_acp, SensorType, UnitSystemType
from ansys.acp.core.extras import FLAT_PLATE_SOLID_CAMERA, ExampleKeys, get_example_file
tempdir = tempfile.TemporaryDirectory()
WORKING_DIR = pathlib.Path(tempdir.name)
acph5_input_file = get_example_file(ExampleKeys.RACE_CAR_NOSE_ACPH5, WORKING_DIR)
acp = launch_acp()
model = acp.import_model(acph5_input_file)
model.unit_system = UnitSystemType.SI
print(model.unit_system)
model.fabrics["UD"].area_price = 15 # $/m^2
model.fabrics["woven"].area_price = 23 # $/m^2
model.fabrics["core_4mm"].area_price = 7 # $/m^2
elset_wing_1 = model.element_sets["els_wing_1"]
solid_model = model.create_solid_model(
name="Wing 1",
element_sets=[elset_wing_1]
)
sensor_by_solid_model = model.create_sensor(
name="By Solid Model",
sensor_type=SensorType.SENSOR_BY_SOLID_MODEL,
entities=[solid_model],
)
model.update()
print_measures(sensor_by_solid_model)
plotter = pyvista.Plotter()
plotter.add_mesh(solid_model.solid_mesh.to_pyvista(), show_edges=False, opacity=1, color="turquoise")
plotter.add_mesh(model.mesh.to_pyvista(), show_edges=False, opacity=0.2)
plotter.camera_position = camera
plotter.show()
💻 Which operating system are you using?
Windows
📀 Which ANSYS version are you using?
ACP / WB 2025 R1
🐍 Which Python version are you using?
3.9
📦 Installed packages
The text was updated successfully, but these errors were encountered: