Jump to content
THIS IS THE TEST SITE OF EUROBRICKS! ×
THIS IS THE TEST SITE OF EUROBRICKS!

Recommended Posts

Posted

Ah, that's an interesting one. I believe someone on the LDraw forums had a nice solution for something like that that consisted of a bunch of LPUB meta commands. I'll see if I can find it.

Btw, when creating instructions, I can really recommend to keep 1 'vanilla' file which just consists of the model and nothing more. And 1 file for the instructions which includes things like buffer exchange, ghosting, lpub commands etc. That clean file makes it easier (and less chances for errors) when creating renders and parts lists etc. :wink:

EDIT: here you go. I've never tried it myself and I'm not 100% it's what you need, but it's worth a try :wink:

  • Replies 429
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Posted

I move parts in instructions with buffer exchange, and then ignoring the second copy of the parts in the partslist. I can send you an example if you'd like, if you PM me your email address.

Posted

I move parts in instructions with buffer exchange, and then ignoring the second copy of the parts in the partslist. I can send you an example if you'd like, if you PM me your email address.

The thing is, you can't use buffer exchange through multiple (sub)models right? You can't buffer A in submodel 1 and then retrieve A in the main model. As far as I know :look:

Posted (edited)

The group function looks exactly like what I need. But does it also work with LPub3D? Cause it doesn't seem to work for me (the 'old' axle is still visible next to the 'new' one) :(

These are the code snippets that I use:

First in the submodel (which is part of the big file):

0 MLCAD BGT group_axle

1 0 80 80 0 -1 0 0 0 0.7071 -0.7071 0 -0.7071 -0.7071 3706.dat

0 GROUP 1 group_axle

And then in the main model:

0 STEP

0 !LPUB REMOVE GROUP group_axle

0 LPUB PART BEGIN IGN

1 0 60 80 0 -1 0 0 0 0.7071 -0.7071 0 -0.7071 -0.7071 3706.dat

0 LPUB PART END

I must say there is some ambiguity on the net for the exact commands:

I have seen both MLCAD BGT group_name as well as MLCAD BTG group_name

Also I have seen both !LPUB REMOVE GROUP group_name as well as !LPUB GROUP REMOVE group_name (but this latter variant gives a parsing error in LPUB3D so I assume that is incorrect)

Edited by Jeroen Ottens
Posted (edited)

I'll look in to that Jeroen.

Edit: I guess I was wrong about removing a group from a submodel in the main model. That does not work.

To be sure about the commands (group name = A)

Before every brick in the group

0 MLCAD BTG A

After the last brick in the group

0 GROUP x A

where x is the amount of bricks in the group.

The bricks you add to the group do not have to be in the same step or follow the hierarchy of the lines, but must be in the same model (main or sub) where you remove the group using the command:

0 !LPUB REMOVE GROUP "A"

Jeroen: removing the axle is done with buffer exchange in combination with ghosting.

I'll make an example for that.

Edited by Jaco
Posted

The group function looks exactly like what I need. But does it also work with LPub3D? Cause it doesn't seem to work for me (the 'old' axle is still visible next to the 'new' one) :(

These are the code snippets that I use:

First in the submodel (which is part of the big file):

0 MLCAD BGT group_axle

1 0 80 80 0 -1 0 0 0 0.7071 -0.7071 0 -0.7071 -0.7071 3706.dat

0 GROUP 1 group_axle

And then in the main model:

0 STEP

0 !LPUB REMOVE GROUP group_axle

0 LPUB PART BEGIN IGN

1 0 60 80 0 -1 0 0 0 0.7071 -0.7071 0 -0.7071 -0.7071 3706.dat

0 LPUB PART END

I must say there is some ambiguity on the net for the exact commands:

I have seen both MLCAD BGT group_name as well as MLCAD BTG group_name

Also I have seen both !LPUB REMOVE GROUP group_name as well as !LPUB GROUP REMOVE group_name (but this latter variant gives a parsing error in LPUB3D so I assume that is incorrect)

OK, reading this I think I now know what you want to do.

The axle needs to be pushed inward a few steps after the submodel that it is in.

I found an example in the MINING TRUCK - 42035

http://cache.lego.com/bigdownloads/buildinginstructions/6125480.pdf

On page 9 step 7 there are 2 blue long pins. These are in a submodel.

These need to be pushed in in the next step (page 10 step 8).

