2
Relative Object Design Coordinate Functions
This chapter contains information on the Virtuoso relative object design (ROD) coordinate functions.
For more information on relative object design coordinate objects, refer to the Virtuoso Relative Object Design User Guide.
The functions in this chapter are listed in the alphabetical order.
rodCoordBisect
rodCoordBisect( o_rodCoord[S_snapType]);end rodCoordBisect=>o_rodCoord
Description
Divides the input value by two (bisect). You can optionally set the argument that rounds off the calculated value, truncates it, or converts it based on the defined maximum ceiling.
Arguments
Value Returned
|
Returns a new |
Example
rodCoordBisect(coord1)
=> rodCoord@0x016036
In this example, a new rodCoord object is returned.
rodCoordCreate
rodCoordCreate(g_inputValue [ S_unitType [ S_snapType ] ][x_resolution] );end rodCoordCreate=> o_rodCoordObj
Description
Creates a rodCoord object from the given value, that is, g_inputValue.
Arguments
Value Returned
|
Returns a new instance of the |
Example
rodCoordCreate(1.25 'USER_UNIT 'ROUND)
=> rodCoord@0x018ex64
In this example, a new instance of the rodCoord object is returned.
rodCoordDefineGrid
rodCoordDefineGrid(n_gridValue x_resolutionValue);end rodCoordDefineGrid=> t
Description
Defines the grid and the arithmetic resolution factor values, which are used by the rodCoord* API.
Arguments
|
A fixed or floating number in the user unit that defines the grid value. |
|
|
An integer value that defines the number of arithmetic units in one user unit value. |
Value Returned
Example
rodCoordDefineGrid(10.2 1000000)
=> t
In this example, the grid and arithmetic resolution factor values are defined.
rodCoordFix
rodCoordFix(o_rodCoord);rodCoordFix=> o_newRodCoord
Description
Fixes the rodCoord object and returns a new rodCoord object using the fix() SKILL function.
Arguments
Value Returned
|
A new |
Example
rodCoordFix(coord2)
=> rodCoord0x01604206
In this example, the rodCoord object, coord2 is truncated and a new rodCoord object is returned.
rodCoordGetGrid
rodCoordGetGrid()
;end rodCoordGetGrid
=> o_gridValue
Description
Returns the grid value (defined by rodCoordDefineGrid) as a rodCoord object.
Arguments
Value Returned
|
A grid value defined by the rodCoordDefineGrid function as a |
Example
rodCoordGetGrid()
=> rodCoord@0x018ef24
In this example, a grid value is returned as a rodCoord object.
rodCoordIsOnGrid
rodCoordIsOnGrid(o_rodCoord[n_gridValue] );end rodCoordIsOnGrid=> t / nil
Description
Checks if the data in the given rodCoord object is on the grid or not.
Arguments
Value Returned
Example
rodCoordIsOnGrid(coord1)
=> t
In this example, the data in the specified rodCoord object is on the grid.
rodCoordParseString
rodCoordParseString(t_rodStringCoord)=>o_rodCoord
Description
Creates a rodCoord object out of t_rodString generated by the rodCoordToString function.
Arguments
|
The string representation of the rodCoord object that is generated by the |
Value Returned
|
Returns a new |
Example
; Call rodCoordToString with second argument t to generate a string in the needed format:
rodCoordToString(coord t)
=> "1.22502@100000"
; Then pass this string to rodCoordParseString:
rodCoordParseString("1.22502@100000")
=> rodCoord@0x1b211400 ; rodCoord created (equal to the original rodcoord object).
rodCoordPartition
rodCoordPartition(o_dividendg_divisor);end rodCoordPartition=> l_result
Description
Performs a division on the given arguments – dividend and divisor.
Arguments
Value Returned
|
A list containing two |
Example
rodCoordPartition(coord1 coord2)
=> (rodCoord@0x018ef28 rodCoord@0x018ef68)
In this example, a division on the given arguments dividend and divisor is performed.
rodCoordSnap
rodCoordSnap(o_rodCoord[[S_snapType] [n_gridValue]] );end rodCoordSnap=> o_rodCoord
Description
Snaps a rodCoord object so that its value is on the grid.
Arguments
Value Returned
|
A new |
Example
rodCoordSnap(coord1)
=> rodCoord@0x016036
In this example, a specified o_rodCoord object is snapped.
rodCoordToFloat
rodCoordToFloat(o_rodCoordObj);end rodCoordToFloat=> f_value
Description
Returns the rodCoord data in user unit as floating point number.
Arguments
Value Returned
|
A floating point number is returned. A SKILL error is returned if the input value is invalid. |
Example
rodCoordToFloat(coord1)
=> 1.25
In this example, a floating point number is returned.
rodCoordToInt
rodCoordToInt(o_rodCoordObj);end rodCoordToInt=> x_value
Description
Returns the rodCoord data in user unit as a fixed number.
Arguments
Value Returned
|
A fixed number is returned. A SKILL error is returned if the input value is invalid. |
Example
rodCoordToFloat(coord1)
=> 1
In this example, a fixed number is returned.
rodCoordToString
rodCoordToString(o_rodCoordObj[g_dumpAR] );end rodCoordToString =>t_value
Description
Returns a string containing the rodCoord data in user unit as floating number.
Arguments
|
If set to |
Value Returned
|
A string value returned. A SKILL error is returned if the input value is invalid. |
Example
rodCoordToFloat(coord1)
=> “1.25”
In this example, a string containing the rodCoord data in user unit as floating number is returned.
rodCoordToFloat(coord1 t)
=> “1.25@1000”
In this example, a string containing the rodCoord data is dumped as 1.25@1000.
Return to top