All positive values, don't work unless negated

I think I have experienced a bug in Grasshopper.
After not touching my grasshopper file, for a while and installing some new plugins- Pufferfish, Mesh Tools, and Moonlight. All positive values have to be negated.
I have to go to each slider in my file and add the ‘negative’ component to all outputs before using them.

This isn’t very nice.
I have already spent several days preparing the script and now, I have to go through everything again.
I already tried restarting both Rhino and Grasshopper.
I have restarted my laptop.

I use Rhino SR 25
Anyone have any ideas before I go through everything.
The script is almost 1MB.

Thank you.

It’s more likely to be the direction of some geometries you have of the start of the script.

Like, a line from A to B is different than from B to A. Visually is the same but on the code it can result in flipped/mirrored/reversed geometries.

Same for:
- a closed curve, going clockwise or counter-clockwise
- a surface , flipped or not
- a surface with same normal but different UV point order
- a mesh flipped or with different face corners order
- etc

You can also have cases where your code generate some randomly flipped geometries (like contour), then you know you have to check and enforce a specific orientation before using that geometry.

Difficult to tell without looking at the code, but normally you can build a solution with constant “direction”.

1 Like

Whatever the issue it has nothing to do with those plugins. They do not do anything out of the ordinary besides use Rhinocommon. Also we cannot tell anything without some files or atleast a screenshot. What are these values doing?

I got the script back to normal after, I uninstalled Pufferfish 2-9 and Mesh tools.
I am currently using the Pufferfish 2-6.
I will reinstall it when I need it.

Thank you.

I’m sorry, but this makes no sense. Can you provide more info? What specifically required reversed values?

I can send you both files, so you take a look.
I prepared the script for work on one building on a site. After completing the design for the first one. I went on to work on the next one, but I needed an upgrade of Pufferfish ( from 2-6 to 2-9) and Mesh tools for the second script for the design of the next building.

So, I installed Mesh tools and upgraded Pufferfish for the second design.But when I went back to open the previous Rhino file with corresponding grasshopper file, It gave me a lot of errors.
Particularly, with the crv offset on surface component.

So after a day, trying to get the file back to normal, ie : Flipping surfaces and normals to get extrusion and offsets going the right direction.

Thank you.

I decided to downgrade to Pufferfish(2-6)
And everything came back to normal, in the original file, no errors, no red flags.

I can send you the script privately, if you want to take a look at it.

Yes send it, but the curve offset on surface is native to gh so I don’t see how a plug-in would effect that. I suspect something else is going on. Will look at your file when you send it.

So the issue is that in V2.6 Offset Surface component there was a bug causing the offset to not always follow surface normal direction (sometimes a positive value would offset in the negative normal direction). If seems you have unknowingly corrected this in your definition with flip operations etc. Once you updated to V2.9 which has the correct offset functionality your definition was flipping to the wrong offset direction instead of correcting the previously bugged component from V2.6.