Dual color linetype

Hi all,
I am working on a wiring diagram involving many independent circuits, which I identify with (layer)colors ( electrical systems in a '50s railway carriage, you’d be surprised about the complexity…).
However, I am running out of easy to discern colors, and I wonder if there is a way to create a linetype like this:

Max.

not sure if that is possible, i assume you would have to try with hatches instead, one ugly workaround would be to use a 2d checker texture turn off one direction and turn the value of the other repeat to a good number and put that on a layer, duplicate the layers and edit the colours of each layer.

using any curve with offset then loft (could be macroed) for polylines you would have to MergeAllCoplanarFaces additionally, it has some skewed angles but maybe its an option.

textured curves.3dm (3.4 MB)

Thanks encephalon. Apart from the fact that I cannot quite follow you there, this is not the kind of method I was looking for, I was hoping for a way to create a line type that does that.
I tried to create two dashed line types in such a way that the dashes are complimentary, then just copy the line in place and specify each with one of the complementary line types. Did not give a reliable result.
In the end I settled for creating a differently colored parallel line at a distance equal to the printed line width. Not totally satisfactory, but workable and good enough for the intended purpose.

that is a bit contradicting, so did you follow in the end or not?

if its just for print display purpose why bother with hacking together 2 lines like these? ok my method does not yield any curves but if you only have to print these for representation why not?

meddling a bit more i figured that you could actually use pipe which will create a better following linetype and would be even faster to create. make a macro that adds a pipe with a fixed width after completing the line. make the material a layer material and anything you start drawing on it will turn into your dual color linetype. the only thing is that for polylines you would have to use the command convert with a fixed length before you use pipe obviously because you want the material fo follow a clean u v direction.

sorry if that is still not what you need…

@Gijs hacked something together with hatches for me at some point, maybe he could create something more appropriate? but then again that will not be lines for whatever purpose.

textured curves 2.3dm (4.6 MB)

I should have worded it differently, I meant to say that it was beyond my current knowledge of Rhino.

Do you mean to say I should create a dual color material (how?), and assign it to a layer?

Not obvious to me. It seems I am missing the basics of material handling. I will try to catch up on that. Thanks for your efforts to enlighten me.

Max.

This seems like a fun project. I’ll see if I can wire up a test command for this next week.

1 Like

which version of rhino are you using? i posted my last experiments which should be ready to go as V8 files, till Steve makes xmas come early, let me know if that helps, i can probably export to an older version.

encephalon, I do appreciate your efforts to help me. I do have the latest formal V8 version, so I can open the files you posted, no problem there. But I am not interested in a solution for my project anymore as I have an acceptable alternative.
I really am interested in your “experiments”, and I do intend to look into those. But I am spending too much time behind my computer screen as it is, so not right now.
Thanks again, Max.

yes those machines are eating us up, at some point we will become slaves to it, if… we not already are :vulcan_salute:

ok; I won’t work on this.

:cry:

Too bad - one of my current projects is to redraw a 1974 black and white car wiring diagram in color with striped wires… Could have used this.

1 Like

Hi,
There seems to be a connection with this post.

In general, in some software, it is possible to determine a geometry that you want to repeat along a line. Like a symbol, for example, which is multiplied along a line according to certain parameters. And then you can modify this line and the geometry adapts.

Here the base geometry would be a yellow rectangle hatch and a red rectangle hatch next to each other for exemple.

I don’t know if this would be possible in rhino, by script or grasshopper?

So I have just been playing around with workarounds a bit… So far I have this:

Basically, it’s just a copy/inplace of the curve, the linetype is applied to one of the copies and then BringToFront is used on it. The one that stays in the back is solid. The copies can be grouped together.

Unfortunately it can’t do diagonal striping, but this might temporarily be enough for my wiring diagram.

Just been futzing around with this some more to see if it’s good enough to make a first go at doing my wiring diagram.

I tried using the layer order to determine the draw order and that works fairly well.
First I set up 3 linetypes (could do many more), all by mm (not pixels):
1 dashed at 1.5mm
1 solid at 1.5mm
1 solid at 1.8mm (outline)

Then for each wire color there will be a master layer and three sublayers in order
Dashed, Solid, Outline - with the layer colors representing the wire colors. The outline is black to separate from the paper.

It’s still pretty kludgy to do…
First draw everything in simple line form
Then for each wire color, select all the lines and change to the first sublayer, then copy to the second and third sublayers. Group the 3 polylines for each wire together.

Still a lot of work unfortunately, but that’s all I can think of.