weGetPathSegWidth
weGetPathSegWidth([g_pathSegId] ) => float
Description
Automatically handles the sqrt(2) conversion for diagonal path segments when their width is being queried. Unlike dbGetPathSegWidth which returns the value stored in the OpenAccess database for the width of diagonal pathSegs, this API does the sqrt(2) conversion appropriately and return the width value as it appears in the property editor form or object inspector assistant.
Arguments
Value Returned
|
Returns an sqrt(2) converted width for diagonal pathSeg. For manhattan pathSegs, it returns the value of |
Examples
Consider the following examples:
Consider ortho is a manhattan pathseg whose width == 0.3
\i weGetPathSegWidth(ortho)
\t 0.3
\p >
\i ortho~>width
\t 0.3
Consider diag is a diagonal pathseg whose width == 0.3. The following script shows the use of weGetPathSegWidth versus using ~> operator with dbGetPathSegWidth. Here the diagonal width is calculated as 0.43 = mfgGrid (0.3 * sqrt(2) )
\i weGetPathSegWidth(diag)
\t 0.3
\p >
\i diag~>width
\t 0.43
\p >
Related Topics
Interactive and Assisted Routing Functions
Return to top