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.LABELandMeasure.TRANSPARENT
- class property Measure.format: constant
Number format for measures. Can be
Measure.AUTOMATIC,Measure.SCIENTIFICorMeasure.GENERAL
- class property Measure.line: constant
Line style for measures. Can be
Measure.HIDDENorMeasure.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_CURRENTorMeasure.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_PARTorMeasure.PART_TO_PART
Constructor
- classmethod Measure(type, options)
Create a new
Measureobject
- Parameters:
type (constant) – Measure type. Can be
Measure.NODE_TO_NODE,Measure.NODE_ANGLE,Measure.NODE_ORIGIN,Measure.NODE_TO_PARTorMeasure.PART_TO_PARToptions (dict) –
Measure options
- node1:
(
Nodeobject) First node for the measurement- node2:
(
Nodeobject) Second node for the measurement- node3:
(
Nodeobject) Third node for the measurement- part1:
(
Partobject) First part for the measurement- part2:
(
Partobject) Second part for the measurement- window:
(
GraphicsWindowobject) Graphics window where the measurement will be created. If omitted, it will be created in the first window- Returns:
Measure object
- Return type:
Measure
Example
To create a measure between the node with external label 50 in model 1 and the part with external label 10 in model 2 in window 4:
model1 = Oasys.D3PLOT.Model.GetFromID(1) node = Oasys.D3PLOT.Node.GetFromID(model1, 50) model2 = Oasys.D3PLOT.Model.GetFromID(2) part = Oasys.D3PLOT.Part.GetFromID(model2, 10) gw = Oasys.D3PLOT.GraphicsWindow.GetFromID(4) m = Oasys.D3PLOT.Measure(Oasys.D3PLOT.Measure.NODE_TO_PART, { "node1": node, "part2": part, "window": gw })
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(index)
Gets the measure object for a given index
- Parameters:
index (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_PARTorMeasure.PART_TO_PART)- dy:
(real) Y component of the measurement (for types
Measure.NODE_TO_NODE,Measure.NODE_ORIGIN,Measure.NODE_TO_PARTorMeasure.PART_TO_PART)- dz:
(real) Z component of the measurement (for types
Measure.NODE_TO_NODE,Measure.NODE_ORIGIN,Measure.NODE_TO_PARTorMeasure.PART_TO_PART)- mag:
(real) magnitude of the measurement (length for types
Measure.NODE_TO_NODE,Measure.NODE_ORIGIN,Measure.NODE_TO_PARTorMeasure.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