Closed rendetto closed 4 years ago
some back history? https://github.com/nortikin/sverchok/issues/3307
if the node is red, you can view the error either
in the Terminal ( Console ) or
in Blender TextEditor in a textblock called sverchok.log
in the sverchok n panel, turn on Show Error in Tree
i don't know what that error means : )
ZeroCurvatureException
is located in utils.curve.algorithms.py
(line 26-33) and is raised in utils.curve.core.py
(line 239) without being imported. @portnov ?
I've never noticed the option for viewing the error in the tree - that's cool :) Thanks for the suggestion.
@rendetto not everyone likes it, that's why it's optional :)
@portnov , maybe ZeroCurvatureException
should be moved into core.py
?
it's not clear to me if it makes sense to pass a "Line curve" to the Curve Frame node.
This particular case is to demonstrate the node option operation that is broken. In general the option "arbitrary frame" is one way to bypass the error that halts the calculations in case you have a part of a curve(or surface) that have zero curvature. Imagine you need to read many normals along a curve simultaneously and the curve had a flat region in the middle. If that option for skipping is not available the node will fail because of the zero curvature in just one region.
cool, i have almost no experience with the curve/surface class, so i also await @portnov 's view :)
ZeroCurvature means that the curve, literally, has zero curvature at the given point — this is obviously the case for straight line, also it is the case for curves that change direction of their curvature (S-shaped curves, for example). It is not possible to mathematically calculate the normal of such curve at such point, so there is an exception.
("Curve frame" node returns Frenet's frame of the curve, see https://en.wikipedia.org/wiki/Frenet%E2%80%93Serret_formulas)
What I can do, is to skip the particular value of T in case there are several T's provided and only some of them give error. This can also be unexpected: for example, you've passed 5 values of T, and as a result you have only 4 frames, because one of T values results in error...
Uh, it appears this node already has such an option: go to it's N panel, there is "On error": "Raise error" (default), "Arbitrary frame". Well, it actually does not even "skip": it returns just some frame with Z pointing along curve's tangent, without any guarantees where two other axes are pointing.
Well, this node appears to work "as designed". For specific cases, for example for extrusion of one curve along another, there are several modes that are usable in some other cases. Probably I'll add some of such modes into "curve frame" too; at least "Householder" and "Tracking", and probably "track normals"... some day... :)
Skipping values of T doesn't sound useful for me either. The problem I got now is - no matter I'm using "Raise Error" or "Arbitrary frame", the node always throws an error and the whole tree just stuck on that node. Previously it was fine, working like that:
Ah, I see
@rendetto I've pushed a fix into master. Please check.
It's working even better now. Thanks a lot!
Worked previously. Now it doesn't.