inner As Curve() = section.ToNurbsCurve().Offset(normal, pc, -plate, 1e-3, 1e-4, Rhino.Geometry.CurveOffsetCornerStyle.Sharp)
the error message is:
"
{0}0. Error: Het oplossen van de overbelasting is mislukt omdat dit aantal argumenten door geen enkele toegankelijke Offset wordt geaccepteerd. (line 104)
"
this is the VBA script:
"Option Strict OffOption Explicit On'Import SDK and Framework namespacesImports RhinoImports Rhino.GeometryImports Rhino.CollectionsImports GrasshopperImports Grasshopper.KernelImports Grasshopper.Kernel.DataImports Grasshopper.Kernel.TypesImports GH_IOImports GH_IO.SerializationImports SystemImports System.IOImports System.XmlImports System.DataImports System.DrawingImports System.ReflectionImports System.CollectionsImports System.Windows.FormsImports Microsoft.VisualBasicImports System.Collections.GenericImports System.Runtime.InteropServices'Code generated by Grasshopper(R) (except for RunScript() content and Additional content)'Copyright (C) 2011 - Robert McNeel & Associates<System.Runtime.CompilerServices.CompilerGenerated()> _Public Class Script_Instance Implements IGH_ScriptInstance#Region "Members" ''' <summary>List of error messages. Do not modify this list directly.</summary> Private __err As New List(Of String) ''' <summary>List of print messages. Do not modify this list directly, use the Print() and Reflect() functions instead.</summary> Private __out As New List(Of String) ''' <summary>Represents the current Rhino document.</summary> Private doc As RhinoDoc = RhinoDoc.ActiveDoc ''' <summary>Represents the Script component which maintains this script.</summary> Public owner As Grasshopper.Kernel.IGH_ActiveObject#End Region#Region "Utility functions" ''' <summary>Print a String to the [Out] Parameter of the Script component.</summary> ''' <param name="text">String to print.</param> Private Sub Print(ByVal text As String) __out.Add(text) End Sub ''' <summary>Print a formatted String to the [Out] Parameter of the Script component.</summary> ''' <param name="format">String format.</param> ''' <param name="args">Formatting parameters.</param> Private Sub Print(ByVal format As String, ByVal ParamArray args As Object()) __out.Add(String.Format(format, args)) End Sub ''' <summary>Print useful information about an object instance to the [Out] Parameter of the Script component. </summary> ''' <param name="obj">Object instance to parse.</param> Private Sub Reflect(ByVal obj As Object) __out.Add(GH_ScriptComponentUtilities.ReflectType_VB(obj)) End Sub ''' <summary>Print the signatures of all the overloads of a specific method to the [Out] Parameter of the Script component. </summary> ''' <param name="obj">Object instance to parse.</param> Private Sub Reflect(ByVal obj As Object, ByVal method_name As String) __out.Add(GH_ScriptComponentUtilities.ReflectType_VB(obj, method_name)) End Sub#End Region ''' <summary> ''' This procedure contains the user code. Input parameters are provided as ByVal arguments, ''' Output parameter are ByRef arguments. You don't have to assign output parameters, ''' they will be null by default. ''' </summary> Private Sub RunScript(ByVal p0 As Point3d, ByVal p1 As Point3d, ByVal p2 As Point3d, ByVal pc As Point3d, ByVal plate As Double, ByVal itt As Integer, ByVal dev As Double, ByRef crvout As Object, ByRef crvin As Object, ByRef sec As Object, ByRef opp As Object, ByRef div As Object, ByRef pt4 As Object) 'your code goes here… opp = "test01" Dim section As New Polyline(5) section.Add(p0) section.Add(p1) section.Add(p2) section.Add(pc) section.Add(p0) Dim normal As Vector3d = vector3d.CrossProduct((p1 - p0), (p2 - p0)) Dim area As Double Dim chicken_int As Int32 = 0 Dim XX As Double Dim YY As Double Do chicken_int += 1 If (chicken_int > itt) Then Exit Do 'Compute the section offset Dim inner As Curve() = section.ToNurbsCurve().Offset(normal, pc, -plate, 1e-3, 1e-4, Rhino.Geometry.CurveOffsetCornerStyle.Sharp) Dim edges As New CurveList(inner) edges.Add(section.ToNurbsCurve()) crvin = edges Dim sections As Brep() = Brep.CreatePlanarBreps(edges) If (sections Is Nothing) Then Exit Do opp = "test02" 'Compute the centroid of the current section Dim am As AreaMassProperties = AreaMassProperties.Compute(sections(0)) Dim ct As Point3d = am.Centroid XX = am.CentroidCoordinatesMomentsOfInertia.X YY = am.CentroidCoordinatesMomentsOfInertia.Y area = am.Area Dim dx As Vector3d = pc - ct 'Compute the error of the current centroid Dim dl As Double = dx.Length div = dl 'Update output values crvout = section crvin = inner sec = sections(0) opp = area If (dl < dev) Then Exit Do 'Adjust outline with a boosting factor. section(3) += dx * 4 Loop pt4 = section(3) crvout = section End Sub '<Custom additional code> '</Custom additional code> End Class
"…
both my plotter/cutter and wide format printer. I had been running the plotter from my main work laptop - a Win10 machine via the plotters USB port. As it turns out you can't get Win XP drivers for this USB connection so I needed another solution.
I tried to use the plotters DB25 serial port connection using an old DB9 to DB25 modem cable I had in my collection = no luck the plotter wouldn't talk. A bit more research and it turns out these plotters need a 'null modem' cross over cable to operate. I found a pic of the correct wiring online and made up my own with some cable and connectors from the local electronics hobby shop.
With this hooked up and using Hyperterminal I was able to fire some codes to the plotter directly and get a response back - winning!
At this point I got my original code working with the 'net use' redirect from LPT1 to COM1.
HOWEVER - being that the plotter was now on a COM port there are a few more interesting things you can do with it - one is being able to read the paper size/cut area from the printer.
So what I needed to to was find a way to send and receive data to/from the plotter using the serial port.
A bit of research into .NET's serial port interface and using a bunch of small pieces of test code I have manged to completely re-jig this driver.
Upgrades include:
- Direct Serial Port comms using Null Modem cable (a USB to serial adaptor + null modem should also work)
- Plot area read from the plotter - a rectangle the size of the plot area is placed on a separate layer and coloured red
- Testing to see if selected plotting curves are both closed and inside of the cutting area - with errors shown and exiting if they are not right.
- After plot 'parking' of the plot head at the end of the cut items + an adjustable offset (currently requires manual resetting of origin on the plotter before for next cut)
Great thing is it is now 100% running within Rhino Python - no DOS command line calls = no flashing up of the CMD wind. Also no temp files needed on the HDD and no limit to number of curves that can be plotted - tested with 200 or so with no issues.
Overall very happy with whole project - have learnt a LOT about Python and .NET interfacing AND ended up with a very handy/useful tool.
Cheers
DK
# This code is a WIP # It plots directly to a DGI Plotter# via the serial port
import System.IO.Ports as Portsimport rhinoscriptsyntax as rsimport time
#Some setup valuescom_port = 'COM1' #change to match plotter port baud_rate = 9600 #change to match plotter settingplotter_step = .025 #mmfinsh_offset = 10 #mm
#Delete old cutting area and cut objectsif rs.IsLayer('Cutting Area'): rs.PurgeLayer('Cutting Area')if rs.IsLayer('Cutting Objects'): rs.PurgeLayer('Cut Objects')
#Setup Serial PortMyport = Ports.SerialPort(com_port)Port_Write = Ports.SerialPort.WriteMyport.BaudRate = baud_rateMyport.ReadTimeout=5000 #5 secsMyport.Close()Myport.Open()
#Setup PlotterPort_Write(Myport, 'PU;PA0,0;IN;\n')Port_Write(Myport, 'SP1;\n')Port_Write(Myport, 'PA;\n')time.sleep(2)
#Read the Paper size from PlotterPort_Write(Myport, 'OH;') #HPGL read limits codetime.sleep(2)
return1 = ''papersize = ''count = 0char_in_buffer = 0chars_in_buffer = Ports.SerialPort.BytesToRead.GetValue(Myport)
if chars_in_buffer == 0: print 'Plotter not ready' Myport.Close() exit()
while (count < chars_in_buffer): return1 = Myport.ReadChar() papersize = papersize + chr(return1) count = count + 1
papersize = papersize.split(",")rect1 = (float(papersize[2])*plotter_step)rect2 = (float(papersize[3])*plotter_step)
print 'Cutting area = ' + str(rect1) + 'x' + str(rect2)
#place cutting area curve on its own layer, make it red and lock itplane = rs.WorldXYPlane()cutting_area = rs.AddRectangle( plane, (rect1), (rect2))rs.AddLayer (name='Cutting Area', color=(255,0,0), visible=True, locked=True, parent=None)rs.ObjectLayer(cutting_area, 'Cutting Area')
#get plotting objects
allCurves = rs.GetObjects("Select curves to plot", rs.filter.curve)
#test to see if these are closed curves - exit if not
for curve in allCurves: test_closed = rs.IsCurveClosed(curve) if test_closed == 0: print "One or move of these curves are not closed" Myport.Close() exit()
#test to see if these are inside cutting area - exit if not
for curve in allCurves: test_inside = rs.PlanarClosedCurveContainment(curve, cutting_area)
if test_inside==0 or test_inside==1: print "One or more of these curves are outside of cut area" Myport.Close() exit()
#All ok - convert to points and send data to printer
rs.AddLayer (name='Cut Objects', color=(0,255,0), visible=False, locked=True, parent=None)
for curve in allCurves: Port_Write(Myport, 'PU;PA;SP1;\n') polyline = rs.ConvertCurveToPolyline(curve,angle_tolerance=5.0, tolerance=0.025, delete_input=False, min_edge_length=0, max_edge_length=0) points = rs.CurveEditPoints(polyline) rs.ObjectLayer(polyline, 'Cut Objects')
# PU to the first point x = points[0][0] y = points[0][1] Port_Write(Myport, 'PU' + str(int(x / plotter_step)) + ',' + str(int(y / plotter_step)) + ';\n') # PD to every subsequent point i = 1 while i < len(points): x = points[i][0] y = points[i][1] Port_Write(Myport, 'PD' + str(int(x / plotter_step)) + ',' + str(int(y / plotter_step)) + ';\n') i += 1
Port_Write(Myport,'PU;\n')
#find the far end of the cutbox = rs.BoundingBox(allCurves)far_end = str(box[1])far_end = far_end.split(",")far_end = far_end[0]far_end = float(far_end)/plotter_stepfar_end = (int(far_end))+ finsh_offsetfar_end = str(far_end)print (far_end)
#return plotter home and close portPort_Write(Myport, 'PU;PA' + far_end + ',0;IN;\n')Port_Write(Myport, 'SP1;\n')Port_Write(Myport, 'PA;\n')Myport.Close()time.sleep(10)…
a machine that is light and very sturdy. I have taken my Macbook Pro all around the world, carry it with me every day, even dropped it a few times and its still totally fine. Its thin and light.
2) You get some actual support for your hardware even a few years down the line. My Macbook Pro is from 2012 and I can still walk in to any Apple Store and get help with it, which I have done many, many times in different places around the world - I never had to show a receipt or was charged any money for help. There is no PC/Laptop manufacturer in the world with anything close to that, because companies like Asus, Dell, etc. bring out dozens of new versions of laptops every year, so its much harder to service them after a few years.
3) This is the most important one, which usually people forget when they say that Macbooks are overpriced: Resale Value. If you have ever tried to sell an old PC/Laptop (I have a few times), you will know how little value they have even after just 2-3 years. Macbooks retain their value very well and even after 4 years you can still get 50% of your original price.
4) Of course you can install Windows on it and it runs perfectly. I have MacOS and Windows on it and both run absolutely fine. On the Windows side I have Rhino+GH, Maya and a few others. Having Windows is good, because some software still only runs on Windows (looking at you, 3DSMax!). Most other software also runs on MacOS. In the interest of sanity it is great to have an alternative to Windows for all the day to day stuff, like Mail, Calender, Photos, Presentations, etc. that just always works.
5) As for performance: Yes, Macbook Pros dont necessarily have the latest and greatest in graphics cards (the rest is on par with PC laptops), but unless you want to play games you will not need it. VRay RT can do GPU rendering, but you wont get great performance from a Notebook GPU anyways and it doesnt make sense to do rendering on a laptop (especially since you have a workstation). You could get one of the older Macbook Pro Retina Late 2013 or Mid 2014 models with the GTX750M by Nvidia, which will be usable to render using VRay RT, but of course not huge performance. Better to invest in a good used graphics card for your workstation like an Nvdia GTX980ti, which is the best value for money for GPU rendering right now (lots of used ones available).
So at least consider also getting a Macbook Pro. You can buy refurbished models (depending where you are) and they are like new, but a lot cheaper or even get an older one thats used. It will be a worthwile investment.
Take it from someone who has used dozens of PCs and Macs in my lifetime and have to do the IT support here at work (where we also use both).
I still have my Macbook Pro Retina from 2012 and its still running perfectly, super fast, and I can use Rhino and GH for huge files, do GPU Rendering with Octane Render and all sorts of other heavy computing stuff.
Hope that helps.…
Added by Armin Seltz at 11:12am on September 19, 2016
modeler. That being said, I am really interested in Grasshopper and I am having trouble learning it. Learning new software is often difficult especially when you are learning a new paradigm for creating like going from ZBrush to SolidWorks. Node based modeling is new to me.
One thing that I would like for Grasshopper that I have seen in MODO is more connection between the GH editor and the Rhino environment. I would like GH to recognize what I am doing in the Rhino work space automatically. If I create a polyline a polyline node automatically pops up in GH. If I revolve that polyline that connection to the polyline is also reflected in the GH window. This is not earth shattering. It would not only be a faster workflow but it would be a bridge to ramp into using GH faster/make it more likely that I would actually use it. Once I see how things are linked up based on how I already work I can go back in and add sliders and add logic that GH has that I done even know exists.
Is this realistic to ask for?
Thanks!…
Este curso ONLINE está diseñado específicamente para ser realizado a través de INTERNET, puedes realizar el curso DESDE CUALQUIER LUGAR, con cualquier tipo de dispositivo personal (PC, Portátil o Tablet) equipado con altavoces y micrófono y una conexión a internet.
Algunas de las ventajas de recibir Formación Oficial de Rhino y V-Ray for Rhino: . Obtendras tu Diploma Oficial de Rhino.. Obtendrás tu Diploma Oficial de V-Ray for Rhino.. Centro de Formación Oficial de V-Ray, RENDERSFACTORY® único Centro Oficial en Andalucía y Centro de Formación Oficial de Rhino.. Licencias de VisualARQ en tu poder durante 3 meses.. Te entregamos el Manual Oficial de Rhinoceros de McNeel Europe.…
urves as editable splines, not editable meshes, as I don't want to collapse the modifier stack and lose the parametric elements of max (offsets, chamfers, bevels etc).
There are two ways in which i would like to use the curves
-The imported curves need to be useable by my colleagues who don't use or have access to rhino and will potentially be doing several variations on a design theme, but then have the modifier stack reapply the offsets, extrusions, materials IDs etc. Too many vertices along all the curves make this too inefficient on the large scale projects I'm currently working on (10 acres of parkland)
-The alternate method I'm using, is modelling everything in rhino, parkland, parkland borders, paving between grassed areas, lots of amorphous shapes with specific offsets (similar in style to this http://www.zaha-hadid.com/architecture/dongdaemun-design-park-plaza/).
Then I import this into max to extrude, shell, render etc.
This way unfortunately is not very parametric either, as it requires me to model each change in rhino, using GH where I can, but then exporting uneditable, non parametric geometry to 3dsMax.
One of the recurring issues I have is when curved lines are imported , each curve is treated individually according to the export settings and as a result, adjacent and completely touching curves are interpolated differently to one another due to their individual lengths and tangents, losing the exactness of the detail created in rhino.
Still keen for any advice on whether there is an answer to this problem? Or even a combination of answers.
Cheers,
Dave…
ried turning off all firewalls, etc, but still have the issue. I am using your 'analyse_terrain' file.
http://www.grasshopper3d.com/group/gismo/forum/topics/terrain-generator-not-finding-the-remote-server
The error says:
downloadFile_e1: Unable to connect to the remote serverdownloadFile_e2: [Errno socket error] getaddrinfo returns an empty listThis component requires topography data to be downloaded from opentopography.org as a prerequisite for creating a terrain. It has just failed to do that. Try the following two fixes: 1) Sometimes due to large number of requests, the component fails to download the topography data even if opentopography.org website and their services are up and running.In this case, wait a couple of seconds and try reruning the component. 2) opentopography.org website could be up and running, but their terrain service (RESTful Web service) may be down (this already happened before).Try again in a couple of hours. If each of two mentioned advices fails, open a new topic about this issue on: www.grasshopper3d.com/group/gismo/forum.
Have you found any other ways to get around this besides shutting off the firewall?
Thanks
Nate
…
screen they are harder to distinguish.
The main issue is with software developers having to make their application aware that the user might change the scale setting in Windows to make things appear bigger. When this setting is changed some things might change size, like fonts and forms, but other elements might not. If the developer didn't account for this he might set a form element in pixel size unaware that when this setting is changed, the text inside the element will scale, clipping it.
In Mac OS the problem is exactly the same. They can solve it more easily because they only have to support 2 types of resolutions, which one is exactly twice as big as the previous one, so you just have to scale everything 2x (1 pixel becomes 4), just like what i did in my previous post. The disadvantage of this is that you loose pixel density on older software. Windows might be installed in screens with many different resolutions so doing this might not be a good idea since scaling by other than whole numbers will make things look blurry. Cleartype already doesn't work that well even just scaling exactly 2x.…
Added by Vicente Soler at 5:48am on November 29, 2015
ing basic concepts for personalization in footwear design and fabrication in order to send afterwards to CNCs, laser cutting equipment, 3D printers, etc.
Note: Previous knowledge in Rhinoceros and footwear design is not necessary.Content:1. Personalization in footwear upper(Working with a digital shape from a 3D scan)2. Shoe sole creation3. Using Grasshopper to create women's heels4. Nesting and using the work area5. Basic programming for a mold and/or a mock-up for CNC - RhinoCAM
Requirements: 1 PC or LaptopSoftware: Punto3D, provided by a CD which includes necessary demo programs, as well as the files that will be used for the session. Rhinoceros 5.0 for WindowsGrasshopperRhinoCAM 2014RhinoNEST 2014NOTE: You have to bring your own computer with Rhino 5 installed.
Register:
http://www.mcneelmiami.com/inc/sdetail/1727
//
Diseño y fabricación digital de Calzado
Lugar: Sala Ejecutiva 4
Precio: $95.00 USD
Idioma de curso: Español
Profesor: José de Jesús López Martínez. Punto3D, ART (Authorized Rhino Trainer)
Descripción: Compartir conceptos básicos para la personalización de cortes de calzado y el diseño de accesorios. Para su posterior envío a dispositivos como CNC's, equipos de corte láser, impresoras 3D, entre otros. Nota: No es necesario tener conocimientos previos de Rhinoceros, ni de diseño de calzado.
Contenido:
1. Personalización de corte de calzado (Trabajo sobre horma digital, la cual proviene de un escaneado 3D)
2. Creación de una suela
3. Grasshopper para la creación de un tacón para calzado de dama
4. Nesting y el aprovechamiento de áreas de trabajo
5. Programación básica de un molde y/o maqueta para CNC – RhinoCAM
Requisitos: 1 PC o Laptop
Software: Punto3D, proveerá un CD que incluirá los programas Demos necesarios, así como los archivos para trabajar en la sesión
Rhinoceros 5.0 para Windows
Grasshopper
RhinoCAM 2014
RhinoNEST 2014
NOTA: Tienes que llevar tu computador con Rhino 5 ya instalado
Regístrate:
http://www.mcneelmiami.com/inc/sdetail/1727…