Grasshopper

algorithmic modeling for Rhino

Views: 1049

Replies to This Discussion

Have some fun with this attached (ex internal training for my people) and I'll do some less "cryptic" version later. That said as captured above is rather elementary: just get a centroid point for each curve and then move them around using the point list.

Anyway ... back to the attached thingy: Notice that even if you sort radially (the only way - except "some" cases. he he) the curves ... tags tell the old (OEM) indices story.

Move is fun as well (and maybe auto zoom).

Attachments:

thank you for reply Mr.  peter fotiadi

but my problem is i have some unfold object with number and same nested object . i want to orient unfold number to nested object for laser cutting. 

this is a example...

Attachments:

Like this?

Attachments:

Of course I'm lying (because I take for granted a condition that doesn't exist in real-life and/or in packing problems [i.e. previous vs new order of objects]):

Assume that you have a ListA of GeometryBase type of stuff.

Assume that these are duplicated into a ListB and then ListB is shuffled and/or send to some other portion of some code and/or translated and/or send to Mars.

This means that indices in ListA and ListB (or trees if trees are on demand) they have absolutely no relation.

How to "link" the proper pairs?

This does that C# (it keeps records on ListA/B HashCodes exactly after the duplication and PRIOR any further translation)i:

Back to "packing" (or - since is rather unlikely to find for free a decent solution - a min waste material attempt):

In order to do that (i.e. without a pack C#) you'll need manually arrange each object on a per object basis ... a task that actually manages persistent data and it's easily doable via code. I.e. pick this one and put it there > then pick another ... blah, blah.

Other than the above ... another C# attempts to locate clones (but equality on objects is a big/deep rabbit hole and by no means the results are guaranteed - unless you ask a gazillion of questions).

 

And these images are rather more explicit (Cyan are shuffled and then placed randomly on some sort of user defined region).

thankyou peter fotiadis
its solve my problem thanks a lot

Given the opportunity ... things are more "intriguing" when equality checks are not the proper ones (not to mention that there's non addressable cases).

See this.

Moment(s) of inertia De-activated. As captured clone checks include: Area, Curve segment count and curve length >> computer is way out of his depth.

Whilst this (far more easier case) always succeeds:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2025   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service