Direction
- Last UpdatedNov 07, 2024
- 2 minute read
The basic ways of defining a direction are:
-
Direction attribute plus optional WRT. For example: HDIR OF /PIPE1 WRT /*.
-
Cartesian direction. For example: N 45 W.
-
Cartesian direction WRT to an element.
-
All Cartesian directions are returned in the axis of the owner of the current element. For example: (U WRT CE ). This will return the Z axis of the current element relative to its owner.
-
Q ( Z WRT /SCTN ). This will return the Z axis direction of /SCTN relative to the owner of the current element. For example, if the result is required in world coordinates the current element must be the World or a Site.
-
FROM pos2 TO pos2. For example: FROM N 50 WRT CE TO N 100.
-
Keyword AXES followed by a ppoint or pline.
-
The CLOSEST keyword, which will find the closest element in a particular direction. The syntax is:
>- CLOSEST type -+- WITH exp -.
| |
‘------------+- DIRECTION dir -+- EXTENT val -.
| |
‘--------------+-->-+- AFTER val -.
| |
‘-------------+- FROM ?-.
| |
‘---------+-->
In the above graph, the keywords are:
-
EXTENT, which is how far to search in the direction specified, default 10M.
-
AFTER, or the distance along vector after which to start search, default 0M.
-
FROM, which specifies an alternative start point other than current element. This is of particular use for a branch where you might want to specify the HPOS or TPOS.
-
Examples are:
CLOSEST DIR E
CLOSEST BOX WITH ( PURP EQ ’FLOO’ ) DIR D WRT /* EXTENT 20M
CLOSEST VALVE DIR N 45 U FROM E100 N200 U300
CLOSEST BRAN HANG AFTER 2M