ImageBaseBuilder Class

class NXOpen.Display.ImageBaseBuilder

Bases: NXOpen.Builder

Represents a NXOpen.Display.ImageBaseBuilder.

Serves as the base class for all NXOpen.Display.ImageBase builders. NXOpen.Display.ImageBase base class provides definition, orientation, sizing, and display setting controls for image based objects.

This is an abstract class, and cannot be instantiated.

New in version NX9.0.0.

Properties

Property Description
BasePointChoice Returns or sets the image reference base point choice.
ColorMode Returns or sets the color mode to display the image.
Height Returns the height of the image as an NXOpen.Expression. The returned NXOpen.Expression is **not</b> associative to this object.
ImageFile Returns or sets the image file
ImageReferencePoint1 Returns or sets the image reference point1. Only valid when NXOpen.Display.ImageBaseBuilder.SizeOption() is set to NXOpen.Display.ImageBaseBuilderSizeOptions.ReferenceScaling.
ImageReferencePoint2 Returns or sets the image reference point2. Only valid when NXOpen.Display.ImageBaseBuilder.SizeOption() is set to NXOpen.Display.ImageBaseBuilderSizeOptions.ReferenceScaling.
ImageReferencePoint3 Returns or sets the image reference point3. Only valid when NXOpen.Display.ImageBaseBuilder.SizeOption() is set to NXOpen.Display.ImageBaseBuilderSizeOptions.ReferenceScaling and NXOpen.Display.ImageBaseBuilder.LockAspectRatio() is False.
InsertionPointOption Returns or sets the image insertion point type
LockAspectRatio Returns or sets the lock aspect ratio
ModelReferencePoint1 Returns or sets the model reference point1. Only valid when NXOpen.Display.ImageBaseBuilder.SizeOption() is set to NXOpen.Display.ImageBaseBuilderSizeOptions.ReferenceScaling.
ModelReferencePoint2 Returns or sets the model reference point2. Only valid when NXOpen.Display.ImageBaseBuilder.SizeOption() is set to NXOpen.Display.ImageBaseBuilderSizeOptions.ReferenceScaling.
ModelReferencePoint3 Returns or sets the model reference point3. Only valid when NXOpen.Display.ImageBaseBuilder.SizeOption() is set to NXOpen.Display.ImageBaseBuilderSizeOptions.ReferenceScaling and NXOpen.Display.ImageBaseBuilder.LockAspectRatio() is False.
OverallTranslucency Returns or sets the overall translucency.
PixelColorTolerance Returns or sets the transparency pixel color tolerance.
ReferenceDirectionOption Returns or sets the image alignment reference direction type.
RotateAngleOfReferenceVector Returns the current rotation angle of image from aligned reference direction
SizeOption Returns or sets the size option
Tag Returns the Tag for this object.
TransparencyColorOption Returns or sets the transparency color option
UserBasePoint Returns or sets the user defined base point. Only valid when NXOpen.Display.ImageBaseBuilder.BasePointChoice() is set to NXOpen.Display.ImageBaseBuilderBasePointChoices.UserDefined.
UserInsertionPoint Returns or sets the user defined insertion point
UserReferenceDirection Returns or sets the user defined reference direction vector.
Width Returns the width of the image as an NXOpen.Expression. The returned NXOpen.Expression is **not</b> associative to this object.

Methods