We can make this with LPub too. I'll work out an example.

Posted (edited)

Copy this code and save as MPD and open in LPub.

0 FILE main.ldr
0 Remove group test
0 Author: Jaco van der Molen [Jaco van der Molen]
0 !LICENSE Free for non-commercial use.
0 !LPUB MULTI_STEP BEGIN
0 ROTATION CENTER 0 0 0 1 "Custom"
0 ROTATION CONFIG 0 0
1 2 0 0 0 0 -1 0 1 0 0 0 0 1 32316.dat
0 STEP
0 !LPUB CALLOUT PLI PER_STEP FALSE
0 !LPUB CALLOUT BEGIN
1 0 20 0 80 1 0 0 0 1 0 0 0 1 submodel-1.ldr
0 !LPUB CALLOUT POINTER BOTTOM 0.633 0.690 0.112 0
0 !LPUB CALLOUT PLACEMENT TOP CENTER ASSEM OUTSIDE
0 !LPUB CALLOUT END
0 !LPUB CALLOUT ALLOC HORIZONTAL
0 BUFEXCHG A STORE
0 !LPUB PLI BEGIN IGN
1 1 40 0 40 -1 0 0 0 -1 0 0 0 1 6558.dat
0 !LPUB PLI END
0 MLCAD ARROW 4 90 0 40 1 0 0 0 1 0 0 0 1 12 6 16 40 0 30 1 2 16 16
0 MLCAD SKIP_BEGIN
3 4 74 0 40 90 -6 40 90 6 40
4 4 90 -3 40 130 -3 40 130 3 40 90 3 40
0 MLCAD SKIP_END
0 STEP
0 BUFEXCHG A RETRIEVE
0 !LPUB PLI BEGIN IGN
1 1 20 0 40 -1 0 0 0 -1 0 0 0 1 6558.dat
0 !LPUB PLI END
0 STEP
0 !LPUB MULTI_STEP END
0 NOFILE
0 FILE submodel-1.ldr
0 Name: subModel-1.ldr
0 Author: Jaco van der Molen [Jaco van der Molen]
0 !LICENSE Free for non-commercial use.
0 ROTATION CENTER 0 0 0 1 "Custom"
0 ROTATION CONFIG 0 0
1 0 0 0 0 0 1 0 -1 0 0 0 0 1 32316.dat
0 BUFEXCHG A STORE
1 1 80 0 -40 -1 0 0 0 -1 0 0 0 1 6558.dat
0 MLCAD ARROW 4 20 0 -40 1 0 0 0 1 0 0 0 1 10 4 12 40 0 30 1 2 16 16
0 MLCAD SKIP_BEGIN
3 4 8 0 -40 20 -5 -40 20 5 -40
4 4 20 -2 -40 60 -2 -40 60 2 -40 20 2 -40
0 MLCAD SKIP_END
0 STEP
0 BUFEXCHG A RETRIEVE
0 BUFEXCHG A STORE
0 !LPUB PLI BEGIN IGN
1 1 20 0 -40 -1 0 0 0 -1 0 0 0 1 6558.dat
0 !LPUB PLI END
0 STEP
0 BUFEXCHG A RETRIEVE
0 !LPUB NOSTEP
0 NOFILE

Though I called it a Remove Group Test, no remove group needed here. Only done with Buffer exchange.

If the pins are pushed in later in the model, you need to use remove group.

I'll make an example of that too.

Edited by Jaco
Posted

This example uses buffer exchange and remove group.

Like said: no ghosting is needed, because this is native to MLCad to not show floating parts in the main model that are in a submodel.

