What’s harder than solving a problem with GH is inventing similar scenarios for the community to help solve — because my work prevents me from showing or even implying the kind of work I’m doing. It’s not top secret, but it is sensitive.
I would love nothing more than to share the actual project and say “Here, this is the problem right here, and I need this to happen when I do this so we have this information from there…” Know what I mean?
What would REALLY help me is to set custom colours, patterns and thicknesses for lines I get GH to draw. Much of what I do requires lines to overlap each other. Sometimes I generate a line between two moving points just so I have a live feed on measurement. Then I have a second line in the very same spot that I can control the length of. But all lines have the same display property: red and solid. I would be nice to make the measurement line a dotted line in blue with a 50% alpha and a thickness of 3. Sometimes I select lines in GH but can’t see them highlight because other lines are over them in the same place. I end up hiding those lines just to see where I’m going.
the attached file has a C# component which draws curves using a custom colour, width and dash-pattern. The dash pattern is what takes up 90% of the code, so if you don’t need that we can rip it out and make the code a lot easier to understand.
The dashes+gaps are measured in world space, not screen space. It’s simply a bit of text with any number of numeric values separated by a space. The first value becomes the first dash, the second value the first gap, the third value the second dash and so on. The list is just cycled through until I run out of curve to chop up.
It was written in GH1 for RhinoWip. There should be no compatibility issues from the GH side, but something went wrong with the System.Drawing.Color compilation.