TryGetPolyline on ghhops_server

I am trying to get this to work in a ghhops_server with flask.

TryGetPolyline ()

Several types of Curve can have the form of a polyline including a degree 1 NurbsCurve, a PolylineCurve, and a PolyCurve all of whose segments are some form of polyline. IsPolyline tests a curve to see if it can be represented as a polyline.

Returns: tuple (bool, rhino3dm.Polyline)

  • True if this curve can be represented as a polyline; otherwise, false.
  • If True is returned, then the polyline form is returned here.
    Return type: (bool, rhino3dm.Polyline)

I am using this code but the hops component is going red.


curve try get polyline

name=“Try Get Polyline”,
description=“Try get polyline”,
hs.HopsCurve(“Curve”, “C”, “Curve to test”)
outputs=[hs.HopsLine(“Polyline”, “Poly”, “Polyline”)]
def crv_try_get_polyline(curve: rhino3dm.Curve):
polyline = rhino3dm.Polyline()
if curve.TryGetPolyline(polyline):
return polyline
return None

There is no hs.HopsPolyline so I am trying to output a hs.HopsCurve or HopsLine
The warning on the component reads: incompatible function arguments, mmmmm…

I am thinking that I might have to use
, access = hs.Paramaccess.LIST in the inputs or something like that…?