DynamoDS / Dynamo

Open Source Graphical Programming for Design
https://dynamobim.org
Other
1.67k stars 622 forks source link

NurbsCurve Degree false info #3453

Closed ksobon closed 9 years ago

ksobon commented 9 years ago

Here's another thing that seems weird...when Curves converted to NurbsCurve using the ToNurbsCurve() method show their Degree as 3 even for linear objects. Aren't lines and polylines supposed to be Degree 1 (in most cases), Circles - Degree 2 and freeform curves Degree 3/5? I am a little confused about the information displayed here:

capture

ksobon commented 9 years ago

@hlp @lukechurch @holyjewsus anyone?

ptierney commented 9 years ago

These are degree 3 NurbsCurve "under the hood." The information being presented is correct.

You can have a linear degree 3 nurbs curve. It just has more control points than you'd need.

The geometry kernel has more problems with degree 1 curves, so we default to 3.

ksobon commented 9 years ago

I understand that, but I am still a little concerned that defaulting to degree 3 everywhere is confusing people. i dont think many people working with geometry expect seeing lines being represented with degree 3 nurbs curves. its just extra information that's not needed. This goes for superfluous knots at the end of each nurbs curve as well. more sophisticated software (rhino to name one) handles those at the back end while DS being a newer language still expect them to be included. I understand that you guys are not part of the revit team, but nurbs curves in revit are....well, impossible. I am not even going to get started on that. The only reason i mention revit here is because Dynamo, however much it tries to project itself as being independent software, is very much part of Revit. That being said i understand why geometry kernels are different. for the two, but the least Dynamo team should be working on is as smooth as possible conversions from Dynamo to Revit or from Revit to Dynamo. Right now I am seeing a lot of errors with geometry.ToRevitType() method (is line/point the only geometry supported? i couldnt get arcs and nurbs to work). @hlp

mostaphaRoudsari commented 9 years ago

Hi @hlp, is there any plan to have some methods to simplifyCurve or rebuildCurve in Dynamo. In case of free-form geometries with so many curves both of the above should be pretty useful and it should also address @ksobon's concern which I think is valid.

ptierney commented 9 years ago

@ksobon we're working on a more robust set of tools for taking your geometry from Dynamo to Revit, Rhino, or any other CAD program, using Autodesk's internal translation framework. It's awesome to see everyone writing tools to do low-level geometry conversion, but we offer tools so Dynamo users don't have to look under the hood at things like NURBS curve degrees.

pboyer commented 9 years ago

@ksobon,

This is an interesting discussion! However, you are hasty to call Rhino a more sophisticated geometry kernel. Maybe that's because you are more familiar with it or because you find it's API more friendly. We can't help you on the former and we're still working to improve the latter.

A pointer for you: The knots at either end of a NURBS curve are not "superfluous." Those identify whether the spline interpolates the end points or not.

ksobon commented 9 years ago

@pboyer i guess its both. However, I understand that DS is a new language and still being developed. I think its great, and it will only get better, not to mention that being able to have conversation like this with actual developers beats any support forum (that of Revit API for sure). Thanks for the tip about the knots.