General Tools

rvb Export points to Excel

export points to excel

This ilustrates how to export any kind of geometry [in this case, points] to an excel sheet, for after use. You will be able to rework yor geometry in excl, visualize data and anything you need... also this will help you import/export your files in a much lighter format, since it will simply contain what you need. Export your files to custom formats using the same workflow!

Option Explicit

'Script written by Adolfo Nadal

'Script copyrighted by archi·o·logics www.archiologics.com

'Script version martes, 20 de marzo de 2012 13:21:11

 

Call PointsToExcel()

Sub PointsToExcel()

' Launch Excel

Dim app

Set app = CreateObject("Excel.Application")

' Make it visible

app.Visible = False

Continue Reading... see full rvb Export points to Excel

rvb Import points from text file

points from textfile

After seeing how to export points to excel, now it is turn for us to know how to import back geometry and properties... from any custom file type!

Option Explicit

'Script written by Adolfo Nadal

'Script copyrighted by archi·o·logics www.archiologics.com

'Script version martes, 20 de marzo de 2012 13:21:11

 

Call PointsToRhino()

Sub PointsToRhino()

' Prompt the user for a file to import

Dim strFilter, strFileName

strFilter = "Text File (*.txt)|*.txt|All Files (*.*)|*.*|"

strFileName = Rhino.OpenFileName("Open Point File", strFilter)

If IsNull(strFileName) Then Exit Sub

Continue Reading... see full rvb Import points from text file

rvb Surface Construction

add surface tabs

Based on the add tabs an application that will help you when designing... design and forget about how to build it! When you are designing, you are also fabricating. Just use the add tabs tool on the surfaces created by the unroll and you will be done. Create impressive models without effort!

'Option explicit

' Script written by Fabio Mantuano

' http://www.formulas.it/metodi

 

Call Main ()

Sub Main()

Dim random

random = (25*Rnd)+Rnd*pi

Dim arr

arr = Rhino.getsurfaceobject ("Select a surface") 

If IsNull(arr) Then

Rhino.Print "Nessuna superficie selezionata"

Exit Sub

End If

Dim srf

srf = arr(0)

Dim uu, vv, u, v, n, m

uu = surfaceDomain(srf,0)

vv = surfaceDomain(srf,1)

u = uu(1)

v = vv(1)

printEx "Value of U =" & u 

printEx "Value of V =" & v

 

' Dimensioni Griglia

Continue Reading... see full rvb Surface Construction

rvb Add Tabs for fabrication

add surface tabs

Use this tool to quickly add tabs to your unrolled surfaces... build physical models in no time!

Option explicit

'Script written by Fabio Mantuano

' Methods and math in: http://www.formulas.it/metodi

 

Call GlueTabs()

Sub GlueTabs() 

arr = Rhino.GetObjects("Select surfaces",8) 

ScalaTab = Rhino.GetReal ("Size of the Tab 0-1", 0.1 ,0.0001,1)

If IsNull(arr) Then

Exit Sub

End If

n = UBound(arr) 

For i = 0 To n    

SuperficieConLinguette arr(i),ScalaTab

Next

End Sub

Continue Reading... see full rvb Add Tabs for fabrication

rvb Multipipe

rvb animation snippet example

A simple to use multipipe tool - unfortunately it does ot save history records, as it happens with rhino v5 by default.

Option explicit

'Script written by Adolfo Nadal

'Script by archiologics · www.archiologics.com

Call AddPipes()

Sub AddPipes()

' set the current locale to en-us to force usage of the comma seperator "."

Dim intLCID:intLCID = Rhino.LocaleID

SetLocale("en-us")

Continue Reading... see full rvb Multipipe

rvb Curve Divison

rvb animation snippet example

A little piece of code that shows how to divide a curve in a user-defined number of pieces that then will be used as centerpoints to copy planes -this last part will help you understand how local coordinates relate to global XYZ coordinates.

Option explicit

'Script written by Adolfo Nadal

