Grasshopper

algorithmic modeling for Rhino

I've written this script to move a box vertically to intersect an irregular polysurface so that the translation vector is determined by the maximum of the four distances between corner points on the object and their projected counterparts on the psrf.  It works fine for one object, but I need this to repeat for several objects.  The issue is that when I have multiple breps, the translation vector is the same for all since the list , and not unique per object.  How can I modify this to allow each object to move the specific maximum distance?  I assume it has something to do with branching but I'm not very aware of those operations.

Views: 5715

Attachments:

Replies to This Discussion

I realize this is a little unclear and poorly written.  Essentially I want to move objects A,B,..n along vertical vectors A',B',..n', but when setting multiple objects to the brep the translation vector is the same A' (or B' or C', whichever is the longest) for objects A,B,..n.  It's not a mystery why here, since the points from all objects being referenced are all going into one list, the ultimate minimum value for which is one single value, and not associated with the respective objects.  All objects are starting coplanar so the initial Z values are the same, but I need to retain the association of the minimum Z value PER OBJECT rather than a global minimum.  Also, this may have to be applied to maybe 4000 objects >.>

Right click on the first [BRep Param] and select Graft from the context menu. This should sort it all out as I cannot see anything wrong with your logic. Although just to note you shouldn't be using the output from the panels as these are in fact converted to Text. Grasshopper takes longer converting text back into numbers than if you used the actual values from the previous components. 

Thanks, it's working.  

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service