Border Robot Mac OS

broken image


  • YamiPod is a freeware application to efficiently manage your iPod on Linux.It can be run directly from your iPod and needs no installation. It also has extra features such as rss news and podcast support, remove duplicates, easy notes editor (with multipage support), songs synchronization, playlists export, a built in music player and much more.
  • Security robot, wireless sensor network architecture for border patrol system, is introduced. Border security robot utilize a PIR sensor for human detection, a metal detector to detect the presence of explosives and a wireless camera for monitoring the scenario continuously at the remote station.

Robot Framework is a generic keyword-driven test automation framework for acceptance level testing and acceptance test-driven development (ATDD). It has an easy-to-use tabular syntax for creating test cases and its testing capabilities can be extended by test libraries implemented either with Python or Java.

The mBot is a great little programmable robot, and my 9 year-old nephew is really getting into it. His computer can only use Mac OS 10.7.5 Lion, and the mBlock software almost works. Here's how I got it running perfectly.

tl;wr:

  1. Install sketchy driver ver.1.2 for CH340G from a Russian website. (direct link)
  2. Open mBlock_v3.4.8.app/Contents/Resources/Arduino/Arduino.app/Contents/Java/hardware/arduino/avr/platform.txt
  3. Find line tools.avrdude.upload.pattern='{cmd.path}' '-C{config.path}' {upload.verbose} -p{build.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} -D '-Uflash:w:{build.path}/{build.project_name}.hex:i'
  4. Wrap the -P in double quotes: tools.avrdude.upload.pattern='{cmd.path}' '-C{config.path}' {upload.verbose} -p{build.mcu} -c{upload.protocol} '-P{serial.port}' -b{upload.speed} -D '-Uflash:w:{build.path}/{build.project_name}.hex:i'
  5. Comment on my GitHub PR which fixes this issue.

mBot

I was lucky to pick up an mBot from my local Radio Shack at a discount before it closed. My nephew has been getting more interested in computers, robots, and programming, and I figured it would be a great gift. It uses an app called mBlock, which is based on Scratch 2.0. It has a host of interesting components: ultrasonic, line follower, IR receiver (with remote), IR transmitter, light, buttons, beeper, bluetooth, and USB/serial. It has expandable ports with RJ25 connectors. Each port provides power, i2c, and two GPIO or analog pins. This makes custom add-ons relatively easy; certainly much easier than Dash & Dot from Wonder Workshop!

Old computer problems

The website for mBlock simply says 'latest OSX recommended.' The only computer my nephew has unfettered access to runs MacOS 10.7 Lion, which was released in 2011. I was happy to find that mBlock launched fine and appeared to work. I only ran into problems once I wanted it to connect to the mBot over USB.

Programming the mBot requires you install an ‘Arduino Driver'. Unfortunately even after installing the driver, the mBot is not recognized. The mBot and some other budget Arduino-ish devices use very cheap CH340/CH341 USB->Serial converters instead of the higher-quality FTDI chips. It turns out the driver included with mBlock.app only works on MacOS X 10.9 and above.

Rather than trying to get MacPostFactor running on his computer (a MacBook 4,1), I was determined to find a driver for this chip that would work on older hardware. USB->Serial converters have been around for ages, there has to be a compatible driver out there, right?

Fortunately there is; however, it does feel sketchy. There is a Russian hobbyist electronics website that has a page devoted to the CH340G, and includes an older version of the same driver, 1.2. This one installs fine on MacOS 10.7. Disclaimer: I'm not responsible for this driver messing up your computer. I wish that was enough to get everything working, but unfortunately it isn't so simple.

New serial problems

As you see above, the driver doesn't work for the most frustrating reasons. The .kext creates serial devices at paths like /dev/tty.wch ch341 USB=>RS232 1d10, and the mBlock toolchain doesn't escape the special characters. This results in avrdude ignoring the entire device path after the first space. It tries to upload to an arduino at /dev/tty.wch and fails, with a file not found error.

Failed ideas

First, I made a symbolic link at /dev/tty.mbot that points to /dev/tty.wch ch341 USB=>RS232 1d10. The command doesn't survive restarts, so I created a LaunchDaemon and shell script. They have to run at startup as root, which is annoying, and means you have to secure them properly. Next location mac os. Also, sometimes the mBot gets created with a slightly different name (ends with 1a20 instead of 1d10), which breaks everything until you reinsert the cable and pray it works. I don't want a 9 year-old to deal with that.

