Model.meshutils_cutelements_8points#

Model.meshutils_cutelements_8points(element_collection, c1x, c1y, c1z, c2x, c2y, c2z, c3x, c3y, c3z, c4x, c4y, c4z, c5x, c5y, c5z, c6x, c6y, c6z, c7x, c7y, c7z, c8x, c8y, c8z, spc_collector_name, box_collector_name)#

Cut elements with a general box defined by 8 points.

Parameters:
  • element_collection (Collection) – The collection containing the element entities that needs to be cut.

  • c1x (double) – The x-coordinate of point 1.

  • c1y (double) – The y-coordinate of point 1.

  • c1z (double) – The z-coordinate of point 1.

  • c2x (double) – The x-coordinate of point 2.

  • c2y (double) – The y-coordinate of point 2.

  • c2z (double) – The z-coordinate of point 2.

  • c3x (double) – The x-coordinate of point 3.

  • c3y (double) – The y-coordinate of point 3.

  • c3z (double) – The z-coordinate of point 3.

  • c4x (double) – The x-coordinate of point 4.

  • c4y (double) – The y-coordinate of point 4.

  • c4z (double) – The z-coordinate of point 4.

  • c5x (double) – The x-coordinate of point 5.

  • c5y (double) – The y-coordinate of point 5.

  • c5z (double) – The z-coordinate of point 5.

  • c6x (double) – The x-coordinate of point 6.

  • c6y (double) – The y-coordinate of point 6.

  • c6z (double) – The z-coordinate of point 6.

  • c7x (double) – The x-coordinate of point 7.

  • c7y (double) – The y-coordinate of point 7.

  • c7z (double) – The z-coordinate of point 7.

  • c8x (double) – The x-coordinate of point 8.

  • c8y (double) – The y-coordinate of point 8.

  • c8z (double) – The z-coordinate of point 8.

  • spc_collector_name (hwString) –

    The name of the collector in which the spcs will be created for constraining cut elements.

    No entities will be created if the name is an empty string.

  • box_collector_name (hwString) –

    The name of the collector in which a hexa might be created to show the cutbox.

    No entities will be created if the name is an empty string.

Note

Only linear shell elements will be properly cut. For any other type of element, it will simply be deleted if it is completely or partially inside the cut box.

Example#

Cut elements 2D quads and trias elements with a general box defined by 8 points#
import hm
import hm.entities as ent

model = hm.Model()

element_collection = hm.Collection(model, ent.Element, "config=103,104")

model.meshutils_cutelements_8points(
    element_collection=element_collection,
    c1x=0,
    c1y=0,
    c1z=0,
    c2x=1,
    c2y=0,
    c2z=0,
    c3x=1,
    c3y=1,
    c3z=0,
    c4x=0,
    c4y=1,
    c4z=0,
    c5x=0,
    c5y=0,
    c5z=1,
    c6x=1,
    c6y=0,
    c6z=1,
    c7x=1,
    c7y=1,
    c7z=1,
    c8x=0,
    c8y=1,
    c8z=1,
    spc_collector_name="",
    box_collector_name="",
)