i want to use opennurbs c++ to try to convert subd to nurbs, and the test code is following. and the subd->HasBrepForm() is false.
What`s wrong with it?
Does opennurbs has the function to convert subd to nurbs?
ON_SubD* subd = new ON_SubD();
vtcs.push_back(subd->AddVertex(ON_3dPoint(0, 0, 0)));
vtcs.push_back(subd->AddVertex(ON_3dPoint(1, 0, 0)));
vtcs.push_back(subd->AddVertex(ON_3dPoint(1, 1, 0)));
vtcs.push_back(subd->AddVertex(ON_3dPoint(0, 1, 0)));
std::cout << subd->FaceCount() << ", " << subd->VertexCount()
<< ", " << subd->EdgeCount() << std::endl;
std::cout << "Has Brep Form: " << subd->HasBrepForm() << std::endl;
November 9, 2020, 9:26pm
In the standalone, openNURBS toolkit,
ON_SubD::HasBrepForm() always returns
false. The code for converting SubD objects to Breps is not included with the openNURBS toolkit.
Of course, these functions are implemented in core Rhino and accessible from Rhino plug-ins.
Does this help?
Yes. Thank you very much, I decide to turn to rhinoinside.
My target is actually use this “subd2nurbs” function in houdini.
And another question is, in RhinoCommon, SubDFacesList does not have “Add” method.
How can I construct a SubDFace and add it to a SubD?
November 10, 2020, 6:46pm
How would you do this if you were just using Rhino?
Thanks to reply.
I can see a lot of commands to create a subdface just in rhino, like _3DFace, it could just add some point to a face.
but in opennurbs and rhinocommom it seems not so straightforward.
And I cannot find a method to add SubD Face in rhinocommon API.
Could you help me figure out which api can do this? in rhinocommon. Or by now there are no api for this?
November 12, 2020, 8:26pm
A number of Rhino’s SubD creation commands just create meshes and then convert them to SubD.
Thank you for help.
Another question is:
Will Rhino 7 ver. add the similar “SubD.AddFace” and “SubD.Edges.FindEdge with two vertices” api to rhinocommon？like opennurbs c++?
Because I also want to crease edges in SubD, and Add Ngon face to SubD directly.