Second, I assumed this must be a problem with mBlock's code. I went through the (laborious, 2) process of getting mBlock 3.4.5 to compile on my Mac. I changed the relevant UploaderEx.as code to wrap the device's name in double quotes. I recompiled and updated the .app package, but it still failed. avrdude seemed to be interpreting the double quotes as parts of the path. By the way, if you want to compile mBlock 3.x for Mac and you stumble on this post, you have to use AIR SDK + Compilers 19.0. You're welcome.

Finally, I tested this behavior on the latest vanilla Arduino app and my personal computer, and found that this is a bug in Arduino. It turns out this has even been discussed before. The post there helped me find the right Arduino txt file to fix the problem.

Super serial solutions

mBlock.app includes a full copy of Arduino.app, version 1.6.5-r5. You can modify the file at mBlock_v3.4.8.app/Contents/Resources/Arduino/Arduino.app/Contents/Java/hardware/arduino/avr/platform.txt to wrap the upload.pattern's -P{serial.port} option in double quotes: '-P{serial.port}'. This causes the path to be passed successfully down the entire toolchain.

Finally

I can relax knowing that when I'm back in New York, my nephew and his father can use his fancy new robot reliably and with ease. Now he can focus on making amazing programs, educational failures, and mischief.

I'd like Arduino to make this change in their code. I've submitted a pull request, but given the previous comments, it won't get approved without enough support.

-vkm

Who's Varun?

I most recently was the founder of an HR tech startup, Disqovery. I have worn many hats, and I like making things. I also like talking business. You can reach me at smartperson@gmail.com, @smartperson, Github, and LinkedIn.

Deutsch • ‎English • ‎français • ‎italiano • ‎polski • ‎română • ‎русский • ‎中文(中国大陆)‎
Next: Preparing models for 3D printing
Border
  • Discovering FreeCAD
    • Installing
    • The FreeCAD interface
    • Navigating in the 3D view
  • Working with FreeCAD
    • Preparing models for 3D printing
    • Using spreadsheets
  • Python scripting
    • A gentle introduction

Product design is originally a commercial term, but in the 3D world, it often means modeling something with the idea to have it 3D-printed or, more generally, manufactured by a machine, for example a 3D printer or a CNC machine.

When you print objects in 3D, it is of ultimate importance that your objects are solid. As they will become real, solid objects, this is obvious. Nothing prevents them from being hollow inside, of course. But you always need to have a clear notion of which point is inside the material, and which point is outside, because the 3D printer or the CNC machine needs to know exactly what is filled with material and what is not. For this reason, in FreeCAD, the PartDesign Workbench is the perfect tool to build such pieces, because it will always take care for you that your objects stay solid and buildable.

To illustrate how the PartDesign Workbench works, let's model this well-known piece of Lego:

The cool thing with Lego pieces is that the dimensions are easy to obtain on the Internet, at least for the standard pieces. These are pretty easy to model and print on a 3D printer, and with a bit of patience (3D printing often requires much adjustment and fine-tuning) you can make pieces that are totally compatible and click perfectly into original Lego blocks. In the example below, we will make a piece that is 1.5 times bigger than the original.

We will now use exclusively the Sketcher and PartDesign tools. Since all the tools from the Sketcher Workbench are also included in the Part Design Workbench, we can stay in Part Design and we will not need to switch back and forth between the two.

Part Design objects are fully based on Sketches. A Sketch is a 2D object, made of linear segments (lines, arcs of circle or ellipses) and constraints. These constraints can be applied either on linear segments or on their endpoints or center points, and will force the geometry to adopt certain rules. For example, you can place a vertical constraint on a line segment to force it to stay vertical, or a position (lock) constraint on an endpoint to prohibit it to move. When a sketch has an exact amount of constraints that prohibits any point of the sketch to be moved anymore, we talk about a fully constrained sketch. When there are redundant constraints, that could be removed without allowing the geometry to be moved, it is called over-constrained. This should be avoided, and FreeCAD will notify you if such a case occurs.