Method Description
AlignImageToReferenceDirection Align Image to Reference Direction
Commit Commits any edits that have been applied to the builder.
Destroy Deletes the builder, and cleans up any objects created by the builder.
FlipHorizontal Flips the image horizontally.
FlipVertical Flips the image vertically.
GetBackgroundColor Gets the background color (RGB value) of the image. Only valid when NXOpen.Display.ImageBaseBuilder.ColorMode() is set to NXOpen.Display.ImageBaseBuilderImageColorModes.Greyscale.
GetCommittedObjects For builders that create more than one object, this method returns the objects that are created by commit.
GetCornerPoints Get the image corner points.
GetForegroundColor Gets the foreground color (RGB value) of the image. Only valid when NXOpen.Display.ImageBaseBuilder.ColorMode() is set to NXOpen.Display.ImageBaseBuilderImageColorModes.Greyscale.
GetImagesInPart Provide a list of names of the NXOpen.Display.ImageData objects saved in current part file.
GetObject Returns the object currently being edited by this builder.
GetTransparentPixelColor Gets the transparency color (RGB value) of the image. Only valid when NXOpen.Display.ImageBaseBuilder.TransparencyColorOption() is set to NXOpen.Display.ImageBaseBuilderTransparencyColorFrom.PixelColor.
OrientViewToImage Orients and fits the work view’s view direction along the reverse normal direction of the image
ResetImageSize Resets the image to its original size.
RotateLeft Rotates the image 90 degrees counter-clockwise.
RotateRight Rotates the image 90 degrees clockwise.
SetBackgroundColor Sets the background color (RGB value) of the image. Only valid when NXOpen.Display.ImageBaseBuilder.ColorMode() is set to NXOpen.Display.ImageBaseBuilderImageColorModes.Greyscale.
SetCornerPoints Set the image corner points.
SetForegroundColor Sets the foreground color (RGB value) of the image. Only valid when NXOpen.Display.ImageBaseBuilder.ColorMode() is set to NXOpen.Display.ImageBaseBuilderImageColorModes.Greyscale.
SetImageFromPart Set a NXOpen.Display.ImageData object currently stored in the part as the image used by the builder.
SetTransparentPixelColor Sets the transparency color (RGB value) of the image. Only valid when NXOpen.Display.ImageBaseBuilder.TransparencyColorOption() is set to NXOpen.Display.ImageBaseBuilderTransparencyColorFrom.PixelColor.
ShowResults Updates the model to reflect the result of an edit to the model for all builders that support showing results.
Validate Validate whether the inputs to the component are sufficient for commit to be called.

Enumerations

ImageBaseBuilderBasePointChoices Enumeration Specifies image reference base point choice.
ImageBaseBuilderImageColorModes Enumeration Describes image color modes.
ImageBaseBuilderInsertionPoint Enumeration Describes insertion point type.
ImageBaseBuilderReferenceDirection Enumeration Specifies image alignment reference direction type.
ImageBaseBuilderSizeOptions Enumeration Describes size options.
ImageBaseBuilderTransparencyColorFrom Enumeration Transparency Color From

Property Detail

BasePointChoice

ImageBaseBuilder.BasePointChoice

Returns or sets the image reference base point choice.

If you choose NXOpen.Display.ImageBaseBuilderBasePointChoices.UserDefined, use NXOpen.Display.ImageBaseBuilder.UserBasePoint() to set a point as the User-Defined point.

-------------------------------------

Getter Method

Signature BasePointChoice

Returns:
Return type:NXOpen.Display.ImageBaseBuilderBasePointChoices

New in version NX9.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature BasePointChoice

Parameters:basePoint (NXOpen.Display.ImageBaseBuilderBasePointChoices) –

New in version NX9.0.0.

License requirements: None.

ColorMode

ImageBaseBuilder.ColorMode

Returns or sets the color mode to display the image.

-------------------------------------

Getter Method

Signature ColorMode

Returns:
Return type:NXOpen.Display.ImageBaseBuilderImageColorModes

New in version NX9.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature ColorMode

Parameters:colorMode (NXOpen.Display.ImageBaseBuilderImageColorModes) –

New in version NX9.0.0.

License requirements: None.

Height

ImageBaseBuilder.Height

Returns the height of the image as an NXOpen.Expression. The returned NXOpen.Expression is **not</b> associative to this object.

When NXOpen.Display.ImageBaseBuilder.SizeOption() is set to NXOpen.Display.ImageBaseBuilderSizeOptions.UserDefined, set the size of the image using NXOpen.Display.ImageBaseBuilder.SetCornerPoints().

-------------------------------------

Getter Method

Signature Height

Returns:
Return type:NXOpen.Expression

New in version NX9.0.0.

License requirements: None.

ImageFile

ImageBaseBuilder.ImageFile

Returns or sets the image file

