Skip to content

Instantly share code, notes, and snippets.

@sbaer
Created September 12, 2013 21:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sbaer/6543953 to your computer and use it in GitHub Desktop.
Save sbaer/6543953 to your computer and use it in GitHub Desktop.
Scripting AttachGHSData with python
import rhinoscriptsyntax as rs
rs.UnselectAllObjects()
rs.Command('-AttachGHSData General Title "My Scripted Vessel" Enter')
id = rs.AddSphere((0,0,0), 30)
rs.SelectObject(id)
rs.Command('-AttachGHSData HullItems Add BySurface SelId ' + str(id) + 'Enter')
@BillZierke
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment