mapteksdk.view.enums module

Enums used to interact with a view.

class PredefinedView(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

Predefined camera angles for viewing data.

FRONT = 0
BACK = 1
TOP = 2
BOTTOM = 3
LEFT = 4
RIGHT = 5
property look_direction: tuple[float, float, float]

The view direction of this predefined view.

property up_direction: tuple[float, float, float]

The up direction of this predefined view.

class ManipulationMode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

View manipulation modes.

These control how panning and rotating the view is handled.

Z_UP = 'ModeZUp'
LOOK_FROM = 'ModeLookFrom'
PLAN_VIEW_MODE = 'ModePlanView'
SCREEN_MODE = 'ModeScreen'
UNKNOWN = ''

The manipulation mode is not supported by this enum.

This will be commonly encountered if the view is a stereonet view as this has its own view mode which is not included in this enum because it is not applicable to normal views.

class ObjectFilter(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: FixedInteger32uMixin, IntEnum

Describes different ways to filter what objects are returned by a ViewController.

DEFAULT = 0

Default - return all object except transient and background objects but ignoring visibility, and selection

Transient objects are objects that are in the view for previewing an operation or providing additional clarity while a tool in the application is running.

VISIBLE_ONLY = 1

Only return objects that are visible in the view.

HIDDEN_ONLY = 2

Only return objects that are hidden in the view.

SELECTED_ONLY = 4

Only return objects that are selected and are in the view.

classmethod from_bytes(bytes, byteorder='big', *, signed=False)

Return the integer represented by the given array of bytes.

bytes

Holds the array of bytes to convert. The argument must either support the buffer protocol or be an iterable object producing bytes. Bytes and bytearray are examples of built-in objects that support the buffer protocol.

byteorder

The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use ‘sys.byteorder’ as the byte order value. Default is to use ‘big’.

signed

Indicates whether two’s complement is used to represent the integer.

to_bytes(length=1, byteorder='big', *, signed=False)

Return an array of bytes representing an integer.

Parameters:
  • length – Length of bytes object to use. An OverflowError is raised if the integer is not representable with the given number of bytes. Default is length 1.

  • byteorder – The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use ‘sys.byteorder’ as the byte order value. Default is to use ‘big’.

  • signed – Determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.

storage_type

alias of Int32u

classmethod convert_from(value)

Converts the underlying value to the enumeration type.

convert_to()

Convert the enumeration to the value that serialised.

Return type:

Int32u

conjugate()

Returns self, the complex conjugate of any int.

bit_length()

Number of bits necessary to represent self in binary.

>>> bin(37)
'0b100101'
>>> (37).bit_length()
6
bit_count()

Number of ones in the binary representation of the absolute value of self.

Also known as the population count.

>>> bin(13)
'0b1101'
>>> (13).bit_count()
3
as_integer_ratio()

Return integer ratio.

Return a pair of integers, whose ratio is exactly equal to the original int and with a positive denominator.

>>> (10).as_integer_ratio()
(10, 1)
>>> (-10).as_integer_ratio()
(-10, 1)
>>> (0).as_integer_ratio()
(0, 1)
real

the real part of a complex number

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

denominator

the denominator of a rational number in lowest terms

class SectionMode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: IntEnum

Enumeration of the available section modes.

NO_MODE = 0

No section mode is active.

POSITIVE_HALF_SPACE = 1

Only show data on the normal side of the plane.

The clip plane is defined to be the action plane in the direction of the plane normal.

A section width may be defined to only show the data on the normal side of the plane that is at a maximum the section width away.

NEGATIVE_HALF_SPACE = 2

Only show data on the negative side of the plane.

The clip plane is defined to be the action plane in the opposite direction of the plane normal.

A section width may be defined to only show the data on the normal side of the plane that is at a maximum the section width away.

STRIP = 3

Show data between two parallel planes.

The clip planes are defined to be half the section width either side of the plane.

classmethod from_bytes(bytes, byteorder='big', *, signed=False)

Return the integer represented by the given array of bytes.

bytes

Holds the array of bytes to convert. The argument must either support the buffer protocol or be an iterable object producing bytes. Bytes and bytearray are examples of built-in objects that support the buffer protocol.

byteorder

The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use ‘sys.byteorder’ as the byte order value. Default is to use ‘big’.

signed

Indicates whether two’s complement is used to represent the integer.

to_bytes(length=1, byteorder='big', *, signed=False)

Return an array of bytes representing an integer.

Parameters:
  • length – Length of bytes object to use. An OverflowError is raised if the integer is not representable with the given number of bytes. Default is length 1.

  • byteorder – The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use ‘sys.byteorder’ as the byte order value. Default is to use ‘big’.

  • signed – Determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.

conjugate()

Returns self, the complex conjugate of any int.

bit_length()

Number of bits necessary to represent self in binary.

>>> bin(37)
'0b100101'
>>> (37).bit_length()
6
bit_count()

Number of ones in the binary representation of the absolute value of self.

Also known as the population count.

>>> bin(13)
'0b1101'
>>> (13).bit_count()
3
as_integer_ratio()

Return integer ratio.

Return a pair of integers, whose ratio is exactly equal to the original int and with a positive denominator.

>>> (10).as_integer_ratio()
(10, 1)
>>> (-10).as_integer_ratio()
(-10, 1)
>>> (0).as_integer_ratio()
(0, 1)
real

the real part of a complex number

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

denominator

the denominator of a rational number in lowest terms

class SectionStepDirection(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: IntEnum

Enumeration of the section stepping directions.

This refers to the screen-space directions in which to move the section.

The two compound directions (LEFT_AND_UP and RIGHT_AND_DOWN) will move the section in the direction of the strongest component of the section plane normal as seen in screen-space (horizontal or vertical).

LEFT = 0
RIGHT = 1
UP = 2
DOWN = 3
LEFT_AND_UP = 4
RIGHT_AND_DOWN = 5
classmethod from_bytes(bytes, byteorder='big', *, signed=False)

Return the integer represented by the given array of bytes.

bytes

Holds the array of bytes to convert. The argument must either support the buffer protocol or be an iterable object producing bytes. Bytes and bytearray are examples of built-in objects that support the buffer protocol.

byteorder

The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use ‘sys.byteorder’ as the byte order value. Default is to use ‘big’.

signed

Indicates whether two’s complement is used to represent the integer.

to_bytes(length=1, byteorder='big', *, signed=False)

Return an array of bytes representing an integer.

Parameters:
  • length (SupportsIndex) – Length of bytes object to use. An OverflowError is raised if the integer is not representable with the given number of bytes. Default is length 1.

  • byteorder (Literal['little', 'big']) – The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use ‘sys.byteorder’ as the byte order value. Default is to use ‘big’.

  • signed (bool) – Determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.

Return type:

bytes

conjugate()

Returns self, the complex conjugate of any int.

bit_length()

Number of bits necessary to represent self in binary.

>>> bin(37)
'0b100101'
>>> (37).bit_length()
6
bit_count()

Number of ones in the binary representation of the absolute value of self.

Also known as the population count.

>>> bin(13)
'0b1101'
>>> (13).bit_count()
3
as_integer_ratio()

Return integer ratio.

Return a pair of integers, whose ratio is exactly equal to the original int and with a positive denominator.

>>> (10).as_integer_ratio()
(10, 1)
>>> (-10).as_integer_ratio()
(-10, 1)
>>> (0).as_integer_ratio()
(0, 1)
real

the real part of a complex number

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

denominator

the denominator of a rational number in lowest terms

class TransientGeometryRestrictMode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: FixedInteger32Mixin, IntEnum

Enumeration describing the possible restrictions on transient geometry.

The options are:

  • No restrictions (show in all picked views).

  • Only shown in the specific view (after pick in that view).

  • Only shown in views that are not the specified view (after pick in that view).

NO_RESTRICTIONS = 0
ONLY_IN_VIEW = 1
NEVER_IN_VIEW = 2
classmethod from_bytes(bytes, byteorder='big', *, signed=False)

Return the integer represented by the given array of bytes.

bytes

Holds the array of bytes to convert. The argument must either support the buffer protocol or be an iterable object producing bytes. Bytes and bytearray are examples of built-in objects that support the buffer protocol.

byteorder

The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use ‘sys.byteorder’ as the byte order value. Default is to use ‘big’.

signed

Indicates whether two’s complement is used to represent the integer.

to_bytes(length=1, byteorder='big', *, signed=False)

Return an array of bytes representing an integer.

Parameters:
  • length (SupportsIndex) – Length of bytes object to use. An OverflowError is raised if the integer is not representable with the given number of bytes. Default is length 1.

  • byteorder (Literal['little', 'big']) – The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use ‘sys.byteorder’ as the byte order value. Default is to use ‘big’.

  • signed (bool) – Determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.

Return type:

bytes

storage_type

alias of Int32s

classmethod convert_from(value)

Converts the underlying value to the enumeration type.

convert_to()

Convert the enumeration to the value that serialised.

Return type:

Int32s

conjugate()

Returns self, the complex conjugate of any int.

bit_length()

Number of bits necessary to represent self in binary.

>>> bin(37)
'0b100101'
>>> (37).bit_length()
6
bit_count()

Number of ones in the binary representation of the absolute value of self.

Also known as the population count.

>>> bin(13)
'0b1101'
>>> (13).bit_count()
3
as_integer_ratio()

Return integer ratio.

Return a pair of integers, whose ratio is exactly equal to the original int and with a positive denominator.

>>> (10).as_integer_ratio()
(10, 1)
>>> (-10).as_integer_ratio()
(-10, 1)
>>> (0).as_integer_ratio()
(0, 1)
real

the real part of a complex number

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

denominator

the denominator of a rational number in lowest terms

class TransientGeometrySettings

Bases: InlineMessage

Settings for transient geometry.

These affect how an object is treated when they are transient geometry.

classmethod message_structure()

Read the structure of this message from the type hints.

Returns:

A dictionary where the key is the name of each property and the value is its type. For primitive types, the value will be str, bool or one of the types defined in primitives.py. For sequence types, this will be the List, Set or Tuple class defined in this class. Otherwise this will be the type read from the annotations.

Return type:

dict[str, Any]

Raises:

DataTypeNotSupported – If one of the data types in the type hints is not supported.

is_clippable: bool = True
is_pickable: bool = False
is_selectable: bool = False
is_initially_visible: bool = True
restrict_mode: TransientGeometryRestrictMode = 0
restricted_views: list[ObjectID] = []