Grasshopper

algorithmic modeling for Rhino

Well friends...

What is the syntax for taking into account an optional base plane? (as the GH component does/has).

thanks in advance, best, Peter

Views: 1835

Replies to This Discussion

That's a bit tricky, as the Plane type is a struct and thus never null. You could check to see if the plane is invalid (if all vectors are zeroed out, the plane has probably been made with the framework constructor), then assume the plane is optional.

In Grasshopper components this is not a problem, because all data is wrapped inside IGH_Goo interfaces, and an interface can always be null.

Another approach would be to not use the Plane type hint, instead stick to object, and then test the value for null:

Plane actualPlane;

if (plane == null)

  actualPlane = WhateverTheDefaultIs;

else

  actualPlane = (Plane)plane;

hmm...maybe I was not clear: I mean what (method) is required in order to "force" the solver to apply the solution with respect a given plane?

This def captured works OK but with Plane.WorldXY in mind ... what if I had PlaneYouNameIt?

Anyway I'll prepare a simple test case to clarify more my issue. For instance doing this (standard GH component with the base plane input fed  with the appropriate planes):

VS that (my C# ) : result exactly the same if I disconnect the plane(s) input from the standard GH component :

Map your points from the plane to the XY, solve, build your mesh with the original set of points

Thanks to all:

Case closed :

Either by remap: Andrew/Hannes suggestions, or by the code that David Stasiuk kindly provided. Not tested (yet) with some big pts numbers but I have a feeling that David's way may be the faster. 

See attached.

That brings us to the next question: what is the syntax for getting the edges only?

Attachments:

Dear Peter and all GH folks,

I have been researching a way to achieve something similar, which would probably seem simple to you GH gurus! 

I have a relatively complex (in terms of curvature) polysurface which I would like to map a delaunay pattern onto. The intent is to populate the surface/facade continuously with delaunay from randomly assigned points, which will later be rearranged with Galapagos to maximise some environmental conditions. 

I have got the Galapagos bit right but I cannot figure out how to evaluate the surface in order to provide me with the planes to map the pattern. The definition works on a planar surface. 

I have tried using the scripts and C# that you guys kindly provided (I have no notions of scripting) but it does not seem to work, as I get a common feedback from both 3 options provided in the script, which is "invalid mesh at nodes x".

Could you guys please help me out? How can I populate the facade to the edges while preserving the density and randomness of points (because these will be used as the Galapagos genome)?

Thank you for your great help!

Attachments:

I'll investigate that one ASAP

more soon

Hmm ...

1. The Plane thingy used means: "align" solution to that Plane (instead or Plane.WorldXY). As you've noticed I used "planar" surfaces where the term Plane has a meaning for alignment.

2. Instead ... you are after a Del solver that could accept a Surface as "guide" (for instance your tube like facade, the roof etc etc). I'm not aware of a GH Method that does this.

Decomposing your facade into smaller pieces where an average (so to speak) Plane has(?) some meaning and then doing some script that "bridges" these collections ... it's a rather naive thinking for a variety of reasons the main being the need  of "homogenous" random point distribution (as facades supposedly have). But this is also addressable ... thus could be Plan A.

3. Plan B is to use the best tool that GH has to offer for controlling meshes (Daniel's MeshMachine) and then do some script that "adds some random noise" to mesh pts.

For instance using N randomly distributed "attractors" that affect neighbors/groups of mesh pts etc etc. Plan B.A is ... well forget that it's too complicated.

This has the advantage of NOT taking measures as regards what happens to the facade edges (MUST contain pts as well: at least one point per triangle module should be in a given perimeter edge). On the other hand applying some Kangaroo driven "distortion" on that mesh potentially is the best answer.

3. Plan C: I have some stuff (not working quite correctly - yet - mind) that attempts to do that (nothing to do with GH available Methods) . I'll try to fix(?) the bugs and I'll post it here.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service