Sketches have an edit mode, where their geometry and constraints can be changed. When you are done with editing, and leave edit mode, sketches behave like any other FreeCAD object, and can be used as building blocks for all the Part Design tools, but also in other workbenches, such as Part or Arch. The Draft workbench also has a tool that converts Draft objects to Sketches, and vice-versa.

  • Let's start by modeling a cubic shape that will be the base of our Lego brick. Later on we will carve the insides, and add the 8 dots on top of it. So let's start this by making a rectangular sketch that we will then extrude:
  • Switch to the PartDesign Workbench
  • Click on the New Sketch button. A dialog will appear asking where you want to lie the sketch, choose the XY plane, which is the 'ground' plane. The sketch will be created and will immediately be switched to edit mode, and the view will be rotated to look at your sketch orthogonally.
  • Now we can draw a rectangle, by selecting the Rectangle tool and clicking 2 corner points. You can place the two points anywhere, since their correct location will be set in the next step.
  • You will notice that a couple of constraints have automatically been added to our rectangle: the vertical segments have received a vertical constraint, the horizontal ones a horizontal constraint, and each corner a point-on-point constraint that glues the segments together. You can experiment moving the rectangle around by dragging its lines with the mouse, all the geometry will keep obeying the constraints.
  • Now, let's add three more constraints:
    • Select one of the vertical segments and add a Vertical Distance Constraint. Give it a size of 23.7mm.
    • Select one of the horizontal segments and add a Horizontal Distance Constraint. Make it 47.7mm.
    • Finally, select one of the corner points, then the origin point (which is the dot at the crossing of the red and green axes), then add a Coincident Constraint. The rectangle will then jump to the origin point, and your sketch will turn green, meaning it is now fully constrained. You can try moving its lines or points, nothing will move anymore.

Note that the last point-on-point constraint was not absolutely necessary. You are never forced to work with fully constrained sketches. However, if we are going to print this block in 3D, it will be necessary to maintain our piece close to the origin point (which will be the center of the space where the printer head can move). By adding that constraint we are making sure that our piece will always stay 'anchored' to that origin point.

  • Our base sketch is now ready, we can leave edit mode by pressing the Close button on top of its task panel, or simply by pressing the Escape key. If needed later on, we can reenter edit mode anytime by double-clicking the sketch in the tree view.
  • Let's extrude it by using the Pad tool, and giving it a distance of 14.4mm. The other options can be left at their default values:

The Pad behaves very much like the Extrude tool that we used in the previous chapter. There are a couple of differences, though, the main one being that a pad cannot be moved. It is attached forever to its sketch. If you want to change the position of the pad, you must move the base sketch. In the current context, where we want to be sure nothing will move out of position, this is an additional security.

  • We will now carve the inside of the block, using the Pocket tool, which is the PartDesign version of Part Cut. To make a pocket, we will create a sketch on the bottom face of our block, which will be used to remove a part of the block.
  • With the bottom face selected, press the New sketch button.
  • Draw a rectangle on the face.
  • We will now constrain the rectangle in relation to the bottom face. To do this, we need to 'import' some edges of the face with the External geometry tool. Use this tool on the two vertical lines of the bottom face:

