Orients a single object based on input points.
rhinoscriptsyntax.OrientObject (object_id, reference, target, flags=0)
rhinoscript.object.OrientObject (object_id, reference, target, flags=0)
object_id |
Required. String or Guid. The identifier of the object to orient. |
||||||
reference |
Required. Array. An array of 3-D reference points. If two 3-D points are specified, then this method will function similar to Rhino's Orient command. If more than two 3-D points are specified, then the function will orient similar to Rhino's Orient3Pt command. |
||||||
target |
Required. Array. An array of 3-D target points. If two 3-D points are specified, then this method will function similar to Rhino's Orient command. If more than two 3-D points are specified, then the function will orient similar to Rhino's Orient3Pt command. |
||||||
flags |
Optional. Number. The orient flags. Values can be added together to specify multiple options.
|
Guid |
The identifier of the oriented object if successful. |
import rhinoscriptsyntax as rs
obj = rs.GetObject("Select object to orient")
if obj:
reference = rs.GetPoints(message1="First reference point")
if reference and len(reference)>0:
target = rs.GetPoints(message1="First target point")
if target and len(target)>0:
rs.OrientObject( obj, reference, target )