    

 ## On this page

  

 

 # Solid-model classes

 Last update: 20.02.2025 

## [`SolidModel`](#compolyx.SolidModel)

### *class* compolyx.SolidModel(graph, obj, parent=None)

Solid Model class.

#### *property* active

Solid-Model active.

#### add\_disable\_dropoff\_set\_on\_bottom(set)

Add set where the drop-offs on bottom surface are disabled.

#### add\_disable\_dropoff\_set\_on\_top(set)

Add set where the drop-offs on top surface are disabled.

#### add\_element\_set(element\_set)

Add Element Set to Solid Model.

#### clear\_disable\_dropoff\_sets\_on\_bottom()

Clear sets where the drop-offs on bottom are disabled.

#### clear\_disable\_dropoff\_sets\_on\_top()

Clear sets where the drop-offs on top are disabled.

#### clear\_element\_sets()

Clear Element Sets of Solid Model.

#### clear\_generated\_data()

Function clears generated solid model but keeps all definitions.

#### *property* connect\_butt\_joined\_plies

Do not make drop-offs between butt-joined plies if set to True.

#### copy\_extrusion\_guide(source)

Copy a Extrusion Guide.

- **Parameters:**
    - source: Source object to copy.
- **Returns:**New instance of a Extrusion Guide.

#### copy\_snap\_to\_geometry\_obj(source)

Copy a Snap-To Geometry.

- **Parameters:**
    - source: Source object to copy.
- **Returns:**New instance of a Snap-To Geometry.

#### create\_extrusion\_guide(name, edge\_set=None, id='', cad\_geometry=None, direction=(0.0, 0.0, 0.0), radius=None, depth=1.0, use\_curvature\_correction=False, active=True)

Create a new extrusion guide.

- **Parameters:**
    - name: The name of the extrusion guide.
    - edge\_set: An edge set where this guide applies.
    - id: The ID of the extrusion guide.
    - cad\_geometry: A CAD geometry object.
    - direction: Extrusion direction.
    - radius: Distance up to which node translations due to the guide will be propagated through the mesh. 
        - 0.0: Only the nodes extruded from edge\_set will be shifted onto the guide.
    - depth: Intensity for the propagation of mesh corrections. 
        - 1.0: Linear decay from guide to radius.
        - &gt;1.0: Higher reach.
        - &lt;1.0: More local.
    - use\_curvature\_correction: Whether to use curvature correction algorithm to smooth mesh adapted to extrusion guide. Default is False.

#### create\_snap\_to\_geometry\_obj(name, cad\_geometry=None, oriented\_selection\_set=None, orientation='top', active=True, id='')

Create a new snap-to-geometry object.

- **Parameters:**
    - name: The name of the object.
    - id: The ID of the object.
    - active: Pass the active-flag of the object.
    - cad\_geometry: A geometry to snap to.
    - oriented\_selection\_set: Oriented element set where this snap to applies.
    - orientation: “top” or “bottom”.

#### *property* disable\_dropoff\_sets\_on\_bottom

Elements where the drop-offs on bottom are disabled.

#### *property* disable\_dropoff\_sets\_on\_top

Elements of where the drop-offs on top are disabled.

#### *property* disable\_dropoffs\_on\_bottom

Boolean whether to disable the drop-off elements on bottom surface.

#### *property* disable\_dropoffs\_on\_top

Boolean whether to disable the drop-off elements on top surface.

#### *property* drop\_off\_type

Drop-off type. Valid string values: \[‘inside\_ply’, ‘outside\_ply’\].

#### *property* element\_sets

Element Set(s) of the solid model.

#### *property* enabled

Whether this object is currently enabled or not. Solid Models are are enabled in pre and shared mode.

#### *property* ex\_type

Extrusion type. Valid string values: \[‘monolithic’, ‘analysis\_ply\_wise’, ‘production\_ply\_wise’, ‘modeling\_ply\_wise’, ‘sandwich\_wise’, ‘specify\_thickness’, ‘material\_wise’, ‘user\_defined’\].

#### *property* extrusion\_guides

Extrusion Guides.

#### *property* global\_drop\_off\_material

Global material of the drop-off elements.

#### *property* max\_thickness

Maximum thickness of solid elements.

#### *property* offset\_type

Offset type. Valid string values: \[‘shell\_normal’, ‘surface\_normal’\].

#### *property* ply\_group\_pointers

Ply group pointers for user defined extrusion.

#### remove\_element\_set(element\_set)

Remove Element Set from the solid model.

#### reorder\_extrusion\_guides(source, target, option='after')

Reorders the extrusion guides.

- **Parameters:**
    - source: Extrusion guide to be reordered.
    - target: Place to put the source.
    - option: Can be ‘after’ or ‘before’. Defines if the source is put before or after the target.
- **Usage:**```pycon
    >>> sm.reorder_extrusion_guides(source = sm.extrusion_guides['wall'], target=sm.extrusion_guides['leading_edge'], option='after')
    
    ```

#### *property* snap\_to\_geometry\_objs

Snap to Geometry objects.

