Holly-Wood.it  
    Brick 1 x 3
Brick 2 x 2 Corner    
  Brick 1 x 1  
[ english ]   [ deutsch ]
 
  Home > MLCad > Tutorial: Advanced digital building - Page 2 of 5  
   
  Page <Previous 1 2 3 4 5 Next>
  Screenshot 4
   
  12. Select the 3024 - Plate 1x1 after the BUFEXCHG command in the Project Parts List and perform a multiple selection by holding down the SHIFT key while you click on the STEP following the second 3024 - Plate 1x1. The three lines get highlighted. Ctrl+D (Edit > Duplicate) the selection.  
  13. Add a new BUFEXCHG after the STEP command but this time tick the Retrieve checkbox in the popping-up dialog to retrieve the display state saved in memory A. The description in the Project Parts List will read RETRIEVE A.

NOTE! You might change the status of the Buffer Exchange command any time by double-clicking on the command in the Project Parts List or selecting Modify... from the contextual menu.

At this point your project should look like this:
Brick 3x3
       
 
Icon Part PART Dark_Gray 10.000, -16.000, -10.000 4037.dat Plate 1x1 Round
Icon Step STEP -- ----- -----  
Icon Part PART Yellow 0.000, -40.000, 40.000 4871.dat Slope Brick 45 4 x 2 Double Inverted with Open Center
Icon Buffer Exchange BUFEXCHG -- ----- ----- STORE A
Icon Part PART Trans_Clear -10.000, -24.000, -10.000 3024.dat Plate 1x1
Icon Part PART Trans_Clear -10.000, -32.000, -10.000 3024.dat Plate 1x1
Icon Step STEP -- ----- -----  
Icon Buffer Exchange BUFEXCHG -- ----- ----- RETRIEVE A
Icon Part PART Trans_Clear -10.000, -24.000, -10.000 3024.dat Plate 1x1
Icon Part PART Trans_Clear -10.000, -32.000, -10.000 3024.dat Plate 1x1
Icon Step STEP -- ----- -----  
Icon Part PART Yellow -10.000, -40.000, -10.000 3070b.dat Tile 1x1 with Groove
   
  (The screenshot shows all menus and dialogs in one composed image).
Screenshot 5
 
  14. Move the first 3024 - Plate 1x1 up by 24 LDU, the second 48 LDU and delete the STEP command prior the 3070b – Tile 1x1 with Groove in order to get the following sequence:  
       
 
Icon Part PART Dark_Gray 10.000, -16.000, -10.000 4037.dat Plate 1x1 Round
Icon Step STEP -- ----- -----  
Icon Part PART Yellow 0.000, -40.000, 40.000 4871.dat Slope Brick 45 4 x 2 Double Inverted with Open Center
Icon Buffer Exchange BUFEXCHG -- ----- ----- STORE A
Icon Part PART Trans_Clear -10.000, -48.000, -10.000 3024.dat Plate 1x1
Icon Part PART Trans_Clear -10.000, -80.000, -10.000 3024.dat Plate 1x1
Icon Step STEP -- ----- -----  
Icon Buffer Exchange BUFEXCHG -- ----- ----- RETRIEVE A
Icon Part PART Trans_Clear -10.000, -24.000, -10.000 3024.dat Plate 1x1
Icon Part PART Trans_Clear -10.000, -32.000, -10.000 3024.dat Plate 1x1
Icon Part PART Yellow -10.000, -40.000, -10.000 3070b.dat Tile 1x1 with Groove
   
  15. Time to add an arrow which will help understanding how the plate should be positioned. Select the part after which the arrow should be inserted. Hit the Arrow Generator... button Button Arrow in the Extras bar (Extras > Generators > Arrow...).  
  16. Copy the values from the screenshot above, but feel free to play around with the values first. The dialog should be pretty self-explaining. The arrow is build from so-called LDraw primitives: triangles and quadrilaterals. In case there would be an overlap because you entered very strange values, the corresponding boxes will be flagged red. Keep the left mouse-button pressed while you move the cursor in the preview window to get a feeling how the arrow will look like in a 3D environment.

NOTE! MLCad offers also the opportunity to add triangle and quadrilaterals directly into the project by defining their vertices. Check out the buttons in the Expert barBar Expertbar or go to Edit > Add > Primitive > .... Playing around with vertices you'll getting appreciate how much a generator adds in terms of comfort.
By the way: LDraw part authors build parts with these basic elements. If you wanna know more about read the parts authoring tutorial Bits 'n' Pieces on this site.
 