You will notice that only edges from the base face can be added by this tool. When you create a sketch with a face selected, a relation is created between that face and the sketch, which is important for further operations. You can always remap a sketch to another face later with the Map sketch tool.

  • The external geometry is not 'real', it will be hidden when we leave edit mode. But we can use it to place constraints. Place the 4 following constraints:
    • Select the top left point of the rectangle and the top point of the imported line and add a Horizontal Distance Constraint of 1.8mm
    • Select again the top left point of the rectangle and the top point of the imported line and add a Vertical Distance Constraint of 1.8mm
    • Select the bottom right point of the rectangle and the bottom point of the right imported line and add a Horizontal Distance Constraint of 1.8mm
    • Select again the bottom right point of the rectangle and the bottom point of the right imported line and add a Vertical Distance Constraint of 1.8mm
  • Leave edit mode and we can now perform the pocket operation: With the sketch selected, press the Pocket button. Give it a length of 12.6mm, which will leave the upper face of our pad with a thickness of 1.8mm (remember, the total height of our pad was 14.4mm).
  • We will now attack the 8 dots on the top face. To do this, since they are a repetition of a same feature, we will use the handy Linear pattern tool of the Part Design Workbench, which allows to model once and repeat the shape.
  • Start by selecting the top face of our block
  • Create a New sketch.
  • Create two circles.
  • For each circle, select it and add a Radius Constraint of 3.6mm to each of them
  • Import the left edge of the base face with the External geometry tool.
  • Place two vertical constraints and two horizontal constraints of 6mm between the center point of each circle and the corner points of the imported edge, so each circle has its center at 6mm from the border of the face:
  • Notice how, once again, when you lock the position and dimension of everything in your sketch, it becomes fully constrained. This always keeps you on the safe side. You could change the first sketch now, everything we did afterwards would keep tight.
  • Leave edit mode, select this new sketch, and create a Pad of 2.7mm:
  • Notice that, as earlier with the pocket, since we used the top face of our base block as a base for this latest sketch, any PartDesign operation we do with this sketch will correctly be built on top of the base shape: The two dots are not independent objects, they have been extruded directly from our brick. This is the great advantage of working with the Part Design Workbench, as long as you take care of always building one step on top of the previous one, you are actually building one final solid object.
  • We can now duplicate our two dots four times, so we get eight. Select the latest Pad we just created.
  • Press the Linear pattern button.
  • Give it a length of 36mm (which is the total 'span' we want our copies to fit in), in the 'horizontal sketch axis' direction, and make it 4 occurrences:
  • Once again, see that this is not just a duplication of an object, it is a *feature* of our shape that has been duplicated, the final object is still only one solid object.
  • Now let's work on the three 'tubes' that fill the void we created on the bottom face. We have several possibilities: create a sketch with three circles, pad it then pocket it three times, or create a base sketch with one circle inside the other and pad it to form the complete tube already, or even other combinations. Like always in FreeCAD, there are many ways to achieve the same result. Sometimes one way will not work the way we want, and we must try other ways. Here, we will take the safest approach, and do things one step at a time.
  • Select the face that is at the bottom of the hollow space we carved earlier inside the block.
  • Create a new sketch, add a circle with a radius of 4.8825mm, import the left border of the face, and constrain it vertically and horizontally at 10.2mm from the upper corner of the face:

If you have trouble to select features hiding part of the model can help. To hide a feature select it from tree view and press Space-key to toggle visibility.

  • Leave edit mode, and pad this sketch with a distance of 12.6mm
  • Create a linear pattern from this last pad, give it a length of 24mm and 3 occurrences. We now have three filled tubes filling the hollow space:
  • Now let's make the final holes. Select the circular face of the first of our three 'pins'
  • Create a new sketch, import the circular border of our face, create a circle with a radius constraint of 3.6mm, and add a Point on Point Constraint between the center of the imported circle and our new circle. We now have a perfectly centered circle,and once again fully constrained:
  • Leave edit mode, and create a pocket from this sketch, with a length of 12.6mm
  • Create a linear pattern from this pocket, with a length of 24mm and 3 occurrences. That's the last step, our piece of lego is now complete, so we can give it a nice color to mark our victory!

You will notice that our modeling history (what appears in the tree view) has become quite long. This is precious because every single step of what we did can be changed later on. Adapting this model for another kind of brick, for example one with 2x2 dots, instead of 2x4, would be a piece of cake, we would just need to change a couple of dimensions and the number of occurrences in linear patterns. We could as easily create bigger pieces that don't exist in the original Lego game.

Border Robot Mac Os Catalina

But we could also want to get rid of the history, for example if we are going to model a castle with this brick, and we don't want to have this whole history repeated 500 times in our file.

There are two simple ways to get rid of the history, one is using the Create simple copy tool from the Part Workbench, which will create a copy of our piece that doesn't depend anymore on the history (you can delete the whole history afterwards), the other way is exporting the piece as a STEP file and reimporting it.

Sausages mac os. Assembling

