IsArc: Verifies an object is an arc curve object or is a NURBS curve object that looks like an arc.
can somebody post a Nurbs curve that looks like an arc - and IsArc returns true ?
If I _rebuild an arc and set the tolerance - parameter of IsArc (much) higher then the deviation - IsArc still returns false.
If I build a degree 2 curve and set the weight according to an similar Arc - isArc still returns false.
The function behaves like a IsRealArc Function - the behaviour i would need.
But the documentation claims, the Function is a “IsShapelikeArc” - the behaviour that would trouble me, but also would be necessary in other cases.
thanks Dale - so the _what (rhino command line) command will not show any difference, but a c# RhinoCommon Type-Test “if (Geometry) is ArcCurve” or “is NurbsCurve” in RhinoCommone does it. Any approach to distinguish the two types with rhinoscript ?
Both types export in dxf as Arcs. Can i trust on that ? (the Arc-like-nurbs while not become a spline or something else - even with strange settings ??) - i am exporting machine data.
And the pity - your info still does not solve my entire problem - the _convert command does not do anything on the attached curve. the strange thing: as soon as i move the curve it does the job.
Hi Tom - the curve, apart from the end caps, is already a series of very small arcs - as though it is the output from Convert on a simpler curve. What is the output that you were looking for from this curve?
dear pascal thanks for looking at this. The output i am looking for is Curve that only consists of Lines and Arcs - and a Rhinoscript that is handling that transformation. I use a scripted version auf the “_convert” command.
The curve i posted behaves strange: if i run the _convert command in place the command will do nothing. (_sellast is empty afterwards, or Rhinoscript LastCreatedObjects will find nothing)
if i move or copy the curve to a new location, the _convert command will react as expected. (_sellast / LastCreatedObjects will catch the curve)
see attachted screenshot showing the same curve in different locations with different results of the _convert command.
Therefore my problem is that the scripted version of the command will look like an error. (even if there is non) - i have hundreds of curves and i need a stable workflow.
thanks
best
tom
Hi Tom - it looks to me like the SelLast is getting the moved or copied curve - that is why it seems to react. I think nothing happens as far as Convert goes though, so SelLast drops back to the result of the move operation. As far as I can see the curve as you posted it is already composed of arcs and the two end lines. If you want to use the top-level Rhino command inside a script and know if there was a result inside a script, you can use
rs.LeastCommandResult() (Python) or Rhino.LastCommandResult() (Rhinoscript)
after running the command - if that function returns 0 then the command ran successfully and produced a result. In this case it returns 3, for failure.
Hi Tom Yep, thanks, I see it this time - and Rhino.LastCommandResult() does return zero for curve1. Hm. I also see that if I move curve1 after Convert, it becomes a bad object, in V5 and not in V6. As far as I can see, it all works as expected in V6/WIP.