The View class allows you to control the view and plotting modes in PRIMER. More...
The PRIMER JavaScript API provides many class constants, properties and methods. For Arup to
be able to extend and enhance the API in the future any constant, property or method names beginning with a lowercase
or uppercase letter are reserved.
If you need to add your own properties or methods to one of the existing classes then to avoid any potential future conflict you
should ensure that the name begins with either an underscore (_) or a dollar sign ($) or the name is prefixed with your
own unique identifier.
For example if company 'ABC' need to add a property called 'example' then to avoid any potential future conflict use one of:
| Name | Description |
| View.ISO | Isometric projection |
| View.XY | XY axis projection |
| View.XZ | XZ axis projection |
| View.YZ | YZ axis projection |
Detailed DescriptionThe View class gives you access to the different plotting modes and views. See the documentation below for more details. |
Details of functionsAc() [static]DescriptionAutoscales the view |
No arguments
ReturnsNo return value |
ExampleTo autoscale View.Ac();
|
Ct() [static]DescriptionDoes a contour plot |
No arguments
ReturnsNo return value |
ExampleTo do a contour plot View.Ct();
|
GetTargetEye() [static]DescriptionGet the current target and eye settings |
No arguments
Returns |
Object with the following properties:
| Name | Type | Description |
| eye | array | Array containing the coordinates of the eye position |
| perspective | boolean | Whether the perspective switch is active |
| scale | real | Scale factor |
| target | array | Array containing the coordinates of the target position |
| up | constant/array | View.UP_AUTOMATIC, View.UP_X, View.UP_Y, View.UP_Z or an array containing the up vector if user defined |
object
ExampleTo get the current target and eye information var info = View.GetTargetEye();
|
Hi() [static]DescriptionDoes a Hidden line plot |
No arguments
ReturnsNo return value |
ExampleTo do a hidden line plot View.Hi();
|
Li() [static]DescriptionDoes a line (wireframe) plot |
No arguments
ReturnsNo return value |
ExampleTo do a line plot View.Li();
|
Redraw() [static]DescriptionRedraws the plot using the current plot mode. |
No arguments
ReturnsNo return value |
ExampleTo redraw View.Redraw();
|
SetContourType(View type[constant], View subtype[constant], View subtype2[constant]) [static]DescriptionSets a contour type (and subtype) |
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.TIMESTEP
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.STRUCTMASS
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
ReturnsNo return value |
SetTargetEye(info[object]) [static]DescriptionSet the current target and eye settings |
Object containing the target and eye properties
Object has the following properties:
| Name | Type | Description |
| eye | array | Array containing the coordinates of the eye position |
| perspective | boolean | Whether the perspective switch is active. If omitted the default is true |
| scale | real | Scale factor. If omitted, the scaling is automatically calculated (in the same way as if running PRIMER interactively) |
| target | array | Array containing the coordinates of the target position |
| up | constant/array | View.UP_AUTOMATIC, View.UP_X, View.UP_Y, View.UP_Z or an array containing the up vector if user defined. If omitted the default is View.UP_AUTOMATIC |
ReturnsNo return value |
Sh() [static]DescriptionDoes a shaded plot |
No arguments
ReturnsNo return value |
ExampleTo do a shaded plot View.Sh();
|
Show(View type[constant]) [static]DescriptionRedraws using one of the standard views |
The view to show. Can be +/-View.XY, +/-View.YZ, +/-View.XZ or +/-View.ISO
ReturnsNo return value |
ExampleTo do an isometric view from the negative direction: View.Show(-View.ISO);
|
Si() [static]DescriptionDoes a shaded image contour plot |
No arguments
ReturnsNo return value |
ExampleTo do a shaded image contour plot View.Si();
|
Vec() [static]DescriptionDoes a vector plot |
No arguments
ReturnsNo return value |
ExampleTo do a vector plot View.Vec();
|