Sign in to follow this  
supertruper1988

Custom LDraw parts

Recommended Posts

Does anyone have a guide on how one like of code in a dat file for LDraw works? The official tutorial page says "just play around a bit, the advanced parts builders are too busy to write a tutorial" 

I cant seem to figure it out and all I want is a 2 stud long piece of 3mm rigid hose... BL part 75c02

Edited by supertruper1988

Share this post


Link to post
Share on other sites

I may have an answer, depending on whether or not you are using LDCAD as your modelling tool i.e. if you are using LDCAD, I can provide an answer.

David

Share this post


Link to post
Share on other sites

Nowadays the main software being used to create LDraw parts is LDPartEditor, which can be found here: https://nilsschmidt1337.github.io/ldparteditor/
It's probably not the easiest and fastest software to use, especially not for new users (if only the LDraw format would be modernized... Ah well, one can dream :tongue:). It does have a lot of features though, and it's much better than the software that you had to use before its existence. There's a ton of useful information regarding the use of the software on the LDraw forums here: https://forums.ldraw.org/forum-24.html

Share this post


Link to post
Share on other sites
6 hours ago, supertruper1988 said:

I have LDcad installed ultimately I will be importing the finalized DAT file into Stud.io to use with my models there. 

So these answers are applicable to LDCAD. I don't use Stud.io so have no knowledge of their applicability there.

Option #1 - use the Rigid Hose Template

1.1) Starting with a new model in LDCAD (it makes the following screenshots cleaner), invoke the search function. Make sure the "Name" checkbox is ticked and click "Accept".

rigid_01.png

1.2) Your search results will be returned something like this:

rigid_02.png

1.3) Double-click on the Rigid Hose 3mm (i.e. the one highlighted with a green square in 2). This will display a dialog window. Click "Select".

rigid_03.png

1.4) You will now be editing an instance of the rigid hose. Click on the end of the hose.

rigid_04.png

1.5) Drag it horizontally towards the other end of the hose.

rigid_05.png

1.6)  Release the mouse when the Z value equals 40.

rigid_06.png

1.7) Hit the "End" key to return to the parent model. The hose will be inserted into your LDraw model. In the screenshot below, I have also inserted a 1x2 plate to illustrate the length of the hose.

rigid_07.png

 

Option #2 - Build the hose segment by segment

This approach is more painful but may be what you require if you want to do this in Stud.io. N.B. It requires that you have installed the LDraw Unofficial Library.

2.1) If you have the LDraw Unofficial Parts library installed, the initial search results will have returned two other results. One is the end of a hose and the other is a segment of the hose.

rigid_08.png

2.2) Just as with any part, these hose elements can be added to your model. First a hose end cap;

rigid_09.png

2.3) And then individual segments;

rigid_10.png

2.4) You can either manually add 38 segments and 2 end caps, or add a few segments, save the model and then edit it with your choice of text editor. The end caps and segments are fairly obvious in the LDraw model. Copy and paste the segments and alter the Z value by 1 until you have all 40 segments/end caps done.

rigid_11.png

2.5) If you want to, in the source window in LDCAD, select the segments and end caps and reorganize them into a sub-file. Perhaps name your subfile 75c02?

Option #3

Download the LDraw model for the above examples from here. It contains both options. Caopy them into your own LDraw model as you see fit.

N.B. Using the template approach allows you to bend the hose. Using the end cap & segments does not.

Quiz me further if required.

Regards,

David

Edited by djm
Added N.B.

Share this post


Link to post
Share on other sites

Oops, haha. I missed the "all I want is a 2 stud long piece of 3mm rigid hose... BL part 75c02" part :grin:

In that case djm is certainly right in that LDCad is probably the best (and easiest) tool for the job. Great explanation @djm, with all those images. :thumbup:
I do want to add one thing: I'm pretty sure you don't have to create the part manually to be able to use it in stud.io. The generated part from LDCad contains all the necessary information to be able to use it in any LDraw viewer/editor. It does have extra meta-information added to be able to modify the part in LDCad. Besides, if you choose 'Loose file' at your step 1.3 I believe it is saved a separate part (.dat file) to be able to easily use it in another model. No need to import/export stuff or whatever. But, do note that I haven't used it that way myself so I'm not 100% sure on that.

Share this post


Link to post
Share on other sites

Thanks for the help! I am going to see if I can work something out using LDcad, if not I will go the other route. The File posted by @djm didnt seem to work when I opened it in stud.io so I am sure that there will bee some other work to get that going. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.