Model.createsectioncut#

Model.createsectioncut(sectionmethod, beamoffset=0, createbeamelems=0, createbeamsect=0, beamElemsAtPos=1, createelemsets=0, createsectiondata=0, detaileddata=0, elemscomp=0, includebeams=1, includeCollection=Collection(), includerods=1, includeshells=1, inertiaat='', keepintersectlines=0, linescomp=0, nodeatcentroid=0, nodeatneutralaxis=1, numcuts=0, offset=0, ref_list=s_defaultEntityList, sectionbase=hwTriple(0.0, 0.0, 0.0), sectionnormal=hwTriple(0.0, 0.0, 0.0), shelloffset=0, verticalaxis=hwTriple(0.0, 0.0, 0.0), createelemsat=1)#

Computes area moments of inertia and stiffness terms of a planar section cut from a 1D/2D selection. The computed data is stored in a resultant section cut table. Moreover, it can create shell beam sections from the cuts and create beam elements along the consecutive cuts. Every beam element created has a PBEAM property assigned to it. The property refers to the beam sections, along the start and end of the beam element, at stations 0 and 1. The function currently works for OptiStruct and Nastran user profiles.

Parameters:
  • sectionmethod (hwString) –

    auto - Uses the element selection to compute the bounding box and creates section cut along the longest dimension of the box. In case of ambiguity, considers the global axis in the order of X and Y respectively as section cut normal.

    byplane - Uses the plane information to create the cut (default)

  • beamoffset (int) –

    Available if includebeams is specified.

    0 - Do not consider 1D offset in the section cut (default)

    1 - Consider 1D offset in the section cut

  • createbeamelems (int) –

    0 - Do not create beam elements between consecutive cuts (default)

    1 - Create beam elements between consecutive cuts, and create and assign PBEAM properties.

  • createbeamsect (int) –

    0 - Do not create shell beam section from the section cut (default)

    1 - Create shell beam section from the section cut

  • beamElemsAtPos (unsigned int) – Reserved for future development.

  • createelemsets (int) –

    0 - Do not create sets of intersecting elements for each cut (default)

    1 - Create sets of intersecting elements for each cut

  • createsectiondata (int) –

    0 - Do not create resultant section cut table (default)

    1 - Create resultant section cut table

  • detaileddata (int) –

    0 - Do not create a table with detailed element level section cut data (default)

    1 - Create a table with detailed element level section cut data

  • elemscomp (unsigned int) –

    Available if createbeamelems=1.

    0 - Create in current component (default)

    1 - Create in new component

  • includebeams (int) –

    0 - Do not consider beam/bar elements in the section cut

    1 - Consider beam/bar elements in the section cut (default)

  • includeCollection (Collection) – The collection containing the entities for the section cut. If provided, only the given elements will be used for the cut.

  • includerods (int) –

    0 - Do not consider rod/truss elements in the section cut

    1 - Consider rod/truss elements in the section cut (default)

  • includeshells (int) –

    0 - Do not consider 2D elements in the section cut

    1 - Consider 2D elements in the section cut (default)

  • inertiaat (hwString) –

    centroid - Output the MOI at the section’s centroid

    neutralaxis - Output the MOI at the section’s neutral axis (default)

    neutralaxis - Output the MOI at the section’s neutral axis (default)

    <x y z> - Output the MOI at the user-defined position projected onto the section’s plane

  • keepintersectlines (int) –

    Available if createbeamsect=1.

    0 - Do not keep intersect lines (default)

    1 - Keep intersect lines

  • linescomp (unsigned int) –

    Available if keepintersectlines=1.

    0 - Keep in current component (default)

    1 - Keep in new component

  • nodeatcentroid (int) –

    0 - Do not create a node at the centroid (default)

    1 - Create a node at the centroid

  • nodeatneutralaxis (int) –

    0 - Do not create a node at the neutral axis (default)

    1 - Create a node at the neutral axis

  • numcuts (int) – The number of cuts to be made.

  • offset (double) – The offset from the section plane base to make consecutive cuts. Requires the use of numcuts.

Available if sectionmethod=byplane and sectionbase is provided.

Parameters:
  • ref_list (EntityList) – A list containing the entity objects containing the reference nodes or points for the section plane base.

  • sectionbase (hwTriple) – The coordinates of the section base. Required if sectionmethod=byplane and offset is to be used.

  • sectionnormal (hwTriple) – The component of the section plane normal pointing to the positive side. Only elements from that side are considered to evaluate interias. Required if sectionmethod=byplane.

  • shelloffset (int) –

    Available if includeshells is specified.

    0 - Do not consider shell offset in the section cut (default)

    1 - Consider shell offset in the section cut

  • verticalaxis (hwTriple) – The global coordinates of the YZ section vertical axis. The actual vertical axis will be recomputed as 2 cross-products using the section’s normal vector. Required if sectionmethod=byplane.

  • createelemsat (int) –

    Available if createbeamelems=1. Valid values are:

    1 - Create beam elements at the centroid (default)

    2 - Create beam elements at the neutral axis

Example#

Create a section cut use offset information#
import hm
import hm.entities as ent

model = hm.Model()

comps = hm.Collection(model, ent.Component, populate=True)

model.createsectioncut(
    sectionmethod="byplane",
    createbeamelems=1,
    createbeamsect=1,
    createelemsets=1,
    createsectiondata=1,
    detaileddata=1,
    elemscomp=1,
    includeCollection=comps,
    inertiaat="centroid",
    keepintersectlines=1,
    linescomp=1,
    nodeatcentroid=1,
    numcuts=2,
    offset=300,
    sectionbase=[8000, 1.5916157281026e-12, 1125],
    sectionnormal=[-1,0,0],
    verticalaxis=[0,0,1],
)
Create a section cut use nodes#
import hm
import hm.entities as ent

model = hm.Model()

nodes = [ent.Node(model, 10), ent.Node(model, 11), ent.Node(model, 12)]

model.createsectioncut(
    sectionmethod="byplane",
    createbeamelems=1,
    createbeamsect=1,
    createelemsets=1,
    createsectiondata=1,
    detaileddata=1,
    inertiaat="centroid",
    keepintersectlines=1,
    nodeatcentroid=1,
    ref_list=nodes,
    sectionnormal=[1,0,0],
    verticalaxis=[0,0,1],
)
Create a section cut use auto#
import hm
import hm.entities as ent

model = hm.Model()

model.createsectioncut(
    sectionmethod="auto",
    createbeamelems=1,
    createbeamsect=1,
    createelemsets=1,
    createsectiondata=1,
    detaileddata=1,
    inertiaat="centroid",
    keepintersectlines=1,
    nodeatcentroid=1,
    numcuts=4,
)