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!
…
io Arturo Degni
Il workshop introdurrà le nozioni base di Grasshopper approfondendo le metodologie della progettazione parametrica e le tecniche di modellazione algoritmica per la generazione di forme complesse. La didattica è organizzata secondo moduli che coprono gli aspetti più importanti del software e prevede lezioni frontali ed esercitazioni guidate.
Il corso è rivolto a studenti e professionisti con esperienza minima nella modellazione 3D e si articolerà in lezioni teoriche ed esercitazioni. Sarà rilasciato un attestato finale.
La nostra attività formativa nasce dalla volontà di promuovere le nuove tecnologie digitali di supporto alla progettazione e condividere il know-how maturato attraverso ricerca, realizzazioni, pubblicazioni, collaborazioni con le più importanti realta professionali ed accademiche a livello internazionale.
A>T è Authorized Rhino Trainer.
http://www.arturotedeschi.com/wordpress/?project=plug-it_grasshopper-livello-base…
of curved surfaces, its fabrication methods are still a challenge especially on the level of complex surfaces and large scale assemblies. Mathematical surfaces in general and hyperbolic paraboloids (Hypars) in particular embed neverending opportunities for planar construction techniques. The ancient surface of Hypars is one of the most interesting mathematical forms for architects from quantitative structural optimization to qualitative ornaments. Hypars have been used extensively in the works of avant-garde architects including: Gaudi, the Philips pavilion of le Corbusier, Shell structures of Felix Candela and Frei Otto tensile structures, as well as, many contemporary architects. Hypars workshop aims to develop the computational design techniques of complex organizations of hyperbolic surfaces from the structural to the ornamental scale in respect to the planar fabrication methods. The mathematical and geometrical qualities of ruled surfaces will be explored in parallel to material and assembly logic of planar elements for 1:1 prototype of an outdoor canopy in Alexandria. Geometrical properties of Hypars will be coded on the platform of Rhino and Grasshopper while the physical prototypes will be in wood and paper which offer an integrated and intuitive understanding of complex geometries and physical relationships. The workshop objective is to reconsider materials and fabrication as a design tool for architects. /// Application To apply, please follow this link to fill the application form https://docs.google.com/forms/d/1S2-7YNifUing8SVX3Iz9ArrgQgjIk77w9jzG70sIHv0/viewform /// Fees* 1700 EGP for students / 2000 EGP for graduates and young professionals * 20 % discount for early registration and payment before 22 nd of August 2014 more info on the workshop webpage: http://www.encodestudio.net/#!hypar/co9p…
tList2) End Sub '<Custom additional code> Function Network(ptList1 As list(Of On3dPoint), ptList2 As List(Of On3dPoint)) As OnLine Dim line2 As New OnLine Dim dist As Double 'variable to store distance between points Dim maxDist As Double Dim minDist As Double maxDist = 20 minDist = 10 Dim count1 As Integer count1 = ptList1.Count()'set length of list for loop Dim count2 As Integer count2 = ptList2.Count() Dim newPtList1 As List(Of On3dPoint) Dim newPtList2 As List(Of On3dPoint) newPtList1 = ptList1 newPtList2 = ptList2 ptList1.RemoveAll ptList2.RemoveAll For i As Integer =0 To count2 - 1 For j As Integer = 0 To count1 - 1 Dim pt2 As On3dPoint pt2 = newPtList2(i) Dim pt1 As On3dPoint pt1 = newPtList1(i) dist = pt2.DistanceTo(pt1) If (dist < maxDist & dist > minDist) Then line2 = New OnLine(pt2, pt1) ptList2.Add(pt1) Else ptList1.Add(pt1) End If Next Next Dim count As Integer count = ptList1.Count() If (count > 0) Then Call Network(ptList1, ptList2, lineNet) End If End FunctionWhat i have as input are two lists of points (the first one having n-items inside while the other one has only one starting point). It s supposed to work as a recursive function always returning one or more lines in the end.The error i m getting is because of the ptList1/ptList2.RemoveAll command.Does anyone have a clue why i can t remove the items from the lists? What i'm basically trying to do is just clean them of all content.I've attached the def with the code as well.Thank you in advance,Tudor…
ky.exe did not accept -p parameter and made empty sky.cal file.
----
Edit: solved run problem, Bee did not download OpenStudioMasterTemplate.idf
Get it here: https://github.com/mostaphaRoudsari/Honeybee/issues/119
Now get empty HDR:
C:\ladybug\prox\imageBasedSimulation>rpict -i -t 10 -vtv -vp 245.129 -226.458 20 0.405 -vd -0.549 0.656 -0.518 -vu -0.332 0.397 0.855 -vh 42.862 -vv 26.991 -v l 0 -vs 0 -vl 0 -x 800 -y 600 -af prox_RAD_Perspective.amb -ps 8 -pt 0.15 -pj 0.6 -dj 0 -ds 0.5 -dt 0.5 -dc 0.25 -dr 0 -dp 64 -st 0.85 -ab 2 -ad 1024 -as 175 -ar 150 -aa 0.200 -lr 4 -lw 0.050 -av 0 0 0 prox_RAD.oct 1>prox_RAD_Perspectiv e.unf rpict: 0 rays, 0.00% after 0.0000 hours rpict: skybright`c__ladybug_skylib_cumulativeSkies_SINGAPORE_SGP_SINGAPORE_SGP_1 : undefined variable rpict: 1020 rays, 4.91% after 0.0000 hours
----
Hi friends,
trying to get a cumulative sky image metric to run and encountered an issue with the image-based metrics component. It throws:
Runtime error (KeyNotFoundException): honeybee_materialLib Traceback: line 768, in main, "<string>" line 1442, in script
I guess this is some sort of setup issue on my end, or I messed up the definition? Any help appreciated.
Thanks,
Max
…
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.…
value=WINTERDESIGNDAY, in SIZINGPERIOD:DESIGNDAY=SINGAPORE ANN HTG 99.6% CONDNS DB ************* IDF Context for following error/warning message: ************* Note -- lines truncated at 300 characters, if necessary... ************* 53 SizingPeriod:DesignDay, ************* indicated Name=SINGAPORE Ann Htg 99% Condns DB ************* Only last 10 lines before error line shown..... ************* 57 23.5, !- Humidity Indicating Conditions at Maximum Dry-Bulb ************* 58 101133., !- Barometric Pressure {Pa} ************* 59 2, !- Wind Speed {m/s} design conditions vs. traditional 6.71 m/s (15 mph) ************* 60 320, !- Wind Direction {Degrees; N=0, S=180} ************* 61 0.00, !- Clearness {0.0 to 1.1} ************* 62 0, !- Rain {0-no,1-yes} ************* 63 0, !- Snow on ground {0-no,1-yes} ************* 64 21, !- Day of Month ************* 65 12, !- Month ************* 66 WinterDesignDay,!- Day Type
The relevant lines in the IDF file is shown below:
SizingPeriod:DesignDay, SINGAPORE Ann Htg 99.6% Condns DB, !- Name 23, !- Maximum Dry-Bulb Temperature {C} 0.0, !- Daily Temp Range {C} 23, !- Humidity Indicating Conditions at Maximum Dry-Bulb 101133., !- Barometric Pressure {Pa} 2, !- Wind Speed {m/s} design conditions vs. traditional 6.71 m/s (15 mph) 320, !- Wind Direction {Degrees; N=0, S=180} 0.00, !- Clearness {0.0 to 1.1} 0, !- Rain {0-no,1-yes} 0, !- Snow on ground {0-no,1-yes} 21, !- Day of Month 12, !- Month WinterDesignDay,!- Day Type 0, !- Daylight Savings Time Indicator WetBulb; !- Humidity Indicating Type ! SINGAPORE_SGP Annual Heating 99%, MaxDB=23.5°C SizingPeriod:DesignDay, SINGAPORE Ann Htg 99% Condns DB, !- Name 23.5, !- Maximum Dry-Bulb Temperature {C} 0.0, !- Daily Temp Range {C} 23.5, !- Humidity Indicating Conditions at Maximum Dry-Bulb 101133., !- Barometric Pressure {Pa} 2, !- Wind Speed {m/s} design conditions vs. traditional 6.71 m/s (15 mph) 320, !- Wind Direction {Degrees; N=0, S=180} 0.00, !- Clearness {0.0 to 1.1} 0, !- Rain {0-no,1-yes} 0, !- Snow on ground {0-no,1-yes} 21, !- Day of Month 12, !- Month WinterDesignDay,!- Day Type 0, !- Daylight Savings Time Indicator WetBulb; !- Humidity Indicating Type
It seems that there is an empty line after the line for "!- Humidity Indicating Type" field, and nothing is specified for "! SINGAPORE_SGP Annual Heating 99%, MaxDB=23.5°C" field.
May I ask why this happens and how to correct the error?
Thank you very much!…
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…