0

So the first problem will be explaining what I am after clearly.

I have two non-rational 3D b-splines. The first b-spline it the guiding spline. The second b-spline is a reference and it is essentially 'inside' of the first spline. ( the splines were generated in Solidworks )

Imagine a circular playground slide. The first spline is the center line of the slide. The second spline is the inside edge of the slide.

The inside spline will tend to be shorter than the center spline. The inside will also tend to have more curvature at any given point than the center.

The path of the slide is not perfectly circular. But the inside spline is always 'parallel' to the outside. ( very liberal use of the word parallel here )

What I am after:

Given a point along the center curve, I would like to find the point on the inside curve that is on the plane that is defined by the normal to the tangent of the center spline at that point.

Where I am at: I am using the geomdl library in python to manipulate the splines.

I can choose a distance along the center spline and from geomdl I get the 3D point and the tangent vector (A,B,C) of that point and therefore the plane at that point that is normal to the spline at that point.

What I am doing:

From the tangent vector and the point I compute the equation of the plane in the form of: Ax + By + Cz = D.

From there I guess at the point at the same distance on the inside spline and plug it into the equation for the plane that I already have. I use the error in D to guess at which way I should bump my guess on where the point on the inside curve might really be.

[ I understand that over the entire length of the two splines there may be more than one solution. i.e. if the curve wraps more than 180° there would be more than one point on the inside curve that lands on the plane defined by the center curve. In the local area that i am interested in this will not be a problem. Any second point would also be a long ways away from the center line. i.e. the correct point will be no more than 25 mm from the center point. A non-local point will be at least 3000 mm away. ]

This mostly works. But from time to time it fails. i.e. if D is very near 0 my guesses will diverge from the answer.

Currently I make 10 guesses, each guess having a smaller delta guess than the last.

I have a great number of these points to evaluate. My solution requires 10 X the number of calculations so it is not terribly efficient.

From my Google searches I believe that using the error in D in the equation of a plane may not be correct. I 'think' that D is the distance of the plane to the origin.(yes /no?) Therefore I am really comparing the distance of the two planes from the origin and not really from each other. If my guess happens to be on the "other side" of the origin then the distance's may be the same but opposite.

My Question: What is the correct way to go about this?

Is my assumption that D is the distance from the plane to the origin?

Is driving the error in D between the two points valid?

What is the correct way to do this?

Restate my question in different terms

Given a plane (Ax + By + Cz = D) how do I find the point on a given b-spline that pierces ( or is coincident to ) that plane (using geomdl.bcurve)?

( I am very much in over my head here so please forgive if this does not make sense )

Burtski
  • 451
  • 5
  • 19
  • 1
    The distance from the origin to the plane is D/sqrt(A^2+B^2+C^2). – fang May 01 '20 at 18:39
  • @fang Thanks, So using D to drive my guess is indeed valid? If the two planes are the same distance from the origin then they are one in the same? (Assuming the same A,B,C) – Burtski May 04 '20 at 20:09
  • Two planes with the same distance from the origin is not enough to say the two planes are the same. They need to have the same normal (i.e., same normalized A, B, C values). – fang May 05 '20 at 00:41

0 Answers0