But the best of both worlds also exists, which is the Assembly2 Workbench, an addon that can be installed from the FreeCAD-addons repository. This Workbench is named '2' because there is also an official built-in Assembly Workbench in development, which is not ready yet. The Assembly2 Workbench, however, already works very well to construct assemblies, and also features a couple of object-to-object constraints which you can use to constrain the position of one object in relation to another. In the example below, however, it will be quicker and easier to position the pieces using Draft Move and Draft Rotate than using the Assembly2 constraints.

  • Save the file as it is now
  • Install the Assembly2 Workbench and restart FreeCAD
  • Create a new empty document
  • Switch to the Assembly2 workbench
  • Press the Import a part from another FreeCAD document button
  • Select the file we saved above
  • The final piece will be imported in the current document. The Assembly2 workbench will determine automatically what is the final piece in our file that needs to be used, and the new object stays linked to the file. If we go back and modify the contents of the first file, we can press the Update parts imported into the assembly button to update the pieces here.
  • By using the Import a part from another FreeCAD document button several times, and moving and rotating the pieces (with the Draft tools or by manipulating their Placement property), we can quickly create a small assembly:

Downloads

  • The model produced during this exercise: https://github.com/yorikvanhavre/FreeCAD-manual/blob/master/files/lego.FCStd
Border robot mac os 11
  • Discovering FreeCAD
    • Installing
    • The FreeCAD interface
    • Navigating in the 3D view
  • Working with FreeCAD
    • Preparing models for 3D printing
    • Using spreadsheets
  • Python scripting
    • A gentle introduction

Product design is originally a commercial term, but in the 3D world, it often means modeling something with the idea to have it 3D-printed or, more generally, manufactured by a machine, for example a 3D printer or a CNC machine.

When you print objects in 3D, it is of ultimate importance that your objects are solid. As they will become real, solid objects, this is obvious. Nothing prevents them from being hollow inside, of course. But you always need to have a clear notion of which point is inside the material, and which point is outside, because the 3D printer or the CNC machine needs to know exactly what is filled with material and what is not. For this reason, in FreeCAD, the PartDesign Workbench is the perfect tool to build such pieces, because it will always take care for you that your objects stay solid and buildable.

To illustrate how the PartDesign Workbench works, let's model this well-known piece of Lego:

The cool thing with Lego pieces is that the dimensions are easy to obtain on the Internet, at least for the standard pieces. These are pretty easy to model and print on a 3D printer, and with a bit of patience (3D printing often requires much adjustment and fine-tuning) you can make pieces that are totally compatible and click perfectly into original Lego blocks. In the example below, we will make a piece that is 1.5 times bigger than the original.

We will now use exclusively the Sketcher and PartDesign tools. Since all the tools from the Sketcher Workbench are also included in the Part Design Workbench, we can stay in Part Design and we will not need to switch back and forth between the two.

Part Design objects are fully based on Sketches. A Sketch is a 2D object, made of linear segments (lines, arcs of circle or ellipses) and constraints. These constraints can be applied either on linear segments or on their endpoints or center points, and will force the geometry to adopt certain rules. For example, you can place a vertical constraint on a line segment to force it to stay vertical, or a position (lock) constraint on an endpoint to prohibit it to move. When a sketch has an exact amount of constraints that prohibits any point of the sketch to be moved anymore, we talk about a fully constrained sketch. When there are redundant constraints, that could be removed without allowing the geometry to be moved, it is called over-constrained. This should be avoided, and FreeCAD will notify you if such a case occurs.

Sketches have an edit mode, where their geometry and constraints can be changed. When you are done with editing, and leave edit mode, sketches behave like any other FreeCAD object, and can be used as building blocks for all the Part Design tools, but also in other workbenches, such as Part or Arch. The Draft workbench also has a tool that converts Draft objects to Sketches, and vice-versa.

  • Let's start by modeling a cubic shape that will be the base of our Lego brick. Later on we will carve the insides, and add the 8 dots on top of it. So let's start this by making a rectangular sketch that we will then extrude:
  • Switch to the PartDesign Workbench
  • Click on the New Sketch button. A dialog will appear asking where you want to lie the sketch, choose the XY plane, which is the 'ground' plane. The sketch will be created and will immediately be switched to edit mode, and the view will be rotated to look at your sketch orthogonally.
  • Now we can draw a rectangle, by selecting the Rectangle tool and clicking 2 corner points. You can place the two points anywhere, since their correct location will be set in the next step.
  • You will notice that a couple of constraints have automatically been added to our rectangle: the vertical segments have received a vertical constraint, the horizontal ones a horizontal constraint, and each corner a point-on-point constraint that glues the segments together. You can experiment moving the rectangle around by dragging its lines with the mouse, all the geometry will keep obeying the constraints.
  • Now, let's add three more constraints:
    • Select one of the vertical segments and add a Vertical Distance Constraint. Give it a size of 23.7mm.
    • Select one of the horizontal segments and add a Horizontal Distance Constraint. Make it 47.7mm.
    • Finally, select one of the corner points, then the origin point (which is the dot at the crossing of the red and green axes), then add a Coincident Constraint. The rectangle will then jump to the origin point, and your sketch will turn green, meaning it is now fully constrained. You can try moving its lines or points, nothing will move anymore.

