s, each made from two Nurbs curves, each with different surface properties.
Curves A1 and A2 have 2 control points:
startpoint and endpoint
Curves B1 and B2 on the other hand were drawn with 6 control points each.
What's more, those point's aren't equally distanced from one another.
The lofts inherit the position of control points of the profile curves.
The distribution of control points in the loft direction is uniform.
So no suprise here:
You can think of Nurbs curves as rubber bands and of Nurbs surfaces as rubber sheets. The areas with less control points would correspond to streched rubber.
Now lets imagine you take an A4 piece of rubber, lay in on a table and draw equally distanced lines on it. When you strech it ununiformally - the distances won't stay equal anymore.
Returning to your first post:
The Divide Surface component operates on u,v values which you can imagine as dimensions of the rubber sheet in relaxed state.
So the result you got was indeed an equaly divided surface, only in the so called "parameter space" of the surface, which doesn't always correspond to the xyz space.
There are methods to divide curves and surfaces in equal distances in the way you want it. For starters check out the Evaluate Lenght component.
I think that's enough teory for today. Have fun!
JJ…
s on a building. It's been since then reviewed and improved by someone who knows what she's doing.
BUT I still have 2 problems that I want to solve because I don't understand why.
- why after a flip the offset side of the surface doesn't change ?
Generally how to ensure that all my breps will offset outwards the building....?
(I have around 20 of them for the whole building as I have various densities, one brep=one density)
- why some of the louvers always go the wrong way ? It's very time consuming because my boss makes me change them every week and and I have to remove/redraw these one by one...
And for every brep, I have to re-check and re-enter all the louvers dimensions, invert them or put them to negative values, untill most of them are ok on a given brep...
Generally speaking, how to force a sweep to be rotated always in the way we want, without having to change the values to negative...?
Hope someone can give me a direction ! See files attached. Thanks
fanny…
sing 1. the distance to their respective closest points and 2. the strength of a field at the regular grid points when the origins of the objects are given a charge.
I thought the problem was referencing the lists correctly against one another and I have tried to graft the branches at various places in the definition (I am not sure where the correct place to graft is) and to sort the lists using each other as a key (My attempts to use a pathmapper were also unsuccessful).
These two problematic options are grouped in red. The rest of the definition seems to be working ok.
What is the best of the two methods to use and how can I solve it?
Cheers,
Brian
…
strictly with code (BTW: did you crossed Rubicon?).
1. See this: Imagine a curve (say a "rail") that is divided N times and then circles are created with random radii. Circle control points (9, that is) are sampled (obviously) into a DataTree where branches are the rail divisions. Let's call the control points: "start" seed points.
2. Imagine a capability ... that stores all these (the original "seed" control points) into a "parameter" and then each time that a change occurs to them (varying the x/y, on a per point on a per branch on a per plane basis[that provides the Z]) stores the "modified point" into the parameter (at the same index with the old: meaning "deleting" the old) ... and then some other code gets that data and makes curves and lofts them. Reset means: sample again the original "seed" points into that "parameter". Closing are reopening the definition has no effect: the lofted stuff is derived from the (internalized, so to speak) modified points (from the "parameter").
3. A variety of "automation" is available: for instance if you jump from branch to branch and from item to item the value of the selected point is inquired and the sliders that control the new x/y are "set" to 0,0 (meaning no change - yet) values. There's mo "store" mode: it works automatically as far as you modify points or you hit the reset button
4. This does that (only achievable with code):
5. Obviously points can been replaced with anything ... and thus ... we can individually modify items in collections ... and forget for ever attractor points and all that (OK where appropriate, he he).
I'll post 30 similar examples soon in the forthcoming mother of all threads: "GH goes (at last) interactive". Watch this space.
BTW: study the "animation" where points with index 6 are "sequentially" modified. I've added some delay in order to give you time to get the gist of the whole thingy.
best, Lord of Darkness
…
ed to develop a component that reads data from a Tracking Server we have built here in our lab, on top of VRPN Server. We developed a client library to communicate with this server and to read data from different devices through the server, making our life easier. The fact is that I need to update data received from a wiimote for example (at a regular time interval) and output this data to feed other components. Our first approach was to test the inclussion of that library into the context of Grasshopper and it worked, but just and only for the first time the component is created of course. Now the problem is to call this update function inside grasshopper multiple times and update the output. I'm new to grasshopper component coding so, it would be nice if I can get some response of an expereinced developer or at least somebody that have developed something like the example I'm exposing here. Some code is posted below to clarify what I'm saying.
...
using VRPNClassLib; //This is our class lib.namespace MyComp{ public class MyComp : GH_Component { private VRPNController controllerWiimote = new VRPNClassLib.VRPNController("WiiMote0@localhost"); private Wiimote wii = new Wiimote();
...
private double rotX, rotY, rotZ; public MyComp() : base("Al required params ok") { try { controllerWiimote.addDevice(wii); } catch (Exception e) { throw new Exception("No wii controller attached to the PC: -->" + e.Message); } }
...
protected override void RegisterOutputParams(GH_Component.GH_OutputParamManager pManager) { pManager.Register_DoubleParam("Pos X", "X", "Wiimote X"); pManager.Register_DoubleParam("Pos Y", "Y", "Wiimote Y"); pManager.Register_DoubleParam("Pos Z", "Z", "Wiimote Z"); } protected override void SolveInstance(IGH_DataAccess DA) {
// If execute MainLoop() here for the first time it works of course, but I need to continuously read data from wiimote, how do I do that
MainLoop(); DA.SetData(0,rotX); DA.SetData(1,rotY); DA.SetData(2,rotZ); }
protected void MainLoop() { controllerWiimote.UpdateData(); //this is the function that updates device data rotX = Math.Round(wii.getSensorRot1(),2); rotY = Math.Round(wii.getSensorRot2(),2); rotZ = Math.Round(wii.getSensorRot3(),2); }
public override Guid ComponentGuid { //Genere el GUID del componente get { return new Guid("8F9858D8-F18E-45f2-90EC-CC23523ACC4F"); } } ... }}
So any sugestions are welcome.
Cheers :)…
cribes a set of machine movements in X, Y and Z (Z being Pen Up and Pen Down) directions. It very closely related to G-code in this way - just slightly more simple than G-code overall.
For tool selection you use the Select Pen - SPx - command, x is the number of the pen you are using. As I'm using a vinyl cutter without a pen/tool changer I just use SP1 in the file header/ini of the cutter.
Without knowing the full spec of your machine it is hard to say for certain BUT all of my experience with CNC machines - of all sizes and spec levels - the actual control files are pretty much the same. Very simple text based HPGL or G-code text files run all motion control - even on things like 7 axis robot arms etc. For plotting I'd expect you'd be able to get a usable HPGL/PLT file without a lot of work - its just a matter of matching the file to what the machine is expecting.
To answer your question about getting the file to the printer its maybe best to explain it this way: there are two parts to this project1/ Create the correctly formatted text/hpgl/plt file ready to send to the printer2/ Send the file to printer
For part 1/ the procedure is:
Select the curves you want to printConvert the curves into a set of pointsFormat these points into HPGL Save this HPGL as a text file
For 2/ we need a way to stream the text file to a printer port
To do this I've used an old dos command line technique that allows allow you to 'copy' a text file to a printer LPT or COM port:
copy /b c:\spool\ini.plt LPT1
Type the above into a DOS command line and it will send a text file called ini.plt to the printer on LPT1 port. As you'll see in my attached code I use os.system calls in my python code to send files when needed.
So your original code was doing some strange things with the conversion from curves to points. Lines/Polylines were OK - with the code just using the line end points. For curves and polycurves the code code was exploding these into segments and then dividing into set of points. However this led to two issues: - curves that started off as closed polycurves would end up being plotted as open curve segments - which is not very good for a cut file and not very smooth for a plot file.- the division of the curves to points was by distance - and if this wasn't an exact division of the length of the curve the end point would not match up with the next line - again not ideal for a cutting file which needs to be a closed curve.
To solve the above I changed to using rs.ConvertCurveToPolyline - with the tolerance set to match the HPGL resolution of 0.025mm - this converts all curves needed to plot to polylines, leaves everything closed and ends points line up perfectly.
I had one other problem with my setup - I ran into a file size/curve number/plotting points upper limit. A small number of curves would cut/plot fine, however at a certain number in one file the print driver would throw an error and the plotter would not even start plotting the file. I could not work out where is the system this limit was being imposed. The current working version of my code is attached - it gets around this file size limit by creating a separate print file for each curve required and sending them to the plotter in sequence. Not as completely tidy as I'd like as it flashes up a cmd window on every loop - but plots/cuts are perfect.
The final 'nice touch' for the project is I've created a custom tool bar button to run the script - all I have to do to cut a file is hit the button on the tool bar, select the curves and hit enter = SO EASY!
I've attached my latest code, a sample HPGL file to plot a rectangle, and a screen shot of setting up the custom toolbar button.
Cheers
DK…
gaps between each other.. If you use more points and divide octagons list by some distance-to-point parameter, so each tip has a certain number of curves assigned, you'll get groups of Breps (each group extruded to one point) that will overlap each other or have gaps between each other, although inside of each group everything will work correctly.. If it's ok and you don't need every surface to touch its neighbor correctly, then it's quite simple...
...but I think it's not the right way...
..to create irregular distribution of geometry between 2 surfaces you can combine domain tools (Math tab) and morphing tools (Transform tab)... I created a simple subdivision definition - you can control division by using graph mappers... you can also try other types of graphs..
..so you don't use control points, but domains to map extruded octagons to surface...all neighboring surfaces will stay connected... but there is also a tiny problem - surfaces won't be planar...
...as usual with GH- it's just one way among many others.. you can subdivide surface by different parameters like sun vector, bitmaps, curve or point attractors, static loads....it's not that simple though...maybe I'll come up with some smarter solution later..
p.s. I used mesh geometry, because it's much faster to morph.. if you need a rhino surface, there's a note in the file, that will tell you how to morph it..…
1. follow the steps that David suggested.
2. When you try to download the GH from http://www.grasshopper3d.com, if it downloads as .rhi file again, follow the following instruction:
Right click on .rhi file then "Open with" and browse for the "rhinoexec.exe" in C:\Program Files\Rhinoceros 5 (64-bit)\System\x86.
As soon as you click on OK. it will run the GH installation and will say that GH was successfully installed, but then when I opened Rhino 5, even though the 0.9.0061 folder was in the previous location:
C:\Users\naciem\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\Grasshopper {..........}\0.9.61.0
my GH was not installed in Rhino 5 and I had to install it manually by:
1. Type "PluginManager" command in Rhino 5
2.Click on "Install" and browse for "GrasshopperPlugin.rhp" file in C:\Users\naciem\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\Grasshopper {..........}\0.9.61.0
And now GH 0.9.0061 seems to be installed and working.
I hope this helps!
Thanks,
Naciem
…
nk the the US Department of Energy's MidriseApartment template that Honyebee uses is not supposed to include hot water in the equipment loads (equipment loads = 3.875 W/m2). However, even for residential, hot water typically makes up a relatively small portion of the building energy use (and internal space gains) such that it's usually ok to leave it out of a full building energy model and model it separately. So I would recommend using the Ladybug hot water components for now or (if you really need the hot water system in your energy model) build the hot water system in OpenStudio after exporting from honeybee.
As for heat recovery, given that Abu Dhabi never gets that cold, regular-old sensible heat recovery is likely not going to have a large effect. You want to make sure that you use an enthalpy wheel (set the heatRecovery on the airDetails to 2) and this will ensure that both latent and sensible heat is recovered. As a result, you will save a lot on the cooling energy because enthalpy wheels will ensure that the incoming air does not have to be dehumidified as much. Also, enthalpy wheels generally have a higher recovery effectiveness than most sensible heat recovery systems so you can set this as high as 0.7 like so:
The COP is ignored when using ideal air systems and the "Assign HVAC System" should give you a warning about this.
-Chris…
about in the levels there is on average 3 floors per segment). -(Each segment will have a Rib around it)
2) - From the Curves I used the "Divide array of curves" command from the Panelling tools plug-in and got my self a load of Points divided correctly to what I need my Diamond shape dimensions to be.
3) - Then Used the Panelling tool to create my Diagrid which works OK, but not perfectly, it also doesn't let me offset the middle of each Diamond shape and remove the inside So I can then extrude the frame outwards...The far right component shows the end result, see how it miss's out a load of Diamonds.
So What I want to Do from using Grasshopper is using the Line work, I want to create the Diamond Shapes, we will call that Glass, THAT'S ONE DONE,
I then Want GS to create me a separate component of that glass, offset it inwards by X amount, remove the inside of each Diamond, and extrude it all outwards to give it a thickness of my choosing, We will call that TRUSS WORK. - Can Anyone point me in the right direction?
[URL=http://img529.imageshack.us/i/example011111.jpg/][IMG]http://img529.imageshack.us/img529/6290/example011111.jpg[/IMG][/URL]
…