0 FILE main.ldr
0 Remove group test
0 Author: Jaco van der Molen [Jaco van der Molen]
0 !LICENSE Free for non-commercial use.
0 !LPUB MULTI_STEP BEGIN
0 ROTATION CENTER 0 0 0 1 "Custom"
0 ROTATION CONFIG 0 0
1 2 0 0 0 0 -1 0 1 0 0 0 0 1 32316.dat
1 0 10 0 40 1 0 0 0 0 -1 0 1 0 2780.dat
0 STEP
0 !LPUB CALLOUT PLI PER_STEP FALSE
0 !LPUB CALLOUT BEGIN
1 0 20 0 60 1 0 0 0 1 0 0 0 1 submodel-1.ldr
0 !LPUB CALLOUT POINTER BOTTOM 0.633 0.690 0.112 0
0 !LPUB CALLOUT PLACEMENT TOP CENTER ASSEM OUTSIDE
0 !LPUB CALLOUT END
0 !LPUB CALLOUT ALLOC HORIZONTAL
0 !LPUB PLI BEGIN IGN
0 MLCAD BTG A
1 1 40 0 20 -1 0 0 0 -1 0 0 0 1 6558.dat
0 GROUP 1 A
0 !LPUB PLI END
0 STEP
1 0 10 0 -40 -1 0 0 0 -1 0 0 0 1 2780.dat
0 BUFEXCHG A STORE
0 MLCAD ARROW 4 90 0 20 1 0 0 0 1 0 0 0 1  12 6 16 40  0 30 1 2  16 16
0 MLCAD SKIP_BEGIN
3 4 74 0 20 90 -6 20 90 6 20
4 4 90 -3 20 130 -3 20 130 3 20 90 3 20
0 MLCAD SKIP_END
0 STEP
0 BUFEXCHG A RETRIEVE
0 !LPUB REMOVE GROUP "A"
0 !LPUB PLI BEGIN IGN
1 1 20 0 20 -1 0 0 0 -1 0 0 0 1 6558.dat
0 !LPUB PLI END
0 STEP
0 !LPUB MULTI_STEP END
0 NOFILE 
0 FILE submodel-1.ldr
0 Name: subModel-1.ldr
0 Author: Jaco van der Molen [Jaco van der Molen]
0 !LICENSE Free for non-commercial use.
0 ROTATION CENTER 0 0 0 1 "Custom"
0 ROTATION CONFIG 0 0
1 0 0 0 0 0 1 0 -1 0 0 0 0 1 32316.dat
0 BUFEXCHG A STORE
0 GHOST 1 1 80 0 -40 -1 0 0 0 -1 0 0 0 1 6558.dat
0 MLCAD ARROW 4 20 0 -40 1 0 0 0 1 0 0 0 1  10 4 12 40  0 30 1 2  16 16
0 MLCAD SKIP_BEGIN
3 4 8 0 -40 20 -5 -40 20 5 -40
4 4 20 -2 -40 60 -2 -40 60 2 -40 20 2 -40
0 MLCAD SKIP_END
0 STEP
0 BUFEXCHG A RETRIEVE
0 BUFEXCHG A STORE
0 !LPUB PLI BEGIN IGN
0 GHOST 1 1 20 0 -40 -1 0 0 0 -1 0 0 0 1 6558.dat
0 !LPUB PLI END
0 STEP
0 BUFEXCHG A RETRIEVE
0 !LPUB  NOSTEP
0 NOFILE 

Posted

Hello everyone. I'm newbie to LDCad (and LPub3D) and also a bit late to the discussion. Anyway, let me ask several questions (which probably have been answered already) just to make sure I got it right from reading the previous comments:

  • For buffer exchange, I have to switch into MLCad?
  • To show temporare part/assembly placements (before push, rotation...) I need to use Ghost on them?

I also have a generalized question: What is the correct (best) routine for using groups and sub-models? So far I learned to use sub-models for sections that I want to build in callouts (even for like 4-part assemblies). Groups I don't use very much, sometimes to make sure I don't screw up some assembly that is eventual.

Lastly, does anyone know about some good guide/tutorial onto LDCad in general but mainly this Buffer Exchange related stuff?

Thank you and forgive my ignorance, I hope it won't last for very long! :D

Posted

For buffer exchange, I have to switch into MLCad?

Not necessarily. Although Buffer Exchange is native to MLCad, you can add the command lines by hand in a text editor.

It is not yet implemented in LDCad.

See https://sites.google.com/site/binarybricks/mlcad/lessen/buffer-uitwisselen (in Dutch, but very good translateable with Google Translate)

To show temporare part/assembly placements (before push, rotation...) I need to use Ghost on them?

No. Ghosting is also native to MLCad and is only handy if you use buffer exchange in submodels. You ghost the floating parts to exclude them from rendering in the main model.

LPub does not need ghosting.

I also have a generalized question: What is the correct (best) routine for using groups and sub-models? So far I learned to use sub-models for sections that I want to build in callouts (even for like 4-part assemblies). Groups I don't use very much, sometimes to make sure I don't screw up some assembly that is eventual.