-------------------------------------

Getter Method

Signature ImageFile

Returns:
Return type:str

New in version NX9.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature ImageFile

Parameters:filename (str) –

New in version NX9.0.0.

License requirements: None.

ImageReferencePoint1

ImageBaseBuilder.ImageReferencePoint1

Returns or sets the image reference point1. Only valid when NXOpen.Display.ImageBaseBuilder.SizeOption() is set to NXOpen.Display.ImageBaseBuilderSizeOptions.ReferenceScaling.

Reference Scaling provides sizing the image by defining image reference points and matching them with corresponding model reference points.

-------------------------------------

Getter Method

Signature ImageReferencePoint1

Returns:
Return type:NXOpen.Point

New in version NX9.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature ImageReferencePoint1

Parameters:imageReferencePoint1 (NXOpen.Point) –

New in version NX9.0.0.

License requirements: None.

ImageReferencePoint2

ImageBaseBuilder.ImageReferencePoint2

Returns or sets the image reference point2. Only valid when NXOpen.Display.ImageBaseBuilder.SizeOption() is set to NXOpen.Display.ImageBaseBuilderSizeOptions.ReferenceScaling.

Reference Scaling provides sizing the image by defining image reference points and matching them with corresponding model reference points.

-------------------------------------

Getter Method

Signature ImageReferencePoint2

Returns:
Return type:NXOpen.Point

New in version NX9.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature ImageReferencePoint2

Parameters:imageReferencePoint2 (NXOpen.Point) –

New in version NX9.0.0.

License requirements: None.

ImageReferencePoint3

ImageBaseBuilder.ImageReferencePoint3

Returns or sets the image reference point3. Only valid when NXOpen.Display.ImageBaseBuilder.SizeOption() is set to NXOpen.Display.ImageBaseBuilderSizeOptions.ReferenceScaling and NXOpen.Display.ImageBaseBuilder.LockAspectRatio() is False.

Reference Scaling provides sizing the image by defining image reference points and matching them with corresponding model reference points.

-------------------------------------

Getter Method

Signature ImageReferencePoint3

Returns:
Return type:NXOpen.Point

New in version NX9.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature ImageReferencePoint3

Parameters:imageReferencePoint3 (NXOpen.Point) –

New in version NX9.0.0.

License requirements: None.

InsertionPointOption

ImageBaseBuilder.InsertionPointOption

Returns or sets the image insertion point type

-------------------------------------

Getter Method

Signature InsertionPointOption

Returns:
Return type:NXOpen.Display.ImageBaseBuilderInsertionPoint

New in version NX9.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature InsertionPointOption

Parameters:insertPoint (NXOpen.Display.ImageBaseBuilderInsertionPoint) –

New in version NX9.0.0.

License requirements: None.

LockAspectRatio

ImageBaseBuilder.LockAspectRatio

Returns or sets the lock aspect ratio

-------------------------------------

Getter Method

Signature LockAspectRatio

Returns:
Return type:bool

New in version NX9.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature LockAspectRatio

Parameters:lockAspectRatio (bool) –

New in version NX9.0.0.

License requirements: None.

ModelReferencePoint1

ImageBaseBuilder.ModelReferencePoint1

Returns or sets the model reference point1. Only valid when NXOpen.Display.ImageBaseBuilder.SizeOption() is set to NXOpen.Display.ImageBaseBuilderSizeOptions.ReferenceScaling.

Reference Scaling provides sizing the image by defining image reference points and matching them with corresponding model reference points.

-------------------------------------

Getter Method

Signature ModelReferencePoint1

Returns:
Return type:NXOpen.Point

New in version NX9.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature ModelReferencePoint1

Parameters:modelReferencePoint1 (NXOpen.Point) –

New in version NX9.0.0.

License requirements: None.

ModelReferencePoint2

ImageBaseBuilder.ModelReferencePoint2

Returns or sets the model reference point2. Only valid when NXOpen.Display.ImageBaseBuilder.SizeOption() is set to NXOpen.Display.ImageBaseBuilderSizeOptions.ReferenceScaling.

