YORIK’S COFFEE CORNER

Hi, this is my blog, and also a guestbook. I publish stuff I do from time to time. Be welcome and feel at home, have a coffee and don't hesitate to drop me a line or two. All languages are highly welcome, especially the most exotic ones (nederlands, bij voorbeeld...).

You are currently viewing only posts tagged as freecad in this guestblog.

Click here to go back the blog home page, or browse by tag: firefoxos, opensource, bede, sketches, freecad, architecture, idsampa, projects, linux, works, 3d, blender, Works, detail, photo, webdesign, wordpress, animations, inthepress, cooking, trilhas, orange, Architecture, gaming, or search the 2013, 2012, 2011, 2010, 2009, 2008, 2007 or 2006 archives.


in categories  freecad  opensource  permalink:  156   posted on 13.09.2014 17:57
From Yorik

About panels and blocks - new elements for FreeCAD



I've more or less recently been working on two new features for the Architecture workbench of FreeCAD: Panels and furniture. None of these is in what we could call a finished state, but I thought it would be interesting to share some of the process here.

Panels are a new type of object, that inherits all the properties of other architectural objects, such as additions and subtractions or nomenclature (description, tag, etc...). They are based on a 2D profile, which can be made with any of the FreeCAD tools (draft, sketch, etc) or imported from a 2D drawing. They are primarily made for panel constructions such as the wikihouse or pop-up house projects. But like the rest of the Arch workbench tools, the idea is to stay very generic, and to offer a general-purpose tool that can be used in any situation where such a flat object based on a 2D contour might be used.

Currently the tool only offers a simple 3D object, but the complete plan is to offer a full workflow, from design to the output of sheets to be fed to the cutting machine. But I'm still unsure of how all all this must click together. What is the best path to work with these objects? Would you take pre-cut pieces from a base sheet, like plastic airplane models or wooden dinosaurs, then mount them in 3D? Or is it best to draw the pieces directly at their location? But wouldn't that require a way too precise knowledge of your available elements dimensions?

Certainly this will require a bit of practice to sort out. Try to work with the tool the way it currently is, see what are the best paths, experiment. If you are interested in helping with that, there is a dedicated thread on the FreeCAD forum, where you are welcome to propose ideas.

I should also of course contact the wikihouse developers, who might have some more ideas over the question. My first idea had been to try to convert their sketchup models automatically, but this will be harder than it seems, since in sketchup the different parts don't carry enough information to easily determine which faces forms the profile of the object. But that question is not closed yet, we might still figure out an efficient way to achieve that.



On the image above, you can see on the right a model imported directly from one of the wikihouse sketchup models (converted to .dae), and the corresponding cut sheets imported as .dxf. The dxf files made available on the wikihouse site seem to have a weird formatting that FreeCAD doesn't read well, so I opened and resaved it in LibreCAD, then FreeCAD opened it correctly. Then, it's just a matter of selecting all the profiles and pressing the Panel button. The profiles that have holes can be done in two different ways: either making a panel, extruding the hole, then subtracting, or, better, first turning both the profile and the hole into a single sketch with the Draft2Sketch tool, then creating the panel. The thick object on the left is a panel made of several layers, which works the same way as walls: you build several panel objects from the same profile, and give each of them a different offset value.

Currently such multilayer objects have few tools supporting them, but the idea in the future is to make them always behave as one.

Furniture is a trickier subject, although of less importance. The big problem we have here is availability. We all agree that the best would be to have nice, solid-based models like you have in Revit or ArchiCAD, that you can for example find on http://www.bimobject.com. The problem is, both use specific file formats (rfa for revit and gdl for archicad) that are hard or impossible to parse and import in FreeCAD. Some of these sites propose IFC versions, but in 99% of the cases, the IFC version is a degraded faceted version of the model, that lost all its solid information. Creating a model with these objects in Revit or ArchiCAD and exporting it to IFC almost always also results in these pieces of furniture being faceted.

There is one solution for revit families, though, that is not very practical but works: Export them as .sat files, then convert them to a format that FreeCAD likes (.stp or even better, .brep) with the cad exchanger application, which is (currently) free for personal use. That app is developed by Roman Lygin, one of the founding developers of OpenCasCade, FreeCAD's geometry kernel.

Objects obtained from that method are pretty nice and behave perfectly when projected in 2D:



There is another problem, which is that pieces of furniture can be really very complex, if they are modelled faithfully. Which adds a lot of weight to your model, for something that is not essential to the building. So I also looked at another solution: meshes. Meshes are lightweight, you can literally stuff your FreeCAD model with hundreds of them, without caring much about the complexity, and without loosing much performance.

If you look on the web, you will find a lot of 3D models of furniture. A really awful lot. In fact, just looking on the sketchup 3d warehouse, probable the biggest one, you will probably find exactly the piece you want. The problem, of course, is that almost all of these models are meshes, and they vary a lot in terms of quality and complexity. This goes to the point that you will rarely find a furniture model that will convert cleanly to a solid-based object. there is also the problem that curves in meshes are faceted, so their aspect is not very good when projected in 2D.

Finally there is the fact that furniture, as well as other kinds of objects in an architectural document, are often best represented symbolically instead of accurately. For example, when you show the plan view of a washing machine, you won't want to represent all the buttons and controls, otherwise your drawing will become pretty complex to read. Some applications, such as ArchiCAD and many others, solve that problem by allowing the user to define custom 2D representations for a 3D object, for example its top view, or its front view. These representations are then used when creating 2D drawings.

This is an interesting idea, and it would allow the best of both worlds: Being able to pick any mesh you like on the net and use it as a piece of furniture in FreeCAD, and also have these objects coherently represented when creating 2D views of your models.

Of course having to draw 2D views of furniture yourself would be a lot of work, so I also came up with a simple method to create those views automatically from meshes. This method is very brutal and slow, but has the advantage to not depend much on the quality of the mesh: It projects all the facets of the mesh on a plane, remove the facets that point to the wrong side, then unions all these facets into one big flat face. This way you easily - although not quickly nor necessarily beautifully - create contour views of your meshes, with the big advantage that these contours are shapes, so they behave very well when your model is projected on a 2D drawing:



In the arch utilities menu, there is a new command that allows to create these 3 views from a selected mesh.

The new arch furniture object currently implemented in FreeCAD (that is called arch equipment, because it is also aimed at making other kinds of standalone objects such as sinks, light fixtures, etc) is therefore a hybrid. It can be a shape or a mesh, depending on the object you base the furniture object upon, and has 3 slots for 3 additional shapes, for XY, XZ or YZ views. It also has a couple of additional non-geometric properties such as model, url, etc that are convenient for this kind of objects. Currently these 2D views must still be added manually to the furniture object (via python).

Of course nothing would prevent you from furnishing your own 2D views instead of these automatic ones. I'm not sure how far that will prove practical on the long run, but we'll see! If ArchiCAD users do it, why not us!

Anyway, I hope this is a good way to start attacking the problem, leaving the maximum of freedom to the user, which is one of the base concepts of the arch module. Currently mesh-based equipment objects are not treated yet when projected on a Drawing sheet, but that will be taken care of next. Like most of the things we're implementing in FreeCAD, it starts rough, then gets refined along the way, in no small part thanks to the interaction and feedback with users. Check the FreeCAD forum if you are interested in helping!

in categories  freecad  opensource  permalink:  125   posted on 15.08.2014 23:43
From Yorik

DXF export of FreeCAD Drawing pages



I just upgraded the code that exports Drawing pages in FreeCAD, and it works now much better, and much more the way you would expect: Mount your page fully in FreeCAD, then export it to DXF or DWG with the press of a button.





Before, doing this would export the SVG code from the Drawing page, open it in a new FreeCAD document so it got converted to FreeCAD geometry, then export it back to DXF. It gave a lot of errors and was very slow. Now the whole system is based on templates (you need a DXF template corresponding to the SVG template you use in FreeCAD), and the views that appear on the Drawing pages also output their own DXF code.

Of course things are still far from perfect, there is still no support for paper space and many other features, but it is already handy. The template is exported at 1:1 scale, and each view becomes a block, scaled by the same factor as in the Drawing page. So, scaling everything back to 1:1 is very easy too. In the image below I just scaled everything up, exploded, and modified the Standard dimension and text styles, 5 minutes work:



The two default templates of FreeCAD (A3 and A4) already have a DXF version, so you can test this immediately if you use a development version of FreeCAD. Not all views placed on the page will be guaranteed to work yet, but at least everything that is based on geometry, plus Annotations and a couple of Draft objects such as dimensions works.





The model in the first screenshot is my current IFC test house, I'll blog more about it later...

Enjoy!


in categories  freecad  opensource  permalink:  116   posted on 09.08.2014 3:50
From Yorik

A bit of FreeCAD BIM work



This afternoon I did some BIM work in FreeCAD for a house project I'm doing with Ryan. We're using this as a test platform for IFC roundtripping between Revit and FreeCAD. So far the results are mixed, lots of information get lost on the way obviously, but on the other hand I'm secretly pretty happy to see FreeCAD capable of communicating fluently with Revit already.

We already identified many bottlenecks, a major one being how FreeCAD imports IFC files, it basically transforms everything into dumb solids, which, when exported back to IFC, become faceted Breps, which Revit treats as non-editable. FreeCAD's native Arch objects, on the other hand, are in most case built of standard extrusions, and therefore stay editable in Revit. Thomas from ifcopenshell, which is the IFC importer/exporter we use in FreeCAD, is also thinking about the problem, no doubt we'll come with a solution any day soon.

In the meantime, modeling directly in FreeCAD, although slow (way slower than I would do in Blender), is already pretty reliable (not a single crash, everything nicely undoable, modifiable, fixable, etc) and enjoyable (fairly easy to look at your model the way you want to see it). It's not something I do often, I prefer the speed of Blender to raise the geometry, then I use FreeCAD to turn it into serious stuff, but here I specifically wanted to use the native Arch objects.

The speed of the workflow is of course a delicate matter, that can't be solved overnight, but now that we reached a certain maturity and stability with the Arch module, it'll be the time to begin to study more efficient ways to use it.






in categories  freecad  permalink:  110   posted on 05.08.2014 20:36
From Yorik

FreeCAD Spaces





I just finished to give a bit of polish to the Arch Space tool of FreeCAD. Until now it was a barely geometric entity, that represents a closed space. You can define it by building it from an existing solid shape, or from selected boundaries (walls, floors, whatever).

Now I added a bit of visual goodness. The Space object has gained a label, which is nicely configurable. You can make it display arbitrary text, but also automatic things like the object's name, the floor area, or other properties such as tags. You can also tweak all the usual things such as font, size, alignment, etc. The first line can also be displayed in a different font size, and you can place the label anywhere, visually, with the Draft Edit tool. If you show the floor area, the new units system is taken into account and the area is shown in your preferred unit.

On the image above, all the texts with area underneath are automatically generated that way.

Space objects also gained some slots to specify material finishings for floor, walls and ceiling. These are not used for anything else than storing your own text entries at the moment, but no doubt we'll find some better use for them later...


in categories  freecad  opensource  permalink:  80   posted on 21.07.2014 23:07
From Yorik

FreeCAD release 0.14







This is certainly a bit overdue, since the official launch already happened more than two weeks ago, but at last,here it goes: The 0.14 version of FreeCAD has been released! It happened a long, long time after 0.13, about one year and a half, but we're decided to not let that happen again next time, and will try our best to stick to 3 to 6 month release cycles from now on.

To know what changed in this release, read the full Release notes, which will explain everything in detail. Also have a look at the Arch tutorial if you haven't yet, it explains pretty much how the whole Arch module works.

From my point of view, that is, the point of view of an architect, FreeCAD is slowly becoming a solid, decent BIM authoring tool. We now have solid and trustable IFC import in FreeCAD, if IfcOpenShell is installed. If IfcOpenShell is not present, the old IFC python parser we had in version 0.13 is used, but that parser is now so weak that we'll probably remove it in next versions, because it is not useful anymore.

IfcOpenShell is also preparing a new version, which is already supported in this release, and allows to export FreeCAD models to IFC. Since the beauty of the IFC format is in its concept, that, is, the complex "grammar" by which you describe a building in code, the whole operation to export anything to IFC is a big and delicate work, that involves many conceptual decisions. This is a subject which will certainly span over several releases.

The Architecture workbench of FreeCAD, which is where most of the architecture and BIM-related tools are, is also evolving and maturing slowly. Nobody creates a BIM application from scratch, and these things take time to build, evaluate, and see how it works best. Nevertheless, some of these tools, namely the older ones like wall or structure, are now becoming pretty robust, and using them as building blocks for BIM models is becoming quite enjoyable and efficient.

Nowadays, I use FreeCAD in all of my projects. There are several scenarios for which it already occupies a big place, namely importing and converting blender models to solid geometry, and exporting 2D views (sections, plans and elevations). Blender continues to by my modeler of choice in the first phases of the project. Nothing beats the modelling speed and the freedom you get from it. A bit like sketchup, with the fundamental difference that, apart from blender being open-source and running fully and natively on my Linux machine (sketchup works, but not with all its functionality and plugins), blender offers you a much, much better control over the topology of your geometry than sketchup, which actually tries to hide it from you.

This allows you to build models that are easily "freecad-ready": clean meshes, with no overlapping, no manifold edges, that get converted to solids in FreeCAD without errors. The old dream of turning your sketchy model into a BIM model is becoming very real.

Of course there is fundamentally a difference of philosophy between what you do when you build a sketchy model, when you are trying to compose an architecture project, and when you are building a BIM model, where you know what you are building, and you are mainly adjusting things. No matter how perfectly you build your model in the preliminary phases, there will simply be things you don't pay attention to at that stage. So the process will necessarily involve modifications and "redo it the proper way this time" iterations. This is often where you get your feet trapped in the wheels with parametric modeling. So I'm more and more in favor of a simpler, more clearly-labelled and well constructed approach, where instead of nesting many levels of parametric objects, you prefer a clear human-readable organization, based on grouping objects and labeling them correctly. This will certainly be the main path I'll base my workflow on in the near future.

So, happily we now have this 0.14 release out of the way and can concentrate on new stuff. My main target for next release will of course be IFC export, but there is a lot more on the way. For now, enjoy the new release!

Downloads:

Windows version
Mac version
Ubuntu PPA
Source code

in categories  freecad  opensource  permalink:  40   posted on 29.04.2014 2:57
From Yorik

FreeCAD and IFC: sticking to standards



After my last post about IFC support in FreeCAD, I worked a bit further in order to make the test house behave better when imported into other IFC-capable applications. This is basically the first steps of FreeCAD into the big boys playground. I already leaned a few tricks on the way, that are worth sharing here.