A group is handy for example when you want to rotate a whole bunch of parts.

A group is needed for advanced building instructions if you want to use the Remove Group option in LPub.

A submodel is handy if you use it more then once in the model.

A submodel is needed if you want to make a call out in LPub or a multi step building page for building it.

Lastly, does anyone know about some good guide/tutorial onto LDCad in general but mainly this Buffer Exchange related stuff?

The LDCad documentation (http://www.melkert.net/LDCad/docs) is rather good, though sometimes somewhat technical. Still a very good place to start.

The LDraw forums (forums.ldraw.org) are a good source for answers and asking new questions.

And my website (binarybricks.nl and lpub.binarybricks.nl seems good too :-) Though the LDCad part is still under construction and in Dutch, but translatable.

The LPub manual is in English and the documentation on version 4.0.0.11 does mostly apply to LPub3D too.

Thank you and forgive my ignorance, I hope it won't last for very long! :D

No problem and welcome to the club!

Posted

^Thank you Jaco. I believe you already helped me some on LDraw forum. It is just so anoying to use that I rather moved here :) I'd say it would be worth considering to move whole community forum - It simply couldn't be less convenient.

If I may extend my questions onto example - I want to do something like this:

25468254802_e88d8cceed.jpg

(this is just LDCad screenshot with painted arrows)

So in the next step, all these wedge plate assemblies are tilted to form the front. Unfortunately, even before I could think about buffer exchange, I found out I can't set the propper rotation axis to these side parts, mainly because these are already tilted in another direction. The desired rotation axis is this:

25587382085_3428ee3ee0.jpg

Any easy way to do that? By the way all these moving parts are submodels since I wanted to add them as callouts in LPub3D.

Thanks!

Posted
So in the next step, all these wedge plate assemblies are tilted to form the front. Unfortunately, even before I could think about buffer exchange, I found out I can't set the propper rotation axis to these side parts, mainly because these are already tilted in another direction. The desired rotation axis is this:

The best way is to use relative grid, as described here ("Building at an angle using a relative grid" at the end of page). Roughly speaking, select the hinge part and press 'o'. From there, the origin and axis orientation will be those of the hinge part, so it will be easy to move rotation center there (or use a bar 4L snapped in hing as helper part to define rotation center), and rotate the assembly around its hinge. When you are done, unselect everything and press 'o' again to come back to global origin/orientation

It is just so anoying to use that I rather moved here :) I'd say it would be worth considering to move whole community forum - It simply couldn't be less convenient.

??? for my enlightenment, what do you find inconvenient in LDraw forum? I see no significant differences from here, except it's actually more convenient for me: Possibility to see indented threads to better follow discussions, and possibility to directly attach files directly on the forum...

Posted

^ Thank you Philo, works like charm.

Regarding the forum, for me as for the newcommer, it's very confusing and uncomfortable to use. Should you be following the discussion from the very beginning, then perhaps it's easier to follow all these indented threads, for me though, the need for 'clicking' in order to find next reply makes me headache. I very much prefer to scroll and see the replies one after another.

Secondly the search doesn't really give any comprehensive results. I guess it finds some topics with given words but without showing it in context, it's the matter of checking all the resulting topics manually whereas most of them don't contain the desired content. At least that's my experience - I wasn't very lucky finding anything with help of search.

I also miss private messaging a lot - or is there one, just I don't have access yet?

You are right that the tree of responses might possibly make it easier to overview but for someone who wants to browse through whole topic, searching for any useful information, it is rather an obstacle.

File attachments is nice but then also people use it to attach images without displaying them in the text - another thing that makes reading and comprehending difficult.

All in all, it might be just a first impression and I admitt I have been to fast making judgements - maybe in time I'll get used to it ;) But sometimes impression from new member can actually uncover some negatives which experienced users just no longer perceive.

Posted
  • For buffer exchange, I have to switch into MLCad?
  • To show temporare part/assembly placements (before push, rotation...) I need to use Ghost on them?

I'm considering adding buffer exchange to the up coming 1.6 version but as I'm not used to working it my self this might need a couple of alpha/beta version to find its way :)
I also have a generalized question: What is the correct (best) routine for using groups and sub-models? So far I learned to use sub-models for sections that I want to build in callouts (even for like 4-part assemblies). Groups I don't use very much, sometimes to make sure I don't screw up some assembly that is eventual.
In practice it's almost always best to try to do as much as possible using submodels. Also note that groups in LDCad are different then MLCad groups. I had to implement my own grouping format as I wanted it to support recursive grouping (group of groups) and also have them work combined with the nested mode (groups made out of parts from different (sub)models).
Unfortunately, even before I could think about buffer exchange, I found out I can't set the propper rotation axis to these side parts, mainly because these are already tilted in another direction.