Reference Scaling provides sizing the image by defining image reference points and matching them with corresponding model reference points.

-------------------------------------

Getter Method

Signature ModelReferencePoint2

Returns:
Return type:NXOpen.Point

New in version NX9.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature ModelReferencePoint2

Parameters:modelReferencePoint2 (NXOpen.Point) –

New in version NX9.0.0.

License requirements: None.

ModelReferencePoint3

ImageBaseBuilder.ModelReferencePoint3

Returns or sets the model reference point3. Only valid when NXOpen.Display.ImageBaseBuilder.SizeOption() is set to NXOpen.Display.ImageBaseBuilderSizeOptions.ReferenceScaling and NXOpen.Display.ImageBaseBuilder.LockAspectRatio() is False.

Reference Scaling provides sizing the image by defining image reference points and matching them with corresponding model reference points.

-------------------------------------

Getter Method

Signature ModelReferencePoint3

Returns:
Return type:NXOpen.Point

New in version NX9.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature ModelReferencePoint3

Parameters:modelReferencePoint3 (NXOpen.Point) –

New in version NX9.0.0.

License requirements: None.

OverallTranslucency

ImageBaseBuilder.OverallTranslucency

Returns or sets the overall translucency.

The range of this value is 0 to 100.

-------------------------------------

Getter Method

Signature OverallTranslucency

Returns:
Return type:int

New in version NX9.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature OverallTranslucency

Parameters:overallTranslucency (int) –

New in version NX9.0.0.

License requirements: None.

PixelColorTolerance

ImageBaseBuilder.PixelColorTolerance

Returns or sets the transparency pixel color tolerance.

The range of this value is 0 to 255.

-------------------------------------

Getter Method

Signature PixelColorTolerance

Returns:
Return type:int

New in version NX9.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature PixelColorTolerance

Parameters:colorTolerence (int) –

New in version NX9.0.0.

License requirements: None.

ReferenceDirectionOption

ImageBaseBuilder.ReferenceDirectionOption

Returns or sets the image alignment reference direction type.

NXOpen.Display.ImageBaseBuilderReferenceDirection.Horizontal means rotate the image to align its horizontal direction with the user-specified reference direction (if defined).

-------------------------------------

Getter Method

Signature ReferenceDirectionOption

Returns:
Return type:NXOpen.Display.ImageBaseBuilderReferenceDirection

New in version NX9.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature ReferenceDirectionOption

Parameters:referenceDirection (NXOpen.Display.ImageBaseBuilderReferenceDirection) –

New in version NX9.0.0.

License requirements: None.

RotateAngleOfReferenceVector

ImageBaseBuilder.RotateAngleOfReferenceVector

Returns the current rotation angle of image from aligned reference direction

-------------------------------------

Getter Method

Signature RotateAngleOfReferenceVector

Returns:
Return type:NXOpen.Expression

New in version NX9.0.0.

License requirements: None.

SizeOption

ImageBaseBuilder.SizeOption

Returns or sets the size option

-------------------------------------

Getter Method

Signature SizeOption

Returns:
Return type:NXOpen.Display.ImageBaseBuilderSizeOptions

New in version NX9.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature SizeOption

Parameters:sizeOption (NXOpen.Display.ImageBaseBuilderSizeOptions) –

New in version NX9.0.0.

License requirements: None.

TransparencyColorOption

ImageBaseBuilder.TransparencyColorOption

Returns or sets the transparency color option

-------------------------------------

Getter Method

Signature TransparencyColorOption

Returns:
Return type:NXOpen.Display.ImageBaseBuilderTransparencyColorFrom

New in version NX9.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature TransparencyColorOption

Parameters:transparencyColorOption (NXOpen.Display.ImageBaseBuilderTransparencyColorFrom) –

New in version NX9.0.0.

License requirements: None.

UserBasePoint

ImageBaseBuilder.UserBasePoint

Returns or sets the user defined base point. Only valid when NXOpen.Display.ImageBaseBuilder.BasePointChoice() is set to NXOpen.Display.ImageBaseBuilderBasePointChoices.UserDefined.

