Created
September 12, 2013 21:20
-
-
Save sbaer/6543953 to your computer and use it in GitHub Desktop.
Scripting AttachGHSData with python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to 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!