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
3 changes: 3 additions & 0 deletions doc/source/api/enum_types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ Enumeration data types
EdgeSetType
EdgeSetType
ElementalDataType
ExtrusionType
FeFormat
GeometricalRuleType
IgnorableEntity
IntersectionType
LinkedObjectHandling
LookUpTable3DInterpolationAlgorithm
LookUpTableColumnValueType
Expand All @@ -31,6 +33,7 @@ Enumeration data types
PlyType
RosetteSelectionMethod
RosetteType
SectionCutType
SensorType
StatusType
SymmetryType
Expand Down
1 change: 1 addition & 0 deletions doc/source/api/tree_objects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ ACP objects
ParallelSelectionRule
ProductionPly
Rosette
SectionCut
Sensor
SphericalSelectionRule
Stackup
Expand Down
2 changes: 1 addition & 1 deletion doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ Limitations

* Only shell workflows are supported, solid models can not yet be defined using PyACP
* FieldDefinitions for variable material properties are not supported
* Section cuts are not supported
* Section cuts cannot be visualized
8 changes: 8 additions & 0 deletions src/ansys/acp/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
ElementSet,
ElementSetElementalData,
ElementSetNodalData,
ExtrusionType,
Fabric,
FabricWithAngle,
FeFormat,
Expand All @@ -78,6 +79,7 @@
GeometricalSelectionRuleNodalData,
IgnorableEntity,
InterfaceLayer,
IntersectionType,
Lamina,
LinkedSelectionRule,
LookUpTable1D,
Expand Down Expand Up @@ -114,6 +116,8 @@
RosetteSelectionMethod,
RosetteType,
ScalarData,
SectionCut,
SectionCutType,
Sensor,
SensorType,
SphericalSelectionRule,
Expand Down Expand Up @@ -181,6 +185,7 @@
"ElementSetElementalData",
"ElementSetNodalData",
"example_helpers",
"ExtrusionType",
"Fabric",
"FabricWithAngle",
"FeFormat",
Expand All @@ -194,6 +199,7 @@
"get_model_tree",
"IgnorableEntity",
"InterfaceLayer",
"IntersectionType",
"Lamina",
"launch_acp",
"LaunchMode",
Expand Down Expand Up @@ -236,6 +242,8 @@
"RosetteSelectionMethod",
"RosetteType",
"ScalarData",
"SectionCut",
"SectionCutType",
"Sensor",
"SensorType",
"SphericalSelectionRule",
Expand Down
8 changes: 8 additions & 0 deletions src/ansys/acp/core/_tree_objects/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@
DropoffMaterialType,
EdgeSetType,
ElementalDataType,
ExtrusionType,
GeometricalRuleType,
IntersectionType,
LookUpTable3DInterpolationAlgorithm,
LookUpTableColumnValueType,
NodalDataType,
Expand All @@ -63,6 +65,7 @@
PlyType,
RosetteSelectionMethod,
RosetteType,
SectionCutType,
SensorType,
StatusType,
SymmetryType,
Expand Down Expand Up @@ -99,6 +102,7 @@
)
from .production_ply import ProductionPly, ProductionPlyElementalData, ProductionPlyNodalData
from .rosette import Rosette
from .section_cut import SectionCut
from .sensor import Sensor
from .spherical_selection_rule import (
SphericalSelectionRule,
Expand Down Expand Up @@ -149,6 +153,7 @@
"ElementSet",
"ElementSetElementalData",
"ElementSetNodalData",
"ExtrusionType",
"Fabric",
"FabricWithAngle",
"FeFormat",
Expand All @@ -160,6 +165,7 @@
"IgnorableEntity",
"InterfaceLayer",
"InterpolationOptions",
"IntersectionType",
"Lamina",
"LinkedSelectionRule",
"LookUpTable1D",
Expand Down Expand Up @@ -197,6 +203,8 @@
"RosetteSelectionMethod",
"RosetteType",
"ScalarData",
"SectionCut",
"SectionCutType",
"Sensor",
"SensorType",
"SphericalSelectionRule",
Expand Down
25 changes: 25 additions & 0 deletions src/ansys/acp/core/_tree_objects/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
modeling_ply_pb2,
ply_material_pb2,
rosette_pb2,
section_cut_pb2,
sensor_pb2,
unit_system_pb2,
virtual_geometry_pb2,
Expand All @@ -51,7 +52,9 @@
"DropoffMaterialType",
"EdgeSetType",
"ElementalDataType",
"ExtrusionType",
"GeometricalRuleType",
"IntersectionType",
"LookUpTable3DInterpolationAlgorithm",
"LookUpTableColumnValueType",
"NodalDataType",
Expand All @@ -61,6 +64,7 @@
"PlyType",
"RosetteSelectionMethod",
"RosetteType",
"SectionCutType",
"SensorType",
"StatusType",
"SymmetryType",
Expand Down Expand Up @@ -368,3 +372,24 @@
enum_types_pb2.FileFormat.STL,
),
)

(ExtrusionType, extrusion_type_to_pb, extrusion_type_from_pb) = wrap_to_string_enum(
"ExtrusionType",
section_cut_pb2.ExtrusionType,
module=__name__,
doc="Extrusion method used in a section cut.",
)

(SectionCutType, section_cut_type_to_pb, section_cut_type_from_pb) = wrap_to_string_enum(
"SectionCutType",
section_cut_pb2.SectionCutType,
module=__name__,
doc="Determines whether the section cut is extruded by modeling ply, production ply, or analysis ply.",
)

(IntersectionType, intersection_type_to_pb, intersection_type_from_pb) = wrap_to_string_enum(
"IntersectionType",
section_cut_pb2.IntersectionType,
module=__name__,
doc="Determines how the intersection is computed for wireframe section cuts.",
)
10 changes: 10 additions & 0 deletions src/ansys/acp/core/_tree_objects/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
parallel_selection_rule_pb2_grpc,
ply_geometry_export_pb2,
rosette_pb2_grpc,
section_cut_pb2_grpc,
sensor_pb2_grpc,
spherical_selection_rule_pb2_grpc,
stackup_pb2_grpc,
Expand Down Expand Up @@ -120,6 +121,7 @@
from .oriented_selection_set import OrientedSelectionSet
from .parallel_selection_rule import ParallelSelectionRule
from .rosette import Rosette
from .section_cut import SectionCut
from .sensor import Sensor
from .spherical_selection_rule import SphericalSelectionRule
from .stackup import Stackup
Expand Down Expand Up @@ -708,6 +710,14 @@ def export_modeling_ply_geometries(
ModelingGroup, modeling_group_pb2_grpc.ObjectServiceStub
)

create_section_cut = define_create_method(
SectionCut,
func_name="create_section_cut",
parent_class_name="Model",
module_name=__module__,
)
section_cuts = define_mutable_mapping(SectionCut, section_cut_pb2_grpc.ObjectServiceStub)

create_sensor = define_create_method(
Sensor, func_name="create_sensor", parent_class_name="Model", module_name=__module__
)
Expand Down
Loading