Creating and Scaling Intermediate Lines in Closed Shapes

intermeditae line doubt.3dm (178.7 KB)
beginner to a grasshopper. can anyone please help me. I am trying to create intermediate lines in closed shapes and then scale both ends inside a little. What is the best way to achieve this grasshopper?

If your Surfaces are … er … hmm … Surfaces then an IsoCurve at 0.5 at U or V yields the desired Curve (Set both Domains to Interval (0,1)).

Other than that that’s - in a way - reverse Engineering. If possible avoid that.

Do instead:

  1. Define a “spine” Curve and perp Planes according some user defined div value.
  2. If the Curve is not planar (general case) mastermind a way in order the ref Vectors per plane (the classic ones: plane.XAxis/YAxis) have correct directions (that’s very easy via code [using Cross/Dot Products etc] - notify if you want a C# that does that).
  3. Using the planes place profiles (the same or variable per plane according some logic/rule: for instance a classic Sin/Cos scaling - see below etc). I.e. draw Geometry at the “global” Plane.WorldXY and then use a Plane to Plane trasformation (this is what does the Orient comp).
  4. Loft (or Sweep1) the profiles (assuming that they are “away” each other).

BTW: That’s the classic way for doing ramps/stairs etc. Like:

Hi Sri - there is a Tween Curve component in GH that should help with getting the curve you want.


Thank you for explaining PeterFotiadis

hi pascal , tween is used when there are two open curves isnt it ? , but i couldnt find out how to do it with closed curve or surface . if you have idea can you explain please . thank you sharing your idea