rves that "intersect" a plane placed on Z=6 above the first circle. I did this to have a collection of points from which to choose 3 and make a 3pt-circle.
[this second circle "fits" the catenary at a certain height, that's what I wanted to do]
Maybe it's obtuse but anyway that's the way I managed it.. I then used the "intersection" of the top circle with the original catenary curve to "split" the catenary into 2 parts, I then "Rail Revolution" the first part of it around the axis of the original circle, using the circle as a "rail", and I get a Brep surface.
It is a "open brep" surface, so now i'm having the problem of managing it if I want to subdivide it with Isotrim or other commands to control the number of subdivisions.
Is there a better way to go about this?
I am attaching the file.
About the image, I checked my code about 10 times to understand why it has those "lines" every 1 meter in the Z, and they already appear in the "rail revolution" component when it is visible, but in the "brep components" I can see the individual points along the rail curve.
I think this is what might be causing the brep to surface problem, but for the life of me I can't understand why the rail is not smooth and is "divided" into the 7 points instead of just one smooth revolution...
Thanks! :)
…
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)…
ells new products like the Firefly Interactive Prototyping Shield which mounts on top of your Arduino Uno and provides access to a number of useful input (ie. sensors) and output (ie. motors) devices. It includes features like:
Three linear slide potentiometers connected to analog pins 0, 1, and 2
Two-axis joystick connected to analog pins 3 and 4
Light sensor (photocell) connected to analog pin 5
Three push buttons connected to digital pins 2, 4, and 7
Red LED connected to digital pin 13
RGB LED connected to digital pins 3, 5, and 6
Two servo connections on digital pins 8 and 9
A connection to the Easy Stepper Driver (co-designed by Sparkfun Electronics and Brian Schmalz) to control stepper motors. The direction of the motor is controlled through digital pin 10 and the number of steps through digital pin 12
High-voltage MOSFET circuit capable of driving lights, valves, DC motors, solenoids, or anything else requiring higher voltage or current. The gate of the MOSFET is connected to digital pin 11 (PWM).
Some come take a look and let us know what you think!
…
eñadores, y creativos interesados en el aprendizaje de metodos avanzados de generación y racionalización de geometría compleja, y su implementación en distintas etapas del proceso de diseño.
Se abordaran los conceptos básicos para hacer frente a diversas problemas de diseño a través de la implementación de una serie de plataformas computacionales con el objetivo de construir un flujo de trabajo que permita optimizar proyectos de diversa escala y explorar esquemas geometricos complejos de manera rápida y eficiente.A lo largo del 6 dias trabajaremos con la plataforma de Modelado 3d Rhinoceros, el entorno de programación visual de Grasshopper y el motor de Renderizado de Vray.Estudiantes: $4,500.00Profesionistas: $5,500.00info+inscripciones:workshop@complexgeometry.com[044] 33 3956 9209[044] 33 1410 8975[044] 81 1916 8657
…
dellatore nurbs, Rhinoceros. Attraverso una serie di esercizi che si svolgeranno durante il corso, si spiegheranno i temi fondamentali che stanno alla base della modellazione generativa e del design parametrico.
Il corso è rivolto a chi ha già una familiarità minima con la modellazione attraverso Rhinoceros e vuole ampliare le proprie competenze verso il campo della modellazione parametrica e generativa, e si terrà da martedì 22.10.2016 a giovedì 24.10.2016 – dalle 10:00 alle 17:00.
Potete scaricare qui il PROGRAMMA DEL CORSO.
Il calendario dei corsi è consultabile qui.
VEGA Parco Scientifico TecnologicoVia della Libertà 12 – VeneziaEdificio Porta dell’Innovazione – Piano Terra
Per iscriversi al corso è necessario essere registrati al sito.Per tesserarvi al Fablab Venezia, diventare maker, usufruire dei vantaggi, clicca qui.
Le iscrizioni chiuderanno giovedì 17.11.2016.
Il corso ha un costo di 270,00 euro + iva (329.40) per i tesserati e convenzionati,per i non tesserati il costo sarà di 330,00 + iva (402.60) euro.
Vuoi risparmiare? Iscriviti entro tre settimane dalla data di inizio corso, usufruirai automaticamente dell’offerta “early bird” ovvero uno sconto del 20% sul costo a te dedicato.
Per iscriversi:
http://www.fablabvenezia.org/parametric-design-with-grasshopper/…
holes on each so speed increases). Zero radius circles are skipped.
The image dimensions in pixels are defined in small panels (X=485, Y=759) and used to calculate height/width ratio. That is used to define height based on the 'X' slider (500), which defines width overall.
The 'cell size' slider is also in units and determines resolution indirectly. For any given X value, increasing 'cell size' reduces the number of grid cells (resolution) and vice-versa.
Independent of other parameters, 'Isotrim (SubSrf)' splits the base surface into sub-surfaces, onto which the circles are projected. The 'SrfSplit' does the heavy lifting (can be SLOW!) and finally, 'Sort' is used to select the resulting surfaces that contain the holes.
Benchmarks:
X = 500, cell size = 10, 3161 circlesnine subsurfaces: 'SrfSplit' = 6.6 minutes, 'Project' = 13 secs.16 subsurfaces: 'SrfSplit' = 2.3 minutes, 'Project' = 17 secs.
X = 500, cell size = 5, 12542 circles (shown)35 surfaces: 'SrfSplit' = 30.6 minutes, 'Project' = 57 secs.
As noted before, a very long-standing, well-known bug in Grasshopper fails to save the Image Sampler component when I save a copy of your file. Very annoying, but there is a work-around. Copy/paste and connect the Image Sampler from the code you posted above into the place I reserved for it.
"Pro Tip": Always work at low-resolution until your algorithms are proven before cranking up to 10K+ geometry counts!
Attached file has low resolution settings with 'Project' and 'SrfSplit' (red group) disabled.…
having to deal with big data. i am about to release a version of OctopusE with 'explicit components', which expand some of the core functions of octopus into dedicated components. there, a new GH data container is introduced and used, called 'OctopusSolution', which stores a set of parameters, goal values, and metadata such as phenotypic shapes etc. i ll try to add a direct export to a container on the canvas.
> 2. firstly it is a lot easier to work with normalized parameter- and goal-values regarding the algorithms themselves. i could add the actual values to the solution-information, but secondly this would blow up the amount of data even more.. mostly it is the history which takes a lot of memory, and the actual values would almost double the data to be stored for most use cases.
> 3. i am not sure if i follow correctly, but you want to 'scroll' through the front? so one must give an objective dimension to sort the front, and by scrolling with the mouse wheel you would reinstate the solutions?
this might work fine for fast definitions, but there will be pain for more expensive problems.
what is there right now is the 'reinstate' function on the context menu of a solution,
and the mesh-display of the solutions points in the octpus viewport..
> 4. you should definitely be able to see the shapes, octopus in its current form just sets values, expires the solution and collects some values. no hidden stuff. but by default, 'minimize rhino on start' is set to true - because it can be a factor 10 speedup when rhino&GH do not have to update their UI.
best
Rob…
o IS NOT recommended at all (or buy a CRAY). There's ways to address this but we must spend some Skype time (it's a bit complex to explain here what instance definitions do and why we should use them - obviously only via code). I don;t get the whole orientation puzzle of yours as well: your 1M frames are placed anyway ... so what's the fuss about? Or you mean: find if the frames "point inside" and orient the profiles properly/accordingly? (that's very easy).
BTW: Using different (each other) frames for that scale is like tuning a Harley Davidson: pointless to the max. Using SOME variants (say 5 -10) makes "some" sense and makes the instance part of the equation peanuts stuff.
2. Your stuff displays this blank screen (zoom extends: trying to see some profiles):
this means: no data of yours can been used: Karma - what else? Maybe some Rhino glitz that one.
3. Added a proper profile variant for the templates (see 5) - see option.
4. Frames MUST been sampled into some DataTree NOT groups or cats or dogs or some other stuff.
5. Added a make templates option (works ONLY if the templates are pink). Additionally there's the usual virus (SardineVirus) implemented (see WARNING - don't take risks, he he).
Moral: I can't think any > can you?.
…
a line could be added to the top of the list...some thing like:
10 values inherited from 1 source
Expression: Abs(A)
1
2
3
4
5
Apologies in advance for my use of MS Paint.…