The first thing to know, is that the IFC format is complex, and there are usually many ways to achieve something, and things can become very, very complicated. So I started with the easiest path (the idea is to go the more complex ways later on), which is exporting all the geometry as faceted objects. This is obviousy not excellent, since the objects are reduced to a bunch of faces, and become very hard or impossible to edit. But, this method has the merit to just export anything, without errors (as long as there are no curves, that's for later).

The first test I did was also reimport the IFC test house in freecad. So far so good, all the objects are recreated correctly. Only problem, as stated above, they became dumb shapes, and lost their parametric behaviour.



A second step I did then, is to use the most basic and most used modeling mechanism of IFC: extrusions. Instead of defining an object by its faces, you define a base loop (polyline), and an extrusion vector (direction and length). Several FreeCAD objects are now exported that way when you do an IFC export. At the moment, though, this mechanism is only used in "clean" cases (objects that have no addition or no subtraction, and where the extrusion is in the Z direction). Of course, later on, we need to dissociate these additions and subtractions, so this extrusion mechanism will catch more and more cases.

A second application that is now my favorite test platform, is ifc++. It is an opensource, multiplatform IFC library and viewer, and it is also, thanks to Bernd, the first good, native IFC viewer we have on the Linux platform.



After IfcOpenShell, FreeCAD's IFC engine, which is really rock-solid and can swallow all kinds of wierdly-formatted IFC files, Ifc++ is the second best IFC engine I used in these tests. It sometimes displays some errors, but rarely refuses to render something and is pretty tolerant of bad formatting. It is interesting to notice that, while commercial IFC vendors try to stick as most as possible to the standards, and will just yell at you when you come with your not-totally-up-to-the-standards IFC file, these two open-source apps are way more tolerant, and try as best as they can to handle your errors.

After that I tried to import our test house in two of the big players, Revit and ArchiCAD. Results were not very good at first, but this made me discover several interesting things:

  • When you define a polyline to be used as the base profile of an extrusion, this polyline must lie on the XY plane. It is the extruded object that you then move to its correct position.
  • Windows can only be children of walls if they are children of an opening object which is in turn child of the wall. No way to make a window a child of a wall without the opening object. So for now, they are exported as "stand-alone" windows, which seems to satisfy everybody so far...
  • Windows, apparenlty, cannot be children of structural objects. Only walls...
  • The primary way to define a relationship between two architectural objects, in IFC, is to make them children of the same "gathering" object, such as a storey. This is enough for most software.
  • One object having different representations is interpreted differently depending on the software, but this is not made to add several shapes to an object, although it seems to work (Revit complains).


After a lot of corrections, our test house now opens correctly in Revit and ArchiCAD:





The roadmap now is to add the following features:

  • Fix extrusion orientations (currently only vertical extrusions (along Z axis) work
  • Extrusions of circles (partially done already)
  • Extrusions of ellipses
  • Extrusions of complex polylines (with arcs inside)
  • Breps solids with curved surfaces
  • Subtractions and openings
  • Boolean additions
  • Axes, and additional properties such as heights and widths
  • Colors


After that I think we can say we'll have decent IFC export from FreeCAD, and probably as good as many others...

in categories  freecad  opensource  permalink:  37   posted on 15.04.2014 17:41
From Yorik

IFC support in FreeCAD




We have recently reached a very important point with the Architecture module of FreeCAD: Import and export of IFC files. The support to IFC is not fully compliant yet, but I believe it is stable enough so I can talk about it here.

The IFC format is a very important foundation of any decent BIM workflow. It is basically the one and only proper exchange format we have between all the BIM-capable applications out there, such as Revit, AllPlan or ArchiCAD. IFC is an extension of the STEP format, which is very widely used in mechanical engineering, and also an ISO standard. It is also not a closed format, owned by a single company, but open, human-readable, and maintained by a consortium. This only is a tremendous change compared to older 2D formats such as DWG, that are closed, encrypted, undocumented and proprietary. As a result, implementing DWG support is an almost impossible task for an open-source project, while the IFC format is well documented, the documentation is publicly available, and there are many examples available to programmers. There is even a huge guidebook that explains in details how things must be implemented. All this makes IFC support much easier to implement.

If you read BIM blogs on the internet, you will notice that many people speak against IFC. It is hard, however, to not see a direct relation between these negative opinions and Revit. Revit has a very "everything into one model, one application" ideology, and many of its users see IFC as "too dumb", unable to carry the complex relationships and parametric tissue present in a Revit model.

This is certainly true, although with each new version of the IFC format, its authors try to address more of these parametric relationships. But fundamentally, the purpose of IFC is to describe a building, not the software tools you used to design it. This is at the same time a weakness and a strength, in my opinion. And you have nowadays many voices raising against relying on too complex parametric chains and going back to more simple, easily understandable model structures.

This also speaks of another important point of a modern BIM workflow: collaboration. IFC is not meant to be a format for archiects, but a format for the whole construction family, including engineers and constructors. They will use your IFC files in a very different way as you. You might want to keep your complex relationships so you can import your IFC back into your application, and everything connects, but they will do very different things with it. Engineers will use it as a guide, and sometimes rebuild some sections of it, and constructors will want to extract quantities from it, and won't be interested in how you designed it. For them, there is even a side-format called COBIE which presents the contents of an IFC model as a big spreadsheet...

So thinking of your model as "easy to exchange" with others is a very good way to look at the problem in my opinion, and in that scope, IFC is much, much more interesting. If you model objects that are easy to identify (correctly named and placed in a coherent hierarchy) and easy to modify (which often means: delete and redo it from scratch) by others, the limitations of IFC become totally supportable. And the advantages are huge.

Implementation in FreeCAD


The IFC import/export mechanism in FreeCAD relies on one amazing piece of software called IfcOpenShell. IfcOpenShell is a reader/writer for IFC files, built upon OpenCasCade, the same geometry kernel as we use in FreeCAD. The consequence of this is that both applications communicate extremely well, and the import and export of geometry is very reliable and relatively fast already.

IfcOpenShell has been supporting reading of IFC files for quite some time, but in its latest development version, it now also allows writing. This is now supported in FreeCAD too, and if you can compile FreeCAD and IfcOpenShell yourself, in order to benefit from the latest developments of both applications, you already have full IFC import and export. If not you'll need a little of patience, until these come to a proper release.

When importing an IFC file into FreeCAD, IfcOpenShell will get all the entities derived from the IfcProduct class. That involves basically all building elements, such as walls, windows, roofs, etc. and extract their shape. When a corresponding Arch object exists, for example a wall, such object is created, and the shape is attributed. If no corresponding Arch object exists, for example a piece of furniture, a standard Part object is created. This ensures you that all building products present in the IFC file are imported, even if there is no corresponding Arch object.

At the moment, the shape of the object comes already fully computed, with its openings, subtractions, etc. In the future, we'll work together with the IfcOpenShell developers to get more interesting behaviour, such as having the openings as separate parameters, or retrieving the baselines of the walls.

When exporting an IFC file from FreeCAD, there are currently still a couple of limitations: only Arch objects can be exported, and they can contain no curves. Other than that, any shape is correctly exported,and it's thrilling to see your wildest FreeCAD designs faithfully exported to such a "serious" format as IFC! It is best to have alreay a building + floor(s) structure in FreeCAD to export, but if none is there a default one is created for you.

The biggest task that awaits us now is complying to standards. IFC specification is very complex, and there are a lot of little particularities that such or such application will read or not read. So this will require heavy testing, and help from everybody who wants to see this going further. Several members of the FreeCAD community are already doing some heavy testing, don't hesitate to join us!

As a starter, I mounted a little test file in FreeCAD. This file also serves to demonstrate other features of FreeCAD and the Arch workbench, such as extracting 2D views and calculating quantities. Consider it as a "FreeCAD BIM test":



Get the FreeCAD file from here, and the exported IFC file here. There is also a list of exported objects for you to compare with. I'll add it to the FreeCAD example files later.

If you want to help with testing, a first thing you might want to do is try the IFC file in your BIM application, and head to the FreeCAD forum to report your results! IfcOpenShell also has a test file here.

in categories  freecad  opensource  permalink:  27   posted on 14.03.2014 17:57
From Yorik

FreeCAD Architecture tutorial

This is a copy of this original article I wrote on the FreeCAD wiki, about doing BIM modeling with FreeCAD,that I copied it here for archiving purposes. I advise you to read the original article, the quality is much better.

Introduction

Arch tutorial 00.jpg

This tutorial aims at giving you the basics to work with the Arch Workbench. I will try to make it simple enough so you don't need any previous experience with FreeCAD, but having some experience with 3D or BIM applications will be useful. In any case, you should be prepared to look for yourself for further information about how FreeCAD works on the FreeCAD documentation wiki. The Getting started page is a must read, if you have no previous experience with FreeCAD. Also check our tutorials section, and on youtube you will also find a lot more of FreeCAD tutorials.

The purpose of the Arch Workbench is to offer a complete BIM workflow inside FreeCAD. As it is still under development, don't expect to find here the same tools and level of completion as grown-up commercial alternatives such as Revit or ArchiCAD, but on the other hand, FreeCAD being used in a much bigger scope than these applications, the Arch Workbench greatly benefits from the other disciplines FreeCAD caters to, and offers some features rarely seen in traditional BIM applications.

Here are, for example, a couple of interesting features of FreeCAD's Arch Workbench that you'll hardly find in other BIM apps:

  • Architectural objects are always solids. From FreeCAD's strong mechanical background, we learned the importance of always working with solid objects. This ensures a much more error-free workflow, and very reliable boolean operations. Since cutting through 3D objects with a 2D plane, in order to extract sections, is also a boolean operation, you can immediately see the importance of this point.
  • Architectural objects can always have any shape. No restrictions. Walls don't need to be vertical, slabs don't need to look like slab. Any solid object can always become any architectural object. Very complex things, usually hard to define in other BIM applications, like a floor slab curving up and becoming a wall (yes Zaha Hadid, it's you we're talking about), present no particular problem at all in FreeCAD.
  • The whole power of FreeCAD is at your fingertips. You can design architectural objects with any other tool of FreeCAD, such as the PartDesign Workbench, and when they are ready, convert them to architectural objects. They will still retain their full modeling history, and continue totally editable. The Arch Workbench also inherits much of the Draft Workbench functionality, such as snapping and working planes.
  • The Arch Workbench is very mesh-friendly. You can easily design an architectural model in a mesh-based application such as Blender or SketchUp and import it in FreeCAD. If you took care of the quality of your model and its objects are non-manifold solid shapes, turning them into architectural objects only requires the press of a button.

At the time I'm writing this, though, the Arch Workbench, as the rest of FreeCAD, suffers some limitations. Most are being worked on, though, and will disappear in the future.

  • FreeCAD is no 2D application. It is made for 3D. There is a reasonable set of tools for drawing and editing 2D objects with the Draft Workbench and Sketcher Workbench, but it is not made for handling very large (and sometimes badly drawn) 2D CAD files. You can usually successfully import 2D files, but don't expect very high performance if you want to keep working on them in 2D. You have been warned.
  • No materials support. FreeCAD will have a complete Material system, able to define very complex materials, with all the goodies you can expect (custom properties, material families, rendering and visual aspect properties, etc), and the Arch Workbench will of course use it when it is ready.
  • Very preliminary IFC support. You can already import IFC files, quite reliably, provided IfcOpenShell is installed on your system, but exporting is still not officially supported. This is worked on both by the FreeCAD and IfcOpenShell developers, and in the future we can expect full-powered IFC support.
  • Most Arch tools are still in development. That means that automatic "wizard" tools that create complex geometry automatically, such as Arch Roof or Arch Stairs can only produce certain types of objects, and other tools that have presets, such as Arch Structure or Arch Window only have a couple of basic presets. This will of course grow over time.
  • Relations between objects in FreeCAD are still not officially available. These, for example the relation between a window and its host wall, are currently implemented in the Arch Workbench with temporary (and therefore somewhat limited) methods. Many new possibilities will arise when this feature will be fully available.
  • Units are being implemented in FreeCAD, which will allow you to work with any unit you wish (even imperial units, you guys from the USA can be eternally grateful for this to Jürgen, FreeCAD's godfather and dictator). But at the moment the implementation is not complete, and the Arch workbench still doesn't support them. You must consider it "unit-less".


FreeCAD version 0.14 required

This tutorial was written using FreeCAD version 0.14. You will need at least this version number in order to follow it. Earlier versions might not contain all the needed tools,or they could lack options presented here.


Typical workflows

The Arch Workbench is mainly made for two kinds of workflows:

  • Build your model with a faster, mesh-based application such as Blender or SketchUp, and import them in FreeCAD in order to extract plans and section views. FreeCAD being made for precision modeling, at a much higher level than what we usually need in architectural modeling, building your models directly in FreeCAD can be heavy and slow. For this reason, such a workflow has big advantages. I described it in this article on my blog. If you care to model correctly and precisely (clean, solid, non-manifold meshes), this workflow gives you the same performance and precision level as the other.
  • Build your model directly in FreeCAD. That is what I will showcase in this tutorial. We will use mostly three workbenches: Arch, of course, but also Draft, whose tools are all included in Arch, so there is no need to switch workbenches, and Sketcher. Conveniently, you can do as I usually so, which is to create a custom toolbar in your Arch workbench, with Tools -> Customize, and add the tools from the sketcher that you use often. This is my "customized" Arch workbench

Arch tutorial 01.jpg

In this tutorial, we will model the house in 3D, based on the 2D drawings we'll download from the net, and extract from it 2D documents, such as plans, elevations and sections.

Preparation

Instead of creating a project from scratch, Let's take an example project to model, it will save us time. I chose this wonderful house by the famous architect Vilanova Artigas (see a series of pictures by Pedro Kok), because it is close to where I live, it is simple, it's a wonderful example of the amazing modernist architecture of São Paulo (it is even for sale if you have "a few" Reals to spend), and dwg drawings are easily available.

We will use the 2D DWG drawings obtained from the link above (you need to register to download, but it's free) as a base to build our model. So the first thing you'll want to do is to download the file, unzip it, and open the DWG file inside with a dwg application such as DraftSight. Alternatively, you can convert it to DXF with a free autility such as the Teigha File Converter. If you have the Teigha converter installed (and its path set in the Arch preferences settings), FreeCAD is also able to import DWG files directly. But since these files can sometimes being of bad quality and very heavy, it's usually better open it first with a 2D CAD application and do some cleaning.

Here, I removed all the detail drawings, all the titleblocks and page layouts, did a "clean" ("purge" in AutoCAD slang) to remove all unused entities, reorganized the sections at a logical location in relation to the plan view, and moved everything to the (0,0) point. After that, our file can be opened quite efficiently in FreeCAD. Check the different options available in Edit -> Preferences -> Draft -> Import/Export, they can affect how (and how quickly) DXF/DWG files are imported.

This is how the file looks after being opened in FreeCAD. I also changed the thickness of the walls (the contents of the "muros" group), and flipped a couple of doors that were imported with wrong X scale, with the Draft Scale tool:

Arch tutorial 02.jpg

The DXF importer (which also takes care of DWG files, since when importing DWG files, they are simpl converted to DXF first), groups the imported objects by layer. There is no layer in FreeCAD, but there are groups. Groups offer a similar way to organize the objects of your files, but don't have specific properties, like AutoCAD layers, that apply to their contents. But they can be placed inside other groups, which is very handy. The first thing we might want to do here, is to create a new group (in the tree view, right-click on the document icon, add a group, right click on it to rename it as "base 2D plans", and drag and drop all the other objects into it.

Building the walls

Like most Arch objects, walls can be built upon a big variety of other objects: lines, wires (polylines), sketches, faces or solid (or even on nothing at all, in which case they are defined by height, width and length). The resulting geometry of the wall depends on that base geometry, and the properties you fill in, such as width and height. As you might guess, a wall based on a line will use that line as its alignment line, while a wall based on a face will use that face as its base footprint, and a wall based on a solid will simply adopt the shape of that solid. This allows about any shape imaginable to become a wall.

There are different possible strategies to build walls in FreeCAD. One might want to build a complete "floor plan" with the sketcher, and build one, big, wall object from it. This technique works, but you can only give one thickness for all the walls of the project. Or, you can build each piece of wall from separate line segments. Or, this is what we will do here, a mix of both: We will build a couple of wires on top of the imported plan, one for each type of wall:

Arch tutorial 03.jpg

As you see, I've drawn in red the lines that will become concrete walls (a pictures search of the house can help you to see the different wall types), the green ones are the exterior brick walls, and the blue ones will become the inner walls. I passed the lines through the doors, because doors will be inserted in the walls later, and will create their openings automatically. Walls can also be aligned left, right or centrally on their baseline, so it doesn't matter which side you draw the baseline. I also took care on avoiding intersections as much as I could, because our model will be cleaner that way. But we'll take care of intersections later.

When this is done, place all those lines in a new group if you want, select each line one by one, and press the Arch Wall tool to build a wall from each of them. You can also select several lines at once. After doing that, and correcting widths (exterior walls are 25cm wide, inner walls are 15cm wide) and some alignments, we have our walls ready:

Arch tutorial 04.jpg

We could also have built our walls from scratch. If you press the Arch Wall button with no object selected, you will be able to click two points on the screen to draw a wall. But under the hood, the wall tool will actually draw a line and build a wall on it. In this case, I found it more didactic to show you how things work.

Did you notice that I took great care not to cross the walls? this will save us some headache later, for example if we export our work to other applications, that might not like it. I have only one intersection, where I was too lazy to draw two small line segments, and drew one big wire crossing another. This must be fixed. Fortunately, all Arch objects have a great feature: you can add one to another. Doing that will unite their geometries, but they are still editable independently after. To add one of our crossing walls to the other, just select one, CTRL + select the other, and press the Arch Add tool:

Arch tutorial 05.jpg

On the left is are the two intersecting walls, on the right the result after adding one to the other.

An important note about parametric objects

Something is important to consider already. As you can see, in FreeCAD, everything is parametric: Our new "united" wall is made from two walls, each based on a baseline. When you expand them in the tree view, you can see all that chain of dependencies. As you can imagine, this little game can quickly become very complex. Furthermore, if you already know how to work with the sketcher, you might have wanted to draw the baselines with constrained sketches. This whole complexity has a cost: it raises exponentially the number of calculations that FreeCAD has to perform to keep your model geometry up to date. So, think about it, don't add unnecessary complexity when you don't need it. Keep a good balance between simple and complex objects, and keep these for the cases where you really need them.


For example, I could have drawn all my baselines above without caring about what crosses what, and fix things with the Arch Add tool later. But I would have raised much the complexity of my model, for no gain at all. Better make them correct right from the start, and keeping them as very simple pieces of geometry.

Now that our walls are okay, we need to raise their height, until they intersect the roof. Then, since the wall object still cannot be cut automatically by roofs (this will happen some day, though), we will build a "dummy" object, that follows the shape of the roof, to be subtracted from our walls.

First, by looking at our 2D drawings, we can see that the highest point of the roof is 5.6m above the ground. So let's give all our walls a height of 6m, so we make sure they will be cut by our dummy roof volume. Why 6m and not 5.6m? You may ask. Well, if you already worked with boolean operations (additions, subtractions, intersections), you must already know that these operations usually don't like much "face-on-face" situations. They prefer clearly, frankly intersecting objects. So by doing this, we keep on the safe side.

To raise the height of our walls, simply select all of them (don't forget the one we added to the other) in the tree view, and change the value of their "height" property.

Before making our roof and cutting the walls, let's make the remaining objects that will need to be cut: The walls of the above studio, and the columns. The walls of the studio are made the same way as we did, on the superior floor plan, but they will be raised up to level 2.6m. So we will give them the needed height so their top is at 6m too, that is, 3.4m. Once this is done, let's move our walls up by 2.6m: Select them both, put yourself in frontal view (View -> Standard Views -> Front), press the Draft Move button, select a first point, then enter 0, 2.6, 0 as coordinates, and press enter. Your objects now have jumped 2.6m high:

Arch tutorial 06.jpg

About coordinates

The Draft objects, and most Arch objects too, obey to a Draft system called working planes. This system defines a 2D plane where next operations will take place. If you don't specify any, that working plane adapts itself to the current view. This is why we switched to frontal view, and you see that we indicated a movement in X of 0 and in Y of 2.6. We could also have forced the working plane to stay on the ground, by using the Draft SelectPlane tool. Then, we would have entered a movement of X of 0, Y of 0 and Z of 2.6.


Now let's move our walls horizontally, to their correct location. Since we have points to snap to, this is easier: Select both walls, press the Draft Move tool, and move them from one point to the other:

Arch tutorial 07.jpg

Finally, I changed the color of some walls to a brick-like color (so it's easier to differentiate), and made a small correction: Some walls don't go up to the roof, but stop at a height of 2.60m. I corrected the height of those walls.

Raising the structure

Now, since we'll have to cut our walls with a subtraction volume, we might as well see if there aren't other objects that will need to be cut that way. There are, some of the columns. This is a good opportunity to introduce a second arch object: the Arch Structure. Structure objects behave more or less like walls, but they aren't made to follow a baseline. Rather, their prefer to work from a profile, that gets extruded (along a profile line or not). Any flat object can be a profile for a structure, with only one requirement: they must form a closed shape.

For our columns, we will use another strategy than with the walls. Instead of "drawing" on top of the 2D plans, we will directly use objects from it: the circles that represent the columns in the plan view. In theory, we could just select one of them, and press the Arch Structure button. However, if we do that, we produce an "empty" structural object. This is because you can never be too sure at how well objects were drawn in the DWG file, and often they are not closed shapes. So, before turning them into actual columns, let's turn them into faces, by using the Draft Upgrade tool twice on them. The first time to convert them into closed wires (polylines), the second time to convert those wires into faces. That second step is not mandatory, but, if you have a face, you are 100% sure that it is closed (otherwise a face cannot be made).

After we have converted all our columns to faces, we can use the Arch Structure tool on them, and adjust the height (some have 6m, other only 2.25m height):

Arch tutorial 08.jpg

On the image above, you can see two columns that are still as they were in the DWG file, two that were upgraded to faces, and two that were turned into structural objects, and their height set to 6m and 2.25m.

Note that those different Arch objects (walls, structures, and all the others we'll discover) all share a lot of things between them (for example all can be added one to another, like we already saw with walls, and any of them can be converted to another). So it's more a matter of taste, we could have made our columns with the wall tool too, and converted them if needed. In fact, some of our walls are concrete walls, we might want to convert them to structures later.

Subtractions

Now it is time to build our subtraction volume. The easiest way will be to draw its profile on top of the section view. Then, we will rotate it and place it at its correct position. See why I placed the sections and elevations like that before beginning? It will be very handy for drawing stuff there, then moving it to its correct position on the model.

Let's draw a volume, bigger than the roof, that will be subtracted from our walls. To do that, I drew two lines on top of the base of the roof, then extended them a bit further with the Draft Trimex tool. Then, I drew a wire, snapping on these lines, and going well above our 6 meters. I also drew a blue line on the ground level (0.00), that will be or rotation axis.

Arch tutorial 09.jpg

Now is the tricky part: We will use the Draft Rotate tool to rotate our profile 90 degrees up, in the right position to be extruded. To do that, we must first change the working plane to the YZ plane. Once this is done, the rotation will happen in that plane. But if we do like we did a bit earlier, and set our view to side view, it will be hard to see and select our profile, and to know where is the basepoint around which it must rotate, right? Then we must set the working plane manually: Press the Draft SelectPlane button (it is in the "tasks" tab of the tree view), and set it to YZ (which is the "side" plane). Once you set the working plane manually, like that, it won't change depending on your view. You can now rotate your view until you have a good view of all the things you must select. To switch the working plane back to "automatic" mode later, press the Draft SelectPlane button again and set it to "None".

Now the rotation will be easy to do: Select the profile, press the Draft Rotate button, click on a point of the blue line, enter 0 as start angle, and 90 as rotation:

Arch tutorial 10.jpg

Now all we need to do it to move the profile a bit closer to the model (set the working plane to XY if needed), and extrude it. This can be done either with the Part Extrude tool, or Draft Trimex, which also has the special hidden power to extrude faces. Make sure your extrusion is larger than all the walls it will be subtracted from, to avoid face-on-face situations:

Arch tutorial 11.jpg

Now, here comes into action the contrary of the Arch Add tool: Arch Remove. As you might have guessed, it also makes an object a child of another, but its shape is subtracted from the host object, instead of being united. So now things are simple: Select the volume to subtract (I renamed it as "Roof volume to subtract" in the tree view so it is easy to spot), CTRL + select a wall, and press the Arch Remove button. You'll see that, after the subtraction happened, the volume to subtract disappeared from both the 3D view and the tree view. That is because it has been marked as child of the wall, and "swallowed" by that wall. Select the wall, expand it in the tree view, there is our volume.

Now, select the volume in the tree vieew, CTRL + select the next wall, press Arch Remove. Repeat for the next walls until you have everything properly cut:

Arch tutorial 12.jpg

Remember that for both Arch Add and Arch Remove, the order you select the objects is important. The host is always the last one, like in "Remove X from Y" or "Add X to Y"

A note about additions and subtractions

Arch objects that support such additions and subtractions (all of them except the "visual" helper objects such as the axes) keep track of such objects by having two properties, respectively "Additions" and "Subtractions", that contains a list of links to other objects to be subtracted or added. A same object can be in thr lists of several other objects, as it is the case of our subtraction volume here. Each of the fathers will want to swallow it in the tree view, though, so it will usually "live" in the last one. But you can always edit those lists for any object, by double-clicking it in the tree view, which in FreeCAD enters edit mode. Pressing the escape key exits edit mode.


Making the roofs

Now, all we have to do to complete the structure, is to make the roof and the smaller inner slabs. Again, the easiest way is to draw their profiles on top of the section, with the Draft Wire tool. Here I drew 3 profiles on top of each other (I moved them apart in the image below so you see better). The green one will be used for the lateral borders of the roof slab, then the blue one for the side parts, and the red ones for the central part, that sits above the bathroom block:

Arch tutorial 13.jpg

Then, we must repeat the rotation operation above, to rotate the objects in a vertical position, then move them at their correct places, and copy some of them that will need to be extruded twice, with the Draft Move tool, with the ALT key pressed, which creates copies instead of moving the actual object. I also added two more profiles for the side walls of the bathroom opening.

Arch tutorial 14.jpg

When everything is in place, it's just a matter of using the Draft Trimex tool to extrude, then convert them to Arch Structure objects.

Arch tutorial 15.jpg

After that, we can see some problems arising: two of the columns on the right are too short (they should go up to the roof), and there is a gap between the slab and the walls of the studio on the far right (the 2.60 level symbol on the section view was obviously wrong). Thanks to the parametric objects, all this is very easy to solve: For the columns, just change their height to 6m, fish your roof subtraction volume from the tree view, and subtract it to the columns. For the walls, it's even easier: move them a bit down. Since the subtraction volume continues at the same place, the wall geometry will adapt automatically.

Now one last thing must be fixed, there is a small slab in the bathroom, that intersects some walls. Let's fix that by creating a new subtraction volume, and subtract it from those walls. Another feature of the Draft Trimex tool, that we use to extrude stuff, is that it can also extrude one single face of an existing object. This creates a new, separate object, so there is no risk to "harm" the other object. So we can select the base face of the small slab (look at it from beneath the model, you'll see it), then press the Draft Trimex button, and extrude it up to well above the roofs. Then, subtract it from the two inner bathroom walls with the Arch Remove tool:

Arch tutorial 16.jpg

Floors, stairs and chimney

Now, our structure is complete, we just have a couple of smaller objects to do.

The chimney

Let's start with the chimney. Now you already know how it works, right? Draw a couple of closed wires, move them up at their correct height with the Draft Move tool, extrude them with the Draft Trimex tool, turn the bigger one into a structure, and subtract the smaller ones. Notice how the chimney tube wasn't drawn on the plan view, but I found its position by dragging blue lines from the section views.

Arch tutorial 17.jpg

The floors

The floors are not well represented in the base drawings. When looking at the sections, you cannot know where and how thick the floor slabs are. So I will suppose that the walls are sitting on top of foundation blocks, at level 0.00, and that there are floor slabs, also sitting on those blocks, 15cm thick. So the floor slabs don't run under the walls, but around them. We could do that by creating a big rectangular slab then subtracting the walls, but remember, subtraction operations cost us. Better do it in smaller pieces, it will be "cheaper" in terms of calculation, and also if we do it intelligently, room by room, these will also be useful to calculate floor areas later:

Arch tutorial 18.jpg

Once the wires are drawn, just turn them into structures, and give them a height of 0.15:

Arch tutorial 19.jpg

The stairs

Now the stairs. Met the next of the Arch tools, the Arch Stairs. This tool is still in a very early stage of development, at the time I'm writing, so don't expect too much of it. But it is already pretty useful to make simple, straight stairs. One concept is important to know, the stairs tool is thought to build stairs from a flat floor up to a wall. In other words, when viewed from the top, the stairs object occupies exactly the space that it occupies on the plan view, so the last riser is not drawn (but it is of course taken into account when calculating heights).

In this case, I preferred to build the stairs on the section view, because we'll need many measurements that are easier to get from that view. Here, I drew a couple of red guidelines, then two blue lines that will be the base of our two pieces of stairs, and two green closed wires, that will form the missing parts. Now select the first blue line, press the Arch Stairs tool, set the number of steps to 5, the height to 0.875,the width to 1.30, the structure type to "massive" and the structure thickness to 0.12. Repeat for the other piece.

Then, extrude both green wires by 1.30, and rotate and move them to the right position:

Arch tutorial 20.jpg

On the elevation view, draw (then rotate) the border:

Arch tutorial 21.jpg

Then move everything into place:

Arch tutorial 22.jpg

Don't forget also to cut the column that crosses the stairs, because in BIM it's always bad to have intersecting objects. We are building like in the real world, remember, where solid objects cannot intersect. Here, I didn't want to subtract the column directly from the stairs (otherwise the column object would be swallowed by the stairs object in the tree view, and I didn't like that), so I took the face on which the column was built, and extruded it again. This new extrusion was then subtracted from the stairs.

Right! All the hard work is now done, let's go on with the very hard work!

Doors and windows

Arch Windows are pretty complex objects. They are used to make all kinds of "inserted" objects, such as windows or doors. Yes, in FreeCAD, doors are just a special kind of window. In real life too, if you think of it, no? The Arch Window tool can still be a bit hard to use today, but consider this as a tradeoff, as it was built for maximum power. Almost any kind of window your imagination can produce can be done with it. But as the tool will gain more presets, this situation will certainly become better in the future.

The Arch Window object works like this: It is based on a 2D layout (any 2D object, but preferably a sketch, that contains closed wires (polylines). These wires define the different parts of the window: outer frames, inner frames, glass panels, solid panels, etc. The window objects then has a property that stores what to do with each of these wires: extrude it, place it at a certain offset, etc. Finally, a window can be inserted into a host object such as a wall or structure, and it will automatically create a hole in it. That hole will be calculated by extruding the biggest wire found in the 2D layout.

There are two ways to create such objects in FreeCAD: By using a preset, or drawing the window layout from scratch. We'll look at both methods here. But remember that the preset method does nothing else than creating the layout object and defining the necessary extrusions for you.

Using presets

When pressing the Arch Window tool with no object selected, you are invited either to pick a 2D layout, or to use one of the presets. Let's use the "Simple Door" preset to place the main entrance door of our model. Give it a width of 1m, a height of 2.45m, a W1 size of 0.15m, and leave the other parameters to 0.05m. Then click the lower left corner of the wall, and your new door is created:

Arch tutorial 23.jpg

You will notice that your new door won't appear in the tree view. That is because, by snapping to a wall, we indicated that wall as its host object. Consequently, it has been "swallowed" by the wall. But a right click on it -> Go to selection will find it in the tree.

In this case, as our window is not inserted in any wall (the opening was there already), we might as well detach our window from its host wall. This is done by double-clicking the host wall in the tree view to enter its edit mode. There, you will see the window in its "Subtractions" group. Simply select the window there, press the "remove element" button, then "OK". Our window has now been removed from its host wall, and lies at the bottom of the tree view.

We have a second door, exactly the same as this one, a bit on the left. Instead of creating a new door from scratch, we have two ways to make a copy of the previous one: By using the Draft Move tool, with the ALT key pressed, which, as you already know, copies an object instead of moving it. Or, even better, we can use the Draft Clone tool. The clone tool produces a "clone" of a selected object, that you can move around, but that retains the shape of the original object. If the original object changes, the clone changes too.

So all we need to do now is select the door, press the Draft Clone tool, then move the clone to its correct position with the Draft Move tool.

Organizing your model

Arch tutorial 24.jpg

Now would be a good time to do a bit of housecleaning. Since we already have two windows, it is a good moment to do some cleaning in the tree view: Create a new group, rename it to "windows", and drop the 2 windows in it. I also recommend you to separate other elements that way, such as the walls and structures. Since you can also create groups inside groups, you can organize further, for example by placing all elements that form the roof into a separate group, so it is easy to turn on and off (turning a group visible or invisible does the same with all objects inside).

The Arch Workbench has some additional tools to organize your model: the Arch Site, Arch Building and Arch Floor. Those 3 objects are based on the standard FreeCAD group, so they behave exactly like groups, but they have a couple of additional properties. For example, floors have the ability to set and manage the height of the contained walls and structure, and when they are moved, all their contents are moved too.

But here, since we have only one building with only one (and a half) floor, there is no real need to use such objects, so let's stick with simple groups.

Now, let's get back to work. Turn off the roof group, so we can see better inside, and switch the Display Mode of the floor objects to Wireframe (or use the Draft ToggleDisplayMode tool) so we can still snap to them, but we can see the plan view underneath. But you can also turn off the floors completely, then place your doors at level 0, then raise them of 15cm with the Draft Move tool.

Let's place the interior doors. Use the "Simple Door" preset again, make doors of 1.00m and 0.70m wide x 2.10m high, with W1 size of 0.1m. Make sure you snap to the correct wall when you place them, so they automatically create a hole in that wall. If it is hard to place them correctly, you can place them at an easier location (at the corner of the wall, for example, then move them. The "hole" will move together.

If by mistake you hosted a window in the wrong wall, it is easy to fix: Remove the window from the "Subtraction" group of the host wall in edit mode, as we saw above, then add it to the "Subtraction" group of the correct wall, by the same method, or, simply, using the Arch Remove tool.

A little work later, all our doors are there:

Arch tutorial 25.jpg

After a closer look at the elevation view, I now detected another error: The top of the brick walls is not as 2.60m, but 17.5cm lower, that is, 2.425m. Fortunately, windows based on presets have a facility: You can alter their general dimensions (width and height) from their properties. So let's change their height to 2.425 - 0.15, that is, 2.275. The second window, as it is a clone of the first one, will adapt too. This is basically where the true magic of parametric design appears.

Now we can look at the really interesting stuff: How to design your own custom windows.

Creating custom windows

As I explained above, Arch Window objects are created from 2D layouts, made of closed elements (wires (polylines), circles, rectangles, anything). Since Draft objects cannot hold more than one of these elements, the preferred tool to draw window layouts is the Sketcher. Unfortunately, with the sketcher, it is not possible to snap to external objects like with the Draft workbench, which would be useful here, since our elevations are drawn already. Fortunately, a tool exists to convert Draft objects to a sketch: The Draft To Sketch tool.

So, let's start by building our first window layout. I drew it on the elevation, using several rectangles: One for the outer line, and 4 for the inner lines. I stopped before the door, because, remember, our door already has a frame there:

Arch tutorial 26.jpg

Then, select all the rectangles, and press the Draft To Sketch button (and delete the rectangles, because this tool doesn't delete the original objects, in case something goes wrong). Then, with the new sketch selected, press the Arch Window tool:

Arch tutorial 27.jpg

The tool will detect that the layout has one outer wire and several inner wires, and automatically proposes you a default configuration: One frame, made by subtracting the inner wires from the outer one, extruded by 1m. Let's change that, by entering the window's edit mode, by double-clicking on it in the tree view:

You will see a "Default" component, that has been created automatically by the Window tool, that uses the 5 wires (always subtracting the other ones from the biggest one), and has an extrusion value of 1. Let's change its extrusion value to 0.1, to match what we used in the doors.

Then, let's add 4 new glass panels, each using a single wire, and give them an extrusion of 0.01, and an offset of 0.05, so they are placed at the middle of the frame. This will be how your window looks like when you are finished:

Arch tutorial 28.jpg

I suppose now you must have understood the power of this system: Any combination of frames and panels of any shape is possible. If you can draw it in 2D, it can exist as a full valid 3D object.

Now, let's draw the other pieces, then we'll move everything into place together. But first. we'll need to do some corrections to the base 2D drawing, because some lines are clearly missing, where the windows meet the stairs. We can fix that by offsetting the stairs line by 2.5cm with the Draft Offset tool (with ALT pressed of course, to copy our lines instead of moving them). Now we can draw our layout, with wires, then convert them to a sketch, then making a window of it.

After doing that a couple of times (I made it in 4 separate pieces, but it's up to you to decide), we have our facade complete:

Arch tutorial 29.jpg

Now, as before, it's just a matter of rotating the pieces, and moving them to their correct position:

Arch tutorial 30.jpg

Last missing piece, there is a segment of wall that didn't appear on the plan view, that we need to add. We have several options for that, I chose to draw a line on the ground plane, then move it up to the correct height, then create a wall from it. Then, we also need to fish up our roof subtraction volume (it must have stayed in the last column), then subtract it. Now this side of the building is ready:

Arch tutorial 31.jpg

Ready? Not quite. Look at the image above, we did our doors with a 5cm frame, remember (it was the default from the preset). But the other windows have 2.5cm frames. This needs to be fixed.

Editing windows

We already saw how to build and update window components, via the window's edit mode, but we can also edit the underlying sketch. Preset windows are not different than custom windows, the Arch Window tool only created the underlying sketch fo you. Select our door object (the original, not the copy, remember, we made a clone), and expand it in the tree view. There is our sketch. Double-click it to enter edit mode.

the Sketcher Workbench is an extremely powerful tool. It doesn't have some of the Draft conveniences, such as snapping or working planes, but it has many other advantages. In FreeCAD you will frequently use one or another depending on the need. The most important feature of the sketcher is constraints. Constraints allow you to automatically fix the position of some elements relative to others. For example, you can force a segment to always be vertical, or to always be at a certain distance to another.

When we edit our door sketch, we can see that it is made on a fully constrained sketch:

Arch tutorial 32.jpg

Now all we need to do is edit the 5cm distances between the outer line and the inner line, by double-clicking them, and changing their value to 2.5cm (Remember, the units are still not fully functional at the time I'm writing this). After clicking the "OK" button, our door (and its clone) have been updated.

Working without 2D support

Until now our work has been relatively easy, because we had the underlying 2D drawings to base our work upon. But now, we must do the opposite facade and the glass atrium, and things are getting more complicated: The opposite facade drawing has a lot of wrong things, doesn't represent the atrium at all, and we have simply no drawing for the inner walls of the atrium. So we will need to invent a couple of things ourselves. Be sure to have a look at reference pictures to figure out how things are made. Or do it as you wish!

One thing we can already do: duplicate the complicated stairs window with the Draft Move tool, because it is equal on both sides:

Arch tutorial 33.jpg

Note that here, I preferred to duplicate with the Draft Move tool instead of using a clone, because the clone currently doesn't support different colors inside objects. The difference is that the clone is a copy of the final shape of the original object, while if you copy an object, you create a new object and give it all the same properties as the original one (therefore, also its base sketch and its window components definition, which are both stored as properties).

Now we must attack the parts that are not drawn anywhere. Let's start with the glass wall between the sitting room and the atrium. It'll be easier to draw it on the elevation view, because we'll get the correct height of the roof. Once you are in plan view, you can rotate the view from the menu View -> Standard Views -> Rotate left or right, until you get a comfortable view to work, like this:

Arch tutorial 34.jpg

Note how on the image above, I made a line from the model to the left section, to get the exact width of the window. Then, I reproduced that width on the elevation view and divided it into 4 pieces. Then I built one main window piece, plus 4 additional windows for the sliding doors. The sketcher sometimes has difficulties with overlapping wires, that's why I preferred to keep them separated like this:

Arch tutorial 35.jpg

After the necessary rotations, everything clicks perfectly into place:

Arch tutorial 36.jpg

We still need some corner piece there. A little useful trick with the Draft SelectPlane tool, if you have a face selected when you press the button, the working plane matches this face (at least its position, and if the face is rectangular, it also tries to match its axes). This is useful to draw 2D objects directly on the model, such as here, we can draw a rectangle to be extruded directly at its correct position:

Arch tutorial 37.jpg

Then let's do the two remaining pieces. One is easy, it is a copy of what's on the other side, so we can simply use the 2D drawing:

Arch tutorial 38.jpg

The other one is a bit tricky, by looking at the pictures, we see that it has many vertical divisions, like the stairs windows. By chance (or very good design from Vilanova Artigas), the width of our window, of 4.50m, is exactly the same as the stairs window, so we can use the exact same division: 15 pieces of 30cm. Here I used the Draft Array tool to copy over the two lines 15 times,and drew rectangles on top of them:

Arch tutorial 39.jpg

Once this is done, we can create our window with the same method we already know. Another small useful trick, in case you haven't found it yourself already: When editing a window, if you change the name of a component, it actually creates a duplicate of it. So to create the 15 inner glass panels, instead of clicking 15 times the "add" button and fill 15 times the data, you can just keep editing one, and change its name and wire, it will create a copy each time.

After the window is rotated and moved into place, the atrium is complete:

Arch tutorial 40.jpg

Edits and fixes

Now when we look at our back elevation, and compare it with the plan, we see that there are some differences that need to be fixed. Namely, the bedroom windows are smaller than I first thought, and we'll need to add some more walls. In order to do that properly, some floors need to be cut:

Arch tutorial 41.jpg

We have of course several ways to do that, making a subtraction volume would be an easy way, but it would add unnecessary complexity to the model. Better to edit the base wire of each floors. This is where the Draft Edit mode comes into action. By expanding these floors in the tree view, then making their base wire visible, we can then double-click them to enter edit mode. There, we can move their points, or add or remove points. With this,editing our floor plates becomes easy.

Arch tutorial 42.jpg

After some more sweat (the person who made those drawings obviously became pretty lazy when did this last elevation, much is drawn wrong), we finally have our complete house:

Arch tutorial 43.jpg

Note the chimney tube, which is made from a circle I used to make a hole in the chimney block, that I extruded, then converted into a tube with the Part Offset tool.

Problems in objects

Sometimes an object you made can have problems. For example, the object it was based onto has been deleted, and the object can therefore not recalculate its shape. These are usually shown to you by a little red sign on their icon, and/or a warning in the output window. There is no generic recipe to fix these problems, because they can have many origins. But, the easiest way to solve them is often to delete them, and, if you didn't delete their base objects, recreate them.


Output

Now, after all the hard work we passed through to build this model, comes the reward: What can we do with it? Basically, this is the big advantage of working with BIM, all our traditional architectural needs, such as 2d drawings (plans, sections, etc), renderings, and calculations (bills of quantities, etc) can all be extracted from the model. And, even better, regenerated every time the model changes. I'll show you here how to obtain these different documents.

Preparations

Before starting to export stuff, one consideration is interesting to do: As you saw, our model is becoming increasingly complex, with a lot of relationships between objects. This can make subsequent calculation operations, such as cutting through the model, heavy. One quick way to magically "simplify" drastically your model, is to remove all of this complexity, by exporting it to the STEP format. That format will preserve all your geometry, but will discard all the relationships and parametric constructions, keeping only the final shape. When reimporting that STEP file into FreeCAD, you will get a model that has no relationship, and a much smaller file size. Think of it as an "output" file, that you can regenerate anytime from your "master" file:

Arch tutorial 44.jpg

Exporting to IFC and other applications

Arch tutorial 45.jpg

One of the very fundamental things you need when working with BIM is to be able to import and export IFC files. This is still a work in progress in FreeCAD. IFC format is already supported, and importing IFC files into FreeCAD is already pretty reliable. Exporting is still experimental, though, and has currently many limitations. However, things are bettering and we should get proper IFC export very soon.

IFC export requires very little setup, once the necessary software libraries are installed. You only need to recreate the building structure, which is needed in all IFC files, by adding an Arch Building to your file, then an Arch Floor, then moving all the groups of objects that compose your model in it. Make sure you leave your construction geometry (all the 2D stuff we've been drawing) out of it to avoid making your IFC file unnecessarily heavy.

Another thing to set, is to check the "Role" property of structural elements. Since IFC has no "generic" structural element, like FreeCAD, we need to assign them roles (column, beam, etc...) so the exporter knows what element to create in the IFC file.

In this case, we need our whole architectural system, so the IFC exporter can know if an object must be exported as a wall or a column, so we are using our "master" model, not our "output" model.

Once this is done, simply select your building object, and choose the "Industry Foundation Classes" format. Exporting to non-BIM applications, such as Sketchup is also easy, you have several export formats at your disposal, such as Collada, STEP, IGES ou OBJ.

Rendering

FreeCAD also features a rendering module, the Raytracing Workbench. That workbench currently supports two render engines, PovRay and LuxRender. Since FreeCAD is not designed for image rendering, the features that the Raytracing workbench offer to you are somewhat limited. The best course of action when you want to do proper rendering, is to export your model to a mesh-based format such as OBJ or STL, and open it in an application more suited to rendering, such as blender. The image below has been rendered with blender's cycles engine:

Arch tutorial 47.jpg

But, for a quick rendering, the Raytracing workbench can already do a good job, with the advantage of being very easy to setup, thanks to its templates system. This is a rendering of our model fully made within FreeCAD, with the Luxrender engine, using the "indoor" template.

Arch tutorial 48.jpg

The Raytracing workbench still offers you very limited control over materials, but lighting and environments are defined in templates, so they can be fully customized.

2D drawings

Certainly the most important use of BIM is to produce 2D drawings automatically. This is done in FreeCAD with the Arch SectionPlane tool. This tool allows you to place a section plane object in the 3D view, that you can orient to produce plans, sections and elevations. Section planes must know what objects they must consider, so once you have created one, you must add objects to it with the Arch Add tool. You can add individual objects, or, more conveniently, a group, a floor or a whole building. This allows you to easily change the scope of a certain section plane later, by adding or removing objects to/from that group. Any change to these objects gets reflected in the views produced by the section plane.

The section plane automatically produces cut views of the objects it intersects. In other words, to produce views instead of sections, you just need to place the section plane outside of your objects.

Arch tutorial 49.jpg

The section planes can produce two different outputs: shape objects, that live in the same document as your 3D model, or drawing views, that are made to use on a drawing sheet produced by the Drawing workbench. Each of these behave differently, and has its own advantages.

Shape views

This output is produced by using the Draft Shape2DView tool with a section plane selected. You produce a 2D view of the model directly in the 3D space, like on the image above. The main advantage here is that you can work on them using the Draft tools (or any other standard tool of FreeCAD), so you can add texts, dimensions, symbols, etc:

Arch tutorial 50.jpg

On the image above, two Shape2D views have been produced for each section, one showing everything, the other showing only the cut lines. This allows us to give it a different line weight, and turn hatching on. Then, dimensions, texts and symbols have been added, and a couple of DXF blocks have been imported to represent the furniture. These views are then easy to export to DXF or DWG, and open in your favorite 2D CAD application, such as LibreCAD or DraftSight, where you can work further on them:

Arch tutorial 51.jpg

Note that some features are still not supported by the DXF/DWG exporter so the result in your 2D application might differ a bit. For example, in the image above, I had to redo the hatching, and correct the position of some dimension texts. If you place your objects in different groups in FreeCAD, these become layers in your 2D CAD application.

Drawing views

The other kind of output that can be produced from section planes is a Drawing view. These are produced by using the Draft Drawing tool with a section plane selected. This method has one big limitation compared to the previous one: you have limited possibilities to edit the results, and at the moment, things like dimensioning or hatching are still not natively supported.

On the other hand, the final output being easier to manipulate, and the graphical possibilities of the SVG format being huge, in the future, undoubtedly this will be the preferred method. At the moment, though, you'll get better results using the previous one.

Arch tutorial 52.jpg

On the image above, the geometry is the direct output of the section plane, but some other Draft objects have been added, such as dimensions and hatched polygons, and another view object with same scale and offset values has been produced from them with the Draft Drawing tool. In the future, such operations will be done directly on the Drawing page, leaving your model totally clean.

Quantities extraction

This is another very important task to be performed on BIM models. In FreeCAD, things look good right from the start, since the OpenCasCade kernel of FreeCAD already takes care of calculating lengths, areas and volumes for all the shapes it produces. Since all Arch objects are solids, you are always guaranteed to be able to obtain a volume from them.

Using spreadsheets

There is a brand-new workbench in FreeCAD, the Spreadsheet Workbench, that is the perfect tool for collecting such information about our model. It can count objects of a certain name or a certain type, or display a specific properties of those objects. The spreadsheet workbench features two objects: The spreadsheet object is a simple spreadsheet container, that you can edit, and place values inside the cells, but has no automation. The cell controller, on the other hand, is an object that you must insert in a spreadsheet, that controls a series of cells of its host spreadsheet, filling them according to what you specify. This, provided that you organized your model well, allows you to easily retrieve individual values:

Arch tutorial 53.jpg

Note that the spreadsheet workbench is still very new, and like everything very new, still contains many bugs and limitations. But for simple summaries like this, it already works well. The resulting spreadsheet can then be exported to a CSV file, which can be imported in any spreadsheet application.

The survey mode

Another way to survey your model and extract values, is to use the Arch Survey mode. In this mode, you can click on points, edges, faces or double-click to select whole objects, and you get altitude, length, area or volume values, shown on the model, printed on the FreeCAD output window, and copied to the clipboard, so you can easily pick and paste values in another opened application

Arch tutorial 54.jpg

Conclusion

I hope this gives you a good overview of the available tools, be sure to refer to the Arch Workbench and Draft Workbench documentation for more (there are more tools that I didn't mention here), and, more generally, to the rest of the FreeCAD documentation. Pay a visit to the forum too, many problems can usually be solved there in no time, and follow my blog for news about he Arch workbench development.

The file created during this tutorial can be found here


in categories  freecad  opensource  permalink:  24   posted on 11.02.2014 19:26
From Yorik

Quantity survey in FreeCAD



Today a friend quantity surveyor gave me this idea, that resulted in this quickly made but, I think, fast and useful tool, now available from the Arch workbench:



The idea is simple: you press the tool, then you pick edges, faces or whole objects (by double-clicking them). Each time, a label is added, a line is printed in the output window, and the numeric value is copied to the clipboard, so you can paste it in a spreadsheet. The quantity registered is a length, an area or a volume, depending on what you selected. The value is rounded according to the Draft dimension precision preference.

To finish, double-click on no object or click the toolbar button again. All the labels are then removed.

This does the job that other tools do (info macros, etc...) but I wanted something really fast and simple and adapted for quantity surveying, so you can easily select graphically the measurements you need, and keep your spreadsheet open and quickly fill the values.

Enjoy!

in categories  freecad  opensource  permalink:  20   posted on 07.02.2014 14:10
From Yorik

IFC browser in FreeCAD





A little addition for FreeCAD, is this IFC browser (Find it under the Arch->Utilities menu). It simply allows you to read the contents of an IFC file in an easier way than a text editor. This is above all useful for testing purposes, when you want to chack if some object was imported or exported correctly...

The code doesn't rely on FreeCAD, so it can easily be turned into an external application.

in categories  freecad  opensource  permalink:  19   posted on 06.02.2014 19:01
From Yorik

FreeCAD Parts library





There is a little side-project to FreeCAD, which aims at collecting reusable objects under a creative commons license, that we are currently hosting at https://github.com/yorikvanhavre/FreeCAD-library . It features a small browser integrated into FreeCAD, but can also be used with other applications, since all objects are also stored as STEP files.

It currently doesn't contain a lot of objects, but it grows slowly. If you wish to contribute with some objects, look at the readme file on the repository above for instructions.

Enjoy!

in categories  architecture  projects  freecad  permalink:  386   posted on 11.12.2013 18:09
From Yorik

Florianopolis Mercado Público competition





This is a competition project for the public market of Florianópolis, Brazil. The program asked for a solution to cover the central open space of the market, an historical building located in the center of the city. Unfortunately (but quite expected) our proposal didn't win (winners here), but who has a sharp eye can see we made it to the final designs somehow



Our proposal is inspired by theater scenography, with a visual identity that is very different from the surrounding architecture, so it becomes unique and significant, and also achieves the reversibility and retractablility required by the project.

Composed by 30 mobile metallic panels (each one 4.30m by 8.15m) connected by a central metallic structure, it is thought as a decentralized roofing system, where each part can be moved manually, individually or in trios, by the market vendors.



Each part can be activated by individual crank systems, and can be elevated at an angle between 25 to almost 90 degrees. Between these two, any position is possible, resulting in a rich diversity of combinations, light and shadow situations and ventilation behaviours.

The manual operation is possible through a system of counterweights, placed in the central part of the structure, which allow a person of normal weight to operate it with relative facility. A pair of locks allows to fix each panel in a certain position and turn it resistant to winds.

When all the 30 panels are down, they cover almost 100% of the central open area.





Total water-tightness is not an objective of this proposal. The draining of rainwater is made from the central part of the new structure, while the panels extend above the existing roof, without touching it. This way, while gathering its own water, the roof leaves small vertical openings at its border, between the panels, and between the roof and the accesses. These openings allow a basic quantity of natural light to get through, even when the roof is fully closed.



When fully open, the roof keeps the central space totally open in almost all of its area. To take advantage of the constant and random play of light and shadow that the metallic panels can provide, we decided not to use any transparent part.

This way, with the movement of the panels, each market vendor becomes an active creator of the everyday variation of visual atmosphere that the new roof will provide on the public market.



Full competition panels are available here, and the FreeCAD file here.

in categories  freecad  permalink:  369   posted on 13.11.2013 22:35
From Yorik

FreeCAD Draft dimensions recoded


I just recoded the whole Draft dimension object, and it now behaves pretty well in non-horizontal planes. It also gained new arrow types, and several new properties to adjust their looks. Aditionally, the angular dimensions can now be placed on drawing sheets. Might not be 100% bug-free yet, but most usual cases should now work fine.


in categories  freecad  opensource  permalink:  346   posted on 11.10.2013 19:35
From Yorik

Towards multilayer walls in FreeCAD



I think I found a quite elegant solution for multilayer walls. It is by no means a complete feature, but I think it gives us a very interesting start on the topic.

Basically I added an "Offset" property to walls, so they can be offsetted from their baseline. With this, several walls can be based on the same baseline, resulting in a multilayer wall:



A window can be added as usual, drawn on one of the faces of any of the "sibling" walls:



Upon creation, the window not only creates a hole in its base wall, but also in all the sibling walls (= walls based on the same baseline)



There are of course different issues to solve later such as what happens when a wall intersects a multi-wall, but for that we need more complete materials support, because everything will be decided depending on the material. I will also make the hole system better, allowing the user to add a custom shape to define the hole, so one can do more complex things such as having a different hole size for each of the layers of a multilayer wall.

in categories  freecad  opensource  permalink:  325   posted on 13.09.2013 20:03
From Yorik

FreeCAD Arch module development news



It's been a long time I didn't post any update about the Arch module here, but that doesn't mean nothing has happened! It has been about 8 months now since FreeCAD's release 0.13, and release 0.14 should happen around the end of the year. It depends mainly on Jürgen's Assembly module, which now is being contributed to not only by Jürgen himself but also several other people (the branch can already be compiled and tested, if you are brave enough).

On my side, I've been working mainly on 3 things: 1) a couple of improvements to the Draft module, so it becomes easier to use for pure 2D (remember, not the focus, etc, etc... but can be useful here and there anyway), and I plan to add a coule of more tools so you can have a basic autocad workflow there. 2) the spreadsheet module and 3) new Arch objects.

What is implemented so far, besides what I showed in this post about 2D workflow in FreeCAD is this:

Draft hatching



The Draft module now brings basic hatching in the 3D view:



Draft objects have received a "Pattern" property, which list the 5 default patterns of the Draft module (more to come) plus any custom pattern you might have installed via the Draft preferences. Those patterns are simple svg files, that are turned into transparent textures and applied to the object. If these svg files contain <pattern> attributes, those are used when placing the Draft objects on a Drawing sheet, so the pattern you set in the 3D view gets printed too.

There are still opengl-related problems (the visual artifact you can see on the screenshot), which also appear in other areas of FreeCAD that use transparent textures, that we must fix at some point, but it begins to look good, and making such svg patterns is very easy, so it can be easily extended.

The spreadsheet module



A new workbench is born, with a new object: the spreadsheet:



It is a very simple object, that lives inside the FreeCAD document, and can hold cell contents (a1="yorik", b2="1.93m etc...). It has a simple parser that can evaluate expressions like "=b3*5", like it is commonly used in spreadsheet applications. That object can also be used as a pure python object, with no relationship to FreeCAD.

When editing a spreadsheet object, a spreadsheet view opens, like shown on the screenshot above. Every change you made is saved on the fly, so when finished, you just close the tab.

That spreadsheet object is very simple, very dumb, and is intended that way. We won't recreate a spreadsheet application here, the idea is just to be able to handle spreadsheet data (and save it inside a FreeCAD file).

Another object provided by the spreadsheet module is a cell controller. A cell controller is an object meant to be nested inside a spreadsheet object, and takes control over a series of cells, filling them automatically with values. These values can be taken from the FreeCAD document, and can cover a wide range of uses such as counting objects of a certain type or getting a certain property from certain objects. In the screenshot below, one cell controller extracts the name of all shape-based objects of the document, the other extracts their volume.



The spreadsheet module was coded in python (my very feeble C++ superpowers, as always...) , but a courageous FreeCAD user has already undertaken to convert it to C++, so it becomes more stable, faster, and last but not least, usable by non-python workbenches of FreeCAD.

Arch structural profiles



The structural element of the Arch module has also received some work. The can now have an automatic profile from a simple mouse click (most standard steel beams profiles are there, courageously encoded by the FreeCAD community):



Those structural elements can now also take a wire as extrusion path:



Arch space



A new long-awaited object has appeared in the Arch module: the space.



It works like this: A space always encompasses a solid volume. You can define it from an existing volume, or from bordering faces, or both combined. If you define it only from bordering faces, it is calculated by taking the bounding volume of all those faces, and subtracting what's behind the faces. So we make sure to always have a solid volume. It can also display the floor area (using the "detailed" dislay mode), by taking an horizontal section of the space at its center of mass.

You can also build walls from space faces:



I am not sure this is so useful as it looks, but many people requested to be able to do that, "model with spaces"... To me it looks more like an academic dream, but I'll be happy to be proved wrong.

Arch stairs



Stairs have also been born:



Currently you cannot do very complex stairs, only straight stairs work, but they can already be based on a line, or on nothing at all, in which case you define all parameters numerically. If you use a line as a guide, that line can also be non-horizontal, then it is used to also define the slope. Many properties are already working, such as defining the thickness and nosing of threads, and the structure, that can be massive (concrete) or made of stringers:



I plan of course to add more complex stairs type, but then we will be entering deep and horrible math calculations, from which nobody has ever come back alive...

That's all for now I'm afraid, hope you liked, check the FreeCAD page for ways to be kept informed (google+, facebook, etc) about what happens in the FreeCAD world. And drop on our cool and friendly forum for deeper talk!


in categories  freecad  opensource  permalink:  321   posted on 06.09.2013 15:37
From Yorik

FreeCAD 2D import



I made recently a couple of improvements to the Draft module of FreeCAD to ease the dwg import -> rework -> svg export workflow. This came after soem frustration with DraftSight, which doesn't print linewidths correctly when you are using layers to define linewidths, instead of old-fashioned colors and ctb files.

In FreeCAD, on the other hand, we now have quite precise control over that, and dxf/dwg import is becoming quite reliable. If - this is very important - your drawing is clean and well made (no overlapping lines, few layers, as many polylines as possible), there is almost no work needed in FreeCAD to render quite nice drawings. Basically, everything depends on the quality of your drawing. Bad drawing, bad performance in FreeCAD.

The following example is a sample of a plan I've been doing of an existing building, drawn in DraftSight:



That drawing has less than 10 layers, and all the walls (white lines) are polylines. To quickly make polylines in draftsight (and autocad), and close them where possible, isolate your layer, enter pe (Polyedit), m (multiple), select everything, enter, then j (join).

If you have the Teigha File Converter installed on your machine, you can now configure the path to its executable in the Draft preferences, and have FreeCAD import DWG files directly (it will internally convert them to DXF then import them with the standard dxf importer). If you did what I explained (clean, organized drawing), the import is fast and efficient (no error):



You have several options in the Draft preferences (this is the default). I added a new option to create Draft clones from dxf blocks, which reduces the filesize of the resulting FcStd file to almost the same as the input dxf file, and facilitates handling, because all clones use the same base shape. The base shape itself (the block definition) is there, but hidden.

Since imported objects are grouped by layer, although FreeCAD groups have no controls like autocad layers, it is easy to select all the contents of a group (right-clicking on them, in the Draft module, there is an option to select the contents), and change properties such as linewidth or draw style (hidden, dashdot, etc):



I also modified the Draft-to-Drawing tool so you can now use it on groups. So selecting the 6 groups in this drawing and pressing the Draft Drawing tool immediately places everything on a sheet, but creates only 6 view objects in the Drawing page, which makes it very easy to place them properly on the page, and set things like linewidth:



Since I made sure walls were closed polylines, they are imported as filled objects (faces). If you leave them in "Flat lines" display mode, these faces can be colored or hatched:



There is a new system to show hatching directly in the 3D view, but it is still buggy. On the Drawing page, on the other hand, it already works pretty well. It doesn't appear in the Drawing viewer (a limitation Qt), but if you press the "view in browser" button, the page is opened in the FreeCAD browser, which is based on webkit, which is among the best svg viewers available. There, the rendering is just perfect:



From there, all we need to do is export the page to a svg file, open it in inkscape to make a pdf file. FreeCAD also has a print dialog to print a pdf from the Drawing page, but it uses your system's pdf printer. Inkscape, however, is really the state of the art in that matter, and makes 100% perfect pdf prints.



Obviously you will stil find glitches, bugs and problems here and there, FreeCAD is still in early development after all, but we are slowly arriving to some usable-in-production state. Even using FreeCAD as a 2D CAD application like Autocad or Draftsight is not - and probably will never be - the focus, that doesn't mean that doing 2D with it will be bad or impossible. My aim is - like, i hope, most architects - to free myself of 2D drafting, as much as possible, but at the same time I know we'll still need to live with 2D for a long time, and maybe if we can reduce that 2D work to something minimal, then it can fit perfectly within FreeCAD's possibilities...

I also did some work on the Arch module, other post to come soon...

in categories  freecad  opensource  permalink:  206   posted on 07.02.2013 18:47
From Yorik

FreeCAD plans


The 0.13 release of FreeCAD is being prepared and is almost ready (we are now uploading sources everywhere and building packages), so this is a good time to plan a little bit what I will be working on next...

General
  • Switch our wiki, mantis and phpbb to self-hosted
  • Try to achieve python3 compatibility, so we can have blender-in-freecad or freecad-in-blender again (basically import freecad files in blender and vice-versa)
  • Try to make standard icons use the current qt theme

Draft module
  • Separate upgrade and downgrade tools into smaller parts, to make them more extensible / configurable, and easier to fix bugs
  • Make upgrade and downgrade available in scripts (put them in Draft.py)
  • Turn the Draft snap icons into FreeCAD commands
  • Redo the dimension tools, simplify them (solve the orientation hell), use a placement, see if it is possible to base their coin node on Lukes sketcher dim node

Arch module
  • Better IFC import, get rid of internal parser if possible (keep it as a separate option), try to support IFC objects subcomponents (base polyline, separate shape representations, openings) if available
  • Better struct tool, allow placement, to choose base profile, etc
  • Add IFC export (add python bindings to IfcOpenShells exporter)
  • Add materials
  • Explore the concept of space, an empty volume limited by walls, floors, ceilings or anything else. Ideally have a two-way link between the space and its bordering elements (a space is defined by its borders, but changing the dimensions of a space could or should move its borders... seems difficult to achieve)
  • Explore the concept of floors, basically be able to calculate floor areas of a project. Maybe relate to spaces, but spaces might not always have a floor area...
  • Explore the concept of multilayer objects, typically walls. Many complications arise, such as capping, corners and openings...

More about what I plan for walls here

Spreadsheet module
  • Basic spreadsheet object
  • Basic spreadsheet viewer
  • Basic spreadsheet view (group of cells)

Drawing module
  • Allow the webkit viewer to draw a page background when viewing an svg file
  • Try to use the webkit viewer instead of the qsvg viewer. AFAICS main thing needed is signal-slot to update the contents.


If you want to keep updated with what I do there, check my assigned issues on the issue tracker

in categories  freecad  opensource  blender  permalink:  180   posted on 26.11.2012 20:37
From Yorik

FreeCAD Arch module how-to


In this article I'll try to describe you the new Arch module, that will be available in the soon-to-be-released version 0.13 of FreeCAD. I built a small model with it, in order to walk through the different components and tools currently available.

This project is based on a Blender model that I made during the first phase of the project. FreeCAD is a very precise tool, where things such as modifying objects takes much time. For that reason, when what you want is speed, you are definitely better with a faster, free-form modeler such as blender or sketchup. Nowadays, once you built a very imprecise model, it is fairly easy to make things straight and with the right dimensions in Blender, thanks to the very good snapping tools. You just need to build a couple of reference edges, that set things like external dimensions, roof height, and you can snap all your building to them.



Importing a blender model into FreeCAD is extremely reliable. You have several "transport" formats available (OBJ, STL, DAE), but i always prefer the OBJ format, because it is human-readable, it is well implemented in both Blender and FreeCAD, and it allows fairly complex concepts such as NGons (DAE relies on external components in both applications, and STL reduces everything to the most basic entities). All you need to do is select your objects to be exported in Blender, export to an OBJ file (a corresponding materials file will be created, but that one is not used by FreeCAD), and open it in FreeCAD. Due to the Z/Y orientation of OBJ files (the Z is not pointing "up" but "towards you"), you may need to give all imported objects a 90° rotation on X axis, with their placement property.

Once this is done, you can use that mesh as a base to build your model. You could transform your blender objects directly into Arch objects (Creating a wall or structure with a mesh selected automatically turns it into a wall or structure, provided it is solid an dnon-manifold), but in this case I wasn't too sure about the thickness of my blender walls, and I prefered to start from scratch. I started by drawign some guidelines, mostly to have something to snap to later on.



After that I used the wall tool on my line segments, mostly to check if all worked ok, and to see which wall I would align externally, and which one centrally.



I added two axes systems, and a column. By adding axes systems to a structural element, you turn it into an array. If you add one axes system, the structural element gets copied once on each line. If you add two systems, it gets copied on each itersection of the two systems. That is what I used here to place the columns at the appropriate locations.



Finally, I joined all my base lines with the upgrade tool into two objects, one for exterior walls and one for interior walls (they would have different thicknesses and alignment), and converted them into sketches. Then, I adjusted all the internal lines of the sketches, and rebuilt two new walls on top of them. By adding one wall to the other, you make them union (but they are kept as separated objects in the objects hierarchy). This is the big advantage of parametric modeling, all is undoable, modificable.





I then began to work on the bae slab, which in this case is pretty complex, features many different levels, stairs, etc. I basically worked by laying draft wires, then extruding them and turning them into structural elements. I also placed a couple of helper dimensions, to help me figure out how I would do the stairs.



The stairs are pretty simple, once I calculated the size of one element, I just duplicated it a couple of times.







I then added the windows and doors. Both windows and doors are made with the same window tool (after all, a door is only a special case of a window). If you have a face selected when you press the window tool, it enters in sketch mode, allowing you to draw the window directly on the wall. You can use all the sketcher tools such as importing external edges from the wall to place your window accurately. By default, if you draw your window with two closed wires, one inside the other, when you close the sketch, a defualt window will be created by extruding both wires and subtracting the inner one. But you can make about any combination you want, and the different components (the extrusion depth, which wire must be subtracted, etc) is all configurable in the window's edit mode. Just remember to always draw closed, non-overlapping wires.

Doors are made exactly the same way, only the base of the interior rectangle is aligned with the base of the exterior rectangle (the vertical distance between the two edges is 0).

Here I also added the brise-soleils by making a rectangle, another one smaller by offsetting the first one, then subtracting it from the first one, then extruding, the using the Draft array tool to make the serie of 8 brises.



I also made two beams, with a structural element to which I added one of the axes systems, and then added a roof slab, by extruding a rectangle, then adding a small wall on its border. The wall is then added to the slab.

I then added all the objects of the model to a floor object, which will be easier to make sections, since you can assign one floor object to a section, and it will automatically cut through everything that is inside the floor.



Time for a fist test of a plan view, by adding a horizontal section plane object:



I finally added the big window on the front, by building a rectangular block first, which would give me a face to support the window. I then built a sketch on it, with one exterior rectangle and several inner rectangles. As soon as you exit the sketch, the window is created.



The house is now complete, we can add a couple of other section planes, to make sections and elevations.





And here is the final result on the Drawing sheet, I used the wireframe rendering for plans and sections, and the solid rendering for elevations. You will of course see imperfectiosn here and there, but remember that the development of the Arch module is a work in progress, and it will still take a lot of time before things are perfect. Anyway, I think this already begins to give us a good base.



From our section planes, we can also extract flat shapes directly in the document, by making Shape2Dview objects with them selected. I made two for each section, one showing everything, and one (with thicker line) showing only the cut lines.



These flat objects export very wall to DXF, with absolute precision. You can then use them to build more complex 2D drawings.



That's about it, in the Arch module you will also find a couple of other helper tools, mainly made to help you to convert meshes to arch objects (split meshes, detect non-manifold ones, etc), and a roof tool, which is still pretty experimental, but already works fine for simple roofs. Remember that all this is still being developed, so don't expect to find the same workflow as in commercial applications. You will likely need to go back, try other methods, etc... several times during your work. But I hope I could demonstrate that the foundations are there, and that FreeCAD can begin to have its place in a productive workflow.

The final FreeCAD file can be downloaded here, but remember that until version 0.13 is released, you will need a development version to be able to open the file.

And don't forget, FreeCAD has a lot of documentation and a very cool community that can help you to get on tracks with it...

in categories  freecad  opensource  permalink:  158   posted on 03.09.2012 23:17
From Yorik

Latest developments of the FreeCAD Arch module



This is a small sneak preview of what is possible with the 0.13 version, to be released very soon (you can already test by installing a development version). This is nothing comparable to commercial solutions yet, but it already allows to do some useful work:



It is now quite easy to import mesh objects from Blender or other mesh-based application. If they are closed, solid, non-manifold and have their normals correctly pointing outwards, they convert to Arch objects without problems. The procedure is simple: Select an object in Blender, export it to .obj, import it in FreeCAD, give its placement a rotation of 90° on the X axis (because obj format inverts Y and Z axes). Select it in FreeCAD, separate it if needed (Arch -> Split Mesh) then press the "Wall" button and that's it, it is now a wall, with all its properties.



There are now several graphical goodies to make your 3D workspace more interesting: axes systems, different linewidths, different linestyles, smart grouping, etc. FreeCAD is now becoming more stable everyday, and you can begin to work comfortably with a reasonable number of objects, and keep things fast.



The Arch section plane object now has more powers, it can not only put 2D views on a drawing sheet, like before, but you can also create a real-scale 2D view of its objects right in the 3D document, with the Draft 2DView tool. The advantage is that you can then export the 2D view to DXF with absolute precision. The Draft 2DView tool also allows to show only cut lines, so you can build nice sections, easy to export to your favorite 2D CAD application.



That's it for now (I have a longer article in preparation), probably there won't be any significant changes until the 0.13 release, but there are many ideas ready to be added just after.

in categories  freecad  opensource  linux  permalink:  157   posted on 02.09.2012 21:06
From Yorik

Handling IFC files on Linux

Working with IFC files on a linux system is still not something easy, but there are already a couple of things you can do:

1. Add a MIME type

To have .ifc files recognized, add a file named "application-x-extension-ifc.xml" to ~/.local/share/mime/packages (or /usr/share/mime/packages for system-wide) with this content:

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
	<mime-type type="application/x-extension-ifc">
		<sub-class-of type="text/plain"/>
		<comment>Industry Foundation Classes</comment>
		<glob pattern="*.ifc"/>
	</mime-type>
</mime-info>

Then run "update-mime-database ~/.local/share/mime" to update your mimetypes database.

2. Add an icon

Grab an icon from here, and save it as ~/.icons/x-extension-ifc.png (or /usr/share/icons/x-extension-ifc.png for system-wide). Now your file manager should display IFC files a bit more nicely:

3. Open IFC files

There are currently no applications that can save ifc files (might change sooner than you think, however), but there are already a couple of solutions to open them. The following example is taken from the buildingSmart examples page ((Duplex model):

FreeCAD: Can open IFC file with its internal parser (not all entiites are supported and, starting from version 0.13 (to be released soon), is able to use IfcOpenShell if it is installed on your system, and with it, can import the whole contents of an IFC file:



OpenIfcTools: Has a javawebstart viewer, simple but very good for quickly inspecting IFC files:



Blender: Can also open ifc files when IfcOpenShell and its blender importer addon are installed. Although it uses the same IFC import engine, the file import operation is much faster than FreeCAD, because the mesh data that blender uses is much quicker to construct than FreeCAD's more complex parametric objects:



BimServer: The BimServer is a multiplatform server application, made to share, review and maintain IFC-based projects. It has several interesting functionalities such as conversion to/from several other formats, cobie support, revision control, etc... It has also a WebGL viewer program for it (called BimSurfer), which can render a the project in WebGL (3D inside your web browser):

5. Save IFC files

This is not yet possible, but Thomas Krijnen, the guy behind IfcOpenShell is working on it, so very likely Blender and FreeCAD will be able to output IFC files in some near future.

in categories  freecad  opensource  permalink:  156   posted on 31.08.2012 23:42
From Yorik

Minha Palestra do FreeCAD no youtube



O pessoal do FISL gravou a palestra sobre FreeCAD que fiz no FISL13. Aqui está integralmente, for your viewing pleasure:


in categories  freecad  permalink:  142   posted on 10.08.2012 1:03
From Yorik

More work on FreeCAD


These days I had less time to work on FreeCAD, but I've been working a bit to solidify the Arch module, and refined a bit the 2D export. There are now 2 modes, solid, which uses the Arch vector renderer, and wireframe, which uses the standard Drawing module algorithms. That last mode now also draws sections with thicker lines (settable in the Arch preferences), and can also show the hidden part, behind the cutting plane.






in categories  freecad  opensource  inthepress  permalink:  140   posted on 01.08.2012 18:33
From Yorik

FreeCAD and the FISL



Maíra and me are back from the FISL. I've been presenting FreeCAD there (pdf of my talk here - in portuguese), and we also gave a Blender workshop.

The FreeCAD talk has been good, about half the room was filled, which is much more than I expected, CAD being a subject that fundamentally doesn't interest many people (and the fact that I had been assigned to one of the big rooms ) and nobody left the room during the talk, which is a good sign too. I kept talking with several people after the talk, got a couple of interesting feedbacks about the talk, a news article, and generally speaking got quite happy of how things went. Almost nobody in the room had heard or used FreeCAD before.

Of course there is still not much to show, no way to make a big show that will make people move to FreeCAD immediately, but it's a start. In any case, it's cool to have FreeCAD represented and featured among well-known projects such as ubuntu and firefox. I had hoped to find people interested in participating to the project, though, but I suppose that is something that cannot be forced.

Here are a couple of pictures of the event:









And one of the talk posted by www.baguete.com.br:


in categories  freecad  blender  opensource  permalink:  128   posted on 23.07.2012 20:59
From Yorik

FISL talks



This week I'll be giving a freecad talk (wednesday, 16h) (pdf) and a blender workshop (friday, 17h) (pdf) at the FISL in Porto Alegre. I'll post my impressions after the show here, and try to grab the video if it's filmed. See you there!




in categories  freecad  permalink:  124   posted on 17.07.2012 18:36
From Yorik
Whole morning working in freecad without one single crash, we're already doing better than autocad, aren't we?



Edit: End of the day, still no crash!


in categories  opensource  freecad  linux  blender  permalink:  96   posted on 04.06.2012 21:06
From Yorik

Python for architects - Part 1: Introduction

This is a serie of 3 tutorials for architects who wish to use opensource 3D tools (mainly Blender and FreeCAD more effectively, or simply who are curious about programming, and would like a gentle introduction. This is the first tutorial, presenting python in a general way. Read also the second part: about Blender. The third part (about FreeCAD) is yet to be written.

Why would I need to program? You might ask. There are a couple of reaons:

  • We architects are too dependents on big firms (Autodesk, Graphisoft, etc). They decide which tools, formats and standards we will use, and their decisions are in most cases dictated by commercial interests. We should be able to reflect and decide ourselves about how we want our work to be done, and have the power to craft our own tools if theirs are not good for us. Well, fear no more, yes we can!
  • Python is already included in many tools you know (or not): Blender, FreeCAD, Maya, Rhino, OpenOffice, and the crazy python fans everywhere even went much further, and you can now also use python in AutoCAD, 3ds Max or Revit, or Softimage. It also powers a very big part of Linux software. Python is everywhere. If you know one or another of those applications already, most of the work is already done. You'll just need a bit of python "sauce" to pilot them the same way as you already do with the mouse...
  • It is much easier than you would think. I'll try to demonstrate this below.

Why python?

Python is a programming language. It is free, open-source, multiplatform (Windows, Mac, Linux and many others), and it has several features that make it very different than other common programming languages, and very accessible to new users like yourself:

  • Python is a language described by its conceptors as "made for human beings", and is very easy to learn and understand. And even so (or, maybe, because of it), python is one of the most powerful languages available, principally because it can be (and is) extended almost infinitely, and is very, very widely used by people who are no computer scientists and never studied programming, like me.
  • It is interpreted, that is, unlike most other programming languages, it can be executed on-the-fly, as you write it. This has tremendous advantages for newcomers, for example it notifies you almost immediately when you make an error. You can start with very little knowledge, trying stuff, and in many cases it will teach you how to correct things and what to do next.
  • It can be embedded in other programs to be used as scripting language. Blender and FreeCAD have an embedded Python interpreter, so you can write Python code in them, that will manipulate parts of those programs, for example to create geometry. This is extremely powerful, because instead of just clicking a button labeled "create sphere", that a programmer has placed there for you, you have the freedom to create easily your own tool to create exactly the geometry you want.
  • It is extensible, you can easily plug new modules in your Python installation and extend its functionality. For example, you have modules that allow Python to read and write jpg images, to communicate with twitter, to schedule tasks to be performed by your operating system, etc. The list is endless. All this is easy to combine together, and use the power of one inside the other. For example, you can send tweets from blender, or create an openoffice sheet inside FreeCAD. You can even do incredible things such as running FreeCAD inside Blender (since FreeCAD is itself a python module too) and maybe the contrary too in the future...

So, hands on! Be aware that what will come next is a very simple introduction, by no means a complete python course. But my hope is that after that you'll get enough basics to explore deeper into the Blender and FreeCAD mechanisms, which will be in parts II and III of this tutorials serie.

Installing

Installing python present no difficulty at all, if you are on Linux there are 99% of chances that it is installed already, since it powers many parts of your system (try running "python" from a terminal to check), otherwise just install it from your system's package manager. On Windows and Mac, just download and install the latest version from the official python website. If you have Blender or FreeCAD installed, they already include an embedded python version, and you don't need to install anything.

When installing python, you might be able to choose between several versions. At the time of writing, the globally considered "stable" version is 2.7, but the latest version available is 3.2. I advise you to install the 3.2, or any higher version available. This tutorial is based on 3.2, but normally everything will work just the same with any other version.

The interpreter

Usually, when writing computer programs, you simply open a text editor (such as notepad on Windows) or a special programming environment which is in most case a text editor with several tools around it, write your program, then compile it (that means basically convert it into an executable application) and run it. Most of the time you made errors while writing, so your program won't work, and you will get an error message telling you what went wrong. Then you go back to your text editor, correct the mistakes, run again, and so on until your program works fine.

That whole process, in Python, can be done transparently inside the Python interpreter. The interpreter is a Python window with a command prompt, where you can simply type Python code, that will be executed on-the-fly, without the need to do anything else.

When Python is installed on your computer you will have a Python interpreter in your start menu (usually labelled "Python" or "Python console"). On linux and mac, you can also simply run "python" from a terminal window. Or, simply fire up Blender or FreeCAD, which both have an included python interpreter (also called "python console"). Below are images showing a standalone python console, and the python consoles embedded in FreeCAD and Blender:

The interpreter shows the Python version, then a >>> symbol, which is the command prompt, that is, where you enter Python code. Writing code in the interpreter is simple: one line is one instruction. When you press Enter, your line of code will be executed (after being instantly and invisibly compiled). For example, try writing this:

print("hello")

print is a special Python keyword that means, obviously, to print something on the screen. It is called a function, which means basically "it does something". Like in most programming languages, functions such as this one use parenthesis () that signify "do it with the contents of the parenthesis". So here the whole line means means "print the contents of the parenthesis". When you press Enter, the operation is executed, and the message "hello" is printed. If you make an error, for example let's write:

print(hello)

Python will tell us that it doesn't know what hello is: "NameError: name 'hello' is not defined".

The " characters specify that the content is a string, which is simply, in programming jargon, a piece of text. Without the ", the print command believed hello was not a piece of text but another special Python keyword. I'll explain better below. The important thing is, you immediately get notified that you made an error. By pressing the up arrow, you can go back to the last command you wrote and correct it.

The Python interpreter also has a built-in help system. Try typing:

help

It will tell us that help is a function, and needs to be used with parenthesis. For example, let's say we don't understand what went wrong with our print hello command above, we want specific information about the print command:

help(print)

You'll get a long and complete description of everything the print command can do. Press "Q" to exit the help message.

Now we dominate totally our interpreter (yes, there is no more to know than that), we can begin with serious stuff.

Variables

Of course, printing "hello" is not very interesting. More interesting is printing stuff you don't know before, or let Python find for you. That's where the concept of variable comes in. A variable is simply a value that you store under a name. For example, type this:

a = "hello"
print(a)

I guess you understood what happened, we "saved" the string "hello" under the name a. Now, a is not an unknown name anymore! We can use it anywhere, for example in the print command. We can use any name we want, just respecting simple rules, like not using spaces or punctuation. For example, we could very well write:

hello = "my own version of hello"
print(hello)

See? now hello is not an undefined word anymore. What if, by terrible bad luck, we choosed a name that already exists in Python? Let's say we want to store our string under the name "print":

print = "hello"

Python is very intelligent and will tell us that this is not possible. It has some "reserved" keywords that cannot be modified. But our own variables can be modified anytime, that's exactly why they are called variables, the contents can vary. For example:

myVariable = "hello"
print(myVariable)
myVariable = "good bye"
print(myVariable)

We changed the value of myVariable. We can also copy variables:

var1 = "hello"
var2 = var1
print(var2)

Note that it is interesting to give good names to your variables, because when you'll write long programs, after a while you won't remember what your variable named "a" is for. But if you named it for example myWelcomeMessage, you'll remember easily what it is used for when you'll see it.

Numbers

Of course you must know that programming is useful to treat all kind of data, and especially numbers, not only text strings. One thing is important, Python must know what kind of data it is dealing with. We saw in our print hello example, that the print command recognized our "hello" string. That is because by using the "", we told specifically the print command that what it would come next is a text string.

We can always check what data type is the contents of a variable with the special Python keyword type:

myVar = "hello"
type(myVar)

It will tell us the contents of myVar is 'str', or string in Python jargon. We have also other basic types of data, such as integer and float numbers:

firstNumber = 10
secondNumber = 20
print(firstNumber + secondNumber)
type(firstNumber)

This is already much more interesting, isn't it? Now we already have a powerful calculator! Look well at how it worked, Python knows that 10 and 20 are integer numbers. So they are stored as "int", and Python can do with them everything it can do with integers. Look at the results of this:

firstNumber = "10"
secondNumber = "20"
print(firstNumber + secondNumber)

See? We forced Python to consider that our two variables are not numbers but mere pieces of text. Python can add two pieces of text together, but it won't try to find out any sum. But we were talking about integer numbers. There are also float numbers. The difference is that integer numbers don't have decimal part, while foat numbers can have a decimal part:

var1 = 13
var2 = 15.65
print("var1 is of type ", type(var1))
print("var2 is of type ", type(var2))

Int and Floats can be mixed together without problem:

total = var1 + var2
print(total)
print(type(total))

Of course the total has decimals, right? Then Python automatically decided that the result is a float. In several cases such as this one, Python automatically decides what type to give to something. In other cases it doesn't. For example:

varA = "hello 123"
varB = 456
print(varA + varB)

This will give us an error, varA is a string and varB is an int, and Python doesn't know what to do. But we can force Python to convert between types:

varA = "hello"
varB = 123
print(varA + str(varB))

Now both are strings, the operation works! Note that we "stringified" varB at the time of printing, but we didn't change varB itself. If we wanted to turn varB permanently into a string, we would need to do this:

varB = str(varB)

We can also use int() and float() to convert to int and float if we want:

varA = "123"
print(int(varA))
print(float(varA))

Note on Python commands

You must have noticed that in this section we used the print command in several ways. We printed variables, sums, several things separated by commas, and even the result of other Python command such as type(). Maybe you also saw that doing those two commands:

type(varA)
print(type(varA))

have exactly the same result. That is because we are in the interpreter, and everything is automatically printed on screen. When we'll write more complex programs that run outside the interpreter, they won't print automatically everything on screen, (in fact, maybe they won't even have a screen to print to, if they run inside another application) so we'll need to use the print command. But from now on, let's stop using it here, it'll go faster. So we can simply write:

myVar = "hello friends"
myVar

Another cosmetic detail, you can insert blank spaces where you want, just to make your code easier to read. It's a matter of taste, python doesn't consider whitespaces (unless they are inside a string, of course, otherwise how would you print whole sentences?). For example, these two lines of code are totally identical to python:

print(type(varA+varB))
print ( type ( varA + varB ) )

Lists

Another interesting data type is lists. A list is simply a list of other data. The same way as we define a text string by using " ", we define lists by using [ ]:

myList = [1,2,3]
type(myList)
myOtherList = ["Bart", "Frank", "Bob"]
myMixedList = ["hello", 345, 34.567]

You see that it can contain any type of data. Lists are very useful because you can group variables together. You can then do all kind of things within that groups, for example counting them:

len(myOtherList)

or retrieving one item of a list:

myName = myOtherList[0]
myFriendsName = myOtherList[1]

You see that while the len() command returns the total number of items in a list, their "position" in the list begins with 0. The first item in a list is always at position 0, so in our myOtherList, "Bob" will be at position 2. We can do much more stuff with lists such as you can read here, such as sorting contents, removing or adding elements.

A funny and interesting thing for you: a text string is actually, internally, a list of characters! Try doing this:

myvar = "hello"
len(myvar)
myvar[2]

Usually all you can do with lists can also be done with strings. In fact both lists and strings are sequences of elements, and you can do much more with sequences, as we'll see further on.

Outside strings, ints, floats and lists, there are more built-in data types, such as dictionnaries, or you can even create your own data types with classes. Like everything in Python, the basics are small, but it is often extensible as far as your imagination allows.

Indentation & blocks

One big cool use of lists is also browsing through them and do something with each item. For example look at this:

alldaltons = ["Joe", "William", "Jack", "Averell"]
for dalton in alldaltons:
   print (dalton + " Dalton")

We iterated (programming jargon again!) through our list with the "for ... in ..." command and did something with each of the items. Note the special syntax: the for command terminates with : which indicates that what will comes after will be a block of one of more commands. Immediately after you enter the command line ending with :, the command prompt will change to ... which means Python knows that a :-ended line has happened and that what will come next will be part of it.

How will Python know how many of the next lines will be to be executed inside the for...in operation? For that, Python uses indentation. That is, your next lines won't begin immediately. You will begin them with a blank space, or several blank spaces, or a tab, or several tabs. Other programming languages use other methods, like putting everythin inside parenthesis, etc. As long as you write your next lines with the same indentation, they will be considered part of the same for-in block. If you begin one line with 2 spaces and the next one with 4, there will be an error. When you finished, just write another line without indentation, or simply press Enter to come back from the for-in block

Indentation is cool because if you make big ones (for example use tabs instead of spaces because it's larger), when you write a big program you'll have a clear view of what is executed inside what. We'll see that many other commands than for-in can have indented blocks of code too.

For-in commands can be used for many things that must be done more than once. It can for example be combined with the range() command:

serie = range(1,11)
total = 0
print ("sum")
for number in serie:
   print (number)
   total = total + number
print ("----")
print (total)

Or more complex things like this:

alldaltons = ["Joe", "William", "Jack", "Averell"]
for n in range(4):
   print (alldaltons[n], " is Dalton number ", n)

You see that the range() command also has that strange particularity that it begins with 0 (if you don't specify the starting number) and that its last number will be one less than the ending number you specify. That is, of course, so it works well with other Python commands. For example:

alldaltons = ["Joe", "William", "Jack", "Averell"]
total = len(alldaltons)
for n in range(total):
   print (alldaltons[n])

Another interesting use of indented blocks is with the if command. If executes a code block only if a certain condition is met, for example:

alldaltons = ["Joe", "William", "Jack", "Averell"]
if "Joe" in alldaltons:
   print ("We found that Dalton!!!")

Of course this will always print the sentence, because the stuff after "if" is always true ("Joe" is indeed foundin the allDaltons list), but try replacing the second line by:

if "Lucky Luke" in alldaltons:

Then the result of that line is false, and nothing is printed. We can also specify an else: statement:

alldaltons = ["Joe", "William", "Jack", "Averell"]
if "Lucky Luke" in alldaltons:
   print ("We found that Dalton!!!")
else:
   print ( "Such Dalton doesn't exist!" )

Functions

The standard Python commands are not many. In current version of Python there are about 30, and we already know several of them (print(), len(), type(), etc...). But imagine if we could invent our own commands? Well, we can, and it's extremely easy. In fact, most the additional modules that you can plug into your Python installation do just that, they add commands that you can use. A custom command in Python is called a function and is made like this:

def square(myValue):
    print ( str(myValue)+" square meters" )

print ( square(45) )

Extremely simple: the def() command defines a new function. You give it a name, and inside the parenthesis you define arguments that we'll use in our function. Arguments are data that will be passed to the function. For example, look at the len() command. If you just write len() alone, Python will tell you it needs an argument. That is, you want len() of something, right? Then, for example, you'll write len(myList) and you'll get the length of myList. Well, myList is an argument that you pass to the len() function. The len() function is defined in such a way that it knows what to do with what is passed to it. Same as we did here.

The "myValue" name can be anything, and it will be used only inside the function. It is just a name you give to the argument so you can do something with it, but it also serves so the function knows how many arguments to expect. For example, if you do this:

print ( square(45,34) )

There will be an error. Our function was programmed to receive just one argument, but it received two, 45 and 34. We could instead do something like this:

def sum(val1,val2):
   total = val1 + val2
   return ( total )

sum(45,34)
myTotal = sum(45,34)

We made a function that receives two arguments, sums them, and returns that value. Returning something is very useful, because we can do something with the result, such as store it in the myTotal variable. Of course, since we are in the interpreter and everything is printed, doing:

sum(45,34)

will print the result on the screen, but outside the interpreter, since there is no more print command inside the function, nothing would appear on the screen. You would need to do:

print (sum(45,34))

to have something printed.

Modules

Now that we have a good idea of how Python works, we'll need one last thing: How to work with files and modules.

Until now, we wrote Python instructions line by line in the interpreter, right? What if we could write several lines together, and have them executed all at once? It would certainly be handier for doing more complex things. And we could save our work too. Well, that too, is extremely easy. Simply open a text editor (such as the windows notepad, or gedit on ubuntu), and write all your Python lines, the same way as you write them in the interpreter, with indentations, etc. Then, save that file somewhere, with a .py extension instead of the usual .txt. That's it, you have a complete Python program. Of course, there are much better and much more comfortable editors than notepad (try notepad++ for example), but it is just to show you that a Python program is nothing else than a text file. Also note that on windows, python already comes with an editor named "IDLE", which is also a very comfortable way to write python code.

To make Python execute that program, there are hundreds of ways. In windows, simply right-click your file, open it with Python, and execute it. But you can also execute it from the Python interpreter itself. For this, the interpreter must find your .py file. The easiest way is to place your .py file in a place where python will search by default, such as the folder from where you started the python interpreter. On linux, by default it is your user home directory, on windows it is the folder where you installed python. If you use FreeCAD, you can simply place your .py file in the macros folder.

Here is a simple trick to find, from inside the python console, what is the current directory, which will be a good place to save our script (I'll explain later):

import os
os.path.abspath(".")

Then, let's fire our text editor, and write the following text:

def sum(a,b):
    return (a + b)

print( "test.py succesfully loaded" )

and we save it as test.py in the directory found above. Now, let's start our python console, and, write:

import test

without the .py extension. This will simply execute the contents of the file, line by line, just as if we had written it in the interpreter. The sum function will be created, and the message will be printed. There is one big difference: the import command is made not only to execute programs written in files, like ours, but also to load the functions inside, so they become available in the interpreter. In python, that kind of files, made to be imported into other files instead of being simply executed, are called modules.

Normally when we write a sum() function directly in the interpreter, we execute it simply like that:

sum(14,45)

Like we did earlier. When we import a module containing our sum() function, the syntax is a bit different. We do:

test.sum(14,45)

That is, the module is imported as a "container", and all its functions are inside. This is extremely useful, because we can import a lot of modules, and keep everything well organized. So, basically, everywhere you see something.somethingElse, with a dot in between, that means somethingElse is inside something. Now you should understand better what we did with our "os" module above. The os module is a standard module of python, and contains operating system-related functions, and a submodule (simply a module inside a module) named "path" which contains tools to work with files and folders.

We can also throw out the test part, and import our sum() function directly into the main interpreter space, like this:

from test import *
sum(12,54)

Basically all modules behave like that. You import a module, then you can use its functions like that: module.function(argument). Almost all modules do that: they define functions, new data types and classes that you can use in the interpreter or in your own Python modules, because nothing prevents you to import modules inside your module!

One last extremely useful thing. How do we know what modules we have, what functions are inside and how to use them (that is, what kind of arguments they need)? We saw already that Python has a help() function. Doing:

help()
modules

Will give us a list of all available modules. We can now type q to get out of the interactive help, and import any of them. We can even browse their content with the dir() command:

import math
dir(math)

We'll see all the functions contained in the math module, as well as strange stuff named __doc__, __file__, __name__. The __doc__ is extremely useful, it is a documentation text. Every function of (well-made) modules has a __doc__ that explains how to use it. For example, we see that there is a sin function inside the math module. Want to know how to use it?

print ( math.sin.__doc__ )

which is a simpler version than:

help(math.sin)

And finally one last little goodie: When we work on programming a new module, we often want to test it. So once we wrote a little piece of module, in a python interpreter, we do something like this, to test our new code:

import myModule
myModule.myTestFunction()

But what if we see that myTestFunction() doesn't work correctly? We go back to our editor and modifiy it. Then, instead of closing and reopening the python interpreter, we can simply update the module like this:

reload(myModule)

Conclusion

By now, you should have a broad idea of how things are programmed in python. As you see, it's basically a matter of writing text files containing your python instructions, and have these files (modules) imported in your favorite application, and executed for example when the user pushes a button. How to achieve that depends from the application, that's what we'll explore in the next parts of this tutorials serie...

In the meantime, if you would like to know more about the basics of python, there are many, many tutorials on the internet. I selected a couple of good, simple and easy ones here. For more advanced ones, just google for "python tutorial", and you'll find plenty, including one from the official python website.

There are also many very complete PDF ebooks:

I hope you liked, if anything is unclear, please tell me by posting a comment below, so I can make it evolve into something better!

To be continued! Read the second part: about Blender.


in categories  freecad  opensource  permalink:  92   posted on 01.06.2012 16:49
From Yorik

FreeCAD Arch module development status


There is quite some time I didn't write about what's going on with the FreeCAD Arch module development, so here it goes. Keep in mind that all this is still in heavy development, so it will only be available in next release (unless you use a development version of course!) and it still has many bugs. Even so, I think there is some interesting stuff to show...

The first main improvement is not in the Arch module itself but in the Draft module. The whole snapping system has been fully redone, and now features proper and extensible API and interface, clear icons, and a control toolbar. The Draft snap system is used by all Draft commands and by the Arch Wall tool, which is at the moment the only tool which has a drawing system.



The Arch Wall tool has been redone too. You have now 2 ways to make a wall: Either by selecting a 2D shape (wire, sketch, etc...) and pressing the Wall button, in which case the new wall will take the selected object as baseline, or without anything selected. In the latter case, you enter a wall drawing mode, where walls can be drawn as easily as lines.



Walls also have a new way to connect to each other, and will now auto-connect when you snap to an existing wall segment. This is done in 2 manners: If both wall segments have same width, height and alignment, the baseline of the new segment is simply added to the base sketch of the existing segment. If not, then the new wall receives its own base sketch, and it is added to the existing wall as addition.

The window tool has also been completely redone. Windows can now only be created on top of an existing 2D object (draft or sketch). Which leads to the extremely intuitive new way to make windows in FreeCAD: Draw them directly on the walls!



The technique is simple, you must simply draw a sketch with a serie of closed wires. Then these wires can be used to define window parts (frames, panels, etc...). When pressing the window button, a default window is created, with a default window part, by subtracting the inner wires from the biggest one. you can then edit these window parts, add new ones, etc... By double-clicking the window object in the tree.

The windows also automatically create a hole in the walls they are inserted in. To insert a window in a wall, select the window and the wall, and press the Arch Subtract button. If you create a window with another window selected, you'll create a clone of that window, which can be moved and inserted in other walls, but keeps the same shape of the base one.

Another new tool that has been added is the Arch Roof tool. It works only with a face selected. It then creates a sloped roof on top of that face. You can change the slope angle in its properties. It is still bery basic, all panes have the same angle, and it fails in many complex cases such as angles different than 90°, but for most roofs it already works pretty well:



The Arch group objects (floor, building, site) are also being reworked, and are now based on FreeCAD group objects, which means you can drag&drop to/from them in the tree.

And finally, I also did some further work in the Vector renderer and the Drawing module. The vector renderer is getting more stable, and is now able to work with rather complex models without errors (although it is beginning to be slow... It might be time to redo it in C++ soon). The Drawing workbench also has a new clip object, which can be used to clip a Drawing view to a certain rectangle.



We're now slowly going towards next release, so I think most of my efforts until then will go into bugfixing rather than adding new features. Anyway, I believe we're kind of reaching a state where it begins to be possible to do quite complex architecture models already. I'll try to post some examples soon...

in categories  freecad  permalink:  76   posted on 16.05.2012 20:51
From Yorik

Clipping planes on FreeCAD drawing sheets



I added a new object type for the Drawing module of FreeCAD. It is a clip plane object, it behaves like a group, you can place it inside a page (which happens by default when pressing the button), and add view objects to it by dragging them in the tree view. It has X, Y, Width and Height properties so you can define the viewport precisely, and a "show frame" property which can be used to see a red border around the frame, useful to place it correctly.

The clip object then simply clips all the view objects contained in it, without any further transformation.



The bottom view shows the 3D view with a wall and a section plane object, the top right window shows the current Qt-based Drawing viewer. Due to the internal limitations of the Qt svg engine, it cannot represent the svg clip object correctly. But the webkit viewer (left image), which will be used by default once we find time to do so, shows it correctly, as well as other svg applications.

in categories  freecad  permalink:  74   posted on 14.05.2012 1:24
From Yorik
Experimenting with roof-generation scripts in FreeCAD...


in categories  freecad  opensource  permalink:  54   posted on 03.04.2012 21:21
From Yorik

Vector renderer for FreeCAD


The OpenCasCade kernel of FreeCAD already provides a way to project 3d objects on a 2d plane. That is what we use now in the Drawing module. But it does it by calculating the shown and hidden segments of the object's edges, and can only output a bunch of lines. Nice for simple views, but not enough for architecture documents, where we want to be able to "paint" our 2d areas with solid or hatch fills.

So I ended up writing a complete new vector rendering module, inspired by earlier experiments for blender such as Pantograph or VRM. Both are based on the Painter algorithm, which is a way to render objects by depth order, so the upper objects hide the lower ones.

SVG works exactly that way, so it is totally appropriate. The big problem is to sort the faces of 3D objects by their depth in relation to the point of view. It may look simple, but it is a quite complex problem, you cannot simply consider the faces centerpoint, you need to do a serie of tests to know which face is closer. Finally, I found this article that explains step-by-step several tests to do. I implemented this in a new module and it works already fairly good and fast:



The Arch section plane already uses it by default:



Of course this is still preliminar work and will probably fail in many complex cases, but I'm already pretty happy to have the main algorithm working.



Preliminary sections support is also working:


in categories  freecad  linux  opensource  permalink:  44   posted on 21.03.2012 3:20
From Yorik

FreeCAD thumbnailer for KDE





After the tumbler plugin, here is now a KDE plugin (for the dolphin file manager) that will show thumbnails for FreeCAD .Fcstd files. Enjoy!

http://github.com/yorikvanhavre/kde-fcstd-thumbnailer

in categories  linux  freecad  opensource  permalink:  37   posted on 15.03.2012 20:38
From Yorik

FreeCAD plugin for tumbler





Tumbler is a rather new thumbnailing system developed by the people at xfce. It is used by thunar and marlinn file managers. I just made a plugin for tumbler that allows it to display thumbnails for FreeCAD files (provided you enabled thumbnails in the FreeCAD preferences).

Get the code here: https://github.com/yorikvanhavre/tumbler-fcstd-thumbnailer.

I plan to include this in the FreeCAD sources or the tumbler sources, depending if the xfce devs find it useful

in categories  freecad  permalink:  26   posted on 28.02.2012 13:55
From Yorik

in categories  freecad  opensource  permalink:  17   posted on 15.01.2012 22:29
From Yorik

IfcOpenShell and FreeCAD to work with BRep solids



With Thomas Krijnen, the guy behind IfcOpenShell, we've been playing with importing BRep files, the native OpenCasCade geometry format, from IfcOpenShell to FreeCAD. This gives truly spectacular results, FreeCAD being able to import a whole IFC file as Part solids, thus skipping the whole Mesh-to-Solid operation.



This is of course just a very early step in making the imported IFC files into something usable "architecture-wise", but it is an important one. Part shapes are the true main building block in all FreeCAD, and being able to import data in its native format is of a considerable importance to maintain a good data integrity. I also think it is a significant step in the OCC-based ecosystem...

in categories  freecad  opensource  permalink:  15   posted on 12.01.2012 15:36
From Yorik
follow-up to post 13...

The Structure elements can now be based on 2 axes systems. In edit mode, you can add axes system to a structure element. When you have 2 or more axes systems, the structual elements are placed on every intersection point. Currently only takes the 2 first axes into account...


in categories  freecad  opensource  permalink:  13   posted on 10.01.2012 21:29
From Yorik

Axes systems in FreeCAD


I more or less finished an axes system for the Arch module. It is a simple, 1-dimension axes system. You can specify the length of the axes, the size of the numbering bubble, and the numbering style (1,2,3,... or A,B,C, etc. Several styles available) directly via the properties. Then, via edit mode (double-clicking on the object in the Tree view), you can refine the whole axes sequence, by adding and removing axes, and changing the interval distance and angle of each axis. They are also movable and rotationable, so you can create very complex axes systems, which are totally snappable, including to the intersections.



Later on I plan to use them for laying out the levels of a multi-floor construction too, creating true 3-dimension systems, and find a way to have structural elements bound to them, so you can parametrically stretch buildings only by modifying their axes systems.

in categories  freecad  opensource  permalink:  1   posted on 02.01.2012 22:44
From Yorik

Scale feature in FreeCAD Draft


I changed a bit the current scale tool in the Draft module. It now uses a parametric object instead of modifying the base object. The parametric object allows you to change the scale factor afterwards. The old behaviour is still available to python scripting, though.


in categories  freecad  opensource  permalink:  182   posted on 30.12.2011 2:29
From Yorik

Editable titleblocks in FreeCAD



Lots of new features are arriving after the 0.12 release. I just implemented editable titleblocks:



More here.

in categories  linux  freecad  blender  architecture  opensource  permalink:  97   posted on 22.09.2011 16:52
From Yorik

Linux for architects


This is a little introduction to Linux for you architects who have never tried it, but would like to know what's all the fuss about it and if it is really usable for working with architecture. If you know Linux already, I'm sure you'll find a lot of missing info in this text and find it maybe a bit too enthusiastic, but we are whowe are, aren't we...

This article is a sequel of another short article I wrote back in 2009 to present some tools available to architects on the Linux platform.

Just a small note, What it is exactly?

Actually it's wrong to call Linux Linux. Linux systems are not all-in-one, monolithic things like Windows, but rather a complex assemblage of software pieces, Linux being only the base block.

Linux is based on Unix, its predecessor, and follows a basic Unix philosophy: Rather than having one huge all-in-one application that does 1001 tricks, have 1001 small applications that do each one one simple task, but do it well.

Most of the other pieces come from a project called GNU, that's why those systems are usually called GNU/Linux and not just Linux. But let's make it simple and continue to call it Linux.

Of course make those thousands of small applications all work seamlessly is not a small work, but fortunately it has been done a lot of times already. This is where comes what we call a Linux distribution, which is a complete operating system, based on GNU/Linux, made of hundreds of little pieces, all working in a big symphony. Ubuntu is one of the most famous Linux distributions.

First things first, Why Linux Is For You

  • Linux is free. This means not only that you don't pay anything, but also that you are free to do what you want with it: download it, distribute it, share it on bitTorrent, (you caneven sell it), without having to do anything or report to anyone. Like GNU people use to say, it's free like freedom, not free like free beer
  • Much more important than being free, it will stay free forever. Like most free software, its code carries a license that prevents it from being bought by a firm and stop being free.
  • Your distribution doesn't only provide you with the Linuxoperating system, but with almost any piece of software that runs on Linux. As a consequence, all your applications can be installed easily from your distribution's servers, and your whole computer, not only the operating system but ALL yourinstalled applications, are updated automatically.
  • Linux inherits another very important thing from Unix: The rock-solid built-in protection of networking, files, processes and users. As a consequence, Linux is almost invulnerable to viruses (there is no Linux virus known today) and easily protected against network intrusions.
  • Linux and most free applications that runs on it are programmed and maintained by people who have no commercial reasons to do it. They do what they think is best, not what they think will sell better. Your software will never force you to buy a new computer (Linux and most free software run fine on very old hardware) or a new plugin, and software evolves extremely fast (new features land on your system almost every single day).
  • People who make free software are extremely social. You find them easily, talk to them, discuss, share ideas, and easily get involved in directions your favorite application is taking. All happens through forums, email discussions, chat rooms or facebook pages. If you miss some feature and you can convince people of the importance of your claim, chances are high that someone will implement it.
  • Linux can safely be installed side-to-side with another operating system such as Windows. A menu will then appear, at boot time, to allow you to choose which system to boot to.

The Bad

Of course nothing comes without disvantages. Here are a few issues you might expect:
  • Bleeding-edge new hardware might not be totally supported yet. Nobody has commercial urge to make Linux work for your particular hardware, so you usually have to wait until some Linux programmer will get one for him, be annoyed be the fact it isn't supported, and remedy the situation. It's always a good idea to test before installing or investigate before buying.
  • Windows software doesn't run on Linux systems. You will need to get used to other applications. But most of the usual ones have one or many excellent or even much better alternatives in Linux, and nowadays more and more applications such as Google Chrome, Firefox or Open Office can run on both Windows and Linux. Some more specialized commercial-grade applications such as engineering applications still don't have a Linux alternative, though. You will sometimes need to do some homework and find workarounds to palliate to that situation.
  • There is no firm behind Linux. Nobody to call, nobody to complain to. Although some firms may offer you tech support, you are on your own in most cases. But fortunately most answers are very easy to find on the internet, a simple search like "How to resize a picture in Ubuntu" will usually give you an easy and immediate answer.

So what does it look like?

If you managed to read until now, you must be a bit curious to see what it looks like, right? I gathered here a couple of screenshots from the most common distributions:

Below is the latest version of Ubuntu, probably the most famous of all Linux distributions, and one of the most friendly to new users. In this version, Ubuntu introduced a new way to navigate through your files and applications, called Unity, which is the vertical bar containing icons on the left:



Another very good distribution is LinuxMint. Linux Mint is based on Ubuntu, so it inherits all the qualities of its father. But its developers put a special effort into style and design, so Linux Mint is often the favorite distribution used by artists:




This is another of the most famous ones among new users, called Fedora. Fedora is derived from a famous commercial Linux system called Red Hat, and it inherits from it a great deal of novelty and power. Fedora is usually liked because it brings bleeding-edge features faster than the others:



But most Linux systems are deeply customizable, and you can usually make your desktop look like your wildest dreams. Here is, for example, a screenshot of my own desktop:



How to get it

Most Linux distributions have a great feature: The installation CD is also a Live CD, that allows you to run your Linux system entirely from the CD, without installing anything. This is a great way to test, to see if it runs well, and if you like it at all, without risking to do any harm to your current system. The proceeding is very simple:
  • Download an .iso CD image from one of the distribution sites indicated above. Sometimes they have several flavours, such as 32bits or 64bits. Choose one that suits your computer. Since a full CD image is a big file (700Mb), Most of them allow you to download it via bitTorrent if you prefer. Some even provide DVD versions, which include more pre-installed applications.
  • Burn that image on a blank CD. Be careful, burning an image is not the same thing as copying a file on a CD. Simply copying the .iso file on the CD won't work, you must either right-click on the .iso file and select a "burn this image to disc" option, or open your disk burning software and find the "burn disc image" option. When your disk is burned, it will contain several files, not the .iso file.
  • Now place your fresh CD in your CD drive, and reboot your computer. On some systems, you must allow your computer to boot the CD before booting the Hard drive, this is usually done by pressing a key (F2, F12) during the first seconds after powering up and selecting your CD drive in a list.
  • Your new operating system will now boot. Remember that nothing is copied to your computer, so you can play safely with everything, there is no risk to harm anything. Just remove the CD and reboot, and you'll be back to your original operating system. But remember too that nothing you do while you are running from the CD will be saved, so you will loose any work you do during that time.
  • Most Linux distributions, when running from the CD, will have an "Install to Hard Drive", icon, which you can use when you are ready to install. You will then be taken to a step-by-step install procedure.
Now where are the file explorer, the internet explorer, the windows messenger, the acrobat reader, photoshop, skype, notepad, word, excel? Well, almost none of those are there, but all have at least one equivalent. Explore the menus and you will find everything in no time. And if something is missing, it can easily be installed by the system itself.

This is, for example, the Ubuntu software center, from where you install just about anything:

Okay, after all this bla-bla, what about doing architecture work?

The problem you'll encounter with Linux is that none of your usual architecture software will work. No Autocad, no Revit, no Archicad, no Vectorworks, no 3DS Max, no V-Ray. Those are all windows-only (some run on Mac too), and it's very unlikely that their developers will want to spend time in doing a Linux version in the near future.

So, how bad exactly is the situation?

Actually it is not bad at all, but you will need to learn to use new software, there is no way to avoid that part. Apart from that, it is actually possible to work without any problem.
2D CAD
In the 2D CAD field, we have a couple of options now. Some are totally free, like QCad,Cademia or the new and promising LibreCAD. Those, since they are maintained and developed by a community, might lack some commercial features like DWG format compatibility. This is LibreCAD:



We also have several commercial applications, which are not free, but run natively on Linux, and have all the features that you would expect from a commercial application, such as DWG compatibility and technical support, like Ares Commander and BricsCAD. Here is BricsCAD:



And, since a couple of months, we now have a free AND commercial application called DraftSight. DraftSight, although owned by a company, is distributed for free, and supports DWG format natively:

3D CAD & BIM
Here unfortunately things are less easy. There is at the moment no ready solution, but there are several efforts going in that direction, so the future is promising. One of these efforts is an application called FreeCAD to which I have the honor to contribute with coding in my spare time. FreeCAD is a full modern parametric modeler, and although very young, it already has a lot of interesting functionality for doing architecture, such as a 2D drawing module, usual 3D tools such as extrusion and booleans, and a 3D-to-2D module. A real BIM module is also in development.



I write a lot about FreeCAD on this blog...
3D MODELING & RENDERING
In the area of 3D rendering, things are not only better but state-of-the-art, thanks to an amazing piece of software called Blender. Blender runs on windows too, so chances are high that you heard about it already. Blender is for me the best general-use 3D application available today. Better than 3DS Max, better than Maya. It is faster, smaller, and made by 3D users instead of made by Autodesk. Blender can do everything that those 2 applications can do, and has several external renderers available.

The only drawback of blender is that it can be hard to learn if you are much used to another 3D application. But I warned you about that already...



In fact, I use Blender so much that it is now not only what I use to do rendering, but also to compose architecture:



I also write a lot about Blender, there are also many tutorials on the homepage of this site.

But there is something I didn't tell you yet. Remember I told Windows applications don't run on Linux, right? Well it's not totally true. There is a little gem of a software, called Wine, which allows to run Windows applications on a Linux system. It won't work with all applications, and many will run with problems. But one of the applications that runs almost perfectly is Sketchup! Installing Windows applications with Wine is nowadays almost as easy as installing them on Windows, and they integrate seamlessly on your desktop (But of course it is never as comfortable and fast as running a native Linux application). The Wine website has a list of windows software that runs with it, with ratings, comments and notes.
2D PAINTING & PHOTO-COMPOSITION
What would be of us architects without photoshop, right? The most famous Linux photoshop-like application is called Gimp, and, although many purists will argue that it lacks some or another indispensable photoshop option, is an excellent and very mature application, totally able to perform all the tasks architects usually require from photoshop, and, thanks to the typical friendliness to extension and customization found in most Linux applications, you can extend it into a very powerful digital painting platform.



To give you an idea, this is the kind of drawing that you can achieve with gimp only:



But a lot of digital artists use Linux nowadays, so there are many more interesting tools available, like MyPaint or Krita. Another must-have Linux application is inkscape, which is a vectorial drawing application, similar to Corel Draw or Illustrator. It is commonly used for drawing diagrams, icons and vector artwork, but is perfect for mounting more complex presentation sheets.



Also worth noting, many of those applications also run on windows, so it's a good place to try.

Are there architects out there who use Linux?

Because of all the little problems but mostly because it is not very well known, very few architects use Linux at this time. But things are changing fast... Here is a list of interesting people who share tips, techniques and resources about the subject: Enjoy!

in categories  freecad  opensource  permalink:  77   posted on 22.09.2011 16:50
From Yorik

Draft objects are now usable with PartDesign module





Now Draft objects can be drawn on any existing face. If the working plane was not set manually, the face on which you begin to draw will automatically determinate the working plane. If you draw closed shapes, they can be used for Pads and Pockets too.

in categories  freecad  opensource  permalink:  147   posted on 22.08.2011 16:48
From Yorik

FreeCAD Arch module: working on top of sketches



I just made a couple of improvements so walls can be automatically built on top of complex sketches. This way, it is now possible to build your whole floor plan from one sketch, having it completely constrained...

After you build a sketch, just press the Wall button and that's it!




in categories  freecad  opensource  permalink:  132   posted on 28.07.2011 3:18
From Yorik

The FreeCAD Arch module, development news



I recently made a bit of progress on the Arch module front. Things are still far from efficiently usable, but there are already a couple of easy operations that can be done, and several of the tools have been refined. We now have two basic architecture components (Wall and Structure) and containers (Cell, Floor, Building an Site), plus two tools to simply add or remove components to/from a container. This is temporary, that operation is planned to be done by dragging and dropping directly in the tree view later.

The wall and structure tools are most useful when used with a selected object such as a line or open wire, for a wall, or a closed shape, for a structure. But they can also be invoked without any selected object, in that case the wall is built on a default line that can be edited and extended, and the structure is a simple cubic element. They can also be based not only on a wire, but also on a face or a solid. Of course a face only allows to specify an extrusion heigth (no width and length) and a solid doesn't allow you to teak anything. But in the future when walls will grow more complex and orient how they look in 2D be able to make any solid shape behave like a wall will be very useful.

I also built a temporary system to export 2D data from blender to FreeCAD, while there is no dxf exporter available for blender 2.5x. There is also a new "group layers into compounds" option to the Draft dxf preferences, which, instead of importing every single dxf entity, groups objects from same layers into compounds, which turns the import and 3D view operation blind fast.

Another area where I put some effort recently is in the blender to freecad workflow. There is nothing better in the world to conceive architecture than blender. Think of the flow and easiness of sketchup but with the power of 3ds max. But blender works in meshes, which is at the same time annoying and the key for its success. Meshes are very simple (too simple), but because of that, very flexible and fast.

FreeCAD imports blender meshes very easily. Until now I haven't seen that operation fail once. Just export them as .obj from blender, and import that .obj file in FreeCAD, thats it. Remember that the obj format has the annoying particularity to invert Y and Z axes.

Maíra and me are currently working on a project that is totally developed on blender. This is the project in blender, so you can evaluate the complexity:



And the same project, exported and imported in FreeCAD:



Everything is there, precisely. The file in that state is available here, in case you want to have a look. In spite of the complexity, the 3D display of FreeCAD is totally able to handle that amount of data fluidly. The big hiccup is when you are getting a lot of separate objects in the document, but I'll come to that later.

I also drew a base plan in draftsight (on top of an exported 2D view, with the tools I mentioned earlier. That plan was saved in dxf and imported back in FreeCAD:



I then positioned and rotated that plan to fit perfectly under the mesh model. Since both were extracted from the same model originally, the coincidence is perfect. I did it that way and not the other way round so next time I import the meshes from blender they will fit right into place.



Then come the interesting bits. I first added a tool that splits a mesh into separated components. When you model in blender, it is often more convenient to group several objects into one. For example, here, each building block is one blender object. This allows you, in blender, to keep everything under one local coordinates system. But you must also take care of keeping different part dissociate (use the Y key a lot), this makes it easier, for example to select all pillars inside the buiding. And finally, you must also take care of creatign as little non-manifold pieces as possible. Non-manifolds cannot become solids, which is very important later. Use a lot Ctrl+Shift+Alt+M in Blender to highlight non-manifold edges.

The split tool in FreeCAD also highlights non-manifold components, painting them in red:



Then it's easy to temporarily turn off the non manifold components, and concentrate only on the important parts:



Then there is another tool to convert selected meshes into solids:



This tool is based on a macro that has been on the wiki since a while, based on Werner's mesh-to-part conversion work. The big thing is that it joins coplanar faces, simplifying tremendously the geometry. But I found out it still behaves bad with very complex meshes, made of a lot of small faces. In case the tool cannot build solids, the bad results are also highlighted, and the mesh is not deleted:



But anyway it doesn't make too much sense to have beams and slabs as one big element, so I'll either remodel that part in Blender or directly in FreeCAD. Once we have or solid Part shapes, converting them into walls or structural elements is a simple press of a button (I pained them in yellow here so it's easier to see):



That's about where we are now. Not much you'll say, but turning "raw" mesh data into parametric objects is a very important piece of the game. Next development steps will include complexifying those objects and giving them additional properties, then I'll start experimenting with automatic sectionning, which will probably be the most spectacular achievement. At the end of the jouney, I plan to obtain that kind of output:







The first one is the dxf plan that I imported in FreeCAD above, the 2 others are sections taken from sketchup. They look quite nice, but they are extremely unusable because of the too high complexity. There are so many lines that it is almost impossible to rework, in any application. But sketchup makes sections for rendering, not for reworking, and I have good hopes to achieve much better results inside FreeCAD, since our objects are not meshes anymore but much optimized solids, and getting precise contours, and distinguish what is cut from what is viewed is very easy.

A final note about complexity, the biggest problem at the moment in FreeCAD is that when dealing with high number objects in your document, things get pretty slow. A 2D plan like the one above, when imported line by line, is almost unworkable. But the complete mesh project from the first image shows that the 3D view is perfectly able to handle a very high amount of data, the tremendous difference shown by my little upgrade to the dxf importer and Jürgen's recent work on the View Providers show that the problem is totally solvable. The key, at Arch module level, seems to be in quickly grouping smaller objects into higher-level containers. I'll also have a look at the FreeCAD zoom system, but there are certainly many things to do to solve that issue.

That's it for now, thanks for reading until here!

in categories  blender  freecad  opensource  permalink:  116   posted on 11.07.2011 20:40
From Yorik

Exporting 2d linework from blender 2.5



Blender 2.5X still does not feature the excellent dxf exporter Migius wrote for blender 2.49, so I mounted this little workaround to be able to export linework from a blender model to a 2D CAD application such as FreeCAD or LibreCAD (or AutoCAD if you really must...).

It is made of two scripts, a blender addon to export and a FreeCAD macro to import. In blender, install the addon the usual way, then use it from the export menu to export the selected meshes. What will be exported is simply all the edges of the selected meshes in a text file, one edge (2 vertices) per line.

Then, place the FreeCAD macro in your macros folder, then run it, select the exported .txt file, and voila, your objects edges get imported, one compound object is created per blender object. You can then select everything and export to dxf if you want.

Here are the two scripts:
http://yorik.uncreated.net/scripts/blender25/io_export_flat_edges.py
http://yorik.uncreated.net/scripts/importFlatEdges.FCMacro


The meshes to be exported in blender


The imported linework in FreeCAD


The same linework exported in .dxf fomat and opened in LibreCAD.

in categories  freecad  opensource  permalink:  75   posted on 19.04.2011 22:58
From Yorik

Collada support in FreeCAD


I just found this interesting piece of software called pycollada and used it to make FreeCAD able to import collada files. The support is very basic, only simple geometry is imported. No materials, no components or whatsoever. But it is already pretty handy for a serie of uses. The image below shows an imported collada file generated by the BIMserver (as a little appetizer, waiting for true IFC support)...


in categories  freecad  permalink:  71   posted on 14.04.2011 20:24
From Yorik

FreeCAD t-shirts


I made this design for a FreeCAD t-shirt. If you want yours too, follow the instructions! (No money goes to the FreeCAD project, so do it only for the fun, not to help the project!)


in categories  freecad  opensource  permalink:  64   posted on 05.04.2011 24:15
From Yorik

More FreeCAD dxf export options...


I did some more work on the dxf exporter, now it begins to behave pretty accurately. You can now set an option in the preferences screen, in order to export 3D objects to polyface meshes. This is not the ideal way to export FreeCAD 3D objects, because they will be turned into meshes, so you'll loose important data such as curved surfaces and solid behaviour, but it is the only way to put 3D into a dxf file available to us as long as the ACIS format is kept closed and undocumented.

The other fix I did is to make the way to export 2D Drawing pages to dxf format work better. We now have fairly precise results when exporting such pages. The only thing you need to do is to select a page object, hit File->Export and specify a .dxf filename. There are still some glitches, some objects don't get drawn at the correct scale, etc... But the result is usable already. Below is an example of what you can expect to obtain:



The objects in the FreeCAD viewport



The same objects placed on a Drawing sheet



The sheet exported as dxf and opened in LibreCAD

in categories  freecad  opensource  permalink:  42   posted on 24.02.2011 24:26
From Yorik

Towards an Architecture module in FreeCAD


I began to start on an architecture module for FreeCAD. I saw a lot of extatic tweets about the subject these last days, so I thought everybody would like a little explanation, even if things are still very bare. So far I have an IFC parser (adapted from the work of Marijn van Aerle working, that is now able to parse all my test files without errors. Then there is a second part of the importer which is responsible for creating the corresponding objects in FreeCAD. So far that part is only able to grow simple walls, mainly because that's the only "architectural" object already implemented.

We have had a couple of interesting discussions about how to implement other concepts, and things are beginning to come. We now have a pretty functional wall, that can be based on a line or a wire (a polyline, in OCC jargon), a face or even a solid. It can receive appendices (that get joined to it) and holes (that get subtracted to it), although there is still no UI controls for all that.

There is also a floor object, which at the moment is only a container for walls (or other floors), with the particularity that it can join walls that intersect. In the future of course it'll have other attributions such as cutting plan views, etc).



There were also some talks and discussions about the BIM concepts, etc... But being more a practical person, I prefer experimenting and playing with FreeCAD objects gradually than laying out a big plan conceptual ahead.

For now that's it! More to come...

in categories  freecad  opensource  permalink:  82   posted on 22.02.2011 16:49
From Yorik

Sections coming soon...



in categories  freecad  opensource  permalink:  250   posted on 29.11.2010 22:58
From Yorik

Outputting 2D dxf through FreeCAD itself

Last couple of days Dan Falck and I were chatting about how convenient it would be to be able to output flat, 2D dxf files from any 3D-to-2D process like FreeCAD's drawing module. I've been since then experimenting with that, mainly using Inkscape as a convertor, since FreeCAD outputs 2D drawings in svg format. Inkscape is capable of outputting dxf files, but the quality is not very good.

The other day a much better idea stroke me: The Draft module of FreeCAD is itself capable of reading svg and writing dxf! So I did some new experiments (and a lot of bugfixing) and the result is definitely not that bad.

This is the base file I used for testing:



I then produced a 2D Drawing from the objects in the scene:



This is the scene objects, without passing through the Drawing module, simply exported as svg directly from the 3D scene, then reimported into freecad:



This is the 2D Drawing module output, reimported into FreeCAD:



And this is the same one, exported as dxf (and opened in Caduntu):



Of course the result is stil far from perfect (although much better than last time). The main problem is with the dimensions, which get converted to dummy wires (and have some artifacts too, some bug I must solve). SVG format doesn't support dimension objects. So the thing is, how to do that? Create a new svg tag? I'll have a look around, if other people already thought about that problem...

in categories  freecad  permalink:  198   posted on 20.11.2010 19:40
From Yorik

Another example of FreeCAD 2D drawing


I was showcasing FreeCAD to a friend the other day and we came to mount this nice little drawing. Don't look too close at the project itself since it is more the result of divagations and tests than proper architectural research, but it is a good showcase of what is currently possible:

The FreeCAD 3D view (file available here):


And the resulting svg drawing (file available here):

in categories  freecad  opensource  permalink:  184   posted on 16.11.2010 12:21
From Yorik

Using background images for tracing in FreeCAD


I just implemented this little feature:

Rectangle objects now have a "Texture image" property, where you can choose an image file. That image then gets mapped on the rectangle. You must of course take care of making the rectangle the same proportion as the image. But this way, specially combined with the transparency property, you get a great way of tracing CAD objects over a scanned paper drawing.

in categories  freecad  opensource  permalink:  174   posted on 14.11.2010 16:12
From Yorik

FreeCAD 2D dxf export


FreeCAD can now export a 2D drawing page to dxf. It is preliminar and still buggy but it works:

This is the normal svg output


This is the dxf output. FreeCAD uses inkscape to generate it, so inkscape must be installed on your system. All you need to do is select a Page object and hit the File->Export menu item.

in categories  opensource  freecad  permalink:  125   posted on 16.08.2010 22:46
From Yorik

FreeCAD and SVG output

Putting your drawing on a SVG sheet in FreeCAD is beginning to work well. Here is a recent example:

In FreeCAD:


And the outputted SVG:


It is almost perfect, I still have a small problem regarding texts location (there is a shift between both), and the svg hatches which are not too good and for which I still didn't find a solution.

Download the .fcstd file here and the .svg file here.

in categories  opensource  freecad  blender  permalink:  122   posted on 11.08.2010 14:45
From Yorik

More on FreeCAD, or Generative Components-like workflow on Linux

I did this interesting little chain yesterday, you might find it interesting. With a bit of trickery, you can really do some interesting parametric-generated architecture design on linux, only with open-source tools. And when I say architecture design, I mean the whole production chain, from conception to paper prints.

If you don't know Generative Components, it's a piece of software made to design architecture compositions based on sets of parameters that you can make evolve to create "beautiful" parametric-looking structures... I recently discovered an amazing application called StructureSynth which does exactly that: create geometry based on parameters and rules.

You design simple rules in a very simple language, such as: "Rule n°1: move 2 units in x, rotate 15° in y, then create a box, then reapply Rule n°1". Then, all the magic is here: You can specify another, different Rule n°1. The program will interpolate both randomly, and create randomic variations:



The version of StructureSynth in the Debian repositories comes with a set of exporters for different renderers such as Sunflow, and Blender, (with the help of a blender import script) which I used here to import the geometry:



The blender import script imported all the geometry as one single object, so I first separated it in original parts (Edit mode, select all, P -> separate all loose parts), then exported it as an .obj file, that < href=http://free-cad.sf.net>FreeCAD can read. Of course the blender import script could easily be adapted to FreeCAD so we could skip the Blender step, but I found it interesting to show how the geometry passes from one to another without any data loss.



FreeCAD can work with several types of geometry. Our .obj file was imported as Meshes, but much more interesting is to work with bRep objects, which are FreeCAD's "native" object type, and permit much more complex functionality (they have the notion of "solid", so boolean ops work perfectly, they can have real curved surfaces, etc). So I converted my meshes to brep parts with a macro, and added a couple of lines just to show you how 3D and 2D begin to mix well in FreeCAD.

The Draft module in FreeCAD can already give you nice results when putting your scene geometry on a sheet. Of course the Draft module is made for 2D, so you'll notice the 3D parts are not displaying very correctly (face inversions, mostly), but that problem will be addressed soon.



To show you better the possibilities of the Geometry-to-paper process, I did another example. It suffers the same problems as the one above, but the control over display (colors, line width, texts, etc...) begins to be good.



This is a quick structure I did just to play with the process, and here is the SVG output:



SVG files already carry informations such as paper size, and it is as reliable as pdf (you can easily turn them as pdf with apps that support svg such as Inkscape or directly from FreeCAD). At the moment the informations in the template (Project author, etc...) cannot be edited directly from within FreeCAD, so you need to edit your sheet in another app, but that also will probably be addressed one of these days.

in categories  opensource  freecad  permalink:  120   posted on 09.08.2010 23:06
From Yorik

What's new on the FreeCAD front



There are several cool new things coming to FreeCAD so I decided to show you a bit of what's going on. Most of this stuff will be in the 0.11 release (no release date prevision, it's done when it's done). There is a 0.11 preview installer for windows on the FreeCAD website, otherwise you'll have to wait a bit (or compile FreeCAD yourself if you are brave enough). I'll focus more on the 2D part, since it's what I'm mostly doing there...

The most interesting thing that has been added recently by Werner is python-driven Part objects. Unlike the older python Document objects, where you had to do everything, compute the geometry, and define how that geometry gets displayed in the 3D scene, the new Part python objects automatically display their geometry the "standard FreeCAD way". That allows for extremely simple python objects such as this:
class Line:
    def __init__(self, obj):
        ''' App two point properties '''
        obj.addProperty("App::PropertyVector","p1","myCategory","Start point")
        obj.addProperty("App::PropertyVector","p2","myCategory","End point").p2=FreeCAD.Vector(1,0,0)
        obj.Proxy = self
 
    def execute(self, obj):
        ''' Print a short message when doing a recomputation, this method is mandatory '''
        obj.Shape = Part.makeLine(obj.p1,obj.p2)
 
ml=FreeCAD.ActiveDocument.addObject("Part::FeaturePython","myLine")
Line(ml)
As a result, the 2D drafting module has been completely upgraded to take advantage of this. One of the most useful consequences is that it now has an editmode. But it also allows for several other goodies, such as enter FreeCAD's parametric chain (for example, an object made of the union of two other objects retains the original objects, etc):



Because of this, the use of the Drawing module is now much easier, and you can already output much better sheets:





Another area that is being currently worked on by Jürgen is the Sketcher, which allows you to draw constrained 2D shapes. There is still not much new stuff visible, but it has been almost rewritten from scratch, and is now much more stable and works on all platforms. Now really the sketcher can be used to build geometry.



Of course all this is pretty new and lots of bugs are expected to appear, but we come everyday closer to the day we can start to do serious productive work with FreeCAD. As a sidenote, one of the things we lack badly is bug reporting. If you happen to find a bug, if you make FreeCAD crash and can reproduce the cause of the crash, don't hesitate and add a report to the bug tracker. This is a very important for FreeCAD to reach some stability...

in categories  opensource  freecad  permalink:  64   posted on 29.04.2010 22:18
From Yorik

Playing with FreeCAD...

I just made this little "thing" while searching for a cool new splash screen. I got very impressed by Form:uLA yesterday (specially this work)... Kind of 3D Lebbeus Woods...







The FreeCAD file is here...

in categories  opensource  architecture  freecad  blender  linux  permalink:  40   posted on 28.11.2009 2:25
From Yorik
Actually I really should write a kind of FAQ or article about doing architecture on a Linux platform... Many people are indeed interested by the subject. So, here we go:

My architecture workflow on linux

Actually there is no obvious or productive workflow possible at the moment, due to the lack of good (productive) CAD software on linux. You can do architecture on linux, but you won't have the same level of productivity as if you just draw with your favorite CAD program under windows (I indeed have a dual boot system .


just for the fun, my linux desktop!

That said, if you are willing to move away from the "all-in-one" solutions that big CAD vendors sell, you already can do a very big part of the work with linux software. I myself use blender for about 80% of the conception work, the rest being simple hand sketching. You already have several good scripts to generate plans and sections from your models in blender, and export them to convenient CAD formats like DXF. Search the blender wiki scripts section.

In blender you can do all kinds of useful things like importing your hand-drawn sketches, pieces of 2D CAD plans, model on top of it, etc, for example:


blend file here

The biggest problem is then, when you want to do 2D CAD. There are indeed several solutions, like qcad, autocad under wine, bricascad/intellicad, or long-time linux CAD challengers, like cycas, graphite one or varicad. There are also a number of interesting newcomers, like realCADD or medusa. But none of those solutions are really productive and free at the same time.

What I do most of the time, when I don't need much detailing, is to use several programs, each for doing pieces of the work. This is a typical unix-like approach (use several simple, reusable programs to do separate tasks, instead of having one all-in-one program) that in my opinion could benefit much architecture workflows on linux.



I myself contribute with coding and documentation to a very interesting program (currently) named FreeCAD that could hopefully fit very well in the middle of the workflow, to rework data coming from 3D into precise construction drawings. It is in usable state already, but not for real production.



Note that FreeCAD is not at all aimed at becoming another autocad clone, and 2D drafting is only a temporary use I make of it. The plans for the future of FreeCAD include much more powerful things such as parametric modeling, automatic sectionning, or structural analysis.
Today I still use a mix of other programs, such as autocad, qcad or sketchup. I also use different utilities and convertors to manipulate different file formats, like RealCadd converter or Varicad viewer.

The same way as the data you export from a 3D program to a 2D app, the way the data is formatted is the most important point, not the program you used to make it. If you modeled your building correctly, you will have good 2D data, easy to rework in 2D. The same should apply to 2D data. If you build your technical drawings correctly, they will be easy to export to other programs for presentation work.

The presentation work in itself is also easy to do under linux, there are several programs able to import technical drawings and rework them, my favorite being inkscape:



I also use gimp a lot.

All this works quite well for short or limited architecture projects, like competitions or draft projects, but of course, not so well for more detailed work such as execution drawings. For that, we would need better tools for technical drawing. At the moment I don't know any that is strong enough to allow fast, efficient and beautiful work. But the way we draw architecture is slowly changing too, so maybe new solutions will begin to appear on the linux platform too.

And if you are interested in helping the situation to evolve quicker, there are many great open-source projects out there that could use your efforts, even if you are not a programmer. This is the case of most of the software I showed in this article.
Note: I wrote a sequel to this article, explaining how to get started with Linux...

in categories  opensource  freecad  permalink:  90   posted on 28.11.2009 1:55
From Yorik
New FreeCAD package for 64bit debian/ubuntu
I just packaged the latest version... Still not a fully debian-compliant package, but should install without problems!
http://yorik.orgfree.com/archive/packages/freecad_0.7-2087_amd64.deb
Note that the pivy package is now separated and needed too:
http://yorik.orgfree.com/archive/packages/python-pivy_0.5.0-1_amd64.deb
Enjoy! Edit: Ubuntu users seem to have a problem installing the python-pivy package, so I made an alternative version here.

in categories  opensource  freecad  blender  permalink:  105   posted on 28.11.2009 1:55
From Yorik

FreeCAD import script for Blender

I just made a new script to import FreeCAD files into Blender. You must have FreeCAD installed for this script to work, and you must configure the path to your freecad.la file at the beginning of the script.
The script can be downladed here: import_freecad.py


Note: at the moment you need a recent SVN version of blender (>2111) to make it work...

in categories  opensource  freecad  permalink:  135   posted on 28.11.2009 1:53
From Yorik

New dimension tool in FreeCAD

A very basic first draft of a dim tool is now available in FreeCAD (in the Draft module). Don't expect much of it, it's pretty simple, has few options and is still buggy, but I'll refine it over time...

Read here how to use.

in categories  opensource  freecad  permalink:  205   posted on 28.11.2009 1:51
From Yorik
New features in FreeCAD

I'll summarize a bit what we've been doing recently. The biggest feature is the big improvements to the Drawing module. Basically you can now export any 2D view of a 3D Part object, on scale, on a svg sheet. It is already very powerful, you have total control from python to the output svg code, so you can tweak, fill, etc.
In the Draft module, we now have dimension objects working well, and they import/export to dxf format. There is also a first step to implementation of blocks, that is, you can create compounds objects by joining any type of geometry with the Upgrade tool, if no "smarter" object can be created. The downgrade tool will in turn explode compound objects.


in categories  opensource  freecad  permalink:  237   posted on 28.11.2009 1:49
From Yorik
FreeCAD with new icons set

Everything is getting prepared for the next debian freeze in november... We are more or less doing our own feature freeze this month, killing bugs and polishing the look. Here goes a preview of the new icon set of the Part module, and a first sneak peak at the splash screen. Enjoy!


in categories  opensource  freecad  permalink:  262   posted on 28.11.2009 1:48
From Yorik
Short instructions for compiling current FreeCAD svn version on ubuntu

Be aware that the svn version is the version we are working on, so it might contain bugs or even fail to compile.

  1. In case of problem, the complete and detailed instructions are here

  2. Install the following packages: build-essential, python, libcoin60-dev, libsoqt4-dev, libxerces-c2-dev, libboost-dev, libboost-date-time-dev, libboost-filesystem-dev, libboost-graph-dev, libboost-iostreams-dev, libboost-program-options-dev, libboost-serialization-dev, libboost-signals-dev, libboost-regex-dev, libgts-dev, libqt4-dev, qt4-dev-tools, python2.5-dev, libcv-dev, libhighgui-dev, python-opencv, libopencascade-dev, python-qt4, libode1-dev, subversion, cmake

  3. Install the pivy package manually from here, because it is still not in ubuntu repository

  4. Get the FreeCAD source, by pasting the following line in a terminal: svn co https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk freecad

  5. After downloading, in the same terminal, issue "cd freecad"
  6. to go to the freecad directory
  7. Issue "cmake ." to create the compilation files

  8. Issue "make" to compile FreeCAD

  9. After compiling, issue "./bin/FreeCAD" to run FreeCAD. You can also create a shortcut to your freecad/bin/FreeCAD file.

  10. All FreeCAD is contained in its source directory, so to uninstall, simply remove that directory.


in categories  freecad  permalink:  12   posted on 28.11.2008 1:31
From Yorik

Yorik's FreeCAD page

This page contains stuff related to FreeCAD. FreeCAD is an open-source engineering platform. It is basically a 3D modeller, with focus on engineering, like Catia or SolidWorks. It is extremely open and versatile, has many interesting features being developed such as parametric modeling, total python access to any part of the program, and a strong BRep-based modeling kernel. Below, you can find my custom linux builds, and samples of my activity on FreeCAD.

Custom Builds

Note: Several of the following package are non-standard and might not work on your system. Before downloading any of them, please check on the main downlaod page if there isn't a more standard package for your system.
These are FreeCAD builds for 64bits debian-based systems (Debian, Ubuntu and derivates). They have all options enabled and have been compiled with standard optimization for 64bit athlon CPU. If you're looking for other platforms, check the official download page .
Note that these builds don't include openCascade neither SoQt4, which are required to make FreeCAD work. These libraries have both recently been made available in debian repositories, and appear in current Debian and Ubuntu package management systems.

freecad_0.9.2646-1_amd64.deb - for debian squeeze - 20.11.2009
freecad_0.9.2646-1karmic_amd64.deb - for ubuntu karmic - 20.11.2009
freecad_0.8.2237-1jaunty1_amd64.deb - for ubuntu jaunty - 12.09.2009 - this package is also on FreeCAD download page
freecad_0.8.2237-1testing1_amd64.deb - for debian squeeze - 12.09.2009 - this package is also on FreeCAD download page
freecad_0.7.2200-1_amd64.deb - for debian squeeze - 03.07.2009
freecad_0.7-2145_amd64.deb - for debian squeeze / ubuntu jaunty - 16.06.2009

Additional libraries

This is the Pivy package, which is needed in latest FreeCAD packages (rev >= 2087):
python-pivy_0.5.0~svn765-2_amd64.deb - 20.11.2009 - for debian squeeze
python-pivy_0.5.0~svn765-karmic2_amd64.deb - 20.11.2009 - for ubuntu karmic
python-pivy_0.5.0-1_amd64.deb - 03.05.2009 - for debian squeeze (freecad < 0.9)
python-pivy_0.5.0-1_amd64.deb - 03.05.2009 - for ubuntu jauny

Note for Ubuntu users: I compiled this version of FreeCAD against OpenCasCade 6.3, which is available as default in debian squeeze/testing. If the version in your ubuntu repositories is 6.2 (before karmic), you will need to download and install manually the 6.3 version. from the debian repository. Since 6.3 has the same dependencies as 6.2, it will be handled just fine by your package manager. You will just need the foundation and modeling libraries here:
libopencascade-foundation-6.3.0
libopencascade-modeling-6.3.0 .