GH, same as using sweep2 command in Rhino.
The one on the right is what I got so far (the output smooth our the kink of the original rails). Basically I am just following the methods provided by sdk sample: http://wiki.mcneel.com/developer/sdksamples/sweep2 .
The following is the function I copy and use directly from the SDK sample. By using this function, I can generate the sweep surface at right. But I want to have is the one in the middle with the kink edges. Can anyone show me how and where to modify he settings? I guess some sweep arguments need to be changed? I have try couples, such m_simplify, m_bSimpleSweep, m_bSameHeight, m_rebuild_count... but still cannot find a right combination for this function to output the sweep surface I want. Any suggestions or helps are very appreciated. Thanks for your help and time on this.
'Sweep2 function'----------------
Sub Sweep2( ByVal Rail1 As IOnCurve, _
ByVal Rail2 As IOnCurve, _
ByVal sCurves As List(Of IOnCurve), _
ByRef Sweep2_Breps As List(Of OnBrep))
'Define a new class that contains sweep2 arguments
Dim args As New MArgsRhinoSweep2
'Set the 2 rails
Dim Edge1 As New MRhinoPolyEdge
Dim Edge2 As New MRhinoPolyEdge
Edge1.Append(Rail1.DuplicateCurve())
Edge2.Append(Rail2.DuplicateCurve())
'Add rails to sweep arguments
args.m_rail_curves(0) = Edge1
args.m_rail_curves(1) = Edge2
args.m_bClosed = False
Dim section_curves As New List(Of OnCurve)
'Loop through sections to set parameters
For Each Section As IOnCurve In sCurves
Dim sCurve As OnCurve = Section.DuplicateCurve()
section_curves.Add(sCurve)
Dim t0 As Double = 0
If Not Edge1.GetClosestPoint(sCurve.PointAtStart(), t0) Then
If Not Edge1.GetClosestPoint(sCurve.PointAtEnd(), t0) Then
Dim s As Double = 0
sCurve.GetNormalizedArcLengthPoint(0.5, s)
Edge1.GetClosestPoint(sCurve.PointAt(s), t0)
End If
End If
args.m_rail_params(0).Append(t0)
Dim t1 As Double = 0
If Not Edge2.GetClosestPoint(sCurve.PointAtStart(), t1) Then
If Not Edge2.GetClosestPoint(sCurve.PointAtEnd(), t1) Then
Dim s As Double = 0
sCurve.GetNormalizedArcLengthPoint(0.5, s)
Edge2.GetClosestPoint(sCurve.PointAt(s), t1)
End If
End If
args.m_rail_params(1).Append(t1)
Next
'Set shapes
args.m_shape_curves = section_curves.ToArray
'Set the rest of parameters
args.m_simplify = 0
args.m_bSimpleSweep = False
args.m_bSameHeight = False
args.m_rebuild_count = -1 'Sample point count for rebuilding shapes
args.m_refit_tolerance = RMA.Rhino.RhUtil.RhinoApp.ActiveDoc.AbsoluteTolerance()
args.m_sweep_tolerance = RMA.Rhino.RhUtil.RhinoApp.ActiveDoc.AbsoluteTolerance()
args.m_angle_tolerance = RMA.Rhino.RhUtil.RhinoApp.ActiveDoc.AngleToleranceRadians()
Dim sBreps() As OnBrep = Nothing
If (RhUtil.RhinoSweep2(args, sBreps)) Then
For Each b As OnBrep In sBreps
Sweep2_Breps.Add(b)
Next
End If
Return
End Sub
…
s continuously growing over eleven months.Have an extra minute or two version: Hello Everyone! I am sorry for the sort of 'spam' message, but I promise this does have something to do with Grasshopper. Next week there will be an opening for an exhibition called 'Fabrication Laboratory: New scenarios in 3D Design and Production.' The ehibition will run for eleven months at the Disseny Hub Barcelona. The curator, Marta Malé-Alemany is bringing together the cutting edge and future of fabrication as we know it. I was fortunate enough to be considered for a piece investigating Collaborative Fabrication. With the support of the Institute for Advanced Architecture of Catalonia (IaaC) and the DHUB, we created something called 'Collaborative Cloud.'Collaborative Cloud is an open project which investigates the potentials of local fabrication and distributed design. The project, by giving anyone the access to contribute in its development, attempts to produce a physical object based on participation which goes beyond the limits of physical proximity. Collaboration is made possible by an interface which allows the participant to design and inform a piece of the cloud. The information generated by international participants will be accessed by the DHUB Fab Lab to fabricate pieces which provoke the growth of the project over eleven months.This is a project created and produced by the Institute for Advanced Architecture of Catalonia, organized by Disseny Hub Bacelona, and designed by myself, Victor Viña, and Areti Markopoulou.So, if I have intrigued some of you, please go to: http://dhubfablab.cat/ccloudand design your piece of the cloud! We need submissions! Next week we open with 200 pieces of the cloud! If you want to make multiple submissions, just change the email address a bit (we will use the first email address submitted in case we contact the participants for special events). There are some known issues we are trying to iron out with the interface. Please reply in this thread if there is an issue. Definitely a JAVA warning will pop up asking if you want to block the applet...say No! If you block it, well, it wont work. Don't worry, we won't get all up in your system. Just hit SUBMIT when you are ready to send your design...So how does this have to do with Grasshopper? Well, in order to track and provoke the growth, we use the info from your designed piece...all of that goes into a database which we can mine from Grasshopper / Rhinoscript. When the cloud finds an appropriate piece, it gets queued for fabbing...Grasshopper connects to this and shows us where there are holes, where we can grow, where we will have issues...I am attaching a small simple, quick, n dirty pdf explaining some of the functionality of the system.well, that's long enough. Let me know if you have any issues. I hope you will take part!…
azione parametrica e generativa attraverso Grasshopper, plug-in di programmazione visuale per Rhinoceros 3D (uno dei più diffusi modellatori NURBS per l‘architettura e il design). Il workshop mira a gestire e sviluppare il rapporto tra informazione e geometria lavorando sui sistemi ad involucro in condizioni specifiche.La discretizzazione di superfici (pannellizazione Nurbs o Mesh), la modellazione delle geometrie attraverso informazioni (siano esse provenienti da analisi ambientali, mappe o database) e l’estrazione e la gestione di queste informazioni, richiede la comprensione di strutture di dati al fine di gestire completamente processo che va dalla progettazione alla costruzione.I partecipanti impareranno come costruire e sviluppare strutture di dati parametrici per informare geometrie ‘data-driven’ e come estrarre le informazioni rilevanti da tali modelli per il processo di costruzione.
Modulo 2 – Il workshop, volto a promuovere le nuove tecnologie digitali di supporto alla progettazione e alla fabbricazione, esplorerà l’integrazione tra design e prototipazione tramite processi di stampa 3d di materiale ceramico al fine di comprenderne allo stesso tempo sia il comportamento del materiale che i vincoli e le opportunità offerte dall’utilizzo di tali tecnologie.Infatti utilizzando grasshopper ed una macchina a controllo numerico i partecipanti apprenderanno le modalità per la generazione parametrica dei modelli e la creazione del codice per la loro prototipazione (Gcode creato direttamente in Grasshopper). Il workshop darà quindi ai partecipanti la possibilità di testare direttamente i loro elaborati digitali stampandoli in modo da comprendere come le informazioni articolate tramite tali strumenti di design producano specifici effetti sia morfologici che estetici.…
ut in the next few days.
I've found getting really good handling of static vs kinetic friction to be a pain though.
Distinguishing between collisions and resting contact generally becomes more complicated than it might first appear.
If the collision with the mesh or ground is 'hard' I project the particle positions, so they can never penetrate, and reverse the component of their velocity normal to the surface (multiplied by the restitution factor). This means that whenever you have some structure of springs resting on a hard surface, there is usually still some tiny imperceptible bouncing. This makes it hard to properly apply static friction (which would zero the tangential velocity if the tangential force was below some threshold and it is not already sliding), because particles are generally not perfectly on the surface, even when apparently at rest. Obviously it's not good to have friction affecting things that aren't touching the surface.
This is the origin of the 'settle' parameter in the settings. The idea was that when the motion of a particle normal to the surface drops below that limit, it will be totally zeroed, and the particle becomes properly resting on the surface. I never really like having to use these kind of weird ad hoc fixes though.
Alternatively, if the collision is 'soft' I use a spring-like force to push particles out of the ground/mesh.
This can cause problems because in many cases you just want a simple constraint that they never go below ground level, and there is a limit to how stiff you can make these spring-like forces.
The advantage though, is that because any particle resting 'on' the ground/surface will actually be slightly below/inside it, and one can use this to decide whether to apply contact friction.
With bouncing collisions, it is a little simpler. There is just the question of what to do with the velocity component tangential to the surface. See the bottom comment by me here, for more on the 'tumble' setting:
http://www.grasshopper3d.com/video/kangaroo-traction-test
So you see, it is challenging to get one consistent model that will give correct behaviour for all cases (eg a simple static 'leaning ladder' type problem, a bouncing particle, and vehicle wheel traction), without having several of these odd seeming and non-intuitive settings.
…
Added by Daniel Piker at 11:11am on October 18, 2012
m is different from email spam.
Email spammers want you to buy their product. You are the target of the ad contained in each email spam you receive. Comment/web spammers want your readers to buy their product. You (the blogger, author, moderator) are not the target.
2. Web spammers are social engineers.
Email spammers write messages to get your attention. Comment spammers write messages to escape your attention. They want you to believe they are real bloggers, real people, writing real comments, so you’ll approve the comment and publish it on your site. They use flattery, appeal to your good nature, and simply lie in order to convince you to give them the benefit of the doubt.
3. Web spammers are basically advertising on your blog..
..and they're keeping all of the profits. They’re not even asking your permission first. Right now someone is offering to sell links from your blog to anyone willing to pay a few dollars (or a few cents). If your blog is well known, it may even be listed by name, with backlinks for sale at a set price.
4. It’s all about the backlinks.
Web spammers are selling links from your blog to their clients. They do this to game the search engines and trick your readers into visiting dubious web sites. Their clients are sometimes seemingly harmless, but are often peddling fake pills, porn, scams and malware. Sometimes they’ll use “buffer sites” – that is, innocent looking web pages intended to disguise the fact that they’re really advertising something more sinister.
5. Spammers employ humans.
Not all spam is delivered by spambots. Spammers are increasingly using humans to write and post comments by hand. Typically they are exploiting low-paid workers in internet cafes, schools and factories. Sometimes they are viral marketers paid to promote a new product. Either way they are trying to exploit your blog for their profit – and hoping to do it without you noticing.
…
Added by Danny Boyes at 4:51am on October 24, 2013
he results are accurate enough.Good to go!Current working directory is set to: C:\002_VIDEO\02_UNI\TU_GRAZ\01_DISSERTATION\02_RESEARCH\08_POMODORO\01_SIMULATION_MODEL/03_HONEYBEE\VF_00\gridBasedSimulation\start cmd /c C:\Users\paratufello\AppData\Roaming\Ladybug\unnamed\annualSimulation\unnamed_7_DS.batWMIC PROCESS get CommandlineWMIC PROCESS get CommandlineWMIC PROCESS get Commandlinestart cmd /c C:\Users\paratufello\AppData\Roaming\Ladybug\unnamed\annualSimulation\unnamed_7_DS.batWMIC PROCESS get CommandlineWMIC PROCESS get CommandlineWMIC PROCESS get Commandlinestart cmd /c C:\Users\paratufello\AppData\Roaming\Ladybug\unnamed\annualSimulation\unnamed_7_DS.batWMIC PROCESS get CommandlineWMIC PROCESS get CommandlineWMIC PROCESS get Commandlinestart cmd /c C:\Users\paratufello\AppData\Roaming\Ladybug\unnamed\annualSimulation\unnamed_7_DS.batWMIC PROCESS get CommandlineWMIC PROCESS get CommandlineWMIC PROCESS get Commandlinestart cmd /c C:\Users\paratufello\AppData\Roaming\Ladybug\unnamed\annualSimulation\unnamed_7_DS.batWMIC PROCESS get CommandlineWMIC PROCESS get CommandlineWMIC PROCESS get Commandlinestart cmd /c C:\Users\paratufello\AppData\Roaming\Ladybug\unnamed\annualSimulation\unnamed_7_DS.batWMIC PROCESS get CommandlineWMIC PROCESS get CommandlineWMIC PROCESS get Commandlinestart cmd /c C:\Users\paratufello\AppData\Roaming\Ladybug\unnamed\annualSimulation\unnamed_7_DS.batWMIC PROCESS get CommandlineWMIC PROCESS get CommandlineWMIC PROCESS get Commandlinestart cmd /c C:\Users\paratufello\AppData\Roaming\Ladybug\unnamed\annualSimulation\unnamed_7_DS.batWMIC PROCESS get CommandlineWMIC PROCESS get CommandlineWMIC PROCESS get Commandlinestart cmd /c C:\Users\paratufello\AppData\Roaming\Ladybug\unnamed\annualSimulation\unnamed_7_DS.batWMIC PROCESS get CommandlineWMIC PROCESS get CommandlineWMIC PROCESS get CommandlineRuntime error (IndexOutOfRangeException): index out of range: 0Traceback: line 271, in script…
is set to: C:\002_VIDEO\02_UNI\TU_GRAZ\01_DISSERTATION\02_RESEARCH\08_POMODORO\01_SIMULATION_MODEL/03_HONEYBEE\VF_00\gridBasedSimulation\start cmd /c C:\Users\paratufello\AppData\Roaming\Ladybug\unnamed\annualSimulation\unnamed_7_DS.batWMIC PROCESS get CommandlineWMIC PROCESS get CommandlineWMIC PROCESS get Commandlinestart cmd /c C:\Users\paratufello\AppData\Roaming\Ladybug\unnamed\annualSimulation\unnamed_7_DS.batWMIC PROCESS get CommandlineWMIC PROCESS get CommandlineWMIC PROCESS get Commandlinestart cmd /c C:\Users\paratufello\AppData\Roaming\Ladybug\unnamed\annualSimulation\unnamed_7_DS.batWMIC PROCESS get CommandlineWMIC PROCESS get CommandlineWMIC PROCESS get Commandlinestart cmd /c C:\Users\paratufello\AppData\Roaming\Ladybug\unnamed\annualSimulation\unnamed_7_DS.batWMIC PROCESS get CommandlineWMIC PROCESS get CommandlineWMIC PROCESS get Commandlinestart cmd /c C:\Users\paratufello\AppData\Roaming\Ladybug\unnamed\annualSimulation\unnamed_7_DS.batWMIC PROCESS get CommandlineWMIC PROCESS get CommandlineWMIC PROCESS get Commandlinestart cmd /c C:\Users\paratufello\AppData\Roaming\Ladybug\unnamed\annualSimulation\unnamed_7_DS.batWMIC PROCESS get CommandlineWMIC PROCESS get CommandlineWMIC PROCESS get Commandlinestart cmd /c C:\Users\paratufello\AppData\Roaming\Ladybug\unnamed\annualSimulation\unnamed_7_DS.batWMIC PROCESS get CommandlineWMIC PROCESS get CommandlineWMIC PROCESS get Commandlinestart cmd /c C:\Users\paratufello\AppData\Roaming\Ladybug\unnamed\annualSimulation\unnamed_7_DS.batWMIC PROCESS get CommandlineWMIC PROCESS get CommandlineWMIC PROCESS get Commandlinestart cmd /c C:\Users\paratufello\AppData\Roaming\Ladybug\unnamed\annualSimulation\unnamed_7_DS.batWMIC PROCESS get CommandlineWMIC PROCESS get CommandlineWMIC PROCESS get CommandlineRuntime error (IndexOutOfRangeException): index out of range: 0Traceback: line 271, in script…
dy for a wall where we want to analyze its openings. I made a parametric wall that then get's analyzed with different geometries and the idea was just to leave it there for the weekend as it morphed through different iterations. However, after successfully running a test simulation on my pc (just with one iteration), it fails to run the same test on the workplace computer. Any help would be greatly apprecated! Here is the following error:
Sorry! But the number of available CPUs on your machine is 4.
Honeybee set the number of CPUs to 4.
Grid-based Radiance simulation
The component is checking ad, as, ar and aa values. This is just to make sure that the results are accurate enough.
Good to go!
Current working directory is set to: C:\ladybug\Parametric_Shading_Wall\psw_z0.25_t.025_y.2_r90_m3_lux\gridBasedSimulation\
Failed to read the results!
rtrace: fatal - (psw_z0.25_t.025_y.2_r90_m3_lux_RAD.oct): truncated octree
rtrace: fatal - (psw_z0.25_t.025_y.2_r90_m3_lux_RAD.oct): truncated octree
rtrace: fatal - (psw_z0.25_t.025_y.2_r90_m3_lux_RAD.oct): truncated octree
rtrace: fatal - (psw_z0.25_t.025_y.2_r90_m3_lux_RAD.oct): truncated octree
Runtime error (PythonException): Failed to read the results!
rtrace: fatal - (psw_z0.25_t.025_y.2_r90_m3_lux_RAD.oct): truncated octree
rtrace: fatal - (psw_z0.25_t.025_y.2_r90_m3_lux_RAD.oct): truncated octree
rtrace: fatal - (psw_z0.25_t.025_y.2_r90_m3_lux_RAD.oct): truncated octree
rtrace: fatal - (psw_z0.25_t.025_y.2_r90_m3_lux_RAD.oct): truncated octree
PS. It says to see line 336…
ed file and code below:
Color ColorAt(Mesh mesh, int faceIndex, double t0, double t1, double t2, double t3) { // int rc = -1; var color = Rhino.Display.Color4f.Black;
if( mesh.VertexColors.Count != 0) { // test to see if face exists if( faceIndex >= 0 && faceIndex < mesh.Faces.Count ) { /// Barycentric quad coordinates for the point on the mesh /// face mesh.Faces[FaceIndex].
/// If the face is a triangle /// disregard T[3] (it should be set to 0.0).
/// If the face is /// a quad and is split between vertexes 0 and 2, then T[3] /// will be 0.0 when point is on the triangle defined by vi[0], /// vi[1], vi[2]
/// T[1] will be 0.0 when point is on the /// triangle defined by vi[0], vi[2], vi[3].
/// If the face is a /// quad and is split between vertexes 1 and 3, then T[2] will /// be -1 when point is on the triangle defined by vi[0], /// vi[1], vi[3]
/// and m_t[0] will be -1 when point is on the /// triangle defined by vi[1], vi[2], vi[3].
MeshFace face = mesh.Faces[faceIndex];
// Collect data for barycentric evaluation. Color p0, p1, p2;
if(face.IsTriangle) { p0 = mesh.VertexColors[face.A]; p1 = mesh.VertexColors[face.B]; p2 = mesh.VertexColors[face.C]; } else { if( t3 == 0 ) { // point is on subtriangle {0,1,2} p0 = mesh.VertexColors[face.A]; p1 = mesh.VertexColors[face.B]; p2 = mesh.VertexColors[face.C]; } else if( t1 == 0 ) { // point is on subtriangle {0,2,3} p0 = mesh.VertexColors[face.A]; p1 = mesh.VertexColors[face.C]; p2 = mesh.VertexColors[face.D]; //t0 = t0; t1 = t2; t2 = t3; } else if( t2 == -1 ) { // point is on subtriangle {0,1,3} p0 = mesh.VertexColors[face.A]; p1 = mesh.VertexColors[face.B]; p2 = mesh.VertexColors[face.D]; //t0 = t0; //t1 = t1; t2 = t3; } else { // point must be on remaining subtriangle {1,2,3} p0 = mesh.VertexColors[face.B]; p1 = mesh.VertexColors[face.C]; p2 = mesh.VertexColors[face.D]; t0 = t1; t1 = t2; t2 = t3; } }
/** double r = t0 * p0.FractionRed() + t1 * p1.FractionRed() + t2 * p2.FractionRed(); double g = t0 * p0.FractionGreen() + t1 * p1.FractionGreen() + t2 * p2.FractionGreen(); double b = t0 * p0.FractionBlue() + t1 * p1.FractionBlue() + t2 * p2.FractionBlue();
ON_Color color; color.SetFractionalRGB(r, g, b);
unsigned int abgr = (unsigned int)color; rc = (int) ABGR_to_ARGB(abgr); **/ var c0 = new Rhino.Display.Color4f(p0); var c1 = new Rhino.Display.Color4f(p1); var c2 = new Rhino.Display.Color4f(p2); float s0 = (float) t0; float s1 = (float) t1; float s2 = (float) t2;
float R = s0 * c0.R + s1 * c1.R + s2 * c2.R; float G = s0 * c0.G + s1 * c1.G + s2 * c2.G; float B = s0 * c0.B + s1 * c1.B + s2 * c2.B; color = new Rhino.Display.Color4f(R, G, B, 1); } } return color.AsSystemColor(); }
…