lName, signalValue, operationMode):
sigV=signalValue
if sys.version_info[0] == 3:
if type(signalName) is str:
signalName=signalName.encode('utf-8')
if type(signalValue) is bytearray:
sigV = (ct.c_ubyte*len(signalValue))(*signalValue)
if type(signalValue) is str:
signalValue=signalValue.encode('utf-8')
sigV = (ct.c_ubyte*len(signalValue))(*signalValue)
else:
if type(signalValue) is bytearray:
sigV = (ct.c_ubyte*len(signalValue))(*signalValue)
if type(signalValue) is str:
signalValue=bytearray(signalValue)#<========This is line 1052
sigV = (ct.c_ubyte*len(signalValue))(*signalValue)
sigV=ct.cast(sigV,ct.POINTER(ct.c_ubyte)) # IronPython needs this
return c_WriteStringStream(clientID, signalName, sigV, len(signalValue), operationMode)
It displays the following error:
Program started
Connected to remote API server
Runtime error (TypeErrorException): unicode argument without an encoding
Traceback:
line 1052, in simxWriteStringStream, "C:\Program Files (x86)\V-REP3\V-REP_PRO_EDU\programming\remoteApiBindings\python\python\vrep.py"
line 70, in script
Any hint?…
complicated than it seems as I have an event and a subscriber method receiving data from a serial port.
In the code below, the strings received within myReceivedLines appear when connecting with the serial port (when connecttodevice is true). However they disapear when I launch another command (when homeallis true).
As you recommended in your reply, I have added the field called myReceivedLineswithin the class so that I could use the method String.Add() to all the feedback received and commands sent.
Why does the feedback dispear when a command is sent? Is the string going to myReceivedLine disappearing because they happen within a subscriber method or is it related to the DA.SetDataList() method used to assign myReceivedLinesto the output?
Many thanks!
public class SendToPrintComponent : GH_Component { //Fields List<string> myReceivedLines = new List<string>(); SerialPort port; //subscriber method for the port.DataReceived Event private void DataReceivedHandler(object sender, System.IO.Ports.SerialDataReceivedEventArgs e) { SerialPort sp = (SerialPort)sender; while (sp.BytesToRead > 0) { try { myReceivedLines.Add(sp.ReadLine()); } catch (TimeoutException) { break; } } } protected override void SolveInstance(IGH_DataAccess DA) { //Opening the port if (port == null) { string selectedportname = default(string); DA.GetData(1, ref selectedportname); int selectedbaudrate = default(int); DA.GetData(2, ref selectedbaudrate); //Assigning an object to the field within the SolveInstance method() port = new SerialPort(selectedportname, selectedbaudrate, Parity.None, 8, StopBits.One); //Enables the data terminal ready (dtr) signal during serial communication (handshaking) port.DtrEnable = true; port.WriteTimeout = 500; port.ReadTimeout = 500; } //Event Handling Method bool connecttodevice = default(bool); DA.GetData(3, ref connecttodevice); if (connecttodevice == true) { if (!port.IsOpen) { port.DataReceived += new SerialDataReceivedEventHandler(DataReceivedHandler); DA.SetDataList(0, myReceivedLines); port.Open(); } } else if (port.IsOpen) { port.DataReceived -= new SerialDataReceivedEventHandler(DataReceivedHandler); port.Close(); } if (port.IsOpen) { DA.SetData(1, "Port Open"); } //If the port is open do all the rest if (port.IsOpen) { bool homeall = default(bool); DA.GetData(5, ref homeall); //Home all sends all the axis to the origin if (homeall == true) { port.Write("G28" + "\n"); myReceivedLines.Add("G28" + "\n"); DA.SetDataList(2, myReceivedLines); } } else { DA.SetData(1, "Port Closed"); } }}…
eroberfläche des Grasshopper Programms
Funktionsprinzip eines grafischen Algorithmus-Editors (Datenfluss)
Unterscheidung von Parametern (Datentypen) und Komponenten (Datenverarbeitung)
Erzeugung, Bearbeitung und Analyse von Geometrie-Typen: Punkte, Vektoren, Linien, Kurven, Flächen (surfaces, brep) und Netze (meshes)
Strukturierung der Daten anhand von Listen und Bäumen
unterschiedliche Verknüpfungsmöglichkeiten von Parametern (data matching)
praxisnahe Grundlagen der Geometrie und Vektorrechnung für generatives Design
effizienter Aufbau von parametrischen Modellen anhand Übungsaufgaben
Auszug von Daten aus Modellen für die Fertigung; Daten aus Tabellen (Excel, CSV) importieren, exportieren
Einsatz von benutzerdefinierten Komponenten (custom components)
Vorkenntnisse: Rhinoceros3d Benutzeroberfläche der Software: Englisch Unterrichtssprache: Deutsch
Details und Anmeldung:
www.vhs-sha.de
click: SUCHE
Kurstitel: GRASSHOPPER
(auch: Kurstitel: RHINO)
Trainer: Peter Mehrtens
Kursdauer: 3 Tage / 8 Stunden pro Tag
Donnerstag, 19.07.2012, 08:00-17:00 Uhr Freitag, 20.07.2012, 08:00-17:00 Uhr Samstag, 21.07.2012, 08:00-17:00 Uhr Ort: Volkshochschule Schwäbisch Hall, im Haus der Bildung
Teilnahmegebühr: 299,00 € Teilnehmerzahl: 5-10 Personen
…
you still have left, what matters is how much memory Rhino is using compared to how much Windows is prepared to give it. On 32-bit systems this is usually 2, sometimes 3 Gigs. On 64-bit systems it's such a high limit that it's unlikely you've reached the limit.
You're low on or out of specially allocated memory/handles. Certain processes such as GDI drawing or winforms UI elements require a handle per instance. Every window, every label, every button, every slider, every bitmap... each one has a unique handle associated with it. Depending on the windows version, you either get a few, some, a bunch or lots of these handles to play with. When you start running out, usually the first sign is that the UI goes all wonky. Text disappears, fonts suddenly look terrible, parts of windows go missing. When all the GDI handles that are allowed have been claimed, the application will crash. The same may be true for OpenGL or DirectX handles, I'm not an expert on those.
There's an arithmetic error causing an overflow error. Sometimes these are handled gracefully and you get a proper crash or error message, sometimes they cause software to start accessing the wrong memory.
It's just some random crash that decides to manifest as an out-of-memory crash. This happens a lot and it makes these crashes very difficult to track down.
Since your images start going black before the crash, I'm tempted to think we're dealing with a #2 crash here. Maybe all these images we're saving out are hogging GDI handles and choking the system. If the handles or GDI objects assigned to Rhino keep going up and up as you write out these images, that'll be good supporting evidence. You can use the Windows 8 Task Manager to keep an eye on these values, or if you're running an older version of Windows I recommend installing Sysinternal Process Explorer in lieu of the Task Manager.
…
Added by David Rutten at 1:20pm on February 28, 2015
ruses could follow. Then cones are made and some other things.You can move the cones around via the equivalent slider. If the cones "touch" then ... well .. test it and see what's happening,
2. Interactive capability is not present: assume that you have 666 paths/cones > by what means you think that you could control what's happening? By adding 666 sliders? (not in a million years).
3. Rhino is amusing with regard the solid union Method. Depending on Karma you can get this:
or that :
4. Leaving aside N3 .. if the real-time response goes AWOL with just 8 cones what would be the situation if you add 666 cones? This is the reason for using K to solve this ... obviously with "some" compromises yielding "vault" stuff like this:
or like that (an Alien billiard (C)(Tm)(US patent pending) for planet Zorg):
Moral: stick to the Soap_opera approach.…
al other things:1. the minimum and maximum spacing between points (a certain 'x' and 'y');2. the jump between two next points - let's say it is always 2. So if a minimum possible spacing is 'x' (pt.1) then the next one would be x+2, then x+4, x+6 etc. until it gets to x+n=y (the maximum);3. how many maximum/minimum points there are in a row - when a division reaches the minimum 'x' or maximum 'y distance I want it to stay there for a while (e.g. [...] x+(n-2), x+n=y, y, y, y, y, x+(n-2), x+(n-4)...) Therefore, what I want to get after dividing the base curve are curve pieces of following lenghts/points on the curve with following distances between them (for example):x, x, x, x+2, x+4, x+8 . . . x+n, y, y, y, y, y, x+n . . . x+4, x+2, x, x, x, x, x, x, x, x+2, x+4 . . . x+n, y, y, y, x+n . . . x-2, x, x, x, x, x-2 . . . and so on and on.As you can see the amounts of x's and y's in a row changes (Rule no.3).I've tried this with graphs and attractor points and got nowhere in almost 2 weeks (though I'm a beginner).. Perhaps someone here will have an idea :)I'm attaching a picture of what I have in mind (may be easier to understand than what I wrote for some people :))Cheers…
his comes in the form of an HTML page with links to every component, so you will need to view it in your web browser. (I use Chrome and it doesn't seem to be working correctly, but when opened in IE its fine.)
2) Included in each help topic for each component is the Inputs and Outputs descriptions and data types.
3) You supply the data. What you supply and how you supply it is for you to decide. There are umpteen different ways. Are you asking for a list of those ways for each input?
4) Points can either be Rhino objects or 3D co-ordinates. To create a point you can use any of these methods, but it mostly comes down to user preference. I like using Panels as this displays outside of the component.
5) Because of the nature of vectors they represent magnitude and direction but they don't have an independent location, so there is a component that will display vectors in Rhino.
6) The user.
7) There is a Primer on the front page. Here you find the Basics, but because GH is ever evolving in its current beta state you might find things that aren't relevant any more or simply don't work the same. And here is the reason why nobody is writing an update because it could be soon out of date.
8) Importing images by either dragging them from explorer onto the canvas or right click context menu Image...
9) Single line = Single Item of Data. Double line = Multiple items of data on the same Branch. Dashed Double Line = Multiple Data on Multiple Branches.
10) User preference
11) Toolbar management is probably the bane of David's life. Most things are logically placed. For example the Curve Tab, Primitives are any simple curve types that you are creating from scratch. Similarly Splines is for more complex curve types created from scratch. Analysis is where you find components that are finding answers supplied by curves, control points, curvature, parameters, end points etc. Division is a subset of this category but has a group of its own. And Utilities is where you find curve related actions that you want to perform, offsetting, rebuilding projecting, exploding etc.
12) I would image it would have been the Point On Curve component in Curve>Analysis. Why that group? You are not putting a point on a curve you are analysing a curve for the location of a point based on some parameters that you are supplying. For example "what is the mid point?"
I hope this goes some way towards answering you questions. No doubt this will have generated more so don't be afraid to ask, it took me several releases of Explicit History (aka Grasshopper) before I realised what the egg did, it never occurred to me that I could put my objects into Rhino when I was finished. Or the fact that I could use panels to 'see' data outputs.
Al the best,
Danny…
Added by Danny Boyes at 3:48am on December 9, 2010
should follow the instruction which mostapha has wrote in https://github.com/mostaphaRoudsari/ladybug/blob/master/resources/I...
Instructions for Installing Ladybug + Honeybee: (Follow steps 1-6 for basic functionality and 1-11 for full functionality) 0. If you have an old version of LB+HB, download the file here (https://app.box.com/s/ds96em9l6stxpcw8kgtf) and open it in Grasshopper to remove your old Ladybug and Honeybee version. 1. Make sure that you have a working copy of both Rhino and Grasshopper installed. 2. Open Rhino and type "Grasshopper" into the command line (without quotations). Wait for grasshopper to load. 3. Install GHPython by downloading the file at this link (http://www.food4rhino.com/project/ghpython?ufh) and drag the .gha file onto the Grasshopper canvas. 4. Select and drag all of the files in the "userObjects" folder (downloaded with this instructions file) onto your Grasshopper canvas. You should see Ladybug and Honeybee appear as tabs on the grasshopper tool bar. (If you are reading this instruction on github you can download them from http://www.food4rhino.com/project/ladybug-honeybee) 5. Download the files at this link (https://app.box.com/s/bh9sbpgajdtmmystv3n4), unzip them and copy the contents to both C:\ladybug and C:\Users\[yourUsername]\AppData\Roaming\Ladybug. 6. Restart Rhino and Grasshopper. You now have a fully-functioning Ladybug. For Honeybee, continue to the following: 7. Install Radiance to C:\Radiance by downloading it from this link (https://github.com/NREL/Radiance/releases/download/4.2.2/radiance-4...) and running the exe. 6. Install Daysim to C:\DAYSIM by downloading it at this link (http://daysim.ning.com/page/download) and running the exe. 8. Install Energy Plus 8.1 to C:\EnergyPlusV8-1-0 by going to the DOE website (http://apps1.eere.energy.gov/buildings/energyplus/energyplus_downlo...), making an account, going to "download older versions of EnergyPlus, selecting 8.1 and running the exe. 9. Copy falsecolor2.exe (http://pyrat.googlecode.com/files/falsecolor2.exe) and evalglare.exe (http://www.ise.fraunhofer.de/en/downloads-englisch/software/evalgla...) to C:\Radiance\bin 10. Download the OpenStudio Libraries (https://app.box.com/s/y2sx16k98g1lfd3r47zi) and unzip them to C:\ladybug\OpenStudio. 11. You now have a fully-working version of Ladybug + Honeybee. Get started visualizing weather data with these video tutorials (https://www.youtube.com/playlist?list=PLruLh1AdY-Sj_XGz3kzHUoWmpWDX...).
It works for me..
Agus…
a nodi, permette di sfruttara le potenza della programmazione, senza necessariamente avere competenze avanzate.
Con Grasshopper potrete avere accesso ai segreti della modellazione generativa, un nuovo linguaggio progettuale che sta cambiando il mondo del design, a partire dalla gioielleria, fino ad arrivare all'architettura.
Durante il corso sarà possibile comprendere le caratteristiche di funzionamento del programma e applicarlo alla creazione di oggetti complessi che potranno essere stampati in 3D, oppure renderizzati. La durata è di 30 ore e alla fine del percorso verrà rilasciato il certificato McNeel.
Il Programma
Il corso spiega i concetti base di modellazione parametrica e generativa. Nello specifico:
Interfaccia e comandi
Parametri e componenti
Interopazione con Rhinoceros
Strumenti di parametrizzazione
Combinazione dati
Data tree
Creazioni di superfici attraverso algoritmi di paneling
Teoria degli attrattori
Gestione strumenti mesh
Creazione di Cluster
Durante il corso saranno proposte esercitazioni pratiche sul campo di utilizzo preferito dallo studente
Il docente
Antonino Marsala, è un formatore certificato McNeel con alle spalle oltre 11 anni di esperienza nel settore della modellazione 3D. Oltre ad occuparsi di formazione, collabora con aziende orafe e di architettura per la messa in pratica dei principi di modellazione generativa, applicandoli a casi reali.
FAQ
Quanto costa il corso?
Il prezzo del corso è di 500,00 € + IVA che potranno essere saldati in una soluzione unica. Nel caso di iscrizione di gruppo, potrà essere applicato uno sconto.
Cosa posso portare e cosa non devo portare all'evento?
Gli organizzatori forniranno computer con il software già installato. Nel caso vogliate portare il vostro computer, vi forniremo una versione trial da 90giorni di Rihnoceros e Grasshopper
Dove posso contattare l'organizzatore per qualsiasi domanda?
antonio@mandarinoblu.com
334 24 20 203
La mia registrazione o il mio biglietto è trasferibile?
Si, purchè venga comunicato il cambiamento entro 48 ore dalla partena del corso
…