## [`ExtrusionGuide`](#compolyx.ExtrusionGuide)

### *class* compolyx.ExtrusionGuide(obj, parent=None)

Extrusion guide class.

#### *property* active

Extrusion Guide active.

#### *property* cad\_geometry

Associated CADGeometry.

#### *property* depth

intensity for the propagation of mesh corrections, depth = 1 leads to a linear decay from the guide to the radius, depth &lt; 1 leads to more local corrections.

#### *property* direction

Extrusion direction.

#### *property* edge\_set

Associated EdgeSet.

#### *property* enabled

Whether this object is currently enabled or not. It is derived from the parent solid model.

#### *property* radius

Radius up to which nodal guide translations are propagated through the mesh.

#### *property* use\_curvature\_correction

Whether to use curvature correction algorithm to smooth mesh adapted to extrusion guide. Default is False.

## [`SnapToGeometry`](#compolyx.SnapToGeometry)

### *class* compolyx.SnapToGeometry(obj, parent)

SnapToGeometry guide class.

#### *property* active

Snap-To Geometry active.

#### *property* cad\_geometry

Associated Geometry.

#### *property* elements

List of affected shell elements

#### *property* enabled

Whether this object is currently enabled or not. It is derived from the parent solid model.

#### *property* orientation

Orientation. Valid string values: \[‘top’, ‘bottom’, ‘undefined’\].

## [`CutOffGeometry`](#compolyx.CutOffGeometry)

### *class* compolyx.CutOffGeometry(obj, parent=None)

CutOffGeometry guide class.

#### *property* active

Cut-Off Geometry active.

#### *property* cad\_geometry

Associated CADGeometry.

#### *property* enabled

Whether this object is currently enabled or not. It is derived from the parent solid model.

#### *property* orientation

Orientation. Valid string values: \[‘up’, ‘down’\].

#### *property* rel\_merge\_tolerance

Relative Merge Tolerance.

## [`SolidElementSet`](#compolyx.SolidElementSet)

### *class* compolyx.SolidElementSet(graph, obj=None, parent=None)

Solid element set class. Element Set of a solid model.

#### *property* element\_labels

List of solid elements which are linked to this element set.

#### *property* locked

Returns true if the object is locked (meaning is not editable nor deletable).

#### serialize()

Serialize to Python string.

#### *property* size

Number of entities.

## [`ImportedSolidModel`](#compolyx.ImportedSolidModel)

### *class* compolyx.ImportedSolidModel(graph, obj, parent=None)

Imported Solid Model class.

#### clear\_generated\_data()

Function clears generated solid model but keeps all definitions.

#### copy\_layup\_mapping\_object(source)

Copy a Lay-up Mapping Object.

- **Parameters:**
    - source: Source object to copy.
- **Returns:**New instance of LayupMappingObject.

#### create\_layup\_mapping\_object(name='', id='', active=True, entire\_solid\_mesh=True, solid\_element\_sets=\[\], element\_sets=None, delete\_lost\_elements=True, rosette\_selection\_method\_type='minimum\_distance', base\_element\_rosette\_selection\_method\_type='minimum\_distance', element\_technology='layered\_element', scale\_ply\_thicknesses=True, all\_plies=True, use\_imported\_plies=False, sequences=\[\], rosettes=\[\], base\_element\_rosettes=\[\], minimum\_void\_material\_thickness=-1.0, void\_material=None, filler\_material=None, base\_material=None, base\_element\_material\_handling='remove', reinforcing\_stress\_state='plane\_stress\_state\_with\_transverse\_shear\_and\_bending\_stiffness', reinforcing\_behavior='tension\_and\_compression')

Create a new lay-up mapping object

- **Parameters:**
    - name: The name of the Solid Model.
    - id: The ID of the Solid Model.
    - active: Active status of lay-up mapping object.
    - entire\_solid\_mesh: If true, then the scope is all solid elements.
    - solid\_element\_sets: Defines the scope of solid elements if entire\_solid\_mesh is False.
    - element\_sets: a list of Element Sets of the reference surface. Used to extract the plies.
    - filler\_material: Global filler material which is assigned to the elements without any layers.
    - delete\_lost\_elements: If enabled, then all elements which do not intersect with the lay-up are deleted.
    - rosette\_selection\_method\_type: Defines how the coordinate systems are applied to the filler/lost elements. Used if the element technology is layered\_element.
    - base\_element\_rosette\_selection\_method\_type: Defines how the coordinate systems are applied to the base solid elements. Used if the element technology is reinforcing.
    - element\_technology: Specifies the element technology of this mapping (layered elements or reinforcings).
    - scale\_ply\_thicknesses: Scale plies within layered solid element if they do not fill the entire element, else add void layers.
    - all\_plies: Whether all plies of the selected scope (element\_sets) should be mapped or only specific sequences.
    - use\_imported\_plies: If selected, Imported Ply objects can be used for the mapping. Else standard Modeling Plies.
    - sequences: List of Modeling Groups and/or Modeling Plies which are mapped onto the element scope.
    - rosettes: List of rosettes used to orient the lost elements. Used if the element technology is layered\_element.
    - base\_element\_rosettes: List of coordinate systems used to orient the base solid elements. Used if the element technology is reinforcing.
    - minimum\_void\_material\_thickness: Specifies the minimum thickness of void layers. Default is equal to the minimum analysis ply thickness of the model.
    - void\_material: Global void material which is assigned to layered elements that are not fully filled with ply material.
    - base\_material: Specify the base material of the solids if reinforcing are used.
    - base\_element\_material\_handling: Whether to remove the base material of the solids where the reinforcing intersect, or keep it.
    - reinforcing\_stress\_state: Specify the stress state of the reinforcing.
    - reinforcing\_behavior: Select the mechanical behavior of the reinforcing.
