LDraw.org Discussion Forums

Full Version: separating metal portions of 9V train track
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was wanting to separate the metal portions of
into 1 or more separate files.

Reason for this was that in the current implementation,
when you use that part in a model,
and you assign some color to it,
all edges on metal appear in that color,
this makes that part look weird.

Reason for that is that all edges and optional edges in that file
are coded in color 24, regardless whether they bound plastic or metal parts.

My problem is now this:

I can easily identify quads and triangles of color 494 (metal) and move them to a separate file.
Second step should have been to also move their bounding edges and optional edges there.

Would I have finished that, then the color problem would be gone, because in that new file X.dat,
I would use color 16 for quads and triangles, and 24 for edges and optional edges,
and then reference that file from 2859c00.dat, using color 494. This way, both the surfaces and
the edges would appear in correct color.

However, identifying which edges to move to X.dat is terribly difficult.
There are tons of such edges, and manual selection will introduce lots and lots of errors.

To accomplish this task, I would need help of a tool which doesn't exist yet.

It would let me specify some color, by which I would like to identify affected quads and triangles
(here: 494).
The tool should then run through the file and identify all edges and optional edges which bound
these, i.e., which share coordinates with them.

Using such a tool, it would be easy to find all edges in 2859c00.dat which need to be moved to a separate file.

(Of course, from a logic point of view, each own metal portion should probably go into its own,
separate ~part file, but to me that's second priority. Solving the miscolored edges problem has first.)

Unfortunately, without this tool, I sadly have to give up on this task for now :-(
Don't give up too soon. All you need is Edger2.

Since both files should carry its own edge lines, all you need to find is the triangles and quads that make up the metal part, all in colour 494, and move them to a separate file, and apply Edger2 to it. It will create the missing edge lines you are trying to find.

But yes, you also need to find the unneccesary edge and condlines in the parent file, but that shouldn't be too difficult in MLCad.
yes, I've already tried this.
it is easy to move the metal quads and triangles to a separate file and then apply edger 2.
the difficult part is,
getting rid of these (now superfluous) edges in the original file.
many of them are e.g. optional lines, and cannot properly be selected with the mouse.
others prolong and don't share coordinates with quads, but instead extend from metal to plastic parts,
so they need to be shortened, not removed.
this is where I gave up :-(
I agree it's far from obvious here... It should be possible to cobble something using Edger2 engine. What it would do is accept a key color from command line, then color any line or condline with the same key color if they border one (optionnaly two) key colored surfaces. I don't promise anything yet, I have to be in the right mood to write software...
Would it work to just ditch all line type 2 and 5, and create new lines with Edger2, or are there to many unmatched edges?
I made a quick test, doesn't look very good Sad