Grasshopper

algorithmic modeling for Rhino

{A}(i) -> (i\n). i - as dynamic parameter. What realize this through script? Possible show 'Path Mapper' as work similar script? Want to understand as he works...

Views: 319

Replies to This Discussion

Hi Yurii,

the PathMapper is a very complicated piece of work, thousands of lines of code go into evaluating and parsing the mapping masks. You can however use PathMapper logic from your own code. What you need to do is create a GH_LexerCombo which contains the source and target mappings. Then you can call GH_Lexer.PerformLexicalReplace() to map a data tree.

--
David Rutten
david@mcneel.com
Poprad, Slovakia
Hi David,

Thank you great for answer. I want to split the sheet just as does Path Mapper on picture. It is Necessary therefor that to understand as they are bound indexes and paths. That it is necessary to change in this code to has occurred partition? GH_Lexer.PerformLexicalReplace() - much incomprehensibly for me although I have GH SDK, this it is difficult. I was more simply use List and DataTree parameters. Possible this do? With best wishes.

Here is code

Dim tree As New DataTree(Of String)
Dim i,j As Integer
Dim iList As New List (Of System.Object)
For i = 0 To nIndex
iList.Add(x(i))
Next
For j = 0 To nPaths - 1
Dim path As New GH_Path(j)
tree.Add(x(j), path)
Next
A = tree
B = iList

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service