Grasshopper

algorithmic modeling for Rhino

Widget to select and instantiate components from the canvas. It uses an XML database to record the more frequent components and connections between components.
This allows selection using tabbed distribution, frequency of components/connections, frequency of parameters/connections and random components.

To use: alt + right click or dragging a wire + right click. To access the menu right click on inner circle.

I always wanted something like this to have a faster workflow. However, it is not much improvement as I expected, but it also requires getting used to this. Please note that the frequency components that appear depend of the xml database, so that with time your database will be closer to your really habits of components. However, you can register the components and connections of gh files from the AxonFile.gh. This file also contains more details.

To install:
- Put the .gha and .xml files in the Components Folder:
-- File > Special Folders > Components Folder.
-- Or C:\Users\USER\AppData\Roaming\Grasshopper\Libraries
- Restart Rhino + Grasshopper.

AxonWidget.gha (v 0.2.2  | 13/09/2017)

AxonConnectivityDatabase.xml

AxonFile.gh (requires Human plugin)

About AxonFile:

Perhaps I have done very confusing for someone. I wanted to put options to manipulate the database, but this is not necessary to use the widget.

Write connections from gh files in the Axon Database
This serves to read gh files and add that information (how many times a component is used and the connections between them) to the database. With this you can fill the database with your habits of use of components.

Reset Axon Database
This is to empty the database. Do not use if you do not want to lose the entire database. Without this registration, the widget does not work. This is intended for later to use WriteFromFile script with your own files, to have a database that collects your usage habits of components and connections between them.

Deserialize the top components of the Axon Database
This shows in human language most used components and their connections. It is only for the curious, or for those who need the information of the database for some reason.

Major changes of 0.2.1 release:

- Now when the widget is disabled, are not accessed at any time to the database, is completely isolated.

- Reduced runtime. Instantiate a component or create a connection and add it to the database took between 200 ~ 400 ms, now only takes between 2 ~ 10 ms!!. The database is only saved when you close a document, and not on any new record as before. I know, this was obvious, but really good improvement anyway.

- Bugs fixed.

Major changes of 0.2.2 release:

- Bug fixed: when the definition is very large instantiation took a long time.

Views: 3982

Comment

You need to be a member of Grasshopper to add comments!

Join Grasshopper

Comment by Daniel González Abalde on March 11, 2016 at 5:04am

********************************************************

Please refresh the .gha (v 0.2.1) and tell me whether the warnings and errors still shows up or not.

********************************************************

Comment by Robert Vier on March 11, 2016 at 2:44am

really cool widget!

however, as it happens - same contents in the crash report as abraham does! ;)

Comment by Abraham Yezioro on March 10, 2016 at 9:47pm

Hi Danirel,

Disabling the COFF works fine. Enabling it, inserting the first component gives the image i sent below and then works ok. BUT ... when i open a new file it crashes. This is the report:

System::Windows::Forms::Application::ThreadException event occured

SENDER: System.Threading.Thread

EXCEPTION: System.ArgumentException
MESSAGE: The path is not of a legal form.
SOURCE: mscorlib
CALL STACK
   at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
   at System.IO.Path.GetDirectoryName(String path)
   at AxonWidget.AxonXML..ctor(Axon Axon, GH_Document Doc)
   at AxonWidget.Axon.DocumentChanged(GH_Canvas sender, GH_CanvasDocumentChangedEventArgs e)
   at Grasshopper.GUI.Canvas.GH_Canvas.DocumentChangedEventHandler.Invoke(GH_Canvas sender, GH_CanvasDocumentChangedEventArgs e)
   at Grasshopper.GUI.Canvas.GH_Canvas.set_Document(GH_Document value) in C:\dev\grasshopper\1.0\root\src\GH_Canvas.vb:line 844
   at Grasshopper.GUI.GH_DocumentEditor.ScriptAccess_NewDocument() in C:\dev\grasshopper\1.0\root\src\GH_DocumentEditor.vb:line 2878
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.PerformClick()
   at Grasshopper.GUI.GH_MenuShortCutWrapper.GenerateShortcutCommand(Keys keys, ToolStripMenuItem item) in C:\dev\grasshopper\1.0\root\src\GH_MenuShortCutWrapper.vb:line 79
   at Grasshopper.GUI.GH_MenuShortCutWrapper.GenerateShortcutCommand(Keys keys, ToolStripMenuItem item) in C:\dev\grasshopper\1.0\root\src\GH_MenuShortCutWrapper.vb:line 142
   at Grasshopper.GUI.GH_MenuShortCutWrapper.GenerateShortcutCommand(Keys keyCode, ToolStrip menu) in C:\dev\grasshopper\1.0\root\src\GH_MenuShortCutWrapper.vb:line 45
   at Grasshopper.GUI.GH_DocumentEditor.EditorKeyDown(Object sender, KeyEventArgs e) in C:\dev\grasshopper\1.0\root\src\GH_DocumentEditor.vb:line 651
   at System.Windows.Forms.Control.OnKeyDown(KeyEventArgs e)
   at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
   at System.Windows.Forms.Form.ProcessKeyPreview(Message& m)
   at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
   at System.Windows.Forms.Control.WmKeyChar(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Thanks,

-A.

Comment by Daniel González Abalde on March 10, 2016 at 1:55pm

********************************************************

Please update the .gha to the second release. There are significant changes as reduced runtime.

********************************************************

Comment by Ángel Linares on March 9, 2016 at 9:43am

Awesome and amazing UI work :) Mcneel should consider to add it to GH2 ;)

Comment by Abraham Yezioro on March 9, 2016 at 5:29am

Yes. It works setting off he GHDeveloperSettings.

But since i suppose it is not the only way it should work, here it is the output of the crash:

System::Windows::Forms::Application::ThreadException event occured

SENDER: System.Threading.Thread

EXCEPTION: System.NullReferenceException
MESSAGE: Object reference not set to an instance of an object.
SOURCE: AxonWidget
CALL STACK
   at AxonWidget.Axon.Menu_ByFrequency(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Also when i insert the first component in the canvas i get this warning window:

-A.

Comment by 3dcon on March 9, 2016 at 4:53am

Hi Abraham and Daniel,

I had also a crashing Rhino by right clicking the widget.

For me it is working now by turning off the COFF as Daniel posted here:

>>in the rhino command line, type GrasshopperDeveloperSettings and enable/disable the COFF option and restart rhino + gh.

@Daniel  great work, thank you!

Comment by Daniel González Abalde on March 9, 2016 at 4:28am

Show me the crush message as before please, will not be the same.

Comment by Abraham Yezioro on March 9, 2016 at 4:25am

There is an improvement but not final.

I took out ALL components (userobjects and library). Only leave Human and Axon.

The first time i right click i get the widget fine (this is the improvement, because at this time before it crashed). But right clicking on the widget center and choosing any of the menu possibilities (By hierarchy, random, etc) crashes Rhino.

-A.

Comment by Daniel González Abalde on March 9, 2016 at 3:36am

Mmm when are deciding what items to put on the widget, he says that a component has no icon. Do you have some component without icon/transparent icon? Can you remove it temporarily (remove it from components folder and restart rhino+gh) and try again? If it is for this reason I have to do an update.
Thank you.

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2020   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service