Archive for the 'RhinoScript' Category

Rhinoceros 3D Shortcut Aliases — v1.0

Rhino3D-Aliases

I have been wor­king on de­ve­lo­ping a set of ef­fi­cient Rhino3D Short­cut Alia­ses (Goo­gle Code link) for Rhi­no­ce­ros 3D, ver­sion 4.0. These are ba­sed on the work of Max­wan Archi­tects + Ur­ba­nists in Rot­ter­dam, and their long-term de­ve­lop­ment of Au­to­CAD short­cuts that you can down­load from Dysturb.Net. I have de­ve­lo­ped the Rhino3D sys­tem in pa­ra­llel for ease of in­terchange bet­ween the two softwares.

The ins­ta­lla­tion is sim­ple, and fully ex­plai­ned on the Goo­gle Code page (link above). You simply im­port the .txt file and overw­rite the de­faults. A Mic­ro­soft Ex­cel file shows the list of used com­mands (and unu­sed com­mands for fu­ture de­ve­lop­ment). Feel free to make sug­ges­tions on further commands!

Locate New Point On Curve

locateNewPointOnCurve

Op­tion Ex­pli­cit
’Sc­ript writ­ten by Ma­xime Mo­reau
’Sc­ript copy­righ­ted by Open Form Archi­tec­ture
’This sc­ript lo­cate a new point on a curve ac­cor­ding to its dis­tance from either the CurveDomain(0), the Cur­ve­Sart­Point or the CurveDomain(1), the Cur­veEnd­Point.
’Sc­ript ver­sion Tues­day, No­vem­ber 24, 2009 11:26:07 PM

Call Main()
Sub Main()

Dim ob­ject, do­main, crvNewLength

” dis­tance of the new point
crv­New­Length = 50

ob­ject = Rhino.getObject(“select cur­ves”, 4)
do­main = Rhino.CurveDomain (object)

” new point from the CurveDomain(0) or the Cur­veS­tart­Point
If crv­New­Length > do­main (1) Then
Rhino.MessageBox “Curve new length > Cur­ve­Do­main: ” & CStr(domain(1))
Else
Rhino.AddPoint Rhino.EvaluateCurve (ob­ject, (domain(0) + crv­New­Length))
End If

” new point from the CurveDomain(0) or Cur­veEnd­Point
’ If crv­New­Length > do­main (1) Then
’ Rhino.MessageBox “Curve new length > Cur­ve­Do­main: ” & CStr(domain(1))
’ Else
’ Rhino.AddPoint Rhino.EvaluateCurve (ob­ject, (domain(1) — crv­New­Length))
’ End If

End Sub