'Script by archiologics · www.archiologics.com

Call CurveParameter()

Sub CurveParameter()

Dim strCurve

Dim intDivisions

Dim arrCurveDom

Dim dblParameter

Dim arrPoint

Dim vecTangent, arrPlane, strCircle

Dim dblRadius : dblRadius = 2

strCurve = rhino.GetObject("select curve",4,vbTrue)

intDivisions = rhino.GetInteger("enter number of divisions",100,1)

arrCurveDom = Rhino.CurveDomain (strCurve)

Read more: rvb Curve Divison

rvb Autodimension

add surface tabs

Autodimension tool. It works properly for polylines, not so much for closed lines or curves. Additionaly, it creates a new layer where it creates the actual dimensions, so you do not need to worry about messing with your layer structure.

Option explicit

' Script written by Jan Hempel

' Modified by Adolfo Nadal

'Script by archiologics · www.archiologics.com

Call autodimension()

Sub autodimension()

Dim arrPolycrv: arrPolycrv = Rhino.GetObjects("select lines",4)

Dim dblOffset : dblOffset = rhino.GetReal ("dimension Distance (out = pos., in = neg.) :",5)

Dim Line, arrLine, i, strSrf

If isNull (arrLine) Then Exit Sub

Call Rhino.EnableRedraw (False)

Call Rhino.AddLayer ("DIMENSIONS",RGB(255,0,0))

Call Rhino.CurrentLayer ("DIMENSIONS")

Continue Reading... see full rvb Autodimension

rvb Surface Parameter Viewer

rvb animation snippet example

Another easy to use example on surface parameters. This time we will create circles depending on the position relative to surface parameters.

Option Explicit

'Script written by Adolfo Nadal

'Script by archiologics · www.archiologics.com

 

Call SurfaceUV()

Sub SurfaceUV()

Dim strSurface 'the surface

Dim uDiv,vDiv '

Dim arrUDomain, arrVDomain 

Dim Ustep, Vstep

Dim arrParameter

Dim arrPoint

 

strSurface = rhino.getobject ("please pick surface",8, vbTrue)

   

uDiv = rhino.GetInteger("please enter number in U-direction",5,1)

vDiv = rhino.GetInteger("please enter number in V-direction",5,1)

Continue Reading... see full rvb Surface Parameter Viewer

rvb Surface Circles

rvb animation snippet example

Another easy to use example on surface parameters. This time we will create circles depending on the position relative to surface parameters.

Option Explicit

'Script written by Adolfo Nadal

'Script by archiologics · www.archiologics.com

Call Main()

Sub Main()

Dim strSurface 'the surface

Dim uDiv,vDiv '

Dim arrUDomain, arrVDomain 

Dim Ustep, Vstep

Dim arrParameter

Dim arrPoint

Dim arrNormal, arrPlane, strCircle

Dim dblRadius  

Dim strPoints

Dim arrSurfaceDom

Dim arrData

strSurface = rhino.getobject ("please pick surface",8, vbTrue)

Continue Reading... see full rvb Surface Circles

rvb Surface Stair

rvb animation snippet example

Or how to dinamically create a nice design for a stair in no time. Just be careful with the inpput geometry and everything will be fine

Option Explicit

'Script written by Adolfo Nadal

'Script by archiologics · www.archiologics.com

 

Call Main()

Sub Main()

Dim strsur,arrstartpt,arrendpt,dblinterval

Dim disstep,dis,n

Dim arrcontour,arrcontour2

Dim arrbox

 

strsur=rhino.GetObject("Select a surface")

arrbox=rhino.BoundingBox(strsur)

arrstartpt=arrbox(2)

arrendpt=arrbox(6)

disstep=rhino.GetReal("type distance between 2 steps",0.15)

dis=rhino.Distance(arrstartpt,arrendpt)

n=int(dis/disstep)

dblinterval=dis/n

Continue Reading... see full rvb Surface Stair