|
| 1 | +Feature tree |
| 2 | +------------ |
| 3 | + |
| 4 | +.. testsetup:: |
| 5 | + |
| 6 | + import ansys.acp.core as pyacp |
| 7 | + |
| 8 | + acp = pyacp.launch_acp() |
| 9 | + model = acp.import_model("../tests/data/minimal_complete_model_no_matml_link.acph5") |
| 10 | + |
| 11 | +.. doctest:: |
| 12 | + |
| 13 | + >>> pyacp.extras.feature_tree.print_feature_tree() |
| 14 | + Model |
| 15 | + ├── Material |
| 16 | + ├── Fabric |
| 17 | + ├── Stackup |
| 18 | + ├── SubLaminate |
| 19 | + ├── ElementSet |
| 20 | + ├── EdgeSet |
| 21 | + ├── CADGeometry |
| 22 | + │ └── CADComponent (read-only) |
| 23 | + ├── VirtualGeometry |
| 24 | + ├── Rosette |
| 25 | + ├── LookUpTable1D |
| 26 | + │ └── LookUpTable1DColumn |
| 27 | + ├── LookUpTable3D |
| 28 | + │ └── LookUpTable3DColumn |
| 29 | + ├── ParallelSelectionRule |
| 30 | + ├── CylindricalSelectionRule |
| 31 | + ├── SphericalSelectionRule |
| 32 | + ├── TubeSelectionRule |
| 33 | + ├── CutOffSelectionRule |
| 34 | + ├── GeometricalSelectionRule |
| 35 | + ├── VariableOffsetSelectionRule |
| 36 | + ├── BooleanSelectionRule |
| 37 | + ├── OrientedSelectionSet |
| 38 | + ├── ModelingGroup |
| 39 | + │ ├── ModelingPly |
| 40 | + │ │ └── ProductionPly (read-only) |
| 41 | + │ │ └── AnalysisPly (read-only) |
| 42 | + │ ├── InterfaceLayer |
| 43 | + │ └── ButtJointSequence |
| 44 | + ├── ImportedModelingGroup |
| 45 | + │ └── ImportedModelingPly |
| 46 | + │ └── ImportedProductionPly (read-only) |
| 47 | + │ └── ImportedAnalysisPly (read-only) |
| 48 | + ├── SamplingPoint |
| 49 | + ├── SectionCut |
| 50 | + ├── SolidModel |
| 51 | + │ ├── ExtrusionGuide |
| 52 | + │ ├── SnapToGeometry |
| 53 | + │ ├── SolidElementSet (read-only) |
| 54 | + │ ├── CutOffGeometry |
| 55 | + │ ├── AnalysisPly (read-only) |
| 56 | + │ └── InterfaceLayer (read-only) |
| 57 | + ├── ImportedSolidModel |
| 58 | + │ ├── SolidElementSet (read-only) |
| 59 | + │ ├── CutOffGeometry |
| 60 | + │ ├── LayupMappingObject |
| 61 | + │ │ ├── AnalysisPly (read-only) |
| 62 | + │ │ └── ImportedAnalysisPly (read-only) |
| 63 | + │ ├── AnalysisPly (read-only) |
| 64 | + │ └── ImportedAnalysisPly (read-only) |
| 65 | + ├── Sensor |
| 66 | + └── FieldDefinition |
| 67 | + <BLANKLINE> |
| 68 | + |
| 69 | + |
| 70 | +This structure determines how objects can be created, accessed, and stored in the model. |
| 71 | + |
| 72 | +For example, :class:`ModelingPly` is a child of :class:`ModelingGroup`, which is a child of :class:`Model`. |
| 73 | + |
| 74 | +To access a specific modeling ply, you can traverse this tree hierarchy: |
| 75 | + |
| 76 | +.. doctest:: |
| 77 | + |
| 78 | + >>> model |
| 79 | + <Model with name 'ACP Model'> |
| 80 | + >>> model.modeling_groups |
| 81 | + <MutableMapping[ModelingGroup] with keys ['ModelingGroup.1']> |
| 82 | + >>> modeling_group = model.modeling_groups["ModelingGroup.1"] |
| 83 | + >>> modeling_group.modeling_plies |
| 84 | + <MutableMapping[ModelingPly] with keys ['ModelingPly.1']> |
| 85 | + >>> modeling_ply = modeling_group.modeling_plies["ModelingPly.1"] |
| 86 | + >>> modeling_ply |
| 87 | + <ModelingPly with id 'ModelingPly.1'> |
| 88 | + |
| 89 | +To create a new modeling ply, you can use the :meth:`ModelingGroup.create_modeling_ply` method: |
| 90 | + |
| 91 | +.. doctest:: |
| 92 | + |
| 93 | + >>> new_ply = modeling_group.create_modeling_ply(name="New Ply") |
| 94 | + >>> new_ply |
| 95 | + <ModelingPly with id 'New Ply'> |
| 96 | + |
| 97 | +When cloning and storing a modeling ply, the ``parent`` argument must be a :class:`ModelingGroup` object: |
| 98 | + |
| 99 | +.. doctest:: |
| 100 | + |
| 101 | + >>> other_modeling_group = model.create_modeling_group() |
| 102 | + >>> cloned_ply = modeling_ply.clone() |
| 103 | + >>> cloned_ply |
| 104 | + <ModelingPly with id ''> |
| 105 | + >>> cloned_ply.store(parent=other_modeling_group) |
| 106 | + >>> cloned_ply |
| 107 | + <ModelingPly with id 'ModelingPly.2'> |
0 commit comments