# Find Point on B-Spline that fulfills constraints

Hello,

Using OpenCascade I would like to find a point P that fulfills the following conditions:

> P lies on a given BSplineCurve
> The angle formed between two vectors V1 = P - A (vector between a given point A and P) and V2 = B - P (vector between P and a given point B).

In other words I want to find a Point P on a given BSpline that formes an given angle angle(APB) with to additionally given fixed Points A and B.

I would be glad I someone has an idea how to find the point. Best way would be an fully analytical approach.

Thank you very much.

Sammy It seems difficult to solve it analytically.
Maybe you can define a function and find its roots numerically.
I believe there is a root finder in OpenCascad, maybe under
Module FoundationClasses » Toolkit TKMath » Package math

Mauro Perhaps you can construct the spline by using the vector constraints in GeomAPI_Interpolate?

Load (const TColgp_Array1OfVec &Tangents, const Handle< TColStd_HArray1OfBoolean > &TangentFlags, const Standard_Boolean Scale=Standard_True)
Assigns this constrained BSpline curve to be
tangential to vectors defined in the table Tangents,
which is parallel to the table of points
through which the curve passes, as
defined at the time of initialization. Vectors
in the table Tangents are defined only if
the flag given in the parallel table
TangentFlags is true: only these vectors
are set as tangency constraints. On 2nd thought, you might wanna look into GccAna:

GccAna_Circ2d2TanOn
GccAna_Circ2d3Tan
GccAna_Circ2dBisec
GccAna_Circ2dTanCen
GccAna_CircLin2dBisec
GccAna_CircPnt2dBisec
GccAna_Lin2d2Tan
GccAna_Lin2dBisec
GccAna_Lin2dTanObl
GccAna_Lin2dTanPar
GccAna_Lin2dTanPer
GccAna_LinPnt2dBisec
GccAna_NoSolution
GccAna_Pnt2dBisec What you are looking for is probably the inscribed angle theorem.
You could construct the two circles of the solution space (Fasskreisbögen in german) as Curves in OCC and use OCC functions to intersect the solution curves with your BSplineCurve.
I hope I understood your problem correctly and this is what you are looking for ... Thanks a lot. The "Fasskreisbogen" is exactly what I was looking for. I will give them a first try. If it is not working, I will try the other hints.