rtheless, here is how to do that:
Volvox.gha contains the Instructions objects which are the default instruction available in the plugin
Volvox_Instr.dll has the abstract classes from which the gha instructions inherit
Volvox_Cloud.dll finally contains the GH_Cloud object which tells Grasshopper how to treat the geometry.
You have to reference all 3 of them to make this script work. (they should be in the place you've installed Volvox, GH libraries by default). Just copy paste it then into a VB scripting component.
'create 2 instructions - these classes are from the Volvox.gha library Dim in1 As New volvox.Instr_planeclip(plane.WorldXY) Dim in2 As New Volvox.Instr_RandomSub(0.5, 123) 'create 2 rhino pointclouds Dim pc1 As New pointcloud Dim pc2 As New PointCloud
'populate them with some points For i As Integer = -100 To 100 Step 1 pc1.Add(New point3d(10, 0, i)) pc2.Add(New point3d(0, 0, i)) Next 'execute the instructions onto the pointclouds. in1.Execute(pc1) in1.Execute(pc2) 'note the random subsampling instruction has the same seed in both cases, 'hence it will sift the points in the same pattern in2.Execute(pc1) in2.Execute(pc2)
'get the clouds out with the GH_Cloud class, 'so that Grasshopper understands it as geometry object a = New GH_cloud(pc1) b = new GH_Cloud(pc2)
…
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)…
Loop'. The fun part of the slower version is that you can see what it's doing while it's running. 'Fast Loop' gives no indication that it's working, so you want to test it with small numbers and be sure it's coded properly before bumping the iteration count up.
The GH profiler running the slow version showed between 1 and 1.5 seconds per loop, but the reality was more like ~10 seconds per loop toward the end of an 11 X 11 grid, or ~20 minutes total. It's easier to be patient because you know it's working.
The 'Fast Loop' finished the same grid in 1.6 minutes! An impressive improvement. I've been running it on a 30 X 30 grid (900 points) for ~23 minutes so far and see nothing yet. Not the ~12 minutes I had hoped for... Now 36 minutes on this loop for 900 points... hope it's not stuck. Not fast! Later - DONE!! Profiler says 59 minutes for 900 points but it was more like an hour and twenty minutes total. It succeeded, I have a single 'Closed Brep' from 900 extruded rings, baked to Rhino.
Another strategy to explore would be doing 'SUnion' on a smaller grid using the Anemone loop, then replicate it by moving it as needed to form a larger grid; then run the copies through another 'SUnion' loop. I went ahead and implemented that while waiting. It works and is fast! Started with 3 X 3 and ran the result again as 5 X 5 (9 X 25 = 225 total) in barely ~70 seconds!? Trying 36 X 36 now... 1,296 points appears to have succeeded in less than ten minutes! Though it seems to take quite awhile after the loop ends before control is restored to GH/Rhino. I'll let you do your own experiments and benchmarks.
I encapsulated the loop in a cluster called 'suLoop' (blue groups).
Internal of 'suLoop' cluster:
…
Added by Joseph Oster at 11:14pm on March 22, 2017
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.…
Return
End If
'
Dim ptlist As New list(Of Point3d)
Dim pn As point3d = p
ptlist.add(pn)
Dim k As Double = 1 / (4 * math.PI * (8.85 * 10 ^ -12))
Dim vvect As vector3d = New Vector3d(0, 0, 0)
For j As Integer = 1 To it
Dim fvect As New Vector3d(0, 0, 0)
For i As Integer = 0 To ps.Count - 1
Dim vtemp As New Vector3d(0, 0, 0)
Dim f As Double = 0
Dim val As Double = 1 - v(i)
vtemp = ps(i) - pn
Dim dist As Double = vtemp.Length
If dist < r Then dist = r
' LEY COULOMB
f = k * ((q * q * val) / (dist ^ e))
' LEY MODIFICADA
' f = k * ((q * q * val ^ e2) / (dist ^ e))
vtemp.Unitize
vtemp = vtemp * f
fvect = fvect + vtemp
Next
Dim avect As Vector3d = fvect / m
' MRUA
' vvect = vvect + avect * t
' pn = pn + vvect * t + 1 / 2 * avect * t ^ 2
'LINEAL
vvect = avect * t
pn = pn + vvect
ptlist.add(pn)
Next
a = ptlist
Inputs are 'p' as the point to move, 'ps' as a list of attractor points, 'v' as a list of charge values, 'r' as a minimum radius used for not ending up in a singularity, 'it' as number of iterations, 't' as the time increment in every iteration, the rest are related to physical properties that can be simplified.…
Added by Vicente Soler at 8:51am on October 10, 2010
ght way.
Line no1 and no.2 is the right way for point 0-6
Line no.3 for 7-8
Line no4 for 9-10
Stand 1-3
in the hole project i have 14 lines and 65 points,No number is identical, there is no pattern.
And if i change the beam distance i get more or less points, the lines stay at 14.
Is there a way to count it automatically, i don't want to do it with copy and paste and counting.
solution1 - Maybe that the point knows on which line it is located, or the nearest line.
solution2 - point 0 reads the movement to point 1 if it is the same direction of movement of a line it fits. Line1 = (x+0 y+1 z+1) = point 0 (x+0 y+1 z+1)
point 1 is (x+1 y+0 z-1) so it changes the direction. (i dont know if you can understand my thinking :D)
…
large scale prototyping techniques. The programme continues to build on its expertise on complex architectural design and fabrication processes, relying heavily on materiality and performance. Autumn DLAB brings together a range of experts – tutors and lecturers – from internationally acclaimed academic institutions and practices, Architectural Association, Zaha Hadid Architects, among others.
The research generated at Autumn DLAB has been published in international media – ArchDaily, Archinect, Bustler – and peer-reviewed conference papers, including SimAUD (Simulation in Architecture and Urban Design), eCAADe (Education and research in Computer Aided Architectural Design in Europe).
Autumn DLAB investigates on the correlations between form, material, and structure through the rigorous implementation of computational methods for design, analysis, and fabrication, coupled with analog modes of physical experimentation and prototype making. Each cycle of the programme devises custom-made architectural processes through the creation of novel associations between conventional and contemporary design and fabrication techniques. The research culminates in the design and fabrication of a one-to-one scale prototype realized by the use of robotic fabrication techniques, with the aim of integrating of form-finding, material computation, and structural performance.
The programme is structured in two stages:
PART 1 – participants are introduced to core concepts of material processes, computational methods and digital fabrication techniques. Basic and advanced tutorials on computational design and analysis tools are provided. The programme performs as a team-based workshop promoting collaboration, research and ‘learning-by-experimentation’.
PART 2 – participants propose design interventions based on the skills and knowledge gained during phase 1 and supported by scaled study models and prototypes. The fabrication and assembly of a full-scale architectural intervention with the use of robotic fabrication techniques will then unify the design goals of the programme.
Applications
1) A limited number of 10 places are available. To apply, please send a small portfolio (5MB) to the Visiting School Office.2) PARTIAL SCHOLARSHIPS ARE AVAILABLE. Please send a letter of intent and a small portfolio (5MB) to the Visiting School Office.3) As this programme has a limited number of places it requires a selection process, if you are offered a place on programme, the Visiting School Office will inform you of how you can complete the registration process.
The deadline for applications is 13 AUGUST 2021.
Eligibility
The workshop is open to current architecture and design students, PhD candidates and young professionals. Software Requirements: Adobe Creative Suite, Rhino 6. No prior knowledge of software tools is required for eligibility.
Fees
The AA Visiting School requires a fee of £975 per participant, which includes a £60 Digital Membership fee.Students need to bring their own laptops, digital equipment and model making tools.
…
error, but resetting the height to <100m should fix things.
The height of the night boundary reflects the diurnal pattern of the urban boundary layer (image below). During the day the solar shortwave radiation heats up the urban surface, mixes with the air above creating a tall boundary layer. During the night the surface cools down, the boundary layer becomes more stable, and it's height is reduced. So typical heights for daytime is ~ 1000m, and for nightime ~ >100m.
So increasing it by a factor of 8 to 10 is likely what is causing issues with the UWG calculation for you. I started a github issue here: https://github.com/chriswmackey/Dragonfly/issues/11 so that we can fix this typo. Also we should figure out why exactly the calculation is failing so that can potentially put an upper bound to the inputs or a better error message. Thanks for catching it!
Finding some reference data linking weather layers to urban typologies is a good question, I'd like to find some too. Perhaps Chris/Mostapha might be able to provide some? You can check out the following thesis [1],[2] that the UWG algorithm is based on, which references three case studies for Singapore (Punggol), Capitoul and Bubble:
[1] https://dspace.mit.edu/handle/1721.1/107347
[2] https://dspace.mit.edu/handle/1721.1/59107…