Also be sure to locate the hinge point at 0,0,0 inside the submodel.

Posted

@Krisandkris12

In the LDraw forums, go the the Control Center (top-right corner) then on the left side go to Forum Settings and then change the setting 'Message Reading Display Options' to something that you might like more.

But of course, there's nothing wrong with posting here either :wink:

Posted

@roland,

That's great, thank you for all the good work! If I may suggest something for update, it would be two things that I'm missing from LDD

  • snap hinge tool (axis) in pin/studs (snap points) - perhaps with turn on/of button, like the snap tool itself.
  • snap bricks during rotation - e.g. if I rotate technic liftarm so some hole just hits certain pin aaaand 'snap!' :D

Thanks for the advices too, I have to say thath both subs and groups work really intuitively, even for absolute beginner (my time over ldcad now is less than 3 hours including reseach). Wat I don't fully comprehend is this 0,0,0 thing - do I set this 'inside' the sub model?

@legolijntje,

hey, now that's a hint. I may regret my complaints eventually :D Much appreciated.

Posted
  • snap hinge tool (axis) in pin/studs (snap points) - perhaps with turn on/of button, like the snap tool itself.
  • snap bricks during rotation - e.g. if I rotate technic liftarm so some hole just hits certain pin aaaand 'snap!' :D

Using the snap points as rotation centers is something I'm thinking about of adding, just not sure how and when.

You can resnap any part by grabbing it directly with the mouse instead of the editing pin. While its loose in that state you can rotate it again using the arrow keys like while adding new parts. You can also use ctrl+arrow keys to rotate in steps of 45 degrees in order to help it find a snapping target. Although in practice is it best to make sure a currently correctly orientated part has been selected last or an appropiate relative grid is active so you can use the home key (reset floating part orientation to grid) while re snapping parts. This because the snapping feature only takes one connection into account while snapping. Hope this is somewhat clear :)

Wat I don't fully comprehend is this 0,0,0 thing - do I set this 'inside' the sub model?

If you put the hinge center point at the 0,0,0 position inside the submodel the editing pin will 'stick out' the submodel ready to rotate (optionally with a relative grid active) the hinged parts . You can shift any selection to 0,0,0 (using its first selected part) by pressing shift+c

Posted

If you put the hinge center point at the 0,0,0 position inside the submodel the editing pin will 'stick out' the submodel ready to rotate (optionally with a relative grid active) the hinged parts . You can shift any selection to 0,0,0 (using its first selected part) by pressing shift+c

I didn't knew about that shortcut. That's a nice one. Gonna remember it :classic:

Posted (edited)

LDcad offers “possible solutions to closing three segments into a triangle” via “selection info/show triangle angles”. This works fine.

If you wish to generate a triangle and there is no exact mathematical solution for this triangle, parts do not snap. An ideal or closed triangle is not possible but a small gap remains. So you have to gradually minimize this gap by yourself and step by step.

Is there a better way of generating imperfect triangles? Even better: Is there a possibility in LDcad to automatically minimize this gap to get a best fit?

Edited by papacharly
Posted
Is there a better way of generating imperfect triangles? Even better: Is there a possibility in LDcad to automatically minimize this gap to get a best fit?

I'm not sure what you mean here but the angle/distance information in the same menu is intended to help placement of diagonal things (e.g. crossbeams etc)

And in the upcoming 1.6 version you could write your own scripts to help auto place weird stuff automatically.

  • 3 months later...
Posted

Hi all I've been working on some new features for LDCad 1.6 which might interest some of the builders here.

I've added things like: ROTSTEP and buffer exchange support.

I've released a test version of 1.6 and would be very interested in some feedback on these new features.

So if you're not afraid of trying an Alpha version (use it separate from any existing LDCad version and be sure to make backups of your ldraw files)

Feel free to try it:

http://www.melkert.net/LDCad/nextVer

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.

Announcements

  • THIS IS THE TEST SITE OF EUROBRICKS!

×
×
  • Create New...