Model.ossmooth2#

Model.ossmooth2(femfile, load_op, outputcode, tetrameshingcode, units, autobead, autobeadthreshold, autobeadlayer, isosurface, surfacecode, densitythreshold, distancecoefficient, optismoothboundary, lapiteration, lapfeatureangle, lapsmoothboundary, remesh, surfacereduction, reductionfeatureangle)#

Extracts the final design geometry from Optistruct topology, topography or shape optimization results.

Parameters:
  • femfile (hwString) – Optistruct base input file from which to extract the final geometry

  • load_op (int) –

    Execution/load option:

    0 - Create .oss file only to be used in standalone version (do not execute ossmooth)

    1 - Do not load geometry.

    2 - Load geometry

  • outputcode (int) –

    Output file format:

    1 - Nastran

    2 - IGES

    3 - STL

    4 - H3D

  • tetrameshingcode (int) – Flag indicating whether to create tetramesh after creating isosurface (0=no, 1=yes). Only to be used in standalone version.

  • units (int) –

    Units to use for IGES output:

    1 - inch

    2 - mm

    4 - foot

    6 - meter

    10 - cm

  • autobead (int) – Flag indicating whether to create an autobead design (0=no, 1=yes).

  • autobeadthreshold (double) – Threshold value for autobead (real value ≥ 0 and ≤ 1).

  • autobeadlayer (int) – Layer value for autobead (integer value 0 or 1).

  • isosurface (int) – Flag indicating whether to create an isosurface (0=no, 1=yes).

  • surfacecode (int) –

    The method to use:

    0 - no smoothing, isosurface only

    1 - Optimization based smoothing

    2 - no smoothing, element threshold

    3 - Laplacian smoothing

  • densitythreshold (double) – The density threshold for topology optimization (real value ≥ 0 and ≤ 1).

  • distancecoefficient (double) – The distance coefficient to use in optimization based smoothing (real value ≥ -50 and ≤ 50).

  • optismoothboundary (int) – Flag indicating whether to include the boundary or not in optimization based smoothing (0=no, 1=yes).

  • lapiteration (int) – The number of iterations to use in Laplacian smoothing (integer ≥ 0).

  • lapfeatureangle (double) – The feature angle to use in Laplacian smoothing (real value ≥ 1 and ≤ 80).

  • lapsmoothboundary (int) – Flag indicating whether to include the boundary or not in Laplacian smoothing (0=no, 1=yes).

  • remesh (int) – Flag indicating whether to remesh when creating an autobead design or/and isosurface (0=no, 1=yes).

  • surfacereduction (int) – Flag indicating whether to use surface reduction (0=no, 1=yes).

  • reductionfeatureangle (double) – The feature angle to use when requesting surface reduction (real value ≥ 1 and ≤ 80).

Example#

Execute OSSmooth on the “ c:/test / os1.fem “ , “ c:/test / os1.grid “ and “ c:/test / os1.sh “ files , load geometry back to HyperMesh , request Nastran output , create 1 layer autobead with remesh design with 0.3 bead threshold , no surface reduction , 0.3 topology optimization threshold , Laplacian smoothing , 10 iterations , 30.0 degrees feature angle and include the boundary#
import hm
import hm.entities as ent

model = hm.Model()

model.ossmooth2(
    femfile="c:/test/os1.fem",
    load_op=2,
    outputcode=1,
    tetrameshingcode=0,
    units=1,
    autobead=1,
    autobeadthreshold=0.3,
    autobeadlayer=1,
    isosurface=1,
    surfacecode=3,
    densitythreshold=0.3,
    distancecoefficient=0.0,
    optismoothboundary=0,
    lapiteration=10,
    lapfeatureangle=30.0,
    lapsmoothboundary=1,
    remesh=1,
    surfacereduction=0,
    reductionfeatureangle=10.0,
)