CustomGraphicsCoordinates Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCoordinates.h>

Description

Represents coordinates that are used to define vertices in custom graphics.

Methods

Name Description
classType Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
create Static method that creates a CustomGraphicsCoordinates object which can be used as input to various custom graphics methods.
getColor Gets the color assigned to the coordinate at the specified index.
getCoordinate Gets the coordinate at the specified index.
setColor Sets the color of the coordinate at the specified index.
setCoordinate Sets the coordinate at the specified index.

Properties

Name Description
colors Gets and sets the colors associated with the coordinate data. This is used when a mesh is displayed using per-vertex coloring. The color at each vertex is represented by four values where they are the red, green, blue, and alpha values. This should contain the same number of colors as vertices.
coordinateCount Returns the number of coordinates defined in the CustomGraphicsCoordinates object.
coordinates Gets and sets the coordinate data associated with this CustomGraphicsCoordinates object. This data represents the x, y, z components of the coordinates where the unit of measure is centimeters.
isValid Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CustomGraphicsCoordinates.create, CustomGraphicsLines.coordinates, CustomGraphicsMesh.coordinates, CustomGraphicsPointSet.coordinates

Version

Introduced in version September 2017