Grasshopper

algorithmic modeling for Rhino

Problem with copy/paste arithmetic components - 0.90010

Hi,

If I put a value in one of the inputs of a "+", "-", "x" or "/" component, and then copy it, the value is lost in the copy.  Is intended behavior, a local problem on my computer or something else?  I don't know if the phenomenon extends to other components, I haven't tested them all.

Oh, also if I save the definition, close it, and reopen it, the value stored is also gone, even if the component wasn't copied.  :(

--Mitch

Views: 1028

Replies to This Discussion

Strange, this was a bug I fixed in 0.9.0010 and it is certainly working over here. Save/Open and Copy/Paste is the exact same operation internally, so it makes sense that they either both work or both don't.

I think it is to do with the Generic Data parameter, at least the bug I thought I fixed was.

Can you copy an Addition component with a value stored in one of the inputs, then paste into Notepad and post the resulting xml data here?

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Hi David,

Attached are two .txts, one (BeforeCopy) a Ctrl+C of a component with a value of 5.0 in 'b' and one from a copy of the first component (AfterCopy)...

--Mitch

PS, I'm also having a similar problem with the 'a' output in the Python component, as mentioned in another thread.  Wonder if it's related...

Attachments:

So the BeforeCopy.txt file contains the persistent data. If I paste it into my Grasshopper I get the '5' assigned to the B input. This doesn't seem to happen in Switzerland for some reason.

I attached a debug build of Grasshopper that has some extra messaging build in. Please follow these steps and let me know what happens:

  1. Close any instances of Rhino/Grasshopper you have running.
  2. Find Grasshopper.dll on your system and rename it to Grasshopper.blarg
  3. Download the Grasshopper.zip attached to this post and unzip.
  4. Put the local Grasshopper.dll where the original used to be.
  5. Start Rhino and run the _Grasshopper command.
  6. Create a new Addition component and put some integers in the A and B inputs.
  7. Copy the component, then paste it.

Either it will now work or there should be an error message. If neither happens I'm barking up the wrong tree entirely.

You can delete the debug Grasshopper.dll and rename the original back to Grasshopper.dll

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Attachments:

Hey David,

I'm sorry, it's neither...  It copies but both a and b are null afterward.  No error message (they both say "computed").  --Mitch

Well, I suppose that's something. At least it isn't a bug I've been staring in the face for hours now. I'll get you a different debug version tomorrow with more logging still.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

OK, thanks David.  Just FYI, we're installing the lab computers here at the school and I did the Rhino install this morning including the latest GH, and it has the exact same problem.  So it's not limited to "chez moi"...  --Mitch

Oh, and I have one install of 0.9006 here and it does not exhibit the problem, so it looks like it might have been introduced in 0.9009 or 10...  --Mitch

Added more logging, this time information is printed to the Rhino command history whenever a structure is deserialized.

Install this Grasshopper.dll as mentioned above, then do the following:

  1. Draw some geometry in Rhino.
  2. Create a new Geometry parameter in an empty document.
  3. Reference all the geometry you just made.
  4. Copy and Paste the Geometry parameter.
  5. Open up the Command History and paste the contents here.

A successful operation should look something like this:

GH_Structure deserialization begun
{
  (The local structure contains interfaces, not classes.)
  Deserializing at branch index 0, path: {0}
  Tracking down local type: Grasshopper.Kernel.Types.GH_Brep
  Local type found: GH_Brep
  Valid instance added to branch: Referenced Brep
  Tracking down local type: Grasshopper.Kernel.Types.GH_Curve
  Local type found: GH_Curve
  Valid instance added to branch: Null Curve
  Tracking down local type: Grasshopper.Kernel.Types.GH_Point
  Local type found: GH_Point
  Valid instance added to branch: Referenced Point
  Tracking down local type: Grasshopper.Kernel.Types.GH_Point
  Local type found: GH_Point
  Valid instance added to branch: Referenced Point
}

(The Grasshopper.dll I posted is a debug build so not really useful for production work as it does a lot of extra stuff that slows down solutions and display.)

--

David Rutten

david@mcneel.com

Poprad, Slovakia

OK, done.  3 closed BReps added and referenced; sphere, box, cylinder. As soon as I copy/pasted the component I got error screens going up (2, not three though) attached.  The command history dump is below, hope it helps...


--Mitch

2 polysurfaces, 1 surface added to selection.
GH_Structure deserialization begun
{
  (The local structure contains interfaces, not classes.)
  Deserializing at branch index 0, path: {0}
  Tracking down local type: Grasshopper.Kernel.Types.GH_Brep
  Null added to branch due to exception: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
  Tracking down local type: Grasshopper.Kernel.Types.GH_Brep
  Local type not found.
  Null added to branch.
  Tracking down local type: Grasshopper.Kernel.Types.GH_Brep
  Local type not found.
  Null added to branch.
}
Command: _CommandHistory

Attachments:

Ok great, I'll narrow down the search and post another debug build soon. I'll create a new topic in the Bugs forum for this.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Please see here: http://www.grasshopper3d.com/xn/detail/2985220:Comment:688655

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Indeed, the missing values...

In saved the cluster's all right. Values ​​are lost when the back to open it.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service