Forgot password?

Create an account!

Forum

« back

RhinoScript – New to Rhino - looking for some help

Messages

Please log in to write a message.

  • 10. hawkes.richardl (Sep 19, 2013 18.55):

    This worked perfectly, thank you so much for help! With your help, just automated a process that usually takes 20 minutes to now 2 minutes (when doing it 10+ times a week, that saves me a lot of time).

    Thanks again,
    Richard

  • 9. pulgarata (Sep 19, 2013 17.34):

    Hi Richard,
    You have to nesting the subfunctions and create the variable with the file name in the main subfunction.
    You don't need repeat the sub "pipe".

    Call Main()
    Sub Main()
            Dim sFileName
           
            ' Get the name of the file to import
            sFileName = Rhino.OpenFileName("Select File", "Excel Files (*.xlsx)|*.xlsx||")
            If IsNull(sFileName) Then Exit Sub
           
            Call ShaftHug(sFileName)
            Call Platform(sFileName)
            Call Insert(sFileName)
            Call Sleeve(sFileName)
           
            Call MergeObjects()
    End Sub
           
    Sub ShaftHug(sFileName)
     
            ' Declare variables and constants
            Const xlDown = -4121
            Dim aPoints(), dblOuterRadius, dblInnerRadius, arrHeight, distance, x, plane, arrExtrude
            Dim oExcel, oSheet, nRow, nRowCount
         
            ' Launch Excel and open the specified file
            Set oExcel = CreateObject("Excel.Application")
            oExcel.Workbooks.Open(sFileName)
     
            ' Get the active worksheet
            Set oSheet = oExcel.ActiveSheet
     
            ' Count the number of rows that need to be processed
            nRowCount = oSheet.Range("a1", oSheet.Range("a1").End(xlDown)).Rows.Count
            If (nRowCount = 0 ) Then
                    Rhino.Print "No data range found in file."
                    Exit Sub
            ElseIf (nRowCount < 2 ) Then
                    Rhino.Print "Not enough points to create curve."
                    Exit Sub
            End If
       
            ' Re-dimension the resulting array of points accordingly
            ReDim aPoints(nRowCount-1)
     
            ' Process all rows
            Rhino.Print "Importing data..."
     
            distance = 8
            x = 0

           
            For nRow = 1 To nRowCount
                    ' Read the values from columns A, B, and C
                   
                    dblInnerRadius = oSheet.Cells(nRow, 1).Value
                    dblOuterRadius = oSheet.Cells(nRow, 2).Value
                    arrHeight = oSheet.Cells(nRow, 3).Value
                    arrExtrude = oSheet.Cells(nRow, 4).Value

                   
                    plane = Rhino.PlaneFromNormal(Array(0, x, arrExtrude), Array(0, 0, 1))
                   
                    Call Pipe(dblOuterRadius, dblInnerRadius, arrHeight, plane)
                   
                    x = x + distance
                   
            Next    
     
           
    End Sub

    Sub Platform(sFileName)
     
            ' Declare variables and constants
            Const xlDown = -4121
            Dim aPoints(), dblOuterRadius, dblInnerRadius, arrHeight, distance, x, plane, arrExtrude
            Dim oExcel,oSheet, nRow, nRowCount
       
            ' Launch Excel and open the specified file
            Set oExcel = CreateObject("Excel.Application")
            oExcel.Workbooks.Open(sFileName)
     
            ' Get the active worksheet
            Set oSheet = oExcel.ActiveSheet
     
            ' Count the number of rows that need to be processed
            nRowCount = oSheet.Range("a1", oSheet.Range("a1").End(xlDown)).Rows.Count
            If (nRowCount = 0 ) Then
                    Rhino.Print "No data range found in file."
                    Exit Sub
            ElseIf (nRowCount < 2 ) Then
                    Rhino.Print "Not enough points to create curve."
                    Exit Sub
            End If
       
            ' Re-dimension the resulting array of points accordingly
            ReDim aPoints(nRowCount-1)
     
            ' Process all rows
            Rhino.Print "Importing data..."
     
            distance = 8
            x = 0

           
            For nRow = 1 To nRowCount
                    ' Read the values from columns A, B, and C
                    dblInnerRadius = oSheet.Cells(nRow, 5).Value
                    dblOuterRadius = oSheet.Cells(nRow, 6).Value
                    arrHeight = oSheet.Cells(nRow, 7).Value
                    arrExtrude = oSheet.Cells(nRow, 8).Value

                   
                    plane = Rhino.PlaneFromNormal(Array(0, x, arrExtrude), Array(0, 0, 1))
                   
                    Call Pipe(dblOuterRadius, dblInnerRadius, arrHeight, plane)
                   
                    x = x + distance
                   
            Next    
     
           
    End Sub

    Sub Insert(sFileName)
     
            ' Declare variables and constants
            Const xlDown = -4121
            Dim aPoints(), dblOuterRadius, dblInnerRadius, arrHeight, distance, x, plane, arrExtrude
            Dim oExcel,oSheet, nRow, nRowCount
       
            ' Launch Excel and open the specified file
            Set oExcel = CreateObject("Excel.Application")
            oExcel.Workbooks.Open(sFileName)
     
            ' Get the active worksheet
            Set oSheet = oExcel.ActiveSheet
     
            ' Count the number of rows that need to be processed
            nRowCount = oSheet.Range("a1", oSheet.Range("a1").End(xlDown)).Rows.Count
            If (nRowCount = 0 ) Then
                    Rhino.Print "No data range found in file."
                    Exit Sub
            ElseIf (nRowCount < 2 ) Then
                    Rhino.Print "Not enough points to create curve."
                    Exit Sub
            End If
       
            ' Re-dimension the resulting array of points accordingly
            ReDim aPoints(nRowCount-1)
     
            ' Process all rows
            Rhino.Print "Importing data..."
     
            distance = 8
            x = 0

           
            For nRow = 1 To nRowCount
                    ' Read the values from columns A, B, and C
                    dblInnerRadius = oSheet.Cells(nRow, 9).Value
                    dblOuterRadius = oSheet.Cells(nRow, 10).Value
                    arrHeight = oSheet.Cells(nRow, 11).Value
                    arrExtrude = oSheet.Cells(nRow, 12).Value

                   
                    plane = Rhino.PlaneFromNormal(Array(0, x, arrExtrude), Array(0, 0, 1))
                   
                    Call Pipe(dblOuterRadius, dblInnerRadius, arrHeight, plane)
                   
                    x = x + distance
                   
            Next    
     
           
    End Sub
    Sub Sleeve(sFileName)
     
            ' Declare variables and constants
            Const xlDown = -4121
            Dim aPoints(), dblOuterRadius, dblInnerRadius, arrHeight, distance, x, plane, arrExtrude
            Dim oExcel,oSheet, nRow, nRowCount
       
            ' Launch Excel and open the specified file
            Set oExcel = CreateObject("Excel.Application")
            oExcel.Workbooks.Open(sFileName)
     
            ' Get the active worksheet
            Set oSheet = oExcel.ActiveSheet
     
            ' Count the number of rows that need to be processed
            nRowCount = oSheet.Range("a1", oSheet.Range("a1").End(xlDown)).Rows.Count
            If (nRowCount = 0 ) Then
                    Rhino.Print "No data range found in file."
                    Exit Sub
            ElseIf (nRowCount < 2 ) Then
                    Rhino.Print "Not enough points to create curve."
                    Exit Sub
            End If
       
            ' Re-dimension the resulting array of points accordingly
            ReDim aPoints(nRowCount-1)
     
            ' Process all rows
            Rhino.Print "Importing data..."
     
            distance = 8
            x = 0

           
            For nRow = 1 To nRowCount
                    ' Read the values from columns A, B, and C
                    dblInnerRadius = oSheet.Cells(nRow, 13).Value
                    dblOuterRadius = oSheet.Cells(nRow, 14).Value
                    arrHeight = oSheet.Cells(nRow, 15).Value
                    arrExtrude = oSheet.Cells(nRow, 16).Value

                   
                    plane = Rhino.PlaneFromNormal(Array(0, x, arrExtrude), Array(0, 0, 1))
                   
                    Call Pipe(dblOuterRadius, dblInnerRadius, arrHeight, plane)
                   
                    x = x + distance
                   
            Next    
     
           
    End Sub
    Sub Pipe(dblOuterRadius, dblInnerRadius, arrHeight, arrBase)
            Dim Outer,Inner


            Outer = Rhino.AddCylinder(arrBase, arrHeight, dblOuterRadius)
            Inner = Rhino.AddCylinder(arrBase, arrHeight, dblInnerRadius)
           
            Rhino.BooleanDifference Outer, Inner, True
                   
    End Sub
    Sub MergeObjects()
            Dim arrObjects
           
            arrObjects = Rhino.AllObjects

            Rhino.BooleanUnion(arrObjects)

    End Sub

  • 8. hawkes.richardl (Sep 17, 2013 21.23):

    The purpose of this script is to take data from an excel file and create a set of drill stops. In the excel file, there is 16 columns and the # of rows doesnt matter. Of the 16 columns, there are 4 sets of 4 numbers (inner diameter, outer diameter, height, and amount of extrusion) for 4 pieces of the drill stops (shaft hug, platform, insert, and sleeve). The way my script is currently set up, You select the excel file, it brings in the shaft hug data, makes it, and then you repeat this process for the other parts. Essentially, I'm having to select the excel file 4 times, and i'm looking to only select the file once (and at the end, all parts are merged)

    Here's the full script:

    Call ShaftHug()
    Sub ShaftHug
     
            ' Declare variables and constants
            Const xlDown = -4121
            Dim sFileName, aPoints(), dblOuterRadius, dblInnerRadius, arrHeight, distance, x, plane, arrExtrude
            Dim oExcel, oSheet, nRow, nRowCount
     
            ' Get the name of the file to import
            sFileName = Rhino.OpenFileName("Select File", "Excel Files (*.xlsx)|*.xlsx||")
            If IsNull(sFileName) Then Exit Sub
       
            ' Launch Excel and open the specified file
            Set oExcel = CreateObject("Excel.Application")
            oExcel.Workbooks.Open(sFileName)
     
            ' Get the active worksheet
            Set oSheet = oExcel.ActiveSheet
     
            ' Count the number of rows that need to be processed
            nRowCount = oSheet.Range("a1", oSheet.Range("a1").End(xlDown)).Rows.Count
            If (nRowCount = 0 ) Then
                    Rhino.Print "No data range found in file."
                    Exit Sub
            ElseIf (nRowCount < 2 ) Then
                    Rhino.Print "Not enough points to create curve."
                    Exit Sub
            End If
       
            ' Re-dimension the resulting array of points accordingly
            ReDim aPoints(nRowCount-1)
     
            ' Process all rows
            Rhino.Print "Importing data..."
     
            distance = 8
            x = 0

           
            For nRow = 1 To nRowCount
                    ' Read the values from columns A, B, and C
                   
                    dblInnerRadius = oSheet.Cells(nRow, 1).Value
                    dblOuterRadius = oSheet.Cells(nRow, 2).Value
                    arrHeight = oSheet.Cells(nRow, 3).Value
                    arrExtrude = oSheet.Cells(nRow, 4).Value

                   
                    plane = Rhino.PlaneFromNormal(Array(0, x, arrExtrude), Array(0, 0, 1))
                   
                    Call Pipe(dblOuterRadius, dblInnerRadius, arrHeight, plane)
                   
                    x = x + distance
                   
            Next   
     
           
    End Sub
    Sub Pipe(dblOuterRadius, dblInnerRadius, arrHeight, arrBase)
            Dim Outer, Inner


            Outer = Rhino.AddCylinder(arrBase, arrHeight, dblOuterRadius)
            Inner = Rhino.AddCylinder(arrBase, arrHeight, dblInnerRadius)
           
            Rhino.BooleanDifference Outer, Inner, True
                   
    End Sub

    Call Platform()
    Sub Platform
     
            ' Declare variables and constants
            Const xlDown = -4121
            Dim sFileName, aPoints(), dblOuterRadius, dblInnerRadius, arrHeight, distance, x, plane, arrExtrude
            Dim oExcel,oSheet, nRow, nRowCount
     
            ' Get the name of the file to import
            sFileName = Rhino.OpenFileName("Select File", "Excel Files (*.xlsx)|*.xlsx||")
            If IsNull(sFileName) Then Exit Sub
       
            ' Launch Excel and open the specified file
            Set oExcel = CreateObject("Excel.Application")
            oExcel.Workbooks.Open(sFileName)
     
            ' Get the active worksheet
            Set oSheet = oExcel.ActiveSheet
     
            ' Count the number of rows that need to be processed
            nRowCount = oSheet.Range("a1", oSheet.Range("a1").End(xlDown)).Rows.Count
            If (nRowCount = 0 ) Then
                    Rhino.Print "No data range found in file."
                    Exit Sub
            ElseIf (nRowCount < 2 ) Then
                    Rhino.Print "Not enough points to create curve."
                    Exit Sub
            End If
       
            ' Re-dimension the resulting array of points accordingly
            ReDim aPoints(nRowCount-1)
     
            ' Process all rows
            Rhino.Print "Importing data..."
     
            distance = 8
            x = 0

           
            For nRow = 1 To nRowCount
                    ' Read the values from columns A, B, and C
                    dblInnerRadius = oSheet.Cells(nRow, 5).Value
                    dblOuterRadius = oSheet.Cells(nRow, 6).Value
                    arrHeight = oSheet.Cells(nRow, 7).Value
                    arrExtrude = oSheet.Cells(nRow, 8).Value

                   
                    plane = Rhino.PlaneFromNormal(Array(0, x, arrExtrude), Array(0, 0, 1))
                   
                    Call Pipe(dblOuterRadius, dblInnerRadius, arrHeight, plane)
                   
                    x = x + distance
                   
            Next   
     
           
    End Sub
    Sub Pipe(dblOuterRadius, dblInnerRadius, arrHeight, arrBase)
            Dim Outer,Inner


            Outer = Rhino.AddCylinder(arrBase, arrHeight, dblOuterRadius)
            Inner = Rhino.AddCylinder(arrBase, arrHeight, dblInnerRadius)
           
            Rhino.BooleanDifference Outer, Inner, True
                   
    End Sub

    Call Insert()
    Sub Insert
     
            ' Declare variables and constants
            Const xlDown = -4121
            Dim sFileName, aPoints(), dblOuterRadius, dblInnerRadius, arrHeight, distance, x, plane, arrExtrude
            Dim oExcel,oSheet, nRow, nRowCount
     
            ' Get the name of the file to import
            sFileName = Rhino.OpenFileName("Select File", "Excel Files (*.xlsx)|*.xlsx||")
            If IsNull(sFileName) Then Exit Sub
       
            ' Launch Excel and open the specified file
            Set oExcel = CreateObject("Excel.Application")
            oExcel.Workbooks.Open(sFileName)
     
            ' Get the active worksheet
            Set oSheet = oExcel.ActiveSheet
     
            ' Count the number of rows that need to be processed
            nRowCount = oSheet.Range("a1", oSheet.Range("a1").End(xlDown)).Rows.Count
            If (nRowCount = 0 ) Then
                    Rhino.Print "No data range found in file."
                    Exit Sub
            ElseIf (nRowCount < 2 ) Then
                    Rhino.Print "Not enough points to create curve."
                    Exit Sub
            End If
       
            ' Re-dimension the resulting array of points accordingly
            ReDim aPoints(nRowCount-1)
     
            ' Process all rows
            Rhino.Print "Importing data..."
     
            distance = 8
            x = 0

           
            For nRow = 1 To nRowCount
                    ' Read the values from columns A, B, and C
                    dblInnerRadius = oSheet.Cells(nRow, 9).Value
                    dblOuterRadius = oSheet.Cells(nRow, 10).Value
                    arrHeight = oSheet.Cells(nRow, 11).Value
                    arrExtrude = oSheet.Cells(nRow, 12).Value

                   
                    plane = Rhino.PlaneFromNormal(Array(0, x, arrExtrude), Array(0, 0, 1))
                   
                    Call Pipe(dblOuterRadius, dblInnerRadius, arrHeight, plane)
                   
                    x = x + distance
                   
            Next   
     
           
    End Sub
    Sub Pipe(dblOuterRadius, dblInnerRadius, arrHeight, arrBase)
            Dim Outer,Inner


            Outer = Rhino.AddCylinder(arrBase, arrHeight, dblOuterRadius)
            Inner = Rhino.AddCylinder(arrBase, arrHeight, dblInnerRadius)
           
            Rhino.BooleanDifference Outer, Inner, True
                   
    End Sub

    Call Sleeve()
    Sub Sleeve
     
            ' Declare variables and constants
            Const xlDown = -4121
            Dim sFileName, aPoints(), dblOuterRadius, dblInnerRadius, arrHeight, distance, x, plane, arrExtrude
            Dim oExcel,oSheet, nRow, nRowCount
     
            ' Get the name of the file to import
            sFileName = Rhino.OpenFileName("Select File", "Excel Files (*.xlsx)|*.xlsx||")
            If IsNull(sFileName) Then Exit Sub
       
            ' Launch Excel and open the specified file
            Set oExcel = CreateObject("Excel.Application")
            oExcel.Workbooks.Open(sFileName)
     
            ' Get the active worksheet
            Set oSheet = oExcel.ActiveSheet
     
            ' Count the number of rows that need to be processed
            nRowCount = oSheet.Range("a1", oSheet.Range("a1").End(xlDown)).Rows.Count
            If (nRowCount = 0 ) Then
                    Rhino.Print "No data range found in file."
                    Exit Sub
            ElseIf (nRowCount < 2 ) Then
                    Rhino.Print "Not enough points to create curve."
                    Exit Sub
            End If
       
            ' Re-dimension the resulting array of points accordingly
            ReDim aPoints(nRowCount-1)
     
            ' Process all rows
            Rhino.Print "Importing data..."
     
            distance = 8
            x = 0

           
            For nRow = 1 To nRowCount
                    ' Read the values from columns A, B, and C
                    dblInnerRadius = oSheet.Cells(nRow, 13).Value
                    dblOuterRadius = oSheet.Cells(nRow, 14).Value
                    arrHeight = oSheet.Cells(nRow, 15).Value
                    arrExtrude = oSheet.Cells(nRow, 16).Value

                   
                    plane = Rhino.PlaneFromNormal(Array(0, x, arrExtrude), Array(0, 0, 1))
                   
                    Call Pipe(dblOuterRadius, dblInnerRadius, arrHeight, plane)
                   
                    x = x + distance
                   
            Next   
     
           
    End Sub
    Sub Pipe(dblOuterRadius, dblInnerRadius, arrHeight, arrBase)
            Dim Outer,Inner


            Outer = Rhino.AddCylinder(arrBase, arrHeight, dblOuterRadius)
            Inner = Rhino.AddCylinder(arrBase, arrHeight, dblInnerRadius)
           
            Rhino.BooleanDifference Outer, Inner, True
                   
    End Sub

    Call MergeObjects()
    Sub MergeObjects()
            Dim arrObjects
           
            arrObjects = Rhino.AllObjects

            Rhino.BooleanUnion(arrObjects)

    End Sub
  • 7. hawkes.richardl (Sep 17, 2013 20.10):

    Nevermind, When I was bringing in the data I had my InnerRadius and OuterRadius switched so thus I was BooleanDifference-ing an InnerRadius Cylinder that was larger than the OuterRadius Cylinder if that makes sense. Thanks to everyone for the help!

  • 6. hawkes.richardl (Sep 17, 2013 19.34):

    When I pull in the data from excel, the BooleanDifference no longer works. The indiviual cylinders are still produced, but the BooleanDifference doesn't work. Here's the script:

    Call ImportFromExcel()
    Sub ImportFromExcel
     
            ' Declare variables and constants
            Const xlDown = -4121
            Dim sFileName, aPoints(), dblOuterRadius, dblInnerRadius, arrHeight, distance, x, plane
            Dim oExcel, oSheet, nRow, nRowCount
     
            ' Get the name of the file to import
            sFileName = Rhino.OpenFileName("Select File", "Excel Files (*.xlsx)|*.xlsx||")
            If IsNull(sFileName) Then Exit Sub
       
            ' Launch Excel and open the specified file
            Set oExcel = CreateObject("Excel.Application")
            oExcel.Workbooks.Open(sFileName)
     
            ' Get the active worksheet
            Set oSheet = oExcel.ActiveSheet
     
            ' Count the number of rows that need to be processed
            nRowCount = oSheet.Range("a1", oSheet.Range("a1").End(xlDown)).Rows.Count
            If (nRowCount = 0 ) Then
                    Rhino.Print "No data range found in file."
                    Exit Sub
            ElseIf (nRowCount < 2 ) Then
                    Rhino.Print "Not enough points to create curve."
                    Exit Sub
            End If
       
            ' Re-dimension the resulting array of points accordingly
            ReDim aPoints(nRowCount-1)
     
            ' Process all rows
            Rhino.Print "Importing data..."
     
            distance = 8
            x = 0

           
            For nRow = 1 To nRowCount
                    ' Read the values from columns A, B, and C
                    dblOuterRadius = oSheet.Cells(nRow, 1).Value
                    dblInnerRadius = oSheet.Cells(nRow, 2).Value
                    arrHeight = oSheet.Cells(nRow, 3).Value

                   
                    plane = Rhino.PlaneFromNormal(Array(0, x, 0), Array(0, 0, 1))
                   
                    Call Pipe(dblOuterRadius, dblInnerRadius, arrHeight, plane)
                   
                    x = x + distance
                   
            Next   
     
           
    End Sub
    Sub Pipe(dblOuterRadius, dblInnerRadius, arrHeight, arrBase)
            Dim Outer, Inner


            Outer = Rhino.AddCylinder(arrBase, arrHeight, dblOuterRadius)
            Inner = Rhino.AddCylinder(arrBase, arrHeight, dblInnerRadius)
           
            Rhino.BooleanDifference Outer, Inner, True
                   
    End Sub
  • 5. hawkes.richardl (Sep 11, 2013 20.22):

    Thank you pulgarata, this was an extremely helpful start!

    This is great to make a set of tubes, my next step was to duplicate this as we merge multiple tubes to create a final "drill stop". Each drill stop is comprised of a "shaft hug", "platform", "insert", and "sleeve". In the attached screenshot, you can see that I duplicated the script and relabeled it so you can follow along. My question is: is there a way to read an excel file as seen in the screen shot and have it pull the correct corresponding data? For example, Sub ShaftHug should pull cells B3:D5; Sub Platform should pull cells E3:G5, etc. However, it's not always cells B3:D5 so could it pull based off labels such as data in B3 is pulled by finding "ShaftHug, Inner Radius, n=0" and that pulls 1.225?

    *Note: There are is only n=2 in the excel sheet, but n=3 in Rhino because I manually pulled in data.

  • 4. pulgarata (Sep 11, 2013 19.24):

    Hi Richard,
    You can start with this:

    Call MovePipe()
    Sub MovePipe()
            Dim dblOuterRadius, dblInnerRadius, arrHeight,distance,n,x,plane
            distance = 8
            x = 0
           
            For n=0 To 5
                   
                    'here you can read the info from excel
                    dblOuterRadius = 3
                    dblInnerRadius = 2
                    arrHeight = 5
                    '
                   
                    plane = Rhino.PlaneFromNormal(Array(0, x, 0), Array(0, 0, 1))
                   
                    Call Pipe(dblOuterRadius, dblInnerRadius, arrHeight, plane)
                   
                    x = x + distance
            Next
           
    End Sub

    Sub Pipe(dblOuterRadius, dblInnerRadius, arrHeight, arrBase)
            Dim Outer,Inner


            Outer = Rhino.AddCylinder(arrBase, arrHeight, dblOuterRadius)
            Inner = Rhino.AddCylinder(arrBase, arrHeight, dblInnerRadius)
           
            Rhino.BooleanDifference Outer, Inner, True
                   
    End Sub
  • 3. hawkes.richardl (Sep 10, 2013 22.34):

    I attached a screenshot and here is the description:

    Steps i've done already:
    1. Build "Drill guide 1 - Shaft Huge"
    2. Build "Drill guide 1 - Platform"
    3. Build "Drill guide 1 - Insert"
    4. Extrude "Drill guide 1 - Insert along z-axis"
    5. Merge all 3 pieces of "Drill guide 1"
    6. Move "Drill guide 1" along x-axis 8mm
    7. Build "Drill guide 2 - Shaft Hug"

    As you can see, I input the numbers into the rightside toolbar where you see "Inner Radius (Bottom)", "Outer Radius (Bottom)", etc. Then I use the pop-up toolbar for tools such as "Merge Two Objects" and "Mark Region" --> "Extrude Marked Regions" --> "Unmark All".

    I repeat the process for Drill Guide 1 for all drill guides I need to make in a set. Hope this helps.

  • 2. pulgarata (Sep 10, 2013 21.52):

    Parece ser realizable.
    Describes muy bien el procedimiento, pero sería mas fácil entenderlo si cargas un dibujo.

    Saludos,

  • 1. hawkes.richardl (Sep 10, 2013 21.15):

    In the past I've been making drill stops for dental drill guides in VRMesh. I just downloaded Rhino to check it out and see if it works better for our company. To make a drill stop in VRMesh, my workflow was the following:
    1. Make Tube 1: Enter A(Inner diameter), B(Outer Diameter), C(Height).
    2. Make Tube 2: "" "" ""
    3. Extrude Tube 2 3mm along y-axis
    4. Make Tube 3: "" "" "".
    5. Merge all tubes
    6. Move merged object 8mm along x-axis
    7. Repeat Steps 1-6 until all drill stops are made for a set (usually 3-5)
    8. Merge all drill stops to be 1 object
    9. Export as STL to be printed.

    This part is extremely manual as I'm staring at an excel spreadsheet on 1/2 my screen and manually typing in these numbers on the other half in VRMesh. I have a couple of questions regarding RhinoScript.

    Is it possible to right code (RhinoScript, Python, whatever) that I can mass input these A,B,C values and automate this design process? Seems so simple as I'm literally only working with tubes. I'm new to Rhino and have no experience at all in coding and was hoping someone could at least point me in the right direction.

Recommend

Why are these buttons gray?