| How to decrease a surface's degree? |
 |
| SunHongLei |
2012/12/11 10:44 |
How to decrease a surface's degree?
I know it can be done by appromaxtion,but I do not know how ?
any information will be appreciated?
|
 |
| |
 | | Rabih |
2012/12/11 13:53 |
Hi,
Handle_Geom_BSplineSurface nurbs_surface = new Geom_BSplineSurface(poles,uknots, vknots, umults, vmults, UDegree, VDegree,IsUPeriodic, IsVPeriodic);
nurbs_surface->IncreaseDegree(UDegree, VDegree);
Best regards
Rabih |
 |
| |
 | | SunHongLei |
2012/12/12 07:01 |
| I want to decrease degree not to increase degree ,but thanks your information all the same! |
 |
| |
 | | Rabih |
2012/12/12 15:11 |
Hi,
you need
Handle_Geom_BSplineSurface nurbs_surface = new Geom_BSplineSurface(poles,uknots, vknots, umults, vmults, UDegree, VDegree,IsUPeriodic, IsVPeriodic);
degree = nurbs_surface->GetDegree(); // degree = degree + 1 or +2 ... +3
nbKnots = nurbs_surface->getNBKnot();
if degree = degree + 2 -> Index + 2 and insert new knots or Multiplicities
nurbs_surface->Setknot(Index, knots);// new Knots
Please read the help
//! Modifies this BSpline curve by assigning the value K
//! to the knot of index Index in the knots table. This is a
//! relatively local modification because K must be such that:
//! Knots(Index - 1) < K < Knots(Index + 1)
//! The second syntax allows you also to increase the
//! multiplicity of the knot to M (but it is not possible to
//! decrease the multiplicity of the knot with this function).
//! Standard_ConstructionError if:
//! - K is not such that:
//! Knots(Index - 1) < K < Knots(Index + 1)
//! - M is greater than the degree of this BSpline curve
//! or lower than the previous multiplicity of knot of
//! index Index in the knots table.
//! Standard_OutOfRange if Index is outside the bounds of the knots table.
// formel
nbKnots = (degree + 1) + nbControlPoint
Best regards
Rabih |
 |
| |
 | | SunHongLei |
2012/12/14 06:35 |
Dear Rabih
Thanks for your kindly help! But I do not understand how your code decrease the surface's degree?
I mean I need decrease a surface'degree along U direction or along V direction,but how can I do it with the function:
Handle_Geom_BSplineSurface nurbs_surface = new
Geom_BSplineSurface(poles,uknots, vknots, umults, vmults, UDegree, VDegree,IsUPeriodic, IsVPeriodic);
Please help again ,Thanks very much!
Best regards
SunHongLei
|
 |
| | | |