Outils pour utilisateurs

Outils du site


issue120:tuto2

Ceci est une ancienne révision du document !


Affordable Computer Assisted Design (CAD) and its complement, Computer Assisted Manufacturing (CAM), have revolutionized many professional workflows in the last several years. There was a time when professional-grade software such as Dassault’s CATIA – and the hardware necessary to run it – was out of reach of most small businesses and the occasional hobbyist. Nowadays, the advent of 3D printing using plastic extrusion has made physical prototyping a viable proposition, meaning, in turn, that a larger segment of computer users actually has a need for usable software to design their pieces. Another group of users includes people designing virtual 3D environments on computers. Many of the same principles apply as when building 3D objects, since working with spatial coordinate systems presents the same challenges in both scenarios, though virtual world designers and ray-tracing artists must additionally contend with object surface qualities and the behavior of light when interacting with the object. Luckily, CAD software for the open-source software user has gone a long way from its (rather timid) beginnings. In this series, we will be examining the world of FreeCAD, an open-source CAD modelling application that it still in Beta, but has been gaining acceptance in recent years. Naturally, it is readily available in the Ubuntu repositories.

A choice of programs Industrial drawing and design software has historically been an area with a small number of offerings. Even in the world of commercial applications, until very recent years, one single name used to arise, repeatedly, enjoying a dominant position as well as defining file formats. This is perhaps understandable, since it does take some time to correctly operate what can be rather complex pieces of software. Once one has come to dominate a specific application, facing a similar and protracted process to learn another can be something of a challenge, even if one is not starting at the very beginning of the learning curve. So, it comes as a little surprise that the situation was even worse concerning open source CAD software. Ten years ago, perhaps the only application that ran on Ubuntu was qcad (http://qcad.org), still in its infancy back then but available in the Canonical repositories. Nowadays, things have changed for the better, and there is a fair offering of programs available that can both read and produce DXF file format drawings. Both qcad, and its fork, LibreCAD, (http://librecad.org) are open-source design programs that focus on 2D, and can, within some limits, be seen as viable alternatives for the popular but non-free AutoCAD (http://www.autodesk.com) series. The price for both qcad and LibreCAD is right (as in free), and availability is for GNU/Linux, Apple’s Mac OS, and Microsoft Windows. As can be seen in the screenshot, the LibreCAD interface is very similar to AutoCAD’s original user interface, which can make conversion from one program to the other easier for the experienced user.

In this series, however, we would prefer the software to more easily create designs in 3D. This is both for ease of learning - correctly “seeing” a 3D object from flat plans can be somewhat difficult for beginners - and because our design will then be exported for printing in a suitable 3D printer, thus creating a physical object that we can compare to our original idea. In this scenario, a piece of software that has gained wide acceptance is SketchUp (formerly Google SketchUp, http://www.sketchup.com) for many reasons, including its ease of use. However, this program has been made available over the years exclusively for the Windows and Mac OS platforms. Though there have been reports of people installing and using it successfully from inside the Wine emulator, an open-source piece of software (as opposed to being merely free for use) that is better integrated into Ubuntu can be seen as preferable. OpenSCAD (www.openscad.org ) is another option for designing 3D objects suitable for 3D printing, though its use-case is focussed on Constructive Solid Geometry (CSG) and is thus perhaps a bit more limited than other applications. However, object creation can easily be conceived as a metalanguage or script, which may have its attraction for users of the Povray raytracer that uses a similar conceptual model. Another option would be TinkerCAD (http://www.tinkercad.com), an online program that can be used for simple projects. However, it can only be used through a web browser and is closed-source, which can present both practical and philosophical inconveniences.

Finally, FreeCAD (http://www.freecadweb.org) is the application we will be focusing on in this series. There are several reasons for this choice, including a relative ease of use, being open source, and available for GNU/Linux but also Windows and Mac OS. It should be said that FreeCAD has modules for both 2D and 3D drawing, though its target seems to be mainly the latter. Interaction between 2D and 3D design is also possible as, for example, when building a 3D model from an initial 2D floor plan, or when exporting the 2D plans from a 3D model. Though the project does caution us on their website that “FreeCAD is under heavy development and might not be ready for production use” - which is coherent with their current 0.16 version number - in actual fact the software does seem to work quite well - at least well enough, in fact, to make this software a viable option for the enthusiast and for learning purposes. Professional users may wish to evaluate the application thoroughly before making a decision, to ensure it fits in well for their own particular needs. There is a large corpus of user documentation available for this project on the site, and also on Youtube. As often with software under heavy development, the documentation often is not quite at the same level as the software and some discrepancies can be seen between versions in the documentation and on your computer, though it is usually not too complicated to figure out how to make things work out. This series of articles is, obviously, not meant to replace the official documentation and tutorials. What it is aimed at is to provide a practical introduction to the use of this software by someone who has not participated in its creation and who, for this reason, may have a slightly different point of view and priorities: those of an ordinary user.

Installation sudo apt update ; sudo apt install freecad Or use your favorite software manager in any version of Ubuntu; ‘nough said. At the time of writing, version 0.15 is to be found in the Xenial repositories, which is a stable version. Developer version 0.17_pre can be downloaded for Windows and Mac OS, while stable 0.16 can be downloaded for GNU/Linux from the project’s Github page (http://github.com/FreeCAD/FreeCAD/releases ). Version 0.16 can be installed under Ubuntu as well by adding the project maintainer’s PPA repository: ppa:freecad-maintainers/freecad-stable It must be said, however, that, with a project such as this one that is moving along quite quickly, it may be best staying with the version in Ubuntu’s repositories - even if it is slightly older than the one in the repositories. This more conservative choice means more bugs will have been ironed out and will not come down to bite us. FreeCAD itself will take up only about 68 MBytes of disk space on our system, which can be rather impressive for users who are used to installing commercial CAD applications. It does come with several dependencies on other packages, such as the Python language it has been developed in, and other graphical libraries such as Boost. However, the sum total of software packages that are (automatically) downloaded and installed is well within the bounds of reason, even for systems with a low amount of available disk space. Not-so-recent processing hardware can be usable. The following screenshot was captured running FreeCAD - installed to RAM - within a Neon 5.9 live session on a laptop equipped with an AMD Athlon X2 processor and 2 GigaBytes of memory, but whose hard drive has been scrapped several years ago. This would clearly not be optimal for production use, but can be envisioned to work on simple projects.

The program interface Designing a user interface for a CAD program is always complex, since there is a rather large amount of information to be displayed. Toolbars can include drawing tools for two- and three-dimensional objects, operations on objects such as scaling and duplication, operations combining objects, and different layers may be displayed or hidden. A program such as FreeCAD that works with an internal tree representation of the scene includes object inspection, thus allowing the user to edit object parameters (such as length and coordinates) directly. But this makes further demands on user interface space since these options must be displayed at some time. As can be seen in the screenshots, the FreeCAD user interface has condensed all these elements into three main areas. The main space is at the bottom right. In this, we will see the start page or “Start Center” when the application is started up. This contains some rather handy links to various simple tasks that can be of help to the novice. Recent projects can also be opened directly from this pane, though they can also be opened from a more traditional File > Open menu option. This area has a system of panes, in which the different projects we are working on will be displayed one at a time. We can switch to one or another at any moment, making it easy to work on several projects, or several different pieces for a single final object.

On the left, we have a column that usually contains a dialog with contextual information on a specific object, either the project as a whole or the element selected at the time. This is also where the parameters relating to that object can be inspected, and altered manually, if needed. Finally, the top of the screen is populated with toolbars that contain the different tools and other options. Herein lies the specificity of the FreeCAD user interface. Toolbar visualization is controlled by a system of “Workbenches”. Within each workbench - with titles such as “Drawing”, “Draft”, “Part” or “Arch” - specific toolbars are activated. The paradigm is similar to a physical fabricator’s workplace. In most shops, different working areas are disposed along the walls. Each bench will have nearby a set of tools, grouped according to the type of work being performed in that area in a way to minimize movement. A (physical) project may then be transferred to a workbench dedicated to soldering, or another specializing in electronic instruments, as the need arises. In a similar fashion, the FreeCAD user will activate one or another workbench inside the user interface as the project evolves from one stage to another. In each workbench, only the toolbars with the most pertinent tools will be seen at any one time, thus reducing visual clutter on-screen. However, it should be noted that all tools within FreeCAD can be accessed from the menu system, even if they are not promoted within the active Workbench.

It should also be noted that windows and toolbars are fully floatable, and can be tailored to the user’s specific needs (and the screen’s available space), much in the way many modern word processing applications work. However, since there are very many different options available, it may be best for beginners to leave tools and toolbars in their default positions, at least while starting to become familiar with the application. What next? In this first article on using FreeCAD, we went over the basics of choosing and installing a CAD application for Ubuntu or GNU/Linux, and reviewed some salient points of the FreeCAD user interface. In the next part, we will be creating a simple planar object to illustrate the use of the main workspaces, drawing, and extrusion tools. Constructive Solid Geometry will also be demonstrated, to punch holes in an unsuspecting piece of plain material.

issue120/tuto2.1494506149.txt.gz · Dernière modification : 2017/05/11 14:35 de d52fr