Quantcast
Channel: Grasshopper - McNeel Forum
Viewing all articles
Browse latest Browse all 39494

K2 231 Locator syntax

$
0
0

@PeterFotiadis wrote:

Hi Daniel,

In order to sample some geometry (lines) into Locator Goals, what is the correct syntax? (PS: Some mini SDK anyone? [ or maxi]).

Lines are the pulling cables in some Tree [red: shown at start pos] in some tensile membrane (from mesh Lists) meaning that one point is anchor and the other is some mesh vertex.

This doesn’t work:

for(int i = 0; i < varCables.Count;i++) { // pulling cables
Line cable = varCables[i];
Spring sc = new Spring(cable.From, cable.To, 0, varCablesStifness);
PS.AssignPIndex(sc, indexTol, byCurr);
Goals.Add(sc);

  // GH_ObjectWrapper ow = new  GH_ObjectWrapper(cable);
  // Locator locator = new Locator(ow);
  // PS.AssignPIndex(locator, indexTol, byCurr);
  // Goals.Add(locator);
}

BTW: The whole single List approach in PS.GetOutput(Goals); needs a certain rethininkg

best,Peter

Posts: 6

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 39494

Trending Articles