Feature tree#
The following tree shows the hierarchy of PyACP objects:
>>> pyacp.extras.feature_tree.print_feature_tree(show_lines=True)
Model
├── Material
├── Fabric
├── Stackup
├── SubLaminate
├── ElementSet
├── EdgeSet
├── CADGeometry
│ └── CADComponent (read-only)
├── VirtualGeometry
├── Rosette
├── LookUpTable1D
│ └── LookUpTable1DColumn
├── LookUpTable3D
│ └── LookUpTable3DColumn
├── ParallelSelectionRule
├── CylindricalSelectionRule
├── SphericalSelectionRule
├── TubeSelectionRule
├── CutOffSelectionRule
├── GeometricalSelectionRule
├── VariableOffsetSelectionRule
├── BooleanSelectionRule
├── OrientedSelectionSet
├── ModelingGroup
│ ├── ModelingPly
│ │ └── ProductionPly (read-only)
│ │ └── AnalysisPly (read-only)
│ ├── InterfaceLayer
│ └── ButtJointSequence
├── ImportedModelingGroup
│ └── ImportedModelingPly
│ └── ImportedProductionPly (read-only)
│ └── ImportedAnalysisPly (read-only)
├── SamplingPoint
├── SectionCut
├── SolidModel
│ ├── ExtrusionGuide
│ ├── SnapToGeometry
│ ├── SolidElementSet (read-only)
│ ├── CutOffGeometry
│ ├── AnalysisPly (read-only)
│ └── InterfaceLayer (read-only)
├── ImportedSolidModel
│ ├── SolidElementSet (read-only)
│ ├── CutOffGeometry
│ ├── LayupMappingObject
│ │ ├── AnalysisPly (read-only)
│ │ └── ImportedAnalysisPly (read-only)
│ ├── AnalysisPly (read-only)
│ └── ImportedAnalysisPly (read-only)
├── Sensor
└── FieldDefinition
This structure determines how objects can be created, accessed, and stored in the model.
For example, ModelingPly
is a child of ModelingGroup
, which is a child of Model
. To access a specific modeling ply, you can traverse this tree hierarchy:
>>> model
<Model with name 'ACP Model'>
>>> model.modeling_groups
<MutableMapping[ModelingGroup] with keys ['ModelingGroup.1']>
>>> modeling_group = model.modeling_groups["ModelingGroup.1"]
>>> modeling_group.modeling_plies
<MutableMapping[ModelingPly] with keys ['ModelingPly.1']>
>>> modeling_ply = modeling_group.modeling_plies["ModelingPly.1"]
>>> modeling_ply
<ModelingPly with id 'ModelingPly.1'>
To create a new modeling ply, you can use the ModelingGroup.create_modeling_ply()
method:
>>> new_ply = modeling_group.create_modeling_ply(name="New Ply")
>>> new_ply
<ModelingPly with id 'New Ply'>
When cloning and storing a modeling ply, the parent
argument must be a ModelingGroup
object:
>>> other_modeling_group = model.create_modeling_group()
>>> cloned_ply = modeling_ply.clone()
>>> cloned_ply
<ModelingPly with id ''>
>>> cloned_ply.store(parent=other_modeling_group)
>>> cloned_ply
<ModelingPly with id 'ModelingPly.2'>