ssembly/component actually means ... until they get hired in some practice that knows a thing or two on that matter.
BTW: This is a cliche (used for classes in programming) but ... Imagine a cookie cutter (the instance definition) that provides us with cookies that we use in some Rhino document. Chances are that some sort of transformation is used (otherwise the whole thingy is paranoid: cookies stacked each other > why bother?). Now ... we have some cookie made from the cutter and information about where to put the thing. Meaning that the trans matrices are stored and (obviously) used in order to put the #^%# thing in the right place... blah, blah (this answers to the mirror question? eh?).
But there's bad news as well : C# thingies that do something other than Academic ... er... hmm... are classified as internal in my practice (for more than obvious reasons: because they can arm a pro with "some" weaponry, kinda like a proper Glock 40 Gen4, he he).
Thus I'm in a rather delicate position right now (notice that I haven't posted anything related with management of instance definitions: and this is a bit more complex than it appears on first sight).
I'll see this w/e what can I do on that matter i.e. removing a lot of "sensitive" stuff and making some "entry level" C# for this case of yours; but all the WOW things would be MIA. …
ack to .ghx?
This is in relation to a discussion I've been having with David Rutten & Scott Davidson about GH consuming memory in a relatively large GH definition (~. I think what I've learned from this is that one should limit the size of the GH file, or put some incremental stops in the definition to limit the length of calculations that it runs at once. Is this a valid conclusion?
The GH file we're talking about is 7Mb & the Rhino file is about 120Mb, but when working w/ the GH def. I try to only keep about 2 curves turned on.
Here's a summary of the discussion:
Hi Mike,thanks for sending it over. I've been fiddling with the file for about 10 minutes and it climbed from 1.7 GB to 1.9GB, but then I've been switching previews on which means more meshes get calculated so you'd expect a higher memory consumption. It is possible we're leaking memory, but if you're working for hours on end, memory fragmentation might also explain part of the increase. Basically, memory gets fragmented just like disks get fragmented after prolonged use, difference is that memory cannot be defragmented unless you restart the application and allow it to start with a clean slate. I'll try and find any leaks we may have missed in the past.Goodwill,David
──────────── David Rutten
On 09/03/2011 06:19, Mike Calvino wrote:
Thanks very much David for the quick response. I've attached the files zipped. I can't figure out what's doing it. After working in the file for awhile, the memory usage in the Windows Task Manager climbs . . . it's gotten to 1.57+Gb before I exited GH & Rhino5Wip & let it dissipate, then restart & work for awhile before it does it again. It probably takes like 4 or 5 hours before it gets that high. That's the highest it's gotten, & that only happened while I was working in a Rhino file that had all of the elements baked into it - turned off at least, but it still climbed to 1.57+Gb. It seems to climbs when you work in the file & move around in both the GH def. & the Rhino file. Like turn on a few of the Extr components at the right end of the "StandareRibExtuder" groups, you can watch the MemUsage go up, but when you turn them off, it does not go down. - goes up fast at this point. Maybe I need to figure out how to do the definition with fewer components, I'm sure that's part of it, but I must confess, I think I'm still early on in the learning curve.I really hope that this is not operator error on my part & I do apologize up front if it is. I have done a disk cleanup, I have tried excluding .3dm & .ghx files from my NOD32 antivirus, no change. I hope you can find something.Let me know if you have any trouble with the files.See if you find anything & please let me know . . . thanks!Cheers! --Mike CalvinoCalvino Architecture Studio, inc.www.calvinodesign.com
…
: ----------------------------------------------------------------------------------------------
1)
Hi Clemens I've analysed a plate structure using Karamba and wanted to do a convergence analysis on results computed as a function of the number of elements.
Now, when strictly looking at the result magnitudes of internal energy (IE) and maximum displacement (w_max), it's acceptable, that their relative deviations are very small. But I cannot explain the tendencies of their graphs. From what I know, FEM should always compute underestimated results when compared to analytical solutions. So I don't understand why both the IE and w_max seem to be decreasing for an increasing number of elements.
But my main concern is the behaviour of the peak moment, it seems to be simply hill climbing untill suddenly a singularity kicks in. I initially wanted to use the peak moment as a fitness value for optimisation, but with this behaviour, I don't think that would make sense. I've attached my GH file as well.
It would be much appreciated if you could enlighten me on these subjects. Cheers Daniel Andersen
2)
Hi Daniel,
I could not run your definition because I have not all the plug-ins installed that you use.
You are basically right that the displacement should increase with a finer mesh. However the result of the shell analysis also depends on the shape of the triangles (well formed vs. very distorted). In order to test this, I think it would be interesting to use a very simple example (e.g. rectangular plate with one column) where you can easily control mesh generation. Would you like to start a discussion on this in the karamba group at http://www.grasshopper3d.com/group/karamba?
It is not a good idea to use the bending moment at a singularity for optimization because the result will be heavily mesh dependent. Also real columns do have a certain diameter and modeling them as point supports introduces an error.
Best,
Clemens
3)
oh, and by the way!
Here's some relevant literature on handling peak moments: https://books.google.dk/books?id=-5TvNxnVMmgC&pg=PA219&lpg=PA219&dq=blaauwendraad+plates+and+fem&source=bl&ots=SdDcwnrSA1&sig=6HulPmKNIhqKx4_rGxitteMC4CU&hl=da&sa=X&ved=0CDEQ6AEwA2oVChMIg66k0LPaxgIVgY1yCh1KPAeY#v=onepage&q=chapter%2014&f=false (Blaauwendraad, J., 2010. Plates and FEM : Surprises and Pitfalls, see Chapter 14) It would be great if a feature dealing with peak moments could be incorporated in Karamba. In my work, I ended up exporting my models to Robot in order to verify the moment values. Best, Daniel
4)
Hi Daniel,
thank you for your reply and the link to Blaauwendraads excellent book!
At some point I hope to include material nonlinearity in Karamba which will help in dealing with stress singularities.
If you want you could open a discussion with a title like 'moment peaks in shells at point-supports'. Then we could copy and paste the text of our conversation into it.
Best,
Clemens
----------------------------------------------------------------------------------------------…
rmation?" I know that this can already be accomplished using the brilliant Kangaroo plugin, but I wanted a simpler and faster (yet still accurate) single component that could replicate this unique curve using a variety of inputs: the length of the rod/wire, the width/distance between the endpoints, the height of the bend, and the tangent angle at the start. I also wanted make the unknowns (such as height if only length and width are known) easily accessible for plugging into additional components.
The resulting script, being an all-in-one solution, is somewhat unwieldy, but it could easily be broken down into smaller components (custom .gha's which I don't have the ability to code). If someone wants to tackle this, please do! I'm not an expert coder by any means, and as this was only my second time diving into Grasshopper scripting, if the script seems somewhat strange, that's probably why. I did try to comment the code pretty well though. Here's the full description:
--------------------------------------------------
DESCRIPTION: This beast creates the so-called 'elastica curve', the shape a long, thin rod or wire makes when it is bent elastically (i.e. not permanently). In this case, force is assumed to only be applied horizontally (which would be in line with the rod at rest) and both ends are assumed to be pinned or hinged meaning they are free to rotate (as opposed to clamped, when the end tangent angle is fixed, usually horizontally). An interesting finding is that it doesn't matter what the material or cross-sectional area is, as long as they're uniform along the entire length. Everything makes the same shape when bent as long as it doesn't cross the threshold from elastic to plastic (permanent) deformation (I don't bother to find that limit here, but can be found if the yield stress for a material is known).
Key to the formulas used in this script are elliptic integrals, specifically K(m), the complete elliptic integral of the first kind, and E(m), the complete elliptic integral of the second kind. There was a lot of confusion over the 'm' and 'k' parameters for these functions, as some people use them interchangeably, but they are not the same. m = k^2 (thus k = Sqrt(m)). I try to use the 'm' parameter exclusively to avoid this confusion. Note that there is a unique 'm' parameter for every configuration/shape of the elastica curve.
This script tries to find that unique 'm' parameter based on the inputs. The algorithm starts with a test version of m, evaluates an expression, say 2*E(m)/K(m)-1, then compares the result to what it should be (in this case, a known width/length ratio). Iterate until the correct m is found. Once we have m, we can then calculate all of the other unknowns, then find points that lie on that curve, then interpolate those points for the actual curve. You can also use Wolfram|Alpha as I did to find the m parameter based on the equations in this script (example here: http://tiny.cc/t4tpbx for when say width=45.2 and length=67.1).
Other notes:
* This script works with negative values for width, which will creat a self-intersecting curve (as it should). The curvature of the elastica starts to break down around m=0.95 (~154°), but this script will continue to work until M_MAX, m=0.993 (~169°). If you wish to ignore self-intersecting curves, set ignoreSelfIntersecting to True
* When the only known values are length and height, it is actually possible for certain ratios of height to length to have two valid m values (thus 2 possible widths and angles). This script will return them both.
* Only the first two valid parameters (of the required ones) will be used, meaning if all four are connected (length, width or a PtB, height, and angle), this script will only use length and width (or a PtB).
* Depending on the magnitude of your inputs (say if they're really small, like if length < 10), you might have to increase the constant ROUNDTO at the bottom
REFERENCES: {1} "The elastic rod" by M.E. Pacheco Q. & E. Pina, http://www.scielo.org.mx/pdf/rmfe/v53n2/v53n2a8.pdf {2} "An experiment in nonlinear beam theory" by A. Valiente, http://www.deepdyve.com/lp/doc/I3lwnxdfGz {3} "Snap buckling, writhing and Loop formation In twisted rods" by V.G.A. GOSS, http://myweb.lsbu.ac.uk/~gossga/thesisFinal.pdf {4} "Theory of Elastic Stability" by Stephen Timoshenko, http://www.scribd.com/doc/50402462/Timoshenko-Theory-of-Elastic-Stability (start on p. 76)
INPUT: PtA - First anchor point (required) PtB - Second anchor point (optional, though 2 out of the 4--length, width, height, angle--need to be specified) [note that PtB can be the same as PtA (meaning width would be zero)] [also note that if a different width is additionally specified that's not equal to the distance between PtA and PtB, then the end point will not equal PtB anymore] Pln - Plane of the bent rod/wire, which bends up in the +y direction. The line between PtA and PtB (if specified) must be parallel to the x-axis of this plane
** 2 of the following 4 need to be specified ** Len - Length of the rod/wire, which needs to be > 0 Wid - Width between the endpoints of the curve [note: if PtB is specified in addition, and distance between PtA and PtB <> width, the end point will be relocated Ht - Height of the bent rod/wire (when negative, curve will bend downward, relative to the input plane, instead) Ang - Inner departure angle or tangent angle (in radians) at the ends of the bent rod/wire. Set up so as width approaches length (thus height approaches zero), angle approaches zero
* Following variables only needed for optional calculating of bending force, not for shape of curve. E - Young's modulus (modulus of elasticity) in GPa (=N/m^2) (material-specific. for example, 7075 aluminum is roughly 71.7 GPa) I - Second moment of area (or area moment of inertia) in m^4 (cross-section-specific. for example, a hollow rod would have I = pi * (outer_diameter^4 - inner_diameter^4) / 32 Note: E*I is also known as flexural rigidity or bending stiffness
OUTPUT: out - only for debugging messages Pts - the list of points that approximate the shape of the elastica Crv - the 3rd-degree curve interpolated from those points (with accurate start & end tangents) L - the length of the rod/wire W - the distance (width) between the endpoints of the rod/wire H - the height of the bent rod/wire A - the tangent angle at the (start) end of the rod/wire F - the force needed to hold the rod/wire in a specific shape (based on the material properties & cross-section) **be sure your units for 'I' match your units for the rest of your inputs (length, width, etc.). Also note that the critical buckling load (force) that makes the rod/wire start to bend can be found at height=0
THANKS TO: Mårten Nettelbladt (thegeometryofbending.blogspot.com) Daniel Piker (Kangaroo plugin) David Rutten (Grasshopper guru) Euler & Bernoulli (the O.G.'s)
--------------------------------------------------
Edit: More on the math behind this here.
Cheers,
Will
…
Added by Will McElwain at 4:08pm on February 26, 2014
nd then writes some data to a certain range of cells, but currently I am missing the small bit of code to save the file and then close that certain excel workbook. One other thing to note is that I'm writing into another excel file concurrently from another set of VB componenets, which must remain open, so I don't want to save & close that file. - Only the file which I'm writing data to from this VB component needs to be saved & closed. Any help would be appreciated.
Here is the current bit of code:
Rhino.Runtime.HostUtils.DisplayOleAlerts(False)If _write = True Then'Dim val As DoubleDim row As IntegerDim column As IntegerDim Pole As StringDim Angle As DoubleDim cellValue As StringDim rowstart As Integer
Dim xlApp As ObjectxlApp = System.Runtime.InteropServices.Marshal.GetActiveObject("Excel.Application")Dim wb As Object = xlApp.Workbooks.Open("W:\Bay Bridge Aiming\Knuckle Plate Aiming\Re-work_Field-Aim_20m.xlsx")Dim sheet As Object = wb.Worksheets("Factory-Aim")
rowstart = 0
Dorowstart += 1cellValue = sheet.cells(rowstart, 1).valueLoop Until cellValue = ""
row = rowstartcolumn = 1For Each Pole In Pole_IDsheet.Cells(row, column).value = Polerow = row + 1Next
row = rowstartcolumn = 2For Each Angle In KnucklePlt_Anglesheet.Cells(row, column).value = Anglerow = row + 1Next
End IfA = 0
Much thanks,
Joel…
Added by Joel DeBoef at 12:29pm on October 23, 2012
work when i finished, saying as follows:
Runtime error (MissingMemberException): walker instance has no attribute 'x' Traceback: line 21, in step, "<string>" line 34, in script
the code is as follows:
import rhinoscriptsyntax as rs import random as r
r.seed(seed)
#class class walker: def _init_(self): self.x = 0 self.y = 0 def point(self): shape = rs.AddPoint(self.x, self.y, 0) return shape def step(self): choice = r.randint(0,3) if choice == 0: self.x = self.x + 1 elif choice == 1: self.x = self.x - 1 elif choice == 2: self.y = self.y + 1 else: self.y = self.y - 1
#time w = walker()
pList = [] for t in range(time): w.step()
pList.append(w.point()) a = pList
can anyone help me figure it out?
thanks
file attached
grasshopper version 0.9.0064…
Added by Chunwei Zhang at 3:37am on January 29, 2014
rk for Rhino, this is a first go at a very simple tool to get an idea of how fast different computers are at performing the sort of calculations used in Kangaroo, with the aim of informing those buying or upgrading their machines.
If you could take a couple of minutes to download and run this definition (after closing other running applications), then post here the result and your PC specs, hopefully we can start building a basic picture of what effect different hardware really has on the speed Kangaroo runs.
Most of the information can be found in the System page of Control Panel.
RAM speed can be checked in your BIOS, or with a tool like CPU-Z (note that the reported frequency from this should be doubled to get the actual RAM speed rating - eg if the frequency is 800MHz you should write DDR3-1600. It's confusing I know - see some discussion of this here), or by searching online for the specs of your PC model number.
This definition is purely testing the speed of the internal physics calculation, not display, so graphics-cards are irrelevant.
For now this is just to get a single general measure of overall Kangaroo speed, but it might also be interesting later to run a variety of tests to see how the speed varies with the size and complexity of simulation.
Of course a way of benchmarking general Grasshopper performance would be very nice to have as well, but would involve a lot more variables, and I'd be interested if anyone has ideas about how that could work.
Note - I posted a couple of versions of this earlier with various errors that were causing incorrect results. If you downloaded the earlier KangaMark01.gh or KangaMark02.gh file, please disregard that and any results from it and use the one posted here below:…
i' an integer slider, 0 to 3, to choose any edge as the pivot axis (vertical or horizontal). Then I used 'PFrames' on that edge and figured out a way to align them using the surface normal vector at each point ('Srf CP' and 'EvalSrf'). I had to use the base surface for that instead of the subsurfaces because surface normals are "messed up" at the edges.
Now it's very easy to have as many stations for 'Sweep 1' as you want, which makes it possible to have full length louvers without torsion wreaking havoc. I replaced my edge slider with a feature to easily switch between Vertical and Horizontal, changing the UV dimensions as well as which edge (left or top) is used for the sweep rail.
There is a flaw in "louver width", causing the louvers to overlap slightly. I understand why, and as I write this, an idea of how to fix it occurs to me... But I'll leave that alone for now.
I left my "Tree/List Viewer" tool in place this time so you can see how I use it. Three copies in this case, the second and third controlled by 'path idx' and 'list idx' sliders in the first one. Yellow is the 'PFrame' tree, cyan is the surface normal frame and black is the aligned frame ('Align' output). Being able to visually inspect geometry like that is really important for me in understanding GH!
There is still room for improvement...
Aloha…
repost your questions. See my answers below:
Hi Santiago,
I have watched your tutorial and this surface panel option has grown the power of Skindesigner by manifolds. Albeit that, there are two aspects on which I'd ask for your input:
1. The panel adopts the shape of the host surface but is there any way to restrict the panel dimensions (W*H) to a specific maximum number?
2. I see that now parameters (minimum panel height and width) do not work. And only the Minimum area can control the panels. Is there any way that I can control the panels by their minimum height and width?
I actually want to cover the maximum surface with the panels within certain dimensions of the panels.
Is that possible through Surface Panel Mode?
Thanks a lot!
That is not possible in SkinDesinger in Surface Panel Mode, just because this would require to cover a lot of use cases (ex. you need to handle width-height based on any given plane). The approach here is to leave all that to be handled before using SkinDesinger through other tools that can already handle that effectively.
For your case, you basically subdivide the surfaces using grasshopper components to meet those requirements and then send them to SkinDesinger. I did a quick search and I found this link for instance:
https://www.grasshopper3d.com/forum/topics/divide-a-surface-by-a-specific-lengthI
Once you have the resulting surfaces you can send them to SkinDeisgner. Hope that makes sense.
…
he Cordyceps. Maybe some of you find this helpful/useful.
So basically, the Cordyceps is a physical module with 4 knobs and 1 slider. The knobs give an output between 1 and 1000, while the physical slider outputs 0-359. And of course, for this physical module I wrote a plugin to communicate with it. The knobs are intended to be the variables that modifies the design, while the physical slider is intended to be connected to the camera component.
Here I will put up "the recipe" for all to make their own module. You will be able to download the plugin as well.
Please send me a message if you want the 3D-files for the knobs, the box and slider knob. They've been made to directly 3D-print.
Plugin:
https://github.com/zakadjeb/Cordyceps/blob/master/Cordyceps/Cordyce...
Code for Arduino IDE:
https://github.com/zakadjeb/Cordyceps/blob/master/Arduino/_Arduino_...
What you need:
1x - Arduino (Leonardo, UNO or whatever)
4x - Potentiometers
1x - Sliding potentiometer
1x - Breadboard
Bundle of jump wires.
1. So, a potentiometer is a variable resistor, which is basically a component that changes the resistance between the voltage and the ground.
If A is supplied with 5V then B must be connected to Ground. The W will give "read" the resistance, and thus should be placed in Analog input (A0-A5) on the Arduino. The slider potentiometer works the same way.
2. Now connect the 4 pots to each their Analog input. The slider is supposed to be in A4. So to make sure:
A0: Knob1
A1: Knob2
A2: Knob3
A3: Knob4
A4: Slider
3. Now it's time to connect the voltage! Using the breadboard, the voltage can be sent through 1 line, the Ground as well. It should be quite easy to connect them.
4. Now, download the Arduino IDE and copy-paste the code I supplied above. In the IDE, you need to let it know which Arduino you're working with, and which port is should send the script.
5. Almost there. Download the plugin. Open the port you're using through the plugin. Set Start to True and the Cordyceps should be within you.
This recipe will be updated!
Let me know if there are any issues.
// Zakaria Djebbara…