-------------------------------------

Getter Method

Signature UserBasePoint

Returns:
Return type:NXOpen.Point

New in version NX9.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature UserBasePoint

Parameters:basePoint (NXOpen.Point) –

New in version NX9.0.0.

License requirements: None.

UserInsertionPoint

ImageBaseBuilder.UserInsertionPoint

Returns or sets the user defined insertion point

-------------------------------------

Getter Method

Signature UserInsertionPoint

Returns:
Return type:NXOpen.Point

New in version NX9.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature UserInsertionPoint

Parameters:insertPoint (NXOpen.Point) –

New in version NX9.0.0.

License requirements: None.

UserReferenceDirection

ImageBaseBuilder.UserReferenceDirection

Returns or sets the user defined reference direction vector.

A direction normal to the plane of the image is invalid.

-------------------------------------

Getter Method

Signature UserReferenceDirection

Returns:
Return type:NXOpen.Direction

New in version NX9.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature UserReferenceDirection

Parameters:userDirection (NXOpen.Direction) –

New in version NX9.0.0.

License requirements: None.

Width

ImageBaseBuilder.Width

Returns the width of the image as an NXOpen.Expression. The returned NXOpen.Expression is **not</b> associative to this object.

When NXOpen.Display.ImageBaseBuilder.SizeOption() is set to NXOpen.Display.ImageBaseBuilderSizeOptions.UserDefined, set the size of the image using NXOpen.Display.ImageBaseBuilder.SetCornerPoints().

-------------------------------------

Getter Method

Signature Width

Returns:
Return type:NXOpen.Expression

New in version NX9.0.0.

License requirements: None.

Method Detail

AlignImageToReferenceDirection

ImageBaseBuilder.AlignImageToReferenceDirection

Align Image to Reference Direction

Signature AlignImageToReferenceDirection()

New in version NX9.0.0.

License requirements: None.

FlipHorizontal

ImageBaseBuilder.FlipHorizontal

Flips the image horizontally.

Signature FlipHorizontal()

New in version NX9.0.0.

License requirements: None.

FlipVertical

ImageBaseBuilder.FlipVertical

Flips the image vertically.

Signature FlipVertical()

New in version NX9.0.0.

License requirements: None.

GetBackgroundColor

ImageBaseBuilder.GetBackgroundColor

Gets the background color (RGB value) of the image. Only valid when NXOpen.Display.ImageBaseBuilder.ColorMode() is set to NXOpen.Display.ImageBaseBuilderImageColorModes.Greyscale.

The length of the output array will always be 3. Each color value of the double array is in the range 0.0 to 1.0.

Signature GetBackgroundColor()

Returns:RGB color array
Return type:list of float

New in version NX9.0.0.

License requirements: None.

GetCornerPoints

ImageBaseBuilder.GetCornerPoints

Get the image corner points.

The points define a rectangular region and are ordered counter-clockwise.

Signature GetCornerPoints()

Returns:a tuple
Return type:A tuple consisting of (point1, point2, point3, point4). point1 is a NXOpen.Point3d. first corner point of image point2 is a NXOpen.Point3d. second corner point of image point3 is a NXOpen.Point3d. third corner point of image point4 is a NXOpen.Point3d. fourth corner point of image

New in version NX9.0.0.

License requirements: None.

GetForegroundColor

ImageBaseBuilder.GetForegroundColor

Gets the foreground color (RGB value) of the image. Only valid when NXOpen.Display.ImageBaseBuilder.ColorMode() is set to NXOpen.Display.ImageBaseBuilderImageColorModes.Greyscale.

The length of the output array will always be 3. Each color value of the double array is in the range 0.0 to 1.0.

Signature GetForegroundColor()

Returns:RGB color array
Return type:list of float

New in version NX9.0.0.

License requirements: None.

GetImagesInPart

ImageBaseBuilder.GetImagesInPart

Provide a list of names of the NXOpen.Display.ImageData objects saved in current part file.

Signature GetImagesInPart()

Returns:Array of NXOpen.Display.ImageData names
Return type:list of str

