I’m a programmer living in Seattle and working at Robert McNeel & Associates.
I have recently become involved in a project where I was asked to calculate the hydrostatic performance of a particular type of vehicle. So, I purchased the GHS software package from Creative Systems, Inc. and learned how to calculate what I needed. I found that the best way to generate a GHS geometry file for fairly complex geometry was to use RhinoCAD, so I purchased RhinoCAD and have been learning how to use it. (I have never actually used a CAD package before.) Because of the requirements of this project, I have a desire to run the GHS software externally, potentially using a Python script (which I have never used before). I know that one can run Python scripts from RhinoCAD, so I was wondering if I could run GHS from a Python script within RhinoCAD. If you have any thoughts on how to do this, I would very much appreciated it.
These types of questions are best asked at http://discourse.mcneel.com/
You should be able to run GHS from a python script. Here is a script that launches notepad
I am still trying to use a Python script running within RhinoCAD to create a GHS geometry file. I saw this script that you wrote and posted on GitHubGIst:
import rhinoscriptsyntax as rs
rs.Command(‘-AttachGHSData General Title “My Scripted Vessel” Enter’)
id = rs.AddSphere((0,0,0), 30)
rs.Command(‘-AttachGHSData HullItems Add BySurface SelId ‘ + str(id) + ‘Enter’)
I posted this comment:
This script shows me that one can access the script for AtttachGHSData using a Python script run from RhinoCAD. However, I would like to do more, to write a Python script that creates a GHS geometry file from a vehicle modeled in RhinoCAD with a fairly complex geometry. It would need a hull with several components and be able to refine the stations. To do so, I need to know much more about using the rs.Command in Python to perform various functions of AttachGHSData. Where can I obtain this information? I would appreciate any help. Thanks!
Could you offer some help.
Thank you so much.
The Rhino help file has a section on command scripting. Almost all commands in Rhino have a ‘dashed’ version where the command starts with a – . Users on the discourse forum will be able to help with getting scripted versions of commands running in Rhino (ask specifically about command scripting from python as AttachGHSData is pretty specialized and most users don’t use that specific command.
Steve, I was skimming over your blog and saw the post about multithreading with Python which I think could drastically improve some tools im writing, but the code sample doesn’t seem to be there. Would you mind posting that again?
First of, thanks for your great inspiration in the different rhino/gh hacks!
This might be off-blog, but still on-topic 😉
I found your ExtractRenderMesh C# script on
As I only have skills in python and not C#, I was wondering if you were able to quickly hack the script to input a list of Meshes (in GH, not the prompt) and output the meshes as a GH output and not “baked” into rhino.
All the best and happy new years,
Fill in your details below or click an icon to log in:
You are commenting using your WordPress.com account. ( Log Out / Change )
You are commenting using your Twitter account. ( Log Out / Change )
You are commenting using your Facebook account. ( Log Out / Change )
You are commenting using your Google+ account. ( Log Out / Change )
Connecting to %s
Notify me of new comments via email.
Blog at WordPress.com.