Archinect
anchor

question: how to rhinoscript some easy batch operations?

rhinoscript question....

i have a bunch (1000 or so) of rectangles, and each one needs to be offset towards its center, as if giving a thickness to the boundary, by a certain distance... and the distance of the offset is the same for large groups of the whole set, so, i'm wondering how to script something that would essentially do this:

-you pick all curves to offset
-you specify offset distance
-automatically picks the 'inside' of the curve as the side to offset to

any ideas?

 
Oct 31, 07 6:35 pm
mdler

nope

Oct 31, 07 6:44 pm  · 
 · 
cll123

JZ says "Pay ME"

Nov 4, 07 1:02 am  · 
 · 
monkeyboy

Option Explicit

Dim offsetDist
Dim arrObjects, strObject

offsetDist = Rhino.GetReal("Specify Offset Distance", 1)
arrObjects = Rhino.GetObjects("Pick some curves", 0)

If IsArray(arrObjects) Then

For Each strObject In arrObjects

Rhino.OffsetCurve strObject, Rhino.CurveStartPoint(strObject), offsetDist

Next

End If


read david rutten's rhinoscript tutorial.. should be pretty easy to accomplish these tasks in the future. Hell, he may have this on his site already.

http://www.reconstructivism.net/

Nov 4, 07 11:04 pm  · 
 · 
FOG Lite
http://en.wiki.mcneel.com/default.aspx/McNeel/RhinoScript101.html

Another good resource for scripting and discussions of same.

Nov 7, 07 4:48 pm  · 
 · 

Block this user


Are you sure you want to block this user and hide all related comments throughout the site?

Archinect


This is your first comment on Archinect. Your comment will be visible once approved.

  • ×Search in: