MeshControl (hwx.inspire)#
- class MeshControl(meshSize, parts=[], features=[], **kwds)#
Bases:
GeneralPhysical
Create mesh controls to assign an element size to parts or faces.
The element size dictates the quality of your analysis or optimization results. In general, the smaller the element size, the more accurate the result.
- Parameters:
meshSize (float) – Element size used in structural analyses. Applies to passed parts and features.
parts (list[Part]) – Parts to be meshed.
features (list[FeatureArea]) – Features to be meshed.
# Name
Type
Example
from hwx import inspire model = inspire.openTutorialFile('Structures/y-bracket.stmod') boss = model.getChild(name='Boss') bracket = model.getChild(name='Bracket') features = boss.getFeatures(type=inspire.FeatureCylindrical) meshGroup = inspire.MeshControl('3 mm', features=features, parts= bracket, name='Mesh control 01') mg = model.getChild(type=inspire.MeshControl) mg.meshSize = '1 mm' with inspire.usingUnits("gui"): print(f'{mg.name} is created with mesh size of {mg.meshSize}.') inspire.fitView()
- property meshSize#
Element size
- property features#
Features to apply meshSize to.
- property parts#
Parts to apply meshSize to.