Note that the last point-on-point constraint was not absolutely necessary. You are never forced to work with fully constrained sketches. However, if we are going to print this block in 3D, it will be necessary to maintain our piece close to the origin point (which will be the center of the space where the printer head can move). By adding that constraint we are making sure that our piece will always stay 'anchored' to that origin point.

  • Our base sketch is now ready, we can leave edit mode by pressing the Close button on top of its task panel, or simply by pressing the Escape key. If needed later on, we can reenter edit mode anytime by double-clicking the sketch in the tree view.
  • Let's extrude it by using the Pad tool, and giving it a distance of 14.4mm. The other options can be left at their default values:

The Pad behaves very much like the Extrude tool that we used in the previous chapter. There are a couple of differences, though, the main one being that a pad cannot be moved. It is attached forever to its sketch. If you want to change the position of the pad, you must move the base sketch. In the current context, where we want to be sure nothing will move out of position, this is an additional security.

  • We will now carve the inside of the block, using the Pocket tool, which is the PartDesign version of Part Cut. To make a pocket, we will create a sketch on the bottom face of our block, which will be used to remove a part of the block.
  • With the bottom face selected, press the New sketch button.
  • Draw a rectangle on the face.
  • We will now constrain the rectangle in relation to the bottom face. To do this, we need to 'import' some edges of the face with the External geometry tool. Use this tool on the two vertical lines of the bottom face:

You will notice that only edges from the base face can be added by this tool. When you create a sketch with a face selected, a relation is created between that face and the sketch, which is important for further operations. You can always remap a sketch to another face later with the Map sketch tool.

  • The external geometry is not 'real', it will be hidden when we leave edit mode. But we can use it to place constraints. Place the 4 following constraints:
    • Select the top left point of the rectangle and the top point of the imported line and add a Horizontal Distance Constraint of 1.8mm
    • Select again the top left point of the rectangle and the top point of the imported line and add a Vertical Distance Constraint of 1.8mm
    • Select the bottom right point of the rectangle and the bottom point of the right imported line and add a Horizontal Distance Constraint of 1.8mm
    • Select again the bottom right point of the rectangle and the bottom point of the right imported line and add a Vertical Distance Constraint of 1.8mm
  • Leave edit mode and we can now perform the pocket operation: With the sketch selected, press the Pocket button. Give it a length of 12.6mm, which will leave the upper face of our pad with a thickness of 1.8mm (remember, the total height of our pad was 14.4mm).
  • We will now attack the 8 dots on the top face. To do this, since they are a repetition of a same feature, we will use the handy Linear pattern tool of the Part Design Workbench, which allows to model once and repeat the shape.
  • Start by selecting the top face of our block
  • Create a New sketch.
  • Create two circles.
  • For each circle, select it and add a Radius Constraint of 3.6mm to each of them
  • Import the left edge of the base face with the External geometry tool.
  • Place two vertical constraints and two horizontal constraints of 6mm between the center point of each circle and the corner points of the imported edge, so each circle has its center at 6mm from the border of the face:
  • Notice how, once again, when you lock the position and dimension of everything in your sketch, it becomes fully constrained. This always keeps you on the safe side. You could change the first sketch now, everything we did afterwards would keep tight.
  • Leave edit mode, select this new sketch, and create a Pad of 2.7mm:
  • Notice that, as earlier with the pocket, since we used the top face of our base block as a base for this latest sketch, any PartDesign operation we do with this sketch will correctly be built on top of the base shape: The two dots are not independent objects, they have been extruded directly from our brick. This is the great advantage of working with the Part Design Workbench, as long as you take care of always building one step on top of the previous one, you are actually building one final solid object.
  • We can now duplicate our two dots four times, so we get eight. Select the latest Pad we just created.
  • Press the Linear pattern button.
  • Give it a length of 36mm (which is the total 'span' we want our copies to fit in), in the 'horizontal sketch axis' direction, and make it 4 occurrences:
  • Once again, see that this is not just a duplication of an object, it is a *feature* of our shape that has been duplicated, the final object is still only one solid object.
  • Now let's work on the three 'tubes' that fill the void we created on the bottom face. We have several possibilities: create a sketch with three circles, pad it then pocket it three times, or create a base sketch with one circle inside the other and pad it to form the complete tube already, or even other combinations. Like always in FreeCAD, there are many ways to achieve the same result. Sometimes one way will not work the way we want, and we must try other ways. Here, we will take the safest approach, and do things one step at a time.
  • Select the face that is at the bottom of the hollow space we carved earlier inside the block.
  • Create a new sketch, add a circle with a radius of 4.8825mm, import the left border of the face, and constrain it vertically and horizontally at 10.2mm from the upper corner of the face:

