NX Open C++ Reference Guide
|
Represents a view. More...
Public Types | |
enum | Canned { CannedTop, CannedFront, CannedRight, CannedBack, CannedBottom, CannedLeft, CannedIsometric, CannedTrimetric } |
Describes a simplified indexing scheme for accessing canned views with interfaces that use this enum as a parameter. More... | |
enum | RenderingStyleType { RenderingStyleTypeShadedWithEdges, RenderingStyleTypeShadedWithBodyColorEdges, RenderingStyleTypeShaded, RenderingStyleTypeWireframeWithDimEdges, RenderingStyleTypeWireframeWithHiddenEdges, RenderingStyleTypeWireframeWithDashedEdges, RenderingStyleTypeStudio, RenderingStyleTypeFaceAnalysis, RenderingStyleTypePartiallyShaded, RenderingStyleTypeStaticWireframe } |
Describes the rendering style for geometry displayed in the view. More... | |
enum | ScaleAdjustment { ScaleAdjustmentFit, ScaleAdjustmentCurrent, ScaleAdjustmentSaved } |
Describes simple, predefined adjustments that may be applied to a view's scale while another operation is performed, in conjunction, on the view. More... | |
enum | ScaleFactor { ScaleFactorHalfScale, ScaleFactorDoubleScale, ScaleFactorReduceScale, ScaleFactorIncreaseScale } |
Describes the relative scales to which a view can be set. More... | |
Public Member Functions | |
std::vector < NXOpen::DisplayableObject * > | AskVisibleObjects () |
Returns an array of objects visible in a view. | |
void | Concatenate (const NXOpen::Point3d &translation) |
Concatenates the given translation with the previous viewing transformation of the specified view. | |
void | Concatenate (double scale) |
Concatenates the given scale with the previous viewing transformation of the specified view. | |
void | Concatenate (const NXOpen::Point3d &translation, double scale) |
Concatenates the given translation and scale with the previous viewing transformation of the specified view. | |
void | Concatenate (const NXOpen::Point3d ¢erOfRotation, const NXOpen::Vector3d &rotationAxis, double angle) |
Concatenates the given rotation with the previous viewing transformation of the specified view. | |
void | Concatenate (const NXOpen::Point3d &translation, const NXOpen::Point3d ¢erOfRotation, const NXOpen::Vector3d &rotationAxis, double angle) |
Concatenates the given translation and rotation with the previous viewing transformation of the specified view. | |
void | Concatenate (double scale, const NXOpen::Point3d ¢erOfRotation, const NXOpen::Vector3d &rotationAxis, double angle) |
Concatenates the given scale and rotation with the previous viewing transformation of the specified view. | |
void | Concatenate (const NXOpen::Point3d &translation, double scale, const NXOpen::Point3d ¢erOfRotation, const NXOpen::Vector3d &rotationAxis, double angle) |
Concatenates the given translation, scale and rotation with the previous viewing transformation of the specified view. | |
NXOpen::ViewDependentDisplayManager * | DependentDisplay () |
Returns an object to perform all view dependent display operations Created in NX3.0.0. | |
void | Expand () |
Expands the specified view to fill as much of the layout which contains the view as possible, without changing the aspect ratio of the view. | |
void | Fit () |
Adjusts the bounds of a given view so that it fully encompasses the extents of the model geometry. | |
void | FitToObjects (const std::vector< NXOpen::IFitTo * > &objects) |
Adjusts the bounds of a given view so that it fully encompasses the extents of the given objects. | |
NXOpen::Vector3d | GetAxis (NXOpen::XYZAxis xYZAxis) |
Returns one of the view axes. | |
void | MakeWork () |
Makes the given view the work view. | |
NXOpen::Matrix3x3 | Matrix () |
Returns the view matrix. | |
void | Orient (const NXOpen::Matrix3x3 &matrix) |
Changes the view orientation relative to the specified absolute coordinate system. | |
void | Orient (NXOpen::View::Canned viewName, NXOpen::View::ScaleAdjustment viewScale) |
Changes the view orientation to a specified canned view. | |
void | Orient (const NXString &viewName, NXOpen::View::ScaleAdjustment viewScale) |
Changes the view orientation to a specified view. | |
NXOpen::Point3d | Origin () |
Returns the view origin. | |
void | Regenerate () |
Regenerates the display of given view. | |
NXOpen::View::RenderingStyleType | RenderingStyle () |
Returns the rendering style of the view. | |
bool | Restore () |
Restores a view to its last remembered rotation, scale and translation. | |
void | Rotate (const NXOpen::Matrix3x3 &matrix) |
Rotates the view by concatenating the given matrix to the existing rotation matrix of the view. | |
void | Rotate (const NXOpen::Point3d &origin, const NXOpen::Vector3d &vector, double angle) |
Rotates the specified view using the specified origin of rotation and about the specified axis. | |
double | Scale () |
Returns the view scale Created in NX3.0.0. | |
void | SetOrigin (const NXOpen::Point3d &origin) |
Moves the given position to the center of the view. | |
void | SetRenderingStyle (NXOpen::View::RenderingStyleType renderingStyle) |
Sets the rendering style of the view. | |
void | SetRotationTranslationScale (const NXOpen::Matrix3x3 &rotMatrix, const NXOpen::Point3d &translation, double scale) |
Sets the rotation, translation and scale of the specified view. | |
void | SetScale (double scale) |
Sets the scale of the specified view to the desired scale factor. | |
void | SnapToClosestCannedOrientation () |
Changes the orientation of the given view to the orientation of the canned view whose orientation is the closest to that of the given view. | |
void | SnapToVariantCannedOrientation () |
Similar to View::SnapToClosestCannedOrientation except it changes the orientation of the given view to the orientation of some canned view "variant" based on I-deas's 'snapview' logic whose orientation is the closest to one of the six orthographic and eight flavors of trimetric views. | |
void | UpdateCustomSymbols () |
Updates custom symbol in a drawing member view or drawing sheet Created in NX8.0.1. | |
void | UpdateDisplay () |
Updates the display of given view, as needed. | |
NXOpen::Preferences::ViewVisualizationSpecialEffects * | VisualizationSpecialEffectsPreferences () |
Returns an object to perform all visualization Special Effects related preferences settings Created in NX3.0.0. | |
NXOpen::Preferences::ViewVisualizationVisual * | VisualizationVisualPreferences () |
Returns an object to perform all visualization related preferences settings Created in NX3.0.0. | |
void | Zoom (NXOpen::View::ScaleFactor scaleFactor) |
Scales the specified view to a desired relative scale. | |
void | ZoomAboutPoint (double relativeScale, const NXOpen::Point3d &scaleAboutPoint, const NXOpen::Point3d &viewCenter) |
Scales the specified view such that the given scale_about_point does not move. | |
void | ZoomByRectangle (const NXOpen::Point3d &corner1, const NXOpen::Point3d &corner2) |
Scales the specified view such that the specified rectangle is as large as possible while being fully contained within the viewport. |
Represents a view.
View can be obtained either from ViewCollection or from ModelingViewCollection .
This class is not created directly by the user.
Created in NX3.0.0.
enum NXOpen::View::Canned |
Describes the rendering style for geometry displayed in the view.
Describes simple, predefined adjustments that may be applied to a view's scale while another operation is performed, in conjunction, on the view.
For more details, refer to those interfaces that use this enum as a parameter.
std::vector<NXOpen::DisplayableObject *> NXOpen::View::AskVisibleObjects | ( | ) |
Returns an array of objects visible in a view.
void NXOpen::View::Concatenate | ( | const NXOpen::Point3d & | translation | ) |
Concatenates the given translation with the previous viewing transformation of the specified view.
The translation is defined in view space.
In batch mode, the translation of the view is modified, but no display occurs
Created in NX4.0.0.
License requirements : None
translation | Point in view space to put at the center of the view |
void NXOpen::View::Concatenate | ( | double | scale | ) |
Concatenates the given scale with the previous viewing transformation of the specified view.
The scale is applied to the view using the current view origin.
In batch mode, the scale of the view is modified, but no display occurs.
Created in NX4.0.0.
License requirements : None
scale | Relative scale factor |
void NXOpen::View::Concatenate | ( | const NXOpen::Point3d & | translation, |
double | scale | ||
) |
Concatenates the given translation and scale with the previous viewing transformation of the specified view.
The translation is defined in view space, and conceptually occurs first. Then, the scale is applied to the view using the new view origin. Although this is logically a two step process, only the final result appears in the graphics window.
In batch mode, the translation and scale of the view are modified, but no display occurs.
Created in NX4.0.0.
License requirements : None
translation | Point in view space to put at the center of the view |
scale | Relative scale factor |
void NXOpen::View::Concatenate | ( | const NXOpen::Point3d & | centerOfRotation, |
const NXOpen::Vector3d & | rotationAxis, | ||
double | angle | ||
) |
Concatenates the given rotation with the previous viewing transformation of the specified view.
First, if a center of rotation is given, a translation occurs to move the center of the view to the center of rotation. Then, the rotation occurs about the center of rotation. Finally, if a center of rotation is being used, the view is translated back to the origin it had upon entering the function. Although this is logically a three step process, only the final result appears in the graphics window.
In batch mode, the rotation of the view is modified, but no display occurs.
Created in NX4.0.0.
License requirements : None
centerOfRotation | If not NULL, this specifies a point in view space about which the view is to be rotated |
rotationAxis | The axis to rotate about |
angle | Rotation angle in radians |
void NXOpen::View::Concatenate | ( | const NXOpen::Point3d & | translation, |
const NXOpen::Point3d & | centerOfRotation, | ||
const NXOpen::Vector3d & | rotationAxis, | ||
double | angle | ||
) |
Concatenates the given translation and rotation with the previous viewing transformation of the specified view.
The translation is defined in view space, and conceptually occurs first. Then, if a center of rotation is given, a translation occurs to move the center of the view to the center of rotation. Third, the rotation occurs about the center of rotation. Finally, if a center of rotation is being used, the view is translated back to the origin it had after the translation. Although this is logically a four step process, only the final result appears in the graphics window.
In batch mode, the translation and rotation of the view are modified, but no display occurs.
Created in NX4.0.0.
License requirements : None
translation | Point in view space to put at the center of the view |
centerOfRotation | If not NULL, this specifies a point in view space about which the view is to be rotated |
rotationAxis | The axis to rotate about |
angle | Rotation angle in radians |
void NXOpen::View::Concatenate | ( | double | scale, |
const NXOpen::Point3d & | centerOfRotation, | ||
const NXOpen::Vector3d & | rotationAxis, | ||
double | angle | ||
) |
Concatenates the given scale and rotation with the previous viewing transformation of the specified view.
First, the scale is applied to the view using the current view origin. Then, if a center of rotation is given, a translation occurs to move the center of the view to the center of rotation. Third, the rotation occurs about the center of rotation. Finally, if a center of rotation is being used, the view is translated back to the origin it had upon entering the function. Although this is logically a four step process, only the final result appears in the graphics window.
In batch mode, the scale and rotation of the view are modified, but no display occurs.
Created in NX4.0.0.
License requirements : None
scale | Relative scale factor |
centerOfRotation | If not NULL, this specifies a point in view space about which the view is to be rotated |
rotationAxis | The axis to rotate about |
angle | Rotation angle in radians |
void NXOpen::View::Concatenate | ( | const NXOpen::Point3d & | translation, |
double | scale, | ||
const NXOpen::Point3d & | centerOfRotation, | ||
const NXOpen::Vector3d & | rotationAxis, | ||
double | angle | ||
) |
Concatenates the given translation, scale and rotation with the previous viewing transformation of the specified view.
The translation is defined in view space, and conceptually occurs first. Then the scale is applied to the view using the newly defined center. Third, a translation occurs to move the center of the view to the center of rotation (if any). Fourth, the rotation occurs about the center of rotation. Finally, if a center of rotation is being used, the view is translated back to its origin as specified by the first argument. Although this is logically a five step process, only the final result appears in the graphics window.
In batch mode, the translation, scale and rotation of the view are modified, but no display occurs.
Created in NX4.0.0.
License requirements : None
translation | Point in view space to put at the center of the view |
scale | Relative scale factor |
centerOfRotation | If not NULL, this specifies a point in view space about which the view is to be rotated |
rotationAxis | The axis to rotate about |
angle | Rotation angle in radians |
Returns an object to perform all view dependent display operations
Created in NX3.0.0.
void NXOpen::View::Expand | ( | ) |
Expands the specified view to fill as much of the layout which contains the view as possible, without changing the aspect ratio of the view.
Other views in the layout are no longer displayed. The view becomes the work view. A view that is not displayed cannot be expanded.
In batch mode, the data for the view is changed to reflect that the view is expanded, but no display occurs.
Created in NX4.0.0.
License requirements : None
void NXOpen::View::Fit | ( | ) |
Adjusts the bounds of a given view so that it fully encompasses the extents of the model geometry.
If the view is displayed, the changes will appear in the display of that view, and, if enabled, the change in the bounds of the view is animated.
In batch mode, the data for the bounds of the view are changed to the adjusted bounds, but no display occurs.
Created in NX3.0.0.
License requirements : None
void NXOpen::View::FitToObjects | ( | const std::vector< NXOpen::IFitTo * > & | objects | ) |
Adjusts the bounds of a given view so that it fully encompasses the extents of the given objects.
If the view is displayed, the changes will appear in the display of that view and, if enabled, the change in the bounds of the view is animated.
In batch mode, the data for the bounds of the view are changed to the adjusted bounds, but no display occurs.
Created in NX4.0.0.
License requirements : None
objects | The objects whose display is to be included in the displayed bounds of the view |
NXOpen::Vector3d NXOpen::View::GetAxis | ( | NXOpen::XYZAxis | xYZAxis | ) |
Returns one of the view axes.
These are the components of the 3x3 matrix which is the rotation of absolute space which results in view space.
xYZAxis | Whether to return the X, Y or Z axis |
void NXOpen::View::MakeWork | ( | ) |
Makes the given view the work view.
The view must be currently displayed. As there must be exactly one work view at any time, the previous work view is no longer the work view.
In batch mode, the given view becomes the work view internally, but no display occurs.
Created in NX4.0.0.
License requirements : None
Returns the view matrix.
This 3x3 orthonormal matrix specifies the rotation from model space to view space.
Created in NX3.0.0.
License requirements : None
void NXOpen::View::Orient | ( | const NXOpen::Matrix3x3 & | matrix | ) |
Changes the view orientation relative to the specified absolute coordinate system.
If enabled, the change in orientation of the view is animated. A view that is not displayed cannot be oriented.
In batch mode, the orientation of given view is changed internally, but no display occurs.
Created in NX3.0.0.
License requirements : None
matrix | Orientation relative to the absolute coordinate system. Must be orthonormal. |
void NXOpen::View::Orient | ( | NXOpen::View::Canned | viewName, |
NXOpen::View::ScaleAdjustment | viewScale | ||
) |
Changes the view orientation to a specified canned view.
If enabled, the change in orientation of the view is animated. A view that is not displayed cannot be oriented.
In batch mode, the orientation of given view is changed internally, but no display occurs.
Created in NX3.0.0.
License requirements : None
viewName | Canned view name |
viewScale | Desired view scale |
void NXOpen::View::Orient | ( | const NXString & | viewName, |
NXOpen::View::ScaleAdjustment | viewScale | ||
) |
Changes the view orientation to a specified view.
If enabled, the change in orientation of the view is animated. A view that is not displayed cannot be oriented.
In batch mode, the orientation of given view is changed internally, but no display occurs.
Created in NX3.0.0.
License requirements : None
viewName | Custom view name NOTE: The full Unicode character set is not supported for this parameter. |
viewScale | Desired view scale |
Returns the view origin.
This is the negation of the position in untranslated view space which appears in the middle of the viewport. This is the same as the translation used in View::Concatenate and in the other similar concatenate methods.
Created in NX3.0.0.
License requirements : None
void NXOpen::View::Regenerate | ( | ) |
Regenerates the display of given view.
The current scale of the view is used to determine the tessalation of curves, facets and software line fonts. The view must be already displayed.
In batch mode, internal state information is reset as if the display were regenerated, but no display occurs.
Created in NX4.0.0.
License requirements : None
Returns the rendering style of the view.
Created in NX4.0.0.
License requirements : None
bool NXOpen::View::Restore | ( | ) |
Restores a view to its last remembered rotation, scale and translation.
A view that is not displayed cannot be restored. If enabled, the restoration of the view is animated.
In batch mode, internal state information is restored, but no display occurs.
Created in NX3.0.0.
License requirements : None
void NXOpen::View::Rotate | ( | const NXOpen::Matrix3x3 & | matrix | ) |
Rotates the view by concatenating the given matrix to the existing rotation matrix of the view.
A view that is not displayed cannot be rotated.
In batch mode, the rotation of the view is modified, but no display occurs.
Created in NX3.0.0.
License requirements : None
matrix | Matrix relative to the absolute coordinate system. Must be orthonormal. |
void NXOpen::View::Rotate | ( | const NXOpen::Point3d & | origin, |
const NXOpen::Vector3d & | vector, | ||
double | angle | ||
) |
Rotates the specified view using the specified origin of rotation and about the specified axis.
The origin and the axis are specified in absolute coordinates. A view that is not displayed cannot be rotated.
In batch mode, the rotation of the view is modified, but no display occurs.
Created in NX3.0.0.
License requirements : None
origin | Origin in absolute space |
vector | X,Y,Z components in absolute space |
angle | Angle in degrees |
double NXOpen::View::Scale | ( | ) |
Returns the view scale
Created in NX3.0.0.
License requirements : None
void NXOpen::View::SetOrigin | ( | const NXOpen::Point3d & | origin | ) |
Moves the given position to the center of the view.
The position is given in absolute coordinates. The scale and rotation of the view are unchanged.
In batch mode, the origin of the view is changed internally, but no display occurs.
Created in NX4.0.0.
License requirements : None
origin | The new view origin |
void NXOpen::View::SetRenderingStyle | ( | NXOpen::View::RenderingStyleType | renderingStyle | ) |
Sets the rendering style of the view.
Created in NX4.0.0.
License requirements : None
renderingStyle | rendering style |
void NXOpen::View::SetRotationTranslationScale | ( | const NXOpen::Matrix3x3 & | rotMatrix, |
const NXOpen::Point3d & | translation, | ||
double | scale | ||
) |
Sets the rotation, translation and scale of the specified view.
The rotation is applied first, about the absolute origin. Then the translation of the "look at" point to the view center is done, then the view is scaled about the view center.
In batch mode, the rotation, translation and scale of the view are modified, but no display occurs.
Created in NX4.0.0.
License requirements : None
rotMatrix | 3x3 rotation matrix to use for the view - replaces the existing view rotation matrix (is not concatenated with it |
translation | Point in view space to put at the center of the view |
scale | Absolute scale factor |
void NXOpen::View::SetScale | ( | double | scale | ) |
Sets the scale of the specified view to the desired scale factor.
In batch mode, the scale of the view is modified, but no display occurs.
Created in NX3.0.0.
License requirements : None
scale | Absolute scale factor |
Changes the orientation of the given view to the orientation of the canned view whose orientation is the closest to that of the given view.
A view that is not displayed cannot be snapped. If enabled, the change in the orientation of the view is animated.
In batch mode, the orientation of the view is changed internally, but no display occurs.
Created in NX4.0.0.
License requirements : None
Similar to View::SnapToClosestCannedOrientation except it changes the orientation of the given view to the orientation of some canned view "variant" based on I-deas's 'snapview' logic whose orientation is the closest to one of the six orthographic and eight flavors of trimetric views.
In batch mode, the orientation of the view is changed internally, but no display occurs.
Created in NX5.0.0.
License requirements : None
void NXOpen::View::UpdateCustomSymbols | ( | ) |
Updates custom symbol in a drawing member view or drawing sheet
Created in NX8.0.1.
License requirements : None
void NXOpen::View::UpdateDisplay | ( | ) |
Updates the display of given view, as needed.
The current scale of the view is used to determine the tessalation of curves, facets and software line fonts. The view must be already displayed.
In batch mode, internal state information is updated, but no display occurs.
Created in NX4.0.0.
License requirements : None
NXOpen::Preferences::ViewVisualizationSpecialEffects* NXOpen::View::VisualizationSpecialEffectsPreferences | ( | ) |
Returns an object to perform all visualization Special Effects related preferences settings
Created in NX3.0.0.
Returns an object to perform all visualization related preferences settings
Created in NX3.0.0.
void NXOpen::View::Zoom | ( | NXOpen::View::ScaleFactor | scaleFactor | ) |
Scales the specified view to a desired relative scale.
The "reduce" and "increase" scale options are fixed at 10%. All the scale options provided by View::ScaleFactor have an internal limiting factor. This scale can't be increased or decreased indefinitely. The change in view scale is not animated.
In batch mode, the scale of the view is modified, but no display occurs.
Created in NX3.0.0.
License requirements : None
scaleFactor | Relative scale factor |
void NXOpen::View::ZoomAboutPoint | ( | double | relativeScale, |
const NXOpen::Point3d & | scaleAboutPoint, | ||
const NXOpen::Point3d & | viewCenter | ||
) |
Scales the specified view such that the given scale_about_point does not move.
If the specified scale is extremely small or extremely large, a minimum or maximum scale will be used. These are the same minimum and maximum values as used interactively. The relative_scale will be concatenated to the current scale of the view, so that 1.0 means no change of scale and 2.0 means that the scale of the view will be doubled. The scale_about_point and current_view_center are given in View Space. The view must already be displayed.
In batch mode, the scale and translation of the view are modified, but no display occurs.
Created in NX4.0.0.
License requirements : None
void NXOpen::View::ZoomByRectangle | ( | const NXOpen::Point3d & | corner1, |
const NXOpen::Point3d & | corner2 | ||
) |
Scales the specified view such that the specified rectangle is as large as possible while being fully contained within the viewport.
If the rectangle and the viewport do not have the same aspect ratio, the viewport will contain some of the view not within the rectangle. If the rectangle is extremely small or extremely large, a minimum or maximum scale will be used. These are the same minimum and maximum values as used interactively. The two opposite corners of the rectangle are given in View Space. The view must already be displayed. If enabled, the change in the bounds of the view is animated.
In batch mode, the scale and translation of the view are modified, but no display occurs.
Created in NX4.0.0.
License requirements : None