Project curve points (vertex) onto mesh C#

Hello,

I ve been trying to copy and align the vertex points of the curves on the mesh but it doesn’t seem to work. I am kind of new with C# … can anyone show me how to correct it or direct me close to the solution?

I would really appreciate any help. :slight_smile:

Regards,

Margi

formfinding .gh (19.5 KB)

P01.3dm (30.7 KB)

Well I have good, bad and ugly news:

Bad: R6 (and the equivalent K2) on duty (I don’t work with R6).

Good: I could easily do whatever you want (with regard the C# part) provited that you can post R5 stuff and a clear explicit description about what you are after.

Ugly: I could do the K2 part as well but using 100% code (That said, a K2 SDK - of some sort - is rather urgently required).

I have several questions actually @PeterFotiadis , FIRST :
I am trying to learn about meshes so I want to these but I am badly stuck … seriously … !
Look at the photo a) I am trying to cumpute the gausian given the vectors drawn like this when theta = 2PI - first connect edges and then compute angles between each pair.
b) Generate volume by creating faces like drawn like this (creating a box by creating several triangulate faces)

Regarding what I was trying to do with K2 …
The actual steps are :

I have to create A QUAD MESH 2 meters x 2 meters - it has to be quads ( I did it in C# if you see the file but I cannot sellect the quads with the list item - so I guess that is not correct ?!
The quads need to have special properties : each quad has to be planar at all times with vertices 2PI angles or 360 degrees angle .
After this I drew these curves and I want the veritces of the curves to be projected onto the flat mesh I created . The curves have to fall on to the grid. I want to use kangaroo to create form finding so I can be able to push the new generated vertices and create new developable geometrical shapes with my mesh .

I hope, i made it clear enough … thank you so much for any help in advance …

I attach the R5 FILE as well …don’t bother with the simulation at the moment. I want to try few things first … maybe we can do it a bit later :slight_smile:

P01r5.3dm (35.3 KB) formfinding .gh (18.9 KB)

OK, don’t panic (but you should, he he).

Until the salvation arrives do:

  1. Understand the relation via connectivity between edges, vertices, topology vertices, faces, cats and dogs. So draw a simple mesh and post here what connectivity stuff you can do with C#. That said connectivity with vertices is actually the one with topology vertices … meaning that the trees are 3*3 = 9 (VV, VE, VF, EV, EE, EF, FV, FE, FF).
  2. Understand the mapping (of indices) between vertices and topology vertices.
  3. Understand what the vertices Normals are (and the face Normals as well).

For all the above see R SDK.

Sorry what is R SDK? @PeterFotiadis

https://developer.rhino3d.com/api/RhinoCommon/html/N_Rhino.htm

SDK: SoftwareDevelopmentKit a term from the very old days … where code was a freaky thing done by freaky fellas (the developers): these days any pro (notably in the AEC market sector) involved with parametric design writes his own stuff and then team(s) of pros do this and that and then this (or that) is made in real-life … blah, blah.

BTW: start looking your stuff: verdict: mama mia, he, he.

OK, Let’s forget the K2 part and name all that stuff as MamaMia (for good reason).

See attached and tell me EXPLICITLY what you want to project, where, when and why: points from dividing the curves? cats? dogs? stars to black holes? other?

Or you want to find the faces that yield ccx events with the Curves? (kinda pixelating the Curves, that is). Obviously if the mesh center to a given curve closest pt yields a distance < half the diagonal … etc etc.

Or you want K2 to push/pull only the faces where ccx events occur? (kinda creating ripples). If so you don’t need K2 for that (nor a Mesh to be honest).

Mesh_Project_MamaMia_V1.gh (17.7 KB)

Moral: Long is the path (and hilly).

Hello ,

@PeterFotiadis
I want to create some sort of origami with regular pleating so when I do the simulation with K2 ALL the pleats will come up something like this https://www.youtube.com/watch?v=VJV6W7qP0OM

but NOT exactly like this - because this structure is not developable…- the quads need to be planar when i do the simulation with K2

thats correct … from the research i found you can see the photo ATTACHED ! But I do need to create a meshScreenshot%20(15)|690x388 in order to pull the vertices created by the curves and these vertices can lift up as mountain / valley … in origami terms
Sorry,it was taking me so long … I was trying to figure it out but miserably failed !!!

Please don’t discuss the c# simulation I am not even ready for it … I struggle with simple stuff! You will make me run away completely from C#!

Thank you so much for your support! Please , keep showing me the way how to do cleaver stuff :))!

Yes too long for sure!!!

Screen%20Shot%20001

Other than the great man’s quote … your strategy with regard an “inflated” vault (so to speak) is wrong having in mind some elementary rational rules (violation of whom cause the ultra kitsch AND ugly things that are supposedly the avant garde contemporary Architecture - and pigs do fly).

Before the (painful) salvation arrives (a proper rational vault, that is):

  1. Resist to sirens: these days the ugly become WOW and the ultra expensive become a must (hope that you understand the reasons: more dollars, that is, for the designers, the builders and everybody else involved in this nonsense [i.e the banks]).
  2. Think: while a tensile membrane is the obvious solution (about 350 E/m2 give or take a few bucks) … well … things are so distorted these days that nobody even considers such a solution. Why? Mammon what else?
  3. Whatever you do is a trace of you: so project yourself well into the future and look back on your stuff: have these things any chance to justify their existence?

Other that that:

  1. Planar quads (a chimera in real-life and a cause for many issues like leaks etc etc) is a thing that K2 can do during the relaxation by just adding suitable Goals.
  2. A vault like mesh (an “inflated” one) can act as a template for some W type of truss that can support any realistic envelope. So the ideal solution is a relaxed tri-mess. Nobody could tell any difference from a quad mesh (unless you are after that Yas Marina hotel in Abu Dhabi where Lewis would do his last 2019 race).