Brick 1x2
Brick 1x1 Round Red
Brick 1x1 Round
17. It is highly recommended that you leave the default MLCad part selected. It will insert a series of specific commands which make sure that the arrow will be readable by other programs of the LDraw System Of Tools and at the same remain changeable if you wanna apply some changes in a second moment. The other three options are almost identical to the one you've already seen in the Minifig Generator above:
  • Insert into current file, New submodel and New file will add a series of triangles and quadrilaterals the arrow is build from to the Project Parts List. The resulting triangles and quads are not different from other LDraw primitives. The colors of the pointer and the indicator depend on the colors selected in the dialog. For the event you don't change the color in the dialog LDraw main color 16 will be used by default.

    NOTE! LDraw main color 16 is a special color or better non-color. Every part of a LDraw element (including triangles and quads, primitives, parts and submodels) painted with this color might re-colored with a second layer in an editor.

    The origin of the arrow is (independently from the length of either element) where the pointer meets the indicator.
  • MLCad part adds a special part named ARROW to your Project Parts List. This is editable at any time. Double-clicking on this part in the Project Parts List or selecting Modify... from the contextual menu will pop-up the Arrow Generator again. The only thing you cannot do is converting an MLCad part into one of the states described above. In fact Insert into current file, New submodel and New file get grayed out, once you have decided to add the arrow as MLCad part.
    An ARROW part is no different from an ordinary LDraw part. It will be inserted at the origin of the project with a default rotation matrix. If you've left the default LDraw main color 16 in the Arrow Generator dialog untouched, the arrow might be colored via the Color bar. Try coloring just the pointer or the indicator in the generator dialog and see what happens using the Color bar in the Building Area.
    Opening the file in a text editor reveals the syntax of this special part:

    0 MLCAD ARROW 1 0 0 0 1 0 0 0 1 0 0 0 1 8 3 8 10 1 30 1 2 16 16
    0 MLCAD SKIP_BEGIN
    3 47 -8 0 0 1 -4 0 -0.6 0 0
    3 47 -8 0 0 1 4 0 -0.6 0 0
    3 47 -0.6 0 0 0 -1.5 0 0 1.5 0
    4 47 0 -1.5 0 10 -1.5 0 10 1.5 0 0 1.5 0
    0 MLCAD SKIP_END


    The MLCAD ARROW line contains all the information about wide, length and color as well as the position and orientation. The MLCAD SKIP_BEGIN and MLCAD SKIP_END commands tell MLCad to ignore the primitives in between since all information is already stored in the arrow command itself and won't show them in the Project Parts List. On the other hand the color, size and position of the triangles and quads are needed by other programs of the LDraw System of Tools such as LPub to draw a proper arrow since they don't support this special MLCad command. If you rotate and move the arrow in the Building Area the vertices of the LDraw primitives get changed accordingly.
Select OK to add the arrow to the project.
 
   
 
 Brick 3x3 (The screenshot shows all menus and dialogs in one composed image).
Screenshot 6
 
  18. Color the arrow part black, rotate it and position it as shown above. Copy it to the clipboard, paste it after the second plate and reposition it.
Brick 2x2 Corner
19. Select all the parts – arrows included – in between the Buffer-Exchange commands and hit the Ghost button Button Ghost in the Visibility bar (Edit > Visibility > Ghost). The icon in the Project Parts List changes to the representation of a ghost and also the entries in the Part Name/Description are substituted – at least for regular parts.
This feature is tight to the Buffer-Exchange command and has two functions:
  • Prevent that the extra parts added to the project are also added to the count in the Parts List. Extras > Reports > Parts... and check the figures for the 3024 - Plate 1x, Trans_Clear.
    Now Unghost Button Unghost (Edit > Visibility > Unghost) and generate a new Parts List. You'll see that the number for the parts above have doubled. MLCad doesn't know anything about the purpose you have called in a Buffer-Exchange and assumes that the added parts are part of the project. The Ghost feature has been thought to correct this.
  • A model containing CLEAR and Buffer Exchange commands will show everything in between the command in case the model is used as a submodel in a larger MPD project, since MLCad disables these commands for submodels. The Ghost feature partly corrects this. Ghosts are shown only when the submodel is viewed in MLCad's View Mode, but ignored when you view the main model containing a submodel with ghosted parts.

    NOTE! Other viewers (than MLCad) will not display Ghost Parts at all, since they are stored in the format of a comment:

    0 GHOST 1 47 -10 -48 -10 0 0 -1 0 1 0 1 0 0 3024.dat


    so external viewers such as LDView would interpret them as plain text. Unfortunately this is not true for the special MLCad Parts since they do not involve just a single code line which could be “ghosted” but multiple code lines. To work around the problem insert the triangles and quadrilaterals composing the arrow directly into the current file via Insert into current file. Ghosted primitives will be treated as parts and won't be visible.
NOTE! If you plan to use an external program for the building instruction generation such as LPub - LDraw Building Instructions Publishing Tool or LIC - LEGO instruction Creator you should be aware that only the first one supports Buffer-Exchange and Ghosting, while LIC comes with its own tool to draw exploded building steps. Make sure all parts and primitives come with a proper Ghost statement in order to be invisible to LIC.
20. Switch to the View Mode Button View Mode and verify that your building instruction looks like the one below:
  Screenshot 7
    What has happened could be summarized as follows:
  • After the addition of the Slope Brick 45 4 x 2 Double Inverted with Open Center the display status has been stored into the buffer
  • Step 4 shows the added parts and arrows in between the buffer-exchange commands
  • Step 5 retrieves the buffer and adds the parts from step 4 in their final position plus the newly added parts of step 5
  • Step 6 is an ordinary step command just showing the new added parts
 
  21. Finally File > Save As...   Mini Dumper Truck with Buffer-Exchange.ldr.
top  
  Page <Previous 1 2 3 4 5 Next>
  Brick 1x3
All content is provided as is, with no warranty stated or implied regarding the quality or accuracy of any content on or off this site.
LEGO® is a trademark of the LEGO Group of companies which does not sponsor, authorize or endorse this site.