
Thu, 09/07/2006 - 18:35
Forums:
hello all,
I saw someone already brought up this question, but never get answered. How to build a closed surface from points to bspline surface.
Here is the problem:
Handle(Geom_BSplineSurface) surf = PointsToBSplineSurface(pnt);
surf->SetUPeriodic;
This seems right, and it changes the logical value of U or V direction periodic to TRUE in the STEP file I created. But the result is never correct.
It's not so simple? Or there is something missed?
Thank you,
Fri, 09/08/2006 - 10:38
Hi,
it is not egnough to set the periodic flag, you also have to manipulate the "multiplicities". I did it for the BSpline curve, it should be the same for the surface. I could send you or post a piece of code (although written in C#)
best regards
Gerhard
Fri, 09/15/2006 - 23:10
Please do that, I guess the one for the curve will be helpful.
Fri, 09/15/2006 - 23:11
Please do that, I guess the one for the curve will be helpful.
thank you very much
Mon, 09/18/2006 - 11:13
Hello Han,
this is my code, I am not sure, whether it works in your scenario:
if (multiplicities[0]>degree) multiplicities[0] = degree-1;
multiplicities[multiplicities.Length-1] = multiplicities[0];
int sum = 0;
for (int i=0; ipoles.Length)
{
if (multiplicities[j]>1)
{
--sum;
--multiplicities[j];
}
if (sum>poles.Length)
{
if (multiplicities[multiplicities.Length-1-j]>1)
{
--sum;
--multiplicities[multiplicities.Length-j];
}
}
++j;
if (j>multiplicities.Length/2) j = 0;
}
while (summultiplicities.Length/2) j = 1;
}
multiplicities[multiplicities.Length-1] = multiplicities[0];