Is it possible to display knots on curves in Rhino? I seem to recall Alias showed them by default but I can’t find a setting to turn them on in Rhino. Can anybody point me in the right direction?
Thanks.
Is it possible to display knots on curves in Rhino? I seem to recall Alias showed them by default but I can’t find a setting to turn them on in Rhino. Can anybody point me in the right direction?
Thanks.
use the command EditPtOn
is that what you are looking for? its usually not set by default to any shortcut like PointsOn
which you can access via F10.
those are the two GUI icons responsible for the 2 commands
Thanks for the suggestion, Richard, but my understanding is that edit points are not the same as knots. A quick test seems to support this notion (I’ve marked the knots with points using knot snap, turned on edit points and they aren’t aligned).
Hi MisterB - currently, exising knots are marked inside the InsertKnot
& RemoveKnot
commands. Why do you need to see them?
-Pascal
what do you want with the knots? do you want to reshape curves? the knot is as far as i have understood exactly between the edit points, there is no way to switch those on if i am correct. the only why to access them is through RemoveKnot
or InsertKnot
Thanks, Pascal, those commands allow me to see the knots, all be it temporarily. It’s quicker than using points and knot snap.
I don’t really need to see them, it’s just a quick visual way of identifying multi span curves. It isn’t difficult to use the What command.
I’ve been using some Alias training material to brush up on certain Nurbs terms and Alias shows knots, I thought perhaps Rhino could do likewise. No matter, I’ll manage.
Thanks again.
Thanks again, Richard. Insert or Remove Knot will suffice. Thanks again.
hey pascal, why is it actually not possible to switch those on even though its possible to remove or insert them?
Another quick way to check for evil multi-spans is by selecting the curve then the properties tab and then click on details button. This displays the degree and point count. You can quickly see if it’s multispan or not. But you can’t see where the knots are though…
Thanks, mcvltd. That’s a handy shortcut that I don’t use often enough. Thanks for the reminder.
I agree that it would be good to see the knots, if you want to.
I started nurbs modelling with Alias many years ago (didn’t get very far with it but that’s another story). When I switched to Rhino, I actually liked the clean look of the curves. However, now I appreciate that the information contained within the Alias curve display is quite helpful, i.e. knots and the curve direction. None of it is essential, you can easily find this info if you need it in Rhino, but having it visually represented on screen at all times (unless you turn it off) is quite a good idea.
or you search knots by script.
optional color the singlespanCrvs
Option Explicit
Dim colorSingleSpanCrvs:colorSingleSpanCrvs= True
Call Main()
Sub Main()
Dim crvs
crvs = Rhino.GetObjects("get Curves to draw knots",4)
If Not IsArray(crvs) Then Exit Sub
Call Rhino.EnableRedraw(False)
Dim domain,knots
Dim lastKnot,pti,crvi,knot
Dim countKnots
For Each crvi In crvs
countKnots = 0
domain = Rhino.CurveDomain(crvi)
knots = Rhino.CurveKnots(crvi)
lastKnot = domain(0) - 1
For Each knot In knots
If knot > domain(0) And knot > lastKnot And knot < domain(1) Then
pti = Rhino.EvaluateCurve(crvi,knot)
Call Rhino.AddPoint(pti)
countKnots = countKnots +1
End If
Next
If colorSingleSpanCrvs Then
If countKnots = 0 Then
Call Rhino.ObjectColor(crvi,RGB(0,255,0))
End If
End If
Next
Call Rhino.EnableRedraw(True)
End Sub
hope that helps
but i agree - a show direction and show Knots option in the Document Properties View Setting would be nice to have
Thanks, Tom. I appreciate that.
Scripts have been one thing (well actually, one of many things) in Rhino I’ve never really delved into. Perhaps this is a good opportunity to do just that.
Thanks again, I’ll give it a whirl.
You can use CurvatureGraph to visualize knot locations. If the display density is set to 0 it shows a hair at each knot location.
I had a go at that Jim and got the following -
(yellow points are added using the knot osnap feature - I seem to get hairs where there aren’t knots as well - degree3 curve)
set density to 0
but generally i believe its not fully correct, if you have very few knots only it shows hair anyway
even there seem no knots.
Yes It seems to work only for nice curves,
On curves that are not so nice it throws in extra hairs where the curvature is high,
yes on strong curves it shows more hair, but when you have enough knots it equals
but still i am wondering why this would not be possible to handle more intuitiv.
Strong?? I would think weak would be a more accurate adjective.
If you had the tools to view knots then the next thing you would want is tools to edit them.