Skip to main content

SolidModel class

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.
      • >1.0: Higher reach.
      • <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: Options:
      • top
      • bottom

property disable_dropoff_sets_on_bottom

Elements where the drop-offs on bottom are disabled. List of element sets or all to select the entire scope of the solid model.

property disable_dropoff_sets_on_top

Elements of where the drop-offs on top are disabled. List of element sets or all to select the entire scope of the solid model.

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. String options: [inside_ply, outside_ply].

property element_sets

Element set(s) of the solid model.

property enabled

Whether this object is currently enabled. Solid models are are enabled in pre and shared mode.

property ex_type

Extrusion type. String options: [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. String options: [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: Defines if the source is put before or after the target. Option values: after or before.
  • Usage:

property skip_elements_without_plies

Enable this option to automatically skip elements without plies from the region of extrusion.

property snap_to_geometry_objs

Snap to geometry objects.

ExtrusionGuide class

class compolyx.ExtrusionGuide(obj, parent=None)

Extrusion guide class.

property active

Extrusion guide active.

property cad_geometry

Associated CAD geometry.

property depth

intensity for the propagation of mesh corrections, depth=1 leads to a linear decay from the guide to the radius, depth<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 class

class compolyx.SnapToGeometry(obj, parent)

Snap-to geometry 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. It is derived from the parent solid model.

property orientation

Orientation. String options: [top, bottom, undefined].

CutOffGeometry class

class compolyx.CutOffGeometry(obj, parent=None)

Cut-off geometry guide class.

property active

Cut-off geometry active.

property cad_geometry

Associated CAD geometry.

property enabled

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

property orientation

Orientation. String options: [up, down].

property rel_merge_tolerance

Relative merge tolerance.

SolidElementSet class

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 (nor editable, neither deletable).

serialize()

Serialize to Python string.

property size

Number of entities.

ImportedSolidModel class

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 layup 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 layup mapping object.
  • Parameters:
    • name: The name of the solid model.
    • id: The ID of the solid model.
    • active: Active status of layup 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 layup 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 layup 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. Solid Models are are enabled in pre and shared mode.

property ext_id

ID of corresponding mechanical model within the Workbench application project’s 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 layup mapping objects of type reinforcing are present.

import_initial_mesh(unit_system_type=‘undefined’)

Load the solid mesh without updating the layup mapping. The mesh is not refreshed if the solid model is already up-to-date.
  • Parameters:
    • unit_system_type: The mesh is converted to the specified unit system. For instance, mpa or bin.

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. String options:
  • undefined
  • si
  • mks
  • umks
  • cgs
  • mpa
  • bft
  • bin

update_mapping_statistics()

Computes the mapping statistics per ply to compare the original layup with the mapped data. Use imported_solid_model.mapping_statistics() to retrieve the results.

LayupMappingObject class

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

Layup mapping class.

property active

Boolean for whether to this object is active.

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. String options: [retain, remove].

property base_element_rosette_selection_method_type

Selection method of the coordinate systems for the base elements. String options: [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 for 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. String options: [layered_element, reinforcing]

property enabled

Whether this object is currently enabled. 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. String options: [tension_and_compression, tension_only, compression_only].

property reinforcing_stress_state

Defines which FE elements are used. String options: [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. String options: [minimum_distance, minimum_distance_superposed].

property rosettes

List of rosettes used to orient the lost elements.

property scale_ply_thicknesses

Boolean for 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 for whether to map imported plies.

property void_material

Global void material.