Grasshopper

algorithmic modeling for Rhino

List of points error : flatten error with line component

Hello,

I have trouble organising two lists of points.

I  would like to create a line between the green point and the yellow points.

Only between 1 yellow point and 6 points for each individual yellow point.

If I do a list item it would take forever to organize each list of point.

The problem is that I would like to create a node element on each green point in respect with the yellow points.

If I create a line between the green and the yellows, as both lists are flatten, the line are going to be everywhere.

I would like to make lines from the green point toward the yellow point.

Does this make sense ?

Can someone help me with that problem?

Thank you for your time

Views: 808

Replies to This Discussion

You need to re-arrange you points in a DataTree, something like this:

 

Green Point:

{0}

0.Green Point

{1}

0.Green Point

{2}

etc

 

Yellow Point

{0}

0.Yellow Point

1.Yellow Point

2.Yellow Point

3.Yellow Point

4.Yellow Point

5.Yellow Point

{1}

0.Yellow Point

1.Yellow Point

2.Yellow Point

3.Yellow Point

4.Yellow Point

5.Yellow Point

etc...

Each Green Point connects with 6 Yellow Points.

Is that what you want?

 

Best,

Ralf

 

Depends on how your points are stuctured.

Say you have all green points in the same order as the yellow ones only there are six times more yellow. In that case you can use PartitionList with a constant size of 6. Graft the green points to match tree strutures.

If yellow and green points are unstructured or the ordering is more complex, you can use CPs (ClosestPoints). This will find a number of closest points (6 from the cloud of yellows) to a reference point (green). Graft green again to match tree structure.

Hello Hannes,

How can I know the structure or order of my point ?

I tried the closest point : it doesn't work. Maybe I made a mistake. what do you think ?

You do have a tree structure (dashed wires) for your points. The structure depends on how you create the points. That's impossible to answer from a screenshot. If you need help figuring that out, you should post the definition.

CPs works on clouds of points. That is at least a flat list of points in the C input.

sometime there is 4 connections, 6 connections or 10 connections

When naked edges = 4 connections

When clothed edges = 6 connections

There is exception also when surfaces are meeting = 10 connections.

Thank you for your help.

Marc

Ok, let's invert the logic. You got lots of yellow nodes that need to connect to few green ones. Each yellow node get only one connection to nearest green one, right?

Here's the brute force way to solve this problem. There are probably more elgant or efficient ways to solve this...

Attachments:

Thank you very much for your help I was really struggle for that one..

I think two component is quiet elegant and fast too.

Great.

Hello Hannes,

Big struggle on unify vector problem.

Would you know how to do that ?

Thank you.

http://www.grasshopper3d.com/forum/topics/normals-errors-unify

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