Moral: Forza Lewis.

Update: Found some minutes to add existed stuff (out of 50+K C#'s available): you can relax that Mesh via K2 (and you can use any other Curve collection acting as attractors) plus you can attempt to planarize the quads (up to some real-life tolerance, zero is good only for NASA) … but planar quads are just a siren.

That said a quad is planar when the min diagonal distance is less than tol.

Mesh_Project_MamaMia_V1A.gh (129.5 KB)

1 Like

@PeterFotiadis thank you very much for showing, - the spikes and the way I was thinking it was going to work, actually it is not what I was looking for but a good start for sure! I will keep working on it and I will update :slight_smile:

Hope dies last (should die first).

Mesh_to_relaxedVault_EntryLevel_V2.gh (145.7 KB)

Mesh_Project_MamaMia_V1B.gh (135.5 KB)

BTW: more on vaults (and other things) later

BTW: given a mesh how one can make a real-life truss (with depth) out of it? That’s the reason that I said what I said about connectivity on meshes.

1 Like

@PeterFotiadis I really like this type of structure is it voronoi ? I am more fun of delaunay patterns - I love triangles and edges - I am very fun of Zaha Hadids early work like the Vitra Fire station. It reminds me actually of my final year work. Let me show you something of my final year (5th year architecture work ) rendering it was not that great cause I was running out of time haha the building was massive :yum:

.

I love origami … and triangles for sure!!!

Not bad that thing of yours (plus there’s freezing cold around, I like that).

Other than that that particular vault as just a line Graph relaxed (Z+) via K2.

No mesh … just lines that intersect each other - as in the second Pic above - and yield line segments [for K2 Springs] ) . Avoid Uglyvoi (i.e. Voronoi) things at any cost (unpredictable small sizes, kitsch to the max not to mention kitsch). Imagine talking to I.M.Pei (the Lewis Hamilton of Architects) about stuff like that.

Moral: Triangles is the way to go (resist to sirens): be reasonably realistic and some time in the future you’ll understand the benefits. But … you MUST know how to do a W truss out of a Graph (or a Mesh). We use the W for a truss with depth (LOL).

@PeterFotiadis [quote=“PeterFotiadis, post:13, topic:92679”]
Not bad that thing of yours (plus there’s freezing cold around, I like that).
[/quote]

Haha …Thank you … I like it too. But it was not freezing cold hehe… I didn’t have time to add textures and do photoshop stuff , I was running out of time.That year our site was in Cyprus… so it was very hot. The structure outside except supporting the whole cantilever protects the building from overheating too.

I really hope one day I will be able to do something like this in C# !!! Well , I hope so …

Easy (even with the entry level …relaxedVault … C# posted above).

But:

You should been able to do interactive things via GH (related with anchors) as follows: Imagine a C# that gets the List of anchors in some sort of state (as a collection) and you want to modify the List (i.e change some anchor location or delete it or add some other or whatever) because of aesthetic reasons or some other(s): size of panels, clash member issues, structural, HVAC matters etc etc.

How you can do that? Every time that you cause the C# to re-execute (say by changing a slider that picks - by index - some point as anchor etc) the previous state of things is gone (volatile data) meaning that you should use an “outer source” : a parameter (accessed by nick name via the C#) where the collection is stored (as persistent data) and then the collection used is not the collection in the C# (LOL) but the one that the C# gets as input from the parameter (LOL+ LOL). Appears freaky but is as easy as a recursive solution etc etc.

Easy via code meaning that (at last) you would been able to do interactive things with GH and pick on the fly anchors that yield a vault with the aesthetics that suit your taste.

Keep walking the walk and soon you’ll receive something that would change 100% the way that you see things within the parametric game.

Moral: Forza Lewis.

1 Like

@PeterFotiadis Thank you for the encouragement at this stage I can’t even create a box mesh … I don’t understand things like static void or public and other terms - it is just hard to grasp at the moment … I guess it takes time … because I have NO Programming experience at all! My first programming language is C# …so its a bit of a struggle. I can see other people with programming background get it much quicker …I will get there …but slowly …slowly…Lewis Hamilton is very fast !!! hehe

Static is a F1 car when Lewis is behind (Forza Lewis).

Public is what Mercedes says after … er … another great strategy like in Brazil, Japan, Italy and Germany.

Private is what Lewis says to Mercedes after the above.

Void is the hopes that Ferrari has.

Delegate is the medium that Ferrari is using for … whispering things to FIA.

1 Like

@PeterFotiadis ohh that sounds miserable!

Poor Ferrari. So many zillions lost: call the German banks for more.

Other than that, it’s time for pain and torture (no mercy + survival of the fittest, blah, blah).

Mesh_to_relaxedVault_EntryLevel_V3.gh (143.7 KB) .

  1. Added a faulty (with regard the tree structure) entry level C# that does a W truss axis layout out of the vault mesh:

  1. But the whole structure layout is wrong: because in trusses we access the rods (and the nodes) via rods, vertices Lists (or bottom, W, top rods Lists) and their connectivity data as provited by VV, VE, EV Trees. Since you are an Architect … remember: 99% of things related with AEC are connectivity things. Meaning that geometry is nothing if the other thing is MIA.
  2. So do the fix and get Lord’s A+ (be brave, remember Darwin).

yes ferrari will ask money from german banks and the german banks will ask from greek banks! dont even get me started about this!!!

Regarding what you aked me to resolve - I am afraid my current knowledge wont be able to resolve this exercise - maybe in couple of weeks time?
Right know I am trying to create a mesh box and I struggle - think of that! ohhh dear!