0

I want to draw a bounded b-spline surface with 26 b-spline boundary curves.

image

I can draw b-spline surface (without any boundary) in OpenGL, but it is too difficult for me to draw surface and fit the boundary curves.

Any suggestions or ideas are appreciated.

https://drive.google.com/file/d/0ByjklWbi44oBZDhocGdNLWNvUWM/view?usp=sharing

PS: The Files is a sample in .stp format

1 Answers1

1

B-spline surfaces are naturally bounded. So when you say B-spline surface without any boundary, I think you are talking about untrimmed B-spline surfaces and what you want to do is to be able to draw trimmed B-spline surfaces.

Drawing a surface typically involves tessellation, which turns a continuous surface into a triangle mesh consist of many small triangles. Therefore you will need to do the following:

  • Find the surface parameter curve (SP curve) of the boundary curves. The SP curve is a 2D curve defined on the parametric domain of the B-spline surface.
  • Tessellate the 2D region on the parametric domain enclosed by all SP-curves.
  • Map the 2D tessellation on parametric domain back to 3D space to find the 3D triangle mesh.

Step 1 and step 2 are both non-trivial. So, indeed this will be a large task if you don't have any 3D library at your disposal and have to implement everything by yourself.

fang
  • 3,473
  • 1
  • 13
  • 19
  • Thank you for your answer~~, it help me a lot. By the way, do you have any recommended 3D library doing this? I hope the library is open-source and in C++,I am glad to trace the source code. – Angus Wang Sep 24 '15 at 03:39
  • Sorry. I am not familiar with open source 3D libraries. – fang Sep 24 '15 at 19:12
  • Pretty old question, but I would suggest you to take a look at OPENCASCADE (www.opencascade.com) - it's powerful and widely used in industry. If you want to start quickly, then you could check it's python bindings here: http://www.pythonocc.org/ By the way, it supports STEP files. – Fernando Mar 10 '17 at 01:21