compute.rhino3d icon indicating copy to clipboard operation
compute.rhino3d copied to clipboard

Issue with HopsPoint/LIST input

Open wmich opened this issue 2 years ago • 1 comments

Seems like there is a problem with point list input in Hops since 0.14.0. I'm getting 1. point_list requires at least 1 items for a parameter that does have valid input. image

This is the code of the component that I'm running:

from typing import List
import ghhops_server as hs
from Rhino import Geometry  # type:ignore
from lib.hops_wrapper import HopsWrapper


@HopsWrapper.hops.component(
    '/test_inputs',
    name='TestInputs',
    nickname='TI',
    description='Test inputs 0.14.1',
    category='Utils',
    inputs=[
        hs.HopsPoint(
            'point_item',
            'PI',
            'Point ITEM input',
            hs.HopsParamAccess.ITEM
        ),
        hs.HopsPoint(
            'point_list',
            'PL',
            'Point LIST input',
            hs.HopsParamAccess.LIST
        ),
    ],
    outputs=[]
)
def test_inputs(pt1: Geometry.Point3d, pts: List[Geometry.Point3d]):
    print(pt1)
    print(pts)
    return

The same component works fine with Hops 0.13.1 image

wmich avatar May 31 '22 05:05 wmich

Hi, just to confirm, I have the same error since Hops 0.14.0

sperrault avatar Jul 17 '22 15:07 sperrault