# Grids by Face issue

Hey guys,

I have a complex membrane surface (As depicted below) that curves in multiple directions at the same time. What I want to do is divide this off into either a quad or diamond (Preferably be able to choose) pattern to use as a host for a series of Adaptive Components.

I’m assuming I’ve either got the wrong Lunchbox package (Albeit, I downloaded the latest I believe), or it doesn’t handle non-rectangular surfaces?

I can do it “The hard way”, by creating points at parameter for each bounding curve of the surface, but I’ll probably lose a bit of the curve in the geometry if I do it that way.

Any help would be greatly appreciated!

Cheers,

Sol

It looks like the resulting surface is planar. For some weird reason Dynamo handles planar and non-planar surfaces differently. For planar surfaces, the points are not bound to the surface and are always aligned to the global CS. Usually the only way to divide them in a regular grid is to manipulate the generating curves/ perimeter curves.

Ah odd, thanks for clearing that up Dimitar. Once again, I owe you a beer or something

I guess I’ll do it the hard way then!

Dimitar, looking through my ‘library’ of random images downloaded from threads on here, I stumbled across one of yours that showcases using DesignScript to populate U/V points on a surface and I was wondering if you could please explain it to me.

It uses your ‘surfpts’ definition - I’ve simply copied it through as a starting point (As showcased in my image in the stand-alonee code-blocks an the final 4x lines of the major code block).

If I we’re to switch to PointAtDistance, would I be able to achieve a roughly organised points grid this way? Or could I still use PointAtParameter given that my surfaces are different sizes? I could potentially create new U and V division lists for the size variance.

My intention is to try and get the diamond points distribution for an adaptive panel placement as discussed above while maintaining the complex surface curvature.

If anyone else has any thoughts please by all means chime in!

I’ve played around, and got a points distribution working well on the surfaces themselves - but now I need to also get points from the exterior lines that align with the surface distribution - but doing OK so far!

Then I guess it’s all about populating some form of 4x list structure… fun

Hmm I’m not sure how easy it would be to map a quad structure to that list of points because a)it’s a flat list of points and b)each row/collumn of points is of nonuniform length.

I was thinking of something along the lines of this:

Wrap the above in a function/custom node, then check if each surface is planar or not with Clockwork’s “Surface.IsPlanar” and based on the output apply either the PointByParameter function or the above function. That would leave us with a list of points that is easier to handle:

Ah brilliant. Your a Dynamo God! I’ll have a play with that workflow. Many thanks for your help yet again.

I’ve had a play around with your suggestion Dimitar and have had to add in another step or two due to the complex geometry conditions (curve extrusion and the exclusion of the perimeter points from said extrusion before joining them up into a list again).

It’s working rather well so far. Next step would be to re-organise the points grid into a proper diamond structure for Adaptive Component output.

The above example works ok for 4 sided convex polygons but won’t work for 3/5/etc sided ones or for concave shapes. I’m not sure what the best approach for those would be. Maybe create a very slightly curved surface on top of the flat surface, create points on that and project them down to the flat surface?

I think that the DS team should work on the way planar faces are handled.

Edit:

now I am confused

It should work for concave as well as the extrusion is both in the negative and positive. But yeah, not an ideal solution as of yet. I can get it working I believe for my particular situation but it would be much better to figure out something for all potentialities.