LengthMeasure (hwx.inspire)#

class LengthMeasure(location1, location2, **kwds)#

Bases: Measure

Measures the length between two points.

Length measure creates displacement velocity and acceleration requests expressed in global.

Optionally a system can be defined on the point to point measure. If defined the system will be used as RM marker.

Attribute Table#

Name

Type

entity1

Reference

entity2

Reference

length

Double

location

property

location1

Location

location2

Location

solverVariables

tuple

system

Reference

Example

Measure length between features points.#
from hwx import inspire

model = inspire.newModel()
sheet = model.createSheetRectangle()
point1 = sheet.features[0]
point2 = sheet.features[1]
lengthMeasure = inspire.LengthMeasure( point1.location,
                                       point2.location,
                                       entity1 = point1,
                                       entity2 = point2)

# Remove the length measure's association with feature
lengthMeasure.entity1 = None
lengthMeasure.entity2 = None

print("Length Measure: " + str(lengthMeasure.length))

line1 = sheet.features[6]
line2 = sheet.features[7]
lengthMeasure2 = inspire.LengthMeasure( line1.location,
                                       line2.location)

# Add the length measure's association with feature
lengthMeasure2.entity1 = line1
lengthMeasure2.entity2 = line2
print("Length Measure: " + str(lengthMeasure2.length))

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

The first Part or Feature the measure is attached to.

property entity2#

The second Part or Feature the measure is attached to.

property location1#

Location of the measure on entity1.

property location2#

Location of the measure on entity2.

property system#

The System associated with the length measure.

property length#

Distance between the two connecting points.

property location#

Returns the midpoint between the two connecting points.