- **Returns:**The created Layup Mapping Object.
- **Note:**Base solid elements are the solid elements of a Lay-up Mapping object of type reinforcing which are intersected with the reinforcing surfaces.

#### create\_solid\_element\_set(name, id='', locked=False)

For internal use only: Creates a Solid Element Set.

#### *property* enabled

Whether this object is currently enabled or not. Solid Models are are enabled in pre and shared mode.

#### *property* ext\_id

ID of corresponding Mechanical Model within WB arhcive (ComponentID).

#### *property* external\_file\_path

The file path where the CAD geometry is loaded from.

#### *property* format

File format of the imported mesh.

#### has\_reinforcing\_objects()

Boolean whether Lay-up Mapping Objects of type reinforcing are present.

#### import\_initial\_mesh()

Import the solid mesh without updating the lay-up mapping. Nothing is done if the mesh was already loaded.

#### *property* layup\_mapping\_objects

Objects which define the scoping and details of each mapping step.

#### mapping\_statistics()

Returns the statistics of the layup mapping (number of elements, volumes, mass, etc.).

#### refresh\_external\_source(enforce=False)

Reloads the mesh from the external source.

- **Parameters:**
    - enforce: Enforce the reloading of external data for locked object in the new acph5 serialization format. This option should be used with care!

#### serialize()

Returns the Python serialization string.

#### *property* unit\_system

Unit system type of the imported mesh. Valid string values: undefined, si, mks, umks, cgs, mpa, bft, and bin.

#### update\_mapping\_statistics()

Computes the mapping statistics per ply to compare the original lay-up with the mapped data. Use imported\_solid\_model.mapping\_statistics() to retrieve the results.

## [`LayupMappingObject`](#compolyx.LayupMappingObject)

### *class* compolyx.LayupMappingObject(graph, obj, parent=None)

Layup Mapping class.

#### *property* active

Boolean whether to this object is active or not.

#### *property* all\_plies

Boolean whether all plies of the selected scope should be mapped or a user-defined subset.

#### *property* analysis\_plies

Analysis Plies of the Mapping Object.

#### *property* base\_element\_material\_handling

Whether the base-element material is removed or kept. Valid string values: \[‘retain’, ‘remove’\].

#### *property* base\_element\_rosette\_selection\_method\_type

Selection method of the coordinate systems for the base elements. Valid string values: \[‘minimum\_distance’, ‘minimum\_distance\_superposed’\].

#### *property* base\_element\_rosettes

List of rosettes used to orient the lost elements.

#### *property* base\_material

Material of base-element if reinforcing is used.

#### *property* delete\_lost\_elements

Boolean whether to delete solid elements without layup data.

#### *property* element\_sets

Element Set(s) of the solid model.

#### *property* element\_technology

Defines the element technology. Valid string values: \[‘layered\_element’, ‘reinforcing’\].

#### *property* enabled

Whether this object is currently enabled or not. Solid Models are are enabled in pre and shared mode.

#### *property* entire\_solid\_mesh

Boolean whether the mapping object is applied to the entire solid mesh.

#### *property* filler\_material

Filler material if layered elements are used.

#### *property* minimum\_void\_material\_thickness

Minimum thickness of the void layer.

#### *property* reinforcing\_behavior

Whether the reinforcing carries load and/or tension. Valid string values: \[‘tension\_and\_compression’, ‘tension\_only’, ‘compression\_only’\].

#### *property* reinforcing\_stress\_state

Defines which FE elements are used. Valid string values: \[‘uniaxial\_stress\_state’, ‘plane\_stress\_state’, ‘plane\_stress\_state\_with\_transverse\_shear\_stiffness’, ‘plane\_stress\_state\_with\_transverse\_shear\_and\_bending\_stiffness’\].

#### *property* rosette\_selection\_method\_type

Selection method of the coordinate systems for the filler/lost elements. Valid string values: \[‘minimum\_distance’, ‘minimum\_distance\_superposed’\].

#### *property* rosettes

List of rosettes used to orient the lost elements.

#### *property* scale\_ply\_thicknesses

Boolean whether to scale the layer thicknesses or to add void layers to fill voids.

#### *property* sequences

User-defined sequence entities to map.

#### *property* solid\_element\_sets

List of element sets of the solid mesh onto which the mapping is applied to.

#### *property* use\_imported\_plies

Boolean whether to map imported plies.

#### *property* void\_material

Global void material.