Scale by distance

hi guys! I’m a newbie of grasshopper and now facing with some problems. I use lunchbox to form some triangles and set up a curve as an attractor. I firstly use Area to find out the center points of triangles, then calculate the distance between points and line, and scale it by distance. if the distance is smaller than 35 than scale to 0.75 times, if false than scale to 0.3 times. I have trouble using dispatch in this situation. How can I fix it? thanks!

you should dispatch the Geometries, and then maybe use Centroid on both dispatched geometry

maybe something like this:

otherwise you have to dispatch also the Centroids

difficult to guess with an image :slight_smile: uploading your GH file with internalized geometries is always the best choice

Thanks for the answers! It helps a lot. Sure. I’ll upload gh. next time. :smiley: