Making multiple edge loops double-lined

Hi guys!

I made a previous thread a while ago and this is kind of a continuation of that one.
Check it out here: https://forums.sketchup.com/t/making-a-model-single-to-double-lined/30432

Basically I’m trying to create a PLUGIN that can achieve the functionality in the attached example image. This is because I want to automate the workflow of HUGE models with much more details than the example (think hundreds of rooms in an office). A model of single line loops (?) should be able to generate a double-lined model and faces should be kept.

I’ve looked at: http://sketchucation.com/pluginstore?pln=Latticeizer
I’ve tried to understand how that plugin works and I’ve managed to get something similar to work, but just for single loops.

Does anyone have any pointers on how to think about this?
Does anyone know if you could pay someone to get help with something like this?

Please ask if I wasn’t clear about anything.

Thank you very much in advance!

Have you tried using the Offset tool? I am not able to generate a video right now but maybe someone could generate one for you and show you how to use it.

The offset tool would help, but won’t do quite what the OP wants. For example, you can’t offset the single horizontal line on the left - you’d have to do it with Move/Copy instead - or select one of the adjacent perimeter lines instead.

You could do the rest of it approximately with the offset tool in a few separate steps for each part of the original drawing, doing a face or set of edges at a time.

But it’s a fiddle to do, and easy to get wrong. And needs clean up of extra short lines.

Probably needs a custom plugin, and some defined rules for what to do at (for example) T-junctions in the original like the single line on the left.

1 Like

Yes, you can offset a single line (or multiple for that matter) by just selecting the line(s) and then selecting the offset tool. Again, I am not currently able to generate a video or I would show you how it works.

When a try to offset a single line, I get the message ‘choose a face or two or more co-planar edges’ - or words to that effect (not at computer to check exact wording)

Sorry for any confusion!

I posted in this forum (Developers/Ruby API) because I’m trying to create a custom plugin which can achieve this functionality. This is because I want to automate the workflow of huge models.

Yes, if you try to select a single line, you can get that message. If you look at the video below (not the best one I have ever created), you will see how I was able to accomplish it when I do the single object attached to the left wall.

Hope this helps you…

1 Like

Thank you very much for the gif, but I really need to automate this process. I’m so sorry if I confused you guys, but I honestly though that this forum section would imply that I’m talking about custom plugin functionality.

Just curious about why you need a custom plugin. Do you want it to be able to select all lines within a banding box and offset them or what exactly are you wanting the plugin to do?

You are quite right, it should have. But I think in part I was trying to see whether the native tools could accomplish what you want, then be invoked by Ruby. Since it seems they can’t, at least not easily, you are right in thinking of using a Ruby plugin directly to manipulate the geometry. Your other thread suggested you had seen such functionality on other drawing programs. Have you any examples of how they work in practice, on geometry like what is in your models where you want to automate the double-lining?

How clear are you what should happen in awkward cases like the T-junction in your example? Do you want to offset half the double line separation in each direction? And keep the end level with the end of the existing line, or offset it out by half the separation again? Or put all of the separation on one side? If so, how does the algorithm or the user choose which side? And what other awkward cases can you think of?

Do you want the user to select (for example) a whole face with lines on it, just within a bounding box, an arbitrary selection of edges, a whole model, a whole component, or what?

Is this as simple as trying to generate wall thickness in a house plan, or more general, or more complex?

If you need direct user interaction with the plugin and the model for this sort of purpose, you need to make a Ruby Tool, which isn’t trivially easy, but there are examples around.

And presumably you will want at least a simple user interface to specify the offset required, and perhaps other options?

Are you planning to program this yourself?

Or do you want someone to do it for you? If the latter, then there’s a more appropriate forum section to post in - Commercial and Collaborative work.

I know some Ruby, but not enough to be able to program this, nor even to make more than the kind of general observations I’ve made above to suggest some issues to think about, before even starting to code.

1 Like

Dave, although you were able to make the offset, wouldn’t it be faster to draw a single additional edge to complete the wall? Also having to add that little segment means that there will be an excess line when the wall is extruded to make the walls 3D.

Yes, I was mainly trying to show the OP that you could do independent offsets.

I am not sure I understand what he is really wanting.

I think the manual workflow to replicate in ruby could be:

define separate paths for follow me

create a section cut from the result

does your ‘perimeter’ need to remain constant or can it ‘grow’ by half the thickness?

john

1 Like

I added this to the original post:

Thanks for the suggestion!

I’ve tried this solution but I find it hard to define working paths when there is a complicated model.
Do you have any advice how to think about the path definition?

Thank you very much for your answer and I’m very sorry for the late reply.
I’m going to try and answer all your questions…

  1. I’ve attached examples of the functionality I’m seeking. The goal is to use this for automation of walls in huge floor plans.

  2. Regarding the T-junktion questions I think the examples show the behaviour I’m seeking. The goal is for this solution to handle to most common scenarios so I’m not going to handle the most awkward cases. Please give me feedback if you have any regarding this.

  3. The user should select the whole model with faces and everything and my hope is to use that information to generate all the “walls”.

  4. Yes, this is as simple as trying to generate wall thickness in pretty simple floor plans. That is exactly it’s purpose. Do you know any similar plugins?

  5. I think the only option required is the wall thickness. Do you have any other suggestions?

  6. Yes, I am programming this. This is part of a plugin I’m working on with multiple tools to simplify the process of creating fire escape plans. All the other tools are done but I’m struggling to get this one right.

in your first example, after achieving your current result, have you tried edges_find_faces to fill in the voids?

john

1 Like

Thanks for the suggestion, that part is now working. :smiley:

However I’m still having some trouble with the second example, see below.
I’m very thankful for suggestions about this!

It’s not clear to me how or why you get from the Original model to this version of Current result. If the first case now works, why bother with this one, which seems to require inferring edges that don’t exist in the Current result?

Both separate cases needs to work, it was my way of explaining my problems. My current solution is inspired by the suggestion from TIG in a previous thread, as I explained in the original post. (Making a model single to double-lined - #2 by TIG)

Most of the issues I’ve had has been solved by grouping separate edge-loops. But my current problem is that it can only handle closed loops. So I have some problems when there is a free wall or a “non-closed wall” etc. See the image below…

(You should get the same result with the plugin my solution is inspired of SketchUp Plugins | PluginStore | SketchUcation)