Oasys.D3PLOT.Measure class¶
Constants¶
Measure type¶
display¶
line¶
number format¶
offset¶
show¶
Class properties¶
- class property Measure.consider_blanking: boolean¶
true if calculations in
Measure.Data()
only consider unblanked elements, false (default) if they consider all elements
- class property Measure.current: integer¶
Index of the measure currently selected for display purposes, starting at 1
- class property Measure.display: constant¶
Display options for measurements. Can be any combination (bitwise OR) of
Measure.MAGNITUDE
,Measure.VECTOR
,Measure.LABEL
andMeasure.TRANSPARENT
- class property Measure.format: constant¶
Number format for measures. Can be
Measure.AUTOMATIC
,Measure.SCIENTIFIC
orMeasure.GENERAL
- class property Measure.line: constant¶
Line style for measures. Can be
Measure.HIDDEN
orMeasure.WIREFRAME
- class property Measure.offsets: constant¶
Whether or not to consider Deform (Shift deform, Magnify etc.) or model space offsets in the calculation of measures. Can be any combination (bitwise OR) of
Measure.DEFORM
,Measure.MODEL_SPACE
- class property Measure.precision: integer¶
Number of decimal places for scientific or general number format
- class property Measure.show: constant¶
Whether all, only the current or no measure is shown. Can be
Measure.SHOW_NONE
,Measure.SHOW_CURRENT
orMeasure.SHOW_ALL
- class property Measure.total(read only): integer¶
Total number of measures in D3PLOT
Properties¶
- property Measure.index(read only): integer¶
Index where the measure appears on the interactive measure menu, starting at 1. Note that the index of a measure can change when measures with lower indices are deleted
- property Measure.name: string¶
Measure name
- property Measure.type(read only): constant¶
Measure type. Can be
Measure.NODE_TO_NODE
,Measure.NODE_ANGLE
,Measure.NODE_ORIGIN
,Measure.NODE_TO_PART
orMeasure.PART_TO_PART
Constructor¶
- classmethod Measure(type, options)¶
Create a new
Measure
object
- Parameters:
type (constant) – Measure type. Can be
Measure.NODE_TO_NODE
,Measure.NODE_ANGLE
,Measure.NODE_ORIGIN
,Measure.NODE_TO_PART
orMeasure.PART_TO_PART
options (dict) –
Measure options
- model1:
(integer) Model ID for the first node or part for the measurement. If omitted, the current model will be used
- model2:
(integer) Model ID for the second node or part for the measurement. If omitted, the current model will be used
- model3:
(integer) Model ID for the third node for the measurement. If omitted, the current model will be used
- node1:
(integer) First node for the measurement. If +ve: internal node number starting at 1 (faster), if -ve: external node label
- node2:
(integer) Second node for the measurement. If +ve: internal node number starting at 1 (faster), if -ve: external node label
- node3:
(integer) Third node for the measurement. If +ve: internal node number starting at 1 (faster), if -ve: external node label
- part1:
(integer) First part for the measurement If +ve: internal part number starting at 1 (faster), if -ve: external part label
- part2:
(integer) Second part for the measurement. If +ve: internal part number starting at 1 (faster), if -ve: external part label
- window:
(integer) Graphics window ID where the measurement will be created. If omitted, it will be created in the first window
- Returns:
Measure object
- Return type:
dict
Example
To create a measure between the node with internal index 100 and the part with internal index 3:
m = Oasys.D3PLOT.Measure(Oasys.D3PLOT.Measure.NODE_TO_PART, { node1: 100, part2: 3 })To create a measure between the node with external label 50 and the part with external label 10:
m = Oasys.D3PLOT.Measure(Oasys.D3PLOT.Measure.NODE_TO_PART, { node1: -50, part2: -10 })
Static methods¶
- classmethod Measure.Delete(type)¶
Deletes the measure with the given index
- Parameters:
type (integer) – Index of the measure to be deleted, starting at 1
- Returns:
No return value
- Return type:
None
Example
To delete measure m:
index = m.index Oasys.D3PLOT.Measure.Delete(index)
- classmethod Measure.DeleteAll()¶
Deletes all measures
- Returns:
No return value
- Return type:
None
Example
To delete all measures:
Oasys.D3PLOT.Measure.DeleteAll()
- classmethod Measure.GetFromIndex(type)¶
Gets the measure object for a given index
- Parameters:
type (integer) – Index of the measure, starting at 1
- Returns:
Measure object for that index
- Return type:
Measure
Example
To get the object for the measure at index 3:
m = Oasys.D3PLOT.Measure.GetFromIndex(3)
Instance methods¶
- Measure.Data()¶
Returns an object with data for this measure
- Returns:
Dict with properties
- dx:
(real) X component of the measurement (for types
Measure.NODE_TO_NODE
,Measure.NODE_ORIGIN
,Measure.NODE_TO_PART
orMeasure.PART_TO_PART
)- dy:
(real) Y component of the measurement (for types
Measure.NODE_TO_NODE
,Measure.NODE_ORIGIN
,Measure.NODE_TO_PART
orMeasure.PART_TO_PART
)- dz:
(real) Z component of the measurement (for types
Measure.NODE_TO_NODE
,Measure.NODE_ORIGIN
,Measure.NODE_TO_PART
orMeasure.PART_TO_PART
)- mag:
(real) magnitude of the measurement (length for types
Measure.NODE_TO_NODE
,Measure.NODE_ORIGIN
,Measure.NODE_TO_PART
orMeasure.PART_TO_PART
, angle in degrees for typeMeasure.NODE_ANGLE
)- xy:
(real) Angle in the XY plane in degrees for type
Measure.NODE_ANGLE
- xz:
(real) Angle in the XZ plane in degrees for type
Measure.NODE_ANGLE
. The zx property is an alternative name for this- yz:
(real) Angle in the YZ plane in degrees for type
Measure.NODE_ANGLE
- zx:
(real) Angle in the ZX plane in degrees for type
Measure.NODE_ANGLE
. The xz property is an alternative name for this- Return type:
dict
Example
To get the X component of the measure object m:
data = m.Data() dx = data.dx