New in version NX9.0.0.

License requirements: None.

GetTransparentPixelColor

ImageBaseBuilder.GetTransparentPixelColor

Gets the transparency color (RGB value) of the image. Only valid when NXOpen.Display.ImageBaseBuilder.TransparencyColorOption() is set to NXOpen.Display.ImageBaseBuilderTransparencyColorFrom.PixelColor.

The length of the output array will always be 3. Each color value of the double array is in the range 0.0 to 1.0.

Signature GetTransparentPixelColor()

Returns:RGB color array
Return type:list of float

New in version NX9.0.0.

License requirements: None.

OrientViewToImage

ImageBaseBuilder.OrientViewToImage

Orients and fits the work view’s view direction along the reverse normal direction of the image

Signature OrientViewToImage()

New in version NX9.0.0.

License requirements: None.

ResetImageSize

ImageBaseBuilder.ResetImageSize

Resets the image to its original size.

Signature ResetImageSize()

New in version NX9.0.0.

License requirements: None.

RotateLeft

ImageBaseBuilder.RotateLeft

Rotates the image 90 degrees counter-clockwise.

Signature RotateLeft()

New in version NX9.0.0.

License requirements: None.

RotateRight

ImageBaseBuilder.RotateRight

Rotates the image 90 degrees clockwise.

Signature RotateRight()

New in version NX9.0.0.

License requirements: None.

SetBackgroundColor

ImageBaseBuilder.SetBackgroundColor

Sets the background color (RGB value) of the image. Only valid when NXOpen.Display.ImageBaseBuilder.ColorMode() is set to NXOpen.Display.ImageBaseBuilderImageColorModes.Greyscale.

The length of the input array should always be 3. Each color value of the double array must be in the range 0.0 to 1.0.

Signature SetBackgroundColor(backgroundColor)

Parameters:backgroundColor (list of float) – RGB color array

New in version NX9.0.0.

License requirements: None.

SetCornerPoints

ImageBaseBuilder.SetCornerPoints

Set the image corner points.

The points must define a rectangular region and be ordered counter-clockwise.

Signature SetCornerPoints(point1, point2, point3, point4)

Parameters:

New in version NX9.0.0.

License requirements: None.

SetForegroundColor

ImageBaseBuilder.SetForegroundColor

Sets the foreground color (RGB value) of the image. Only valid when NXOpen.Display.ImageBaseBuilder.ColorMode() is set to NXOpen.Display.ImageBaseBuilderImageColorModes.Greyscale.

The length of the input array should always be 3. Each color value of the double array must be in the range 0.0 to 1.0.

Signature SetForegroundColor(foregroundColor)

Parameters:foregroundColor (list of float) – RGB color array

New in version NX9.0.0.

License requirements: None.

SetImageFromPart

ImageBaseBuilder.SetImageFromPart

Set a NXOpen.Display.ImageData object currently stored in the part as the image used by the builder.

Signature SetImageFromPart(imageName)

Parameters:imageName (str) – Name of NXOpen.Display.ImageData object

New in version NX9.0.0.

License requirements: None.

SetTransparentPixelColor

ImageBaseBuilder.SetTransparentPixelColor

Sets the transparency color (RGB value) of the image. Only valid when NXOpen.Display.ImageBaseBuilder.TransparencyColorOption() is set to NXOpen.Display.ImageBaseBuilderTransparencyColorFrom.PixelColor.

The length of the input array should always be 3. Each color value of the double array must be in the range 0.0 to 1.0.

Signature SetTransparentPixelColor(transparencyColor)

Parameters:transparencyColor (list of float) – RGB color array

New in version NX9.0.0.

License requirements: None.

Validate

ImageBaseBuilder.Validate

Validate whether the inputs to the component are sufficient for commit to be called.

If the component is not in a state to commit then an exception is thrown. For example, if the component requires you to set some property, this method will throw an exception if you haven’t set it. This method throws a not-yet-implemented NXException for some components.

Signature Validate()

Returns:Was self validation successful
Return type:bool

New in version NX3.0.1.

License requirements: None.