Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Control points close together causing mesh overlap
#3
That does fix it, but with my current code, it creates another problem where the other segment connecting through that control point (that's not too close) gets pulled in and no longer looks correct.  It's been a little while since I actually wrote this code, so I'm trying to remember exactly what I did, but I remember that I had to essentially tune it to match what I needed.  For context, this is engineering data, and in addition to the points and vectors, I have a slack value, which I was unable to apply directly with Curvy, so I tweaked a scaling variable for the handles in my code (shown below) until it visually matched what I needed.

Is it possible to set the handles asymmetrically so I can check if a control point is too close to the one before or after it, and adjust the handle just on that side of the control point?

Code:
CurvySplineSegment segment = wireSpline.Add();
segment.SetLocalPosition(position);
segment.AutoHandles = false;
Vector3 handleOut = vector;
handleOut.Normalize();
handleOut *= SLACK_SCALING;
Vector3 handleIn = -handleOut;
segment.SetBezierHandles(0.025f, handleIn, handleOut);
Reply


Messages In This Thread
RE: Control points close together causing mesh overlap - by amccraw - 05-23-2020, 12:32 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Incorrect mesh alignment after extrusion on curved path Thinkurvy 10 21 04-17-2024, 10:57 AM
Last Post: _Aka_
  snap to the curve created by the curvy splines segment points ShiroeYamamoto 3 11 04-02-2024, 02:24 PM
Last Post: _Aka_
  Get position of all control points for a spline gekido 1 6 03-28-2024, 10:08 PM
Last Post: _Aka_
  Adjust radius of generated mesh via script? Shackman 1 4 03-26-2024, 01:12 PM
Last Post: _Aka_

Forum Jump: