How to create a NURBS Surface given a gird of XYZ points

How to create a NURBS Surface given a gird of XYZ points

Anonymous
Not applicable
966 Views
3 Replies
Message 1 of 4

How to create a NURBS Surface given a gird of XYZ points

Anonymous
Not applicable

Hi everyone,

I want to create a solid using BRepBuilder. One surface of the solid is a non planar curved surface defined by a grid of XYZ points. I can create a HermiteSurface from these points using HermiteSurface.Create, but BRepBuilder does not support HermiteSurface. I could not find an API method to directly create a NURBS Surface from these points. The BRepBuilderSurfaceGeometry.CreateNURBSSurface seems too complicated for this purpose because it is not easy to get all those inputs. If I can create a HermiteFace, I may use GetNurbsSurfaceDataForFace to get the inputs for CreateNURBSSurface. However, I could not find a way to get a HermiteFace.

Any suggestions would be greatly appreciated. Thanks

0 Likes
967 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable

Could anyone please tell me which API method returns a HermiteFace object? If there is no such a method, what is the purpose of HermiteFace class?

0 Likes
Message 3 of 4

Anonymous
Not applicable

I have been working on this for quite a while. I calculated the control points of URBS Surface from a grid of surface XYZ points by solving a system of linear equations, and create the NURBS Surface using BRepBuilderSurfaceGeometry.CreateNURBSSurface. I then used the URBS Surface in BRepBuilder to create the solid. For some cases, I can get the correct solid. But for others, I got various kinds of internal exceptions.

I found the following link posted in 2014:

https://forums.autodesk.com/t5/revit-api-forum/nurbspline-creation-error/td-p/4831565

The development team said the Revit NURBS spline functions are limited. I’d like to know if the NURBS surface and spline have been improved since then. Could anyone please tell me if my approach to create a solid is the right way?

 

I do not use GeometryCreationUtilities because it also throws internal exceptions, as explained in one of my posts:

https://forums.autodesk.com/t5/revit-api-forum/createsweptblendgeometry-failed/td-p/9058479

 

Thanks,

 

0 Likes
Message 4 of 4

Anonymous
Not applicable

 I gave up on BRepBuilder. Now I am trying TessellatedShapeBuilder. In my testing example, I can create a solid using TessellatedShapeBuilder, as shown in the figure. But How can I delete all those internal edges?

Thanks,

 TessellatedShapeBuilder.PNG

0 Likes