Is there any methods to obtain the multiplicities of the knots in the u parameter direction of MSBsplineSurface?
The C++ MicroStationAPI help documentation show many methods for working with an MSBSplineSurface. Unfortunately, the .NET DgnPlatformNet help does not show the same list. Perhaps Robert Hook or Yongan.Fu can provide better help?
MSBSplineSurface
Regards, Jon Summers LA Solutions
Answer Verified By: Shihang Zhang
Thanks
It is almost same in C# like below test code snippet:
private static void GetBsplineSurfaceKnots() { DgnModel dgnModel = Session.Instance.GetActiveDgnModel(); BSplineSurfaceElement bsElem = dgnModel.FindElementById((ElementId)1640L) as BSplineSurfaceElement; MSBsplineSurface bsSurf = bsElem.GetBsplineSurface(); string msg = "UKnotCnt=" + bsSurf.UKnotCount.ToString() + ", VKnotCnt=" + bsSurf.VKnotCount.ToString(); MessageCenter.Instance.ShowInfoMessage(msg, msg, false); for (uint i=0; i<bsSurf.UKnotCount; i++) { msg = "UKnots[" + i.ToString() + "] = " + bsSurf.get_UKnotAt(i).ToString(); MessageCenter.Instance.ShowInfoMessage(msg, msg, false); } for (uint i = 0; i < bsSurf.VKnotCount; i++) { msg = "VKnots[" + i.ToString() + "] = " + bsSurf.get_VKnotAt(i).ToString(); MessageCenter.Instance.ShowInfoMessage(msg, msg, false); } }
Yongan.Fu said:It is almost same in C#
Thanks!
I should mention that the .NET BSplineSurfaceElement is documented in help file BentleyGeometryNet. An annoying feature of the .NET API help is that it is divided between about five different .chm files.
BSplineSurfaceElement
.chm
Jon Summers said:An annoying feature of the .NET API help is that it is divided between about five different .chm files.
Yes, on the other hand, SDK help special download is available (not sure if for the current U17 too) that allows to search all files together, so the split into individual chm files is not so big pain ;-)
Regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Thanks, I tested a similar code yesterday and found that get_UKnotAt provides all the arrays and not the multiplicities directly.
Well, maybe I need to write codes to count them all, instead of getting the multiplicities of each directly.