FeatureMeasure (hwx.inspire)#

class FeatureMeasure(feature, **kwds)#

Bases: Measure

Measures the length of a feature.

Parameters:

feature (Union[FeatureLinear, FeatureCircular]) – The feature being measured.

Attribute Table#

Name

Type

feature

Reference

length

Double

Example

Measure length of a feature.#
from hwx import inspire

model = inspire.newModel()
sheet = model.createSheetRectangle()
feat = sheet.getFeatures(inspire.core.FeatureLinear)[0]
length = inspire.FeatureMeasure(feat)

circle = model.createSheetCircle()
feat = circle.getFeatures(inspire.core.FeatureCircular)[0]
circumference = inspire.FeatureMeasure(feat)

print("Length : " + str(length.length))
print("Circumference : " + str(circumference.length))

inspire.orientView(direction="isometric")
property length#

The length of the feature.

property feature#

The feature the measure is attached to.