Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use HopsMesh for input #561

Open
StuvX opened this issue Dec 28, 2022 · 1 comment
Open

How to use HopsMesh for input #561

StuvX opened this issue Dec 28, 2022 · 1 comment

Comments

@StuvX
Copy link

StuvX commented Dec 28, 2022

Hi there - I am having trouble getting hops to process a mesh, it seems that gh is not passing the mesh to the hops component, any help or guidance is appreciated.

python file is as follows.

@hops.component(
    "/meshInOut",
    name="meshInOut",
    description="randomly shift mesh vertices",
    inputs=[
        hs.HopsMesh("MeshIn", "M_i", "Mesh to be shifted")
        hs.HopsNumber("Shift", "s", "distance of shift", default=2.0),
    ],
    outputs = [
        hs.HopsMesh("MeshOut", "M_o", "Shifted Mesh"),
    ],
)
def meshInOut(msh: r3.Mesh, s):
    print((msh))
    for v in msh.Vertices:
        v += np.random.random(3)*s
    msh_out = msh
    return msh_out

if __name__== "__main__":
    app.run()
@sbaer
Copy link
Member

sbaer commented Jan 5, 2023

See: https://discourse.mcneel.com/t/how-to-pass-mesh-to-hops/152611
The ghhops-server currently doesn't support communicating with Rhino 8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants