MLCad/LPub: buffer exchange issue - help sought


RE: MLCad/LPub: buffer exchange issue - help sought
#3
(2025-02-18, 6:23)N. W. Perry Wrote: There is a newer protocol in LPub3D called "buildmod" that should improve this…but I'm not sure if development was ever fully completed on that feature. If I understand it correctly, once you define a modification (like a not-pushed-in part), you can then APPLY or REMOVE that modification in subsequent steps.

But you're definitely not the first to want this. For a long time I've envisioned a !FLOAT command—which actually turns out to be essentially the same as buildmod, with one critical exception: To me, a key feature of such a system would be that there is only ever one type 1 line per instance of a part in a model. With both buffer exchange and buildmod, you have two (or more) type 1 lines representing the same physical part—one for its position in the finished model, and another for each modified or temporary position in prior steps.

Unfortunately, while I'm very good at envisioning things Cool I don't have that necessary skills to develop tools to put them into practice. (I could write the instruction manual for the world's greatest LDraw program; I just couldn't even begin to write the program itself!) So for now, !FLOAT remains purely theoretical, while buildmod is at least real and—maybe somewhat—usable.

To actually answer your question, though…

What I usually do is your first method, but instead of re-adding a huge mess of parts (everything in the buffer when it was stored), I would probably put them all into a subfile and just add that along with the floating part in its final position. So only two lines of code in the step where the buffer is retrieved.

I actually never thought about using the second way (where the buffer is retrieved and the pin re-added in each step where its position is temporary), but I kind of like it. The problem is that it makes many copies of the same type 1 line, which will result in many duplicates of the part if the model is viewed in a program that doesn't recognize buffer exchange (like LDView or Studio). So you have to have a second version of the file if you want to use it in these programs.

Of course the same problem exists with both methods, it's just that the first way has only one duplicate per part—but for many more parts instead of just the one. I actually wrote a script for LDCad to disable any type 1 lines (by commenting them out) that should be hidden by buffer exchange, so it's easier to create that second file.

Thank you very much for the super helpful reply!

Try as I might I cannot get LPub3D to work. When I can get it to start at all it always crashes long before I can do anything. I admire the effort that has obviously gone into it, but for now it's LPub4 with all its quirks for me.

I had not thought of putting the extra stuff in a submodel. That makes a lot of sense. Also scripts to perform some of these tasks is very sensible - now that I have confirmation I am not being stupid I may do this too.

If we are getting into wishlists it seems that what would really help here would be a command called something like TEMP that would actually like a more general version of Ghost. You would put some parts between TEMP START A and TEMP END A, and they would display as normal. Then later you would say TEMP REMOVE A, and those parts would be permanently removed from the model. And by default such parts would be excluded from the parts list. This would completely solve my problem, and it seems to me it would also make buffer exchange redundant (by being an easier to understand substitute).
Reply
« Next Oldest | Next Newest »



Messages In This Thread
RE: MLCad/LPub: buffer exchange issue - help sought - by Alexander Holroyd - 2025-02-18, 12:11

Forum Jump:


Users browsing this thread: 3 Guest(s)