If you have trouble to select features hiding part of the model can help. To hide a feature select it from tree view and press Space-key to toggle visibility.

  • Leave edit mode, and pad this sketch with a distance of 12.6mm
  • Create a linear pattern from this last pad, give it a length of 24mm and 3 occurrences. We now have three filled tubes filling the hollow space:
  • Now let's make the final holes. Select the circular face of the first of our three 'pins'
  • Create a new sketch, import the circular border of our face, create a circle with a radius constraint of 3.6mm, and add a Point on Point Constraint between the center of the imported circle and our new circle. We now have a perfectly centered circle,and once again fully constrained:
  • Leave edit mode, and create a pocket from this sketch, with a length of 12.6mm
  • Create a linear pattern from this pocket, with a length of 24mm and 3 occurrences. That's the last step, our piece of lego is now complete, so we can give it a nice color to mark our victory!

You will notice that our modeling history (what appears in the tree view) has become quite long. This is precious because every single step of what we did can be changed later on. Adapting this model for another kind of brick, for example one with 2x2 dots, instead of 2x4, would be a piece of cake, we would just need to change a couple of dimensions and the number of occurrences in linear patterns. We could as easily create bigger pieces that don't exist in the original Lego game.

Border Robot Mac Os Catalina

But we could also want to get rid of the history, for example if we are going to model a castle with this brick, and we don't want to have this whole history repeated 500 times in our file.

There are two simple ways to get rid of the history, one is using the Create simple copy tool from the Part Workbench, which will create a copy of our piece that doesn't depend anymore on the history (you can delete the whole history afterwards), the other way is exporting the piece as a STEP file and reimporting it.

Sausages mac os. Assembling

But the best of both worlds also exists, which is the Assembly2 Workbench, an addon that can be installed from the FreeCAD-addons repository. This Workbench is named '2' because there is also an official built-in Assembly Workbench in development, which is not ready yet. The Assembly2 Workbench, however, already works very well to construct assemblies, and also features a couple of object-to-object constraints which you can use to constrain the position of one object in relation to another. In the example below, however, it will be quicker and easier to position the pieces using Draft Move and Draft Rotate than using the Assembly2 constraints.

  • Save the file as it is now
  • Install the Assembly2 Workbench and restart FreeCAD
  • Create a new empty document
  • Switch to the Assembly2 workbench
  • Press the Import a part from another FreeCAD document button
  • Select the file we saved above
  • The final piece will be imported in the current document. The Assembly2 workbench will determine automatically what is the final piece in our file that needs to be used, and the new object stays linked to the file. If we go back and modify the contents of the first file, we can press the Update parts imported into the assembly button to update the pieces here.
  • By using the Import a part from another FreeCAD document button several times, and moving and rotating the pieces (with the Draft tools or by manipulating their Placement property), we can quickly create a small assembly:

Downloads

  • The model produced during this exercise: https://github.com/yorikvanhavre/FreeCAD-manual/blob/master/files/lego.FCStd

Read more

Next: Preparing models for 3D printing

Border Robot Mac Os X


Greatbattle 1.2.1 mac os.


Mac Os Versions

Retrieved from 'http://wiki.freecadweb.org/index.php?title=Manual:Modeling_for_product_design&oldid=634572'




broken image