Oasys.PRIMER.View class
Constants
SetContourType - argument 1 (Type)
- View.ELEMPROPS
Type Element Properties
- View.ELEMQUAL
Type Element Quality
- View.INITVELS
Type Initial Velocities
- View.LOADSHELLDIRECTION
Type Load Shell Direction
- View.MASSSCALE
Type Mass Scale
- View.MATLPROPS
Type Material Properties
- View.PARTMASS
Type Part Mass
- View.SHELLNORMALS
Type Shell Normals
- View.SHELLTHICKNESS
Type Shell Thickness
- View.TIMESTEP
Type TimeStep
SetContourType - argument 2 (Subtype)
- View.ABSOLUTE
Subtype Absolute (of type Shell Thickness)
- View.ADDEDMASS
Subtype Added Mass (of type Mass Scale)
- View.ADDEDMASSPART
Subtype Added Mass #Part (of type Mass Scale)
- View.AREA
Subtype Area (2d only) (of type Element Property)
- View.ASPECTRATIO
Subtype Aspect Ratio (of type Element Quality)
- View.CONTOUR
Subtype Contour (of type Shell Normals)
- View.DENSITY
Subtype Density (of type Material Property)
- View.EMPFINALMASS
Subtype (*)Final Mass (of type (*)EMP Parts Only)
- View.EMPNSMASS
Subtype (*)NS Mass (of type (*)EMP Parts Only)
- View.EMPSTRUCTMASS
Subtype (*)Struct Mass (of type (*)EMP Parts Only)
- View.FAILEDCRITERIA
Subtype Failed Criteria (of type Element Quality)
- View.FINALMASS
Subtype Final Mass (of type (*)EMP Parts Only)
- View.FORM
Subtype Form (native) (of type Element Property)
- View.FORMULATION
Subtype Formulation (of type Element Property)
- View.INITVELRES
Subtype Init Vel-Res (of type Init Vel Component)
- View.INITVELX
Subtype Init Vel-X (of type Init Vel Component)
- View.INITVELY
Subtype Init Vel-Y (of type Init Vel Component)
- View.INITVELZ
Subtype Init Vel-Z (of type Init Vel Component)
- View.INTPOINTS
Subtype Integration Points (of type Element Property)
- View.JACOBIAN
Subtype Jacobian (of type Element Quality)
- View.MATERIALNUMBER
Subtype Material Number (of type Material Property)
- View.MAXINTANGLE
Subtype Max Internal Angle (of type Element Quality)
- View.MININTANGLE
Subtype Min Internal Angle (of type Element Quality)
- View.MINLENGTH
Subtype Min Length (of type Element Quality)
- View.PERCENTADDEDMASS
Subtype % Added Mass (of type Mass Scale)
- View.PERCENTADDEDMASSPART
Subtype % Added Mass #Part (of type Mass Scale)
- View.PLASTICSTRAIN
Subtype Plastic Strain (of type Element Property)
- View.POISSONRATIO
Subtype Poisson’s Ratio (of type Material Property)
- View.QUALIMPERF
Subtype Tet Collapse (of type Element Quality)
- View.REMAINING
Subtype % remaining (of type Shell Thickness)
- View.SKEW
Subtype Skew (native) (of type Element Quality)
- View.STRUCTMASS
Subtype Struct Mass (of type (*)EMP Parts Only)
- View.TAPER
Subtype Taper (of type Element Quality)
- View.TETCOLLAPSE
Subtype Formulation (of type Element Quality)
- View.THINNING
Subtype % thinning (of type Shell Thickness)
- View.VECTOR
Subtype Vector (of type Shell Normals)
- View.VOLUME
Subtype Volume (of type Element Property)
- View.WARPAGE
Subtype Warpage (of type Element Quality)
- View.YIELDSTRESS
Subtype Yield Stress (of type Material Property)
- View.YOUNGMODULUS
Subtype Young’s Modulus (of type Material Property)
SetContourType - argument 3 (Subtype)
Show
up vector
Static methods
- classmethod View.Ac()
Autoscales the view
- Returns:
No return value
- Return type:
None
Example
To autoscale
Oasys.PRIMER.View.Ac()
- classmethod View.Ct()
Does a contour plot
- Returns:
No return value
- Return type:
None
Example
To do a contour plot
Oasys.PRIMER.View.Ct()
- classmethod View.GetTargetEye()
Get the current target and eye settings
- Returns:
Dict with properties
- eye:
(List of numbers) List containing the coordinates of the eye position
- perspective:
(boolean) Whether the perspective switch is active
- scale:
(float) Scale factor
- target:
(List of numbers) List containing the coordinates of the target position
- up:
(constant/list)
View.UP_AUTOMATIC,View.UP_X,View.UP_Y,View.UP_Zor a list containing the up vector if user defined- Return type:
dict
Example
To get the current target and eye information
info = Oasys.PRIMER.View.GetTargetEye()
- classmethod View.Hi()
Does a Hidden line plot
- Returns:
No return value
- Return type:
None
Example
To do a hidden line plot
Oasys.PRIMER.View.Hi()
- classmethod View.Li()
Does a line (wireframe) plot
- Returns:
No return value
- Return type:
None
Example
To do a line plot
Oasys.PRIMER.View.Li()
- classmethod View.Redraw()
Redraws the plot using the current plot mode
- Returns:
No return value
- Return type:
None
Example
To redraw
Oasys.PRIMER.View.Redraw()
- classmethod View.SetContourType(view_type, view_subtype, view_subtype2)
Sets a contour type (and subtype)
- Parameters:
view_type (constant) – The type of contour to plot. Can be:
View.ELEMPROPS,View.ELEMQUAL,View.INITVELS,View.LOADSHELLDIRECTION,View.MASSSCALE,View.MATLPROPS,View.PARTMASS,View.SHELLNORMALS,View.SHELLTHICKNESS,View.TIMESTEPview_subtype (constant) – The subtype of contour to plot.
Note: This second argument is NOT required for types TIMESTEP and LOADSHELLDIRECTION.
Subtypes for Type TIMESTEP:
No subtypes
Subtypes for Type SHELLTHICKNESS:
View.ABSOLUTE,View.REMAINING,View.THINNING
Subtypes for SHELLNORMALS:
View.CONTOUR,View.VECTOR
Subtypes for Type LOADSHELLDIRECTION:
No subtypes
Subtypes for Type ELEMPROPS:
View.AREA,View.FORM,View.FORMULATION,View.INTPOINTS,View.PLASTICSTRAIN,View.VOLUME
Subtypes for Type ELEMQUAL:
View.ASPECTRATIO,View.FAILEDCRITERIA,View.JACOBIAN,View.MAXINTANGLE,View.MININTANGLE,View.MINLENGTH,View.QUALIMPERF,View.SKEW,View.TAPER,View.TETCOLLAPSE,View.WARPAGE
Subtypes for Type MASSSCALE:
View.ADDEDMASS,View.ADDEDMASSPART,View.PERCENTADDEDMASS,View.PERCENTADDEDMASSPART
Subtypes for Type MATLPROPS:
View.DENSITY,View.MATERIALNUMBER,View.POISSONRATIO,View.YIELDSTRESS,View.YOUNGMODULUS
Subtypes for Type INITVELS:
View.INITVELX,View.INITVELY,View.INITVELZ,View.INITVELRES
Subtypes for Type PARTMASS:
View.EMPFINALMASS,View.EMPNSMASS,View.EMPSTRUCTMASS,View.FINALMASS,View.STRUCTMASSview_subtype2 (constant) – The subtype of contour to plot.
Note: This third argument is required only for ELEMENTPROP ->PLASTICSTRAIN/FORM/AREA/VOLUME.
The default is PARAMETRIC COORDINATE.
Subtypes for Type ELEMENTPROP -> PLASTICSTRAIN/FORM/AREA/VOLUME:
View.INTEGRATIONPOINT,View.MAXSTRAIN,View.MINSTRAIN,View.PARAMETRICCOORD- Returns:
No return value
- Return type:
None
Example
To set a contour plot of Load Shell Direction (no subtype):
Oasys.PRIMER.View.SetContourType(Oasys.PRIMER.View.LOADSHELLDIRECTION)To set a contour plot of Element Formulation (type: Elem Props, subtype: Formulation):
Oasys.PRIMER.View.SetContourType(Oasys.PRIMER.View.ELEMPROPS, Oasys.PRIMER.View.FORMULATION)
- classmethod View.SetTargetEye(info)
Set the current target and eye settings
- Parameters:
info (dict) –
Dictionary containing the target and eye properties
- eye:
(List of numbers) List containing the coordinates of the eye position
- perspective:
(boolean) Whether the perspective switch is active. If omitted the default is true
- scale:
(float) Scale factor. If omitted, the scaling is automatically calculated (in the same way as if running PRIMER interactively)
- target:
(List of numbers) List containing the coordinates of the target position
- up:
(constant/list)
View.UP_AUTOMATIC,View.UP_X,View.UP_Y,View.UP_Zor a list containing the up vector if user defined. If omitted the default isView.UP_AUTOMATIC- Returns:
No return value
- Return type:
None
Example
To set the eye position to (-2365.1, -373.2, 1081.1) looking at target (-2075.9, -367.7, 905.2) with the up vector in global Z, automatically turning on perspective and calculating the scale factor:
Oasys.PRIMER.View.SetTargetEye( { eye: [ 1000, 0, 0], target: [0, 0, 0], up: Oasys.PRIMER.View.UP_Z } )To set the eye position to (-2365.1, -373.2, 1081.1) looking at target (-2075.9, -367.7, 905.2) with the up vector in global Z, turning off perspective and setting the scale factor to 10:
Oasys.PRIMER.View.SetTargetEye( { eye: [ 1000, 0, 0], target: [0, 0, 0], up: Oasys.PRIMER.View.UP_Z, perspective: false, scale: 10 } )
- classmethod View.Sh()
Does a shaded plot
- Returns:
No return value
- Return type:
None
Example
To do a shaded plot
Oasys.PRIMER.View.Sh()
- classmethod View.Show(view_type)
Redraws using one of the standard views
- Parameters:
view_type (constant) – The view to show. Can be +/-
View.XY, +/-View.YZ, +/-View.XZor +/-View.ISO- Returns:
No return value
- Return type:
None
Example
To do an isometric view from the negative direction:
Oasys.PRIMER.View.Show(-Oasys.PRIMER.View.ISO)
- classmethod View.Si()
Does a shaded image contour plot
- Returns:
No return value
- Return type:
None
Example
To do a shaded image contour plot
Oasys.PRIMER.View.Si()
- classmethod View.Vec()
Does a vector plot
- Returns:
No return value
- Return type:
None
Example
To do a vector plot
Oasys.PRIMER.View.Vec()