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 cad in this guestblog for this year only.

Click here to retrieve posts with same tag from other years as well.

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

in categories  freecad  opensource  permalink:  269   posted on 25.09.2016 23:43
From Yorik

Working with terrain in #FreeCAD

Since I have not much new FreeCAD-related development to show this week, I'll showcase an existing feature that has been around for some time, which is an external workbench named geodata, programmed by the long-time FreeCAD community member and guru Microelly2.

That workbench is part of the FreeCAD addons collection, which is a collection of additional workbenches that are not part of the core FreeCAD package but, since they are programmed entirely in Python and therefore don't need to be compiled, can be easily added to an existing FreeCAD installation. The FreeCAD addons repo linked above also provides a macro, which, once run inside FreeCAD, gives you an easy graphical installer that allows you to install, update or remove any of those additional workbenches. Click the link above and you'll get all the necessary instructions.

Also, this year was the first participation of FreeCAD to the Google Summer of Code. We got one student, Mandeep, who worked on building a more solid plugins installer for FreeCAD, capable of installing these workbenches but also all the macros found on the wiki. The work is not finished yet, but no doubt in the near future we will finally have a decent way to install all these additional features in FreeCAD.

Microelly2's geodata workbench basically allows you to fetch terrain data from the net, basically roads and building data from openstreetmap and terrain height data from both openstreetmap (but it doesn't always have accurate data) and NASA's SRTM data.

The procedure to get a piece of terrain with its height data in FreeCAD is quite simple:

  1. Install the geodata workbench and restart FreeCAD
  2. Switch to the geodata workbench
  3. Get the exact coordinates of the center of the zone you wish to import. You can do that simply by zooming in openstreetmap or in google maps, and you will see the coordinates in the URL bar of your browser
  4. In FreeCAD, menu GeoData -> Import OSM Map, fill in the coordinates. Leave "process elevation data" off. Buildings and roads are imported
  5. Click menu GeoData->Import OSM Heights and/or GeoData -> Import SRTM Heights to import height data from these two sources (use the same coordinates).

When done, you will get a piece of terrain with the roads and buildings, and the two terrain data (the SRTM data comes as a points cloud):

There will still be a bit of work necessary to turn this into data you can work with, but it's already a huge part of the work done.

The reason why I got interested in terrain data this week is aalso because I'm working on extending the Arch Site tool. Currently it is a simple container (it's actually simply a FreeCAD group with a couple of additional properties), but the idea is to turn it into something useful to:

  • Hold and process terrain data coming in various forms, such as meshes
  • Be able to get basic properties such as perimeter length or area
  • Be able to subtract or add volumes to it

A made already a couple of experiments to see how far that is possible, and it actually works surprisingly well. In the image below, a mesh was quickly made in Blender, imported and scaled in FreeCAD, then turned into an open Part shape (a shell). Doing boolean operations with shells gives a lot of interesting possibilities, and it's totally possible to keep the terrain surface "open" (no need to add an artificial thickness to it), and be able to subtract or add solids to/from it. Of course the volumes of earth that need to be added/removed are therefore easily computable.

I still need to solve a couple of minor issues, then all this should be in the FreeCAD code pretty soon.

in categories  freecad  opensource  permalink:  262   posted on 17.09.2016 22:23
From Yorik

#FreeCAD news and Arch workflow

So, let's continue to post more often about FreeCAD. I'm beginning to organize a bit better, gathering screenshots and ideas during the week, so I'll try to keep this going. This week has seen many improvements, specially because we've been doing intense FreeCAD work with OpeningDesign. Like everytime you make intense use of FreeCAD or any other app, you spot a lot of smaller bugs and repetitive annoyances. But a look a the commits log will inform you that many of those have already been fixed on the way.

The above image shows one of these jobs, more about it below

Generally speaking, working with FreeCAD is becoming very stable. Drafting and modelling is very straightforward already, and the workflow even begins to become fast. The biggest bottleneck I encountered during this week is using the Drawing workbench to build 2D sheets of the model. This is mostly due to the limitations of Qt's SVG engine, which doesn't support the full SVG specification, and many features like clipping, multiline texts or hatches are not supported by the Drawing viewer. When exporting your final Drawing sheet to SVG, however, and opening it in a better SVG-supporting application such as Inkscape, Firefox or Chrome, the result is very good. But it is annoying to have to work in the Drawing module without seeing the actual result (that's actually the main reason why there is a "preview in browser" button in Drawing).

But, bearing with these difficulties, it is already totally possible to produce this kind of result:

This is about to change, however, with the new TechDraw workbench that is currently already available in development versions of FreeCAD (refer to previous posts to obtain one). TechDraw is not based directly on SVG anymore, but on the more generic graphics engine of Qt. The final SVG sheet that it produces is built from it, at the moment you export, but what you see while you are working is not the SVG data itself anymore. This might seem more complex (it is, actually), but opens up a huge array of possibilities. Most of the limitations above don't exist anymore in TechDraw.

Of the two main tools that we use in architectural and BIM work to build 2D sheets, which are the Draft view and the SectionPlane view (which is also built with the Drawing Draft tool), so far only the Draft view has been implemented in TechDraw, once the Section View tool is implemented too we can think of abandoning the Drawing for good.

I'll describe a bit more of the workflow used in the jobs illustrated in this post. Almost everything was done directly in FreeCAD. The only pieces done outside were the cleaning of the existing floor plan, that we got in DWG form, in DraftSight, and the preparing of the Drawing template, and a couple of SVG objects to be placed directly on it, in Inkscape. All the rest is pure FreeCAD.

The basic workflow was this:

  1. Clean of unnecessary stuff in the DWG file, reduce number of layers, export it to DXF (in DraftSight)
  2. Import the DXF file in FreeCAD
  3. Draw a couple of lines and wires on top of the walls and columns of the existing floor plan (You can draw walls and structural elements directly, but I like to draw the baselines myself, to make sure they are where I want them, and I find the Draft tools much more convenient to draw stuff).
  4. Turn all your lines and wires to walls or structures (this whole thing is actually almost as fast as drawing them directly)
  5. Adjust thickness, height, alignment, etc... of walls and structures
  6. Put everything in groups. For me a huge power of FreeCAD over other BIM applications is the free grouping possibilities. By creating groups, and groups inside groups, you are basically organizing your data the way you want. No limitations, no rigid building/foor structure to follow. All the separation of, for example, the existing walls, the new walls and the walls to be demolished is simply done with groups.
  7. Add doors and windows. In most cases I didn't use the "in-wall" capability of windows, I made the openings first by subtracting a volume, then made the doors outside of any wall, and simply cloned them and moved them to their final places. This is bit slower, but makes your geometry much more failsafe, since windows are a delicate matter and still have bugs here and there.
  8. Add annotations, linework, texts, dimensions, in 2D, directly in the model (in the future, we hope to do most of this directly in TechDraw, but at the moment this "old-school" workflow is solid and works well. Again, separate annotations in groups, depending on the subject.
  9. Add one or more Section Planes to define plans and sections you'll need. If you grouped your objects well, you will only have one or two groups to add to the section plane as "seen objects". It is best to leave all the 2D geometry and annotations out, and have section planes only see 3D objects (being Arch or not).
  10. Prepare a Drawing template in Inkscape
  11. Create a new sheet in FreeCAD's Drawing workbench, give it our template, and start adding our stuff there, by using the Draft View tool, either with section planes selected (for cut or viewed 3D geometry), or groups containing linework, texts and dimensions (for 2D and annotations). This will allow you to create only a few Drawing views, so it keeps manageable.
  12. The clip tool of the Drawing workbench is annoying to use (it draws a big black rectangle on the sheet, which is not exported fortunately), so it's best to think about your layout beforehand, and model only what will appear on the sheet.
  13. Use the Drawing symbol and annotation tools to add stuff (logos, titles, etc) directly on the sheet.
  14. Export to SVG, open in Inkscape, there you have a chance to do more last-minute fixes if needed, and save as PDF. It is possible to export a PDF directly from FreeCAD, but opening it in another app is good to make sure everything is OK.
  15. Finally, in order to export to IFC, gather the arch objects inside a Building, export, and you are done. It is always a good idea to verify the exported IFC file in another IFC viewer application to make sure everything is there an dat the right place. A quick fix for buggy objects is to force them to export to Brep (there is a command for that in Arch -> Utilities).

Interesting detail, the small city map in the images above, is taken directly from OpenStreetMap. There you have a "share" button that exports to SVG. You can then open that in Inkscape, rework it a bit if you like (change some colors and linetypes, etc), save it and place it directly on your Drawing sheet.

Of course this workflow above is somewhat distant than what you are used to with commercial BIM applications. But things are improving, and also this is not necessarily something negative. It also gives you a lot more freedom, and the mix of 2D and 3D that FreeCAD offers, that you had in the old times of AutoCAD or in apps like Rhino is something I find much valuable.

Don't forget that almost all the work of OpeningDesign is open, so all the files from the examples above are available online.

Finally, a word about two features I added this week, one is a new display mode for walls, which shows them in wireframe, but with the bottom face hatched, which makes it very nice to work in plan view

Right now it's still in testing, to see how useful it is and how well it behaves, but if it works well it should be extended to support different patterns (taken from the material, for example), and to extend this to structural objects too.

And finally, another feature is a new addition to the structural precast concrete presets, a stairs element:

in categories  freecad  opensource  permalink:  258   posted on 11.09.2016 21:16
From Yorik

Bits of #FreeCAD

As I (more or less) decided last week, I'll try to post here more often about FreeCAD. There is not much new this week (at least from my part, other have been busy!), but nevertheless a couple of things are worth mentioning.

For who is new to this open-source thing, you must know that all the developement is open. You can check what is being done at any moment, all the discussion about anything going on is always public (you are very welcome to participate), and you can also get yourself a development version to try new things for yourself. There is also a bug tracker where you can report bugs, and also follow the resolution of a certain bug.

Development versions are built manually by kind community members from time to time, using the latest code, and can usually be installed side-by-side with stable versions of FreeCAD. So you can test, and if there are too many bugs (unusual, but it can happen), oyu can always get back to use the stable release. Since the development goes very fast, I really encourage you to try the latest development build available for your platform.

For the adventurous, of course, it is always possible to grab the source code and compile FreeCAD yourself. This allows you to use the latest features immediately. Compiling requires a bit of work on Windows and Mac, but on Linux it is pretty easy.

Among what I I have been doing this week, are a couple of bugfixes, and a couple of improvements in two specific areas:

IFC import

One of the msot interesting improvements is the ability to import 2D objects that are "attached" to 3D objects in IFC files. In IFC, each "building object" (that is, each descendent of the IfcProduct class, which is the "master" class of all specific building objects, like IfcWall or IfcBeam) can have a series of representations. The most commonly used representation type is the "body", which is the 3D representation of an object. But they can also have additional representations, such as "footprint" or "axis". The footprint representation is used, for example, by Revit to add door opening symbols:

FreeCAD cannow import these additional representations. At the moment, since we stil ldon't have a good way to do these door openings in FreeCAD, the imported footprint are added as separate 2D objects. But this gives us a couple of ideas and adding proper support for these opening symbols is on my todo list.

Another thing being worked on is to improve the transfer of IFC files between FreeCAD and Revit. Opening a file produced by one app on the other already works quite well, with the OpeningDesign folks we begin to get quite a bit of experience in that area. The main problem is to turn the objects exported by FreeCAD into usable data in Revit. Revit is very picky about what kind of data can be editable and become a family. It relies on a lot of features that don't exist (yet) in FreeCAD, such as common object types and material layers. This is a complex area, not very well documented, that you must explore step by step.

We are trying to document our findings in a public repository, don't hesitate to come and give us a hand.

Among the improvements to the IFC importer of FreeCAD I did this week, is a better rendering of extruded objects, and a better search for materials attached to an object (that can sometimes be buried under layers and layers of "material layer sets").

Arch object properties

I also went forward on extending the Arch (BIM) objects of FreeCAD with more properties useful for quantity retrieval. All Arch objects now have new Vertical Area and Horizontal Area properties that are calculated automatically when the shape of the object changes. Vertical Area is the sum of the areas of all the vertical faces of the object, which can be useful to calculate for example the area of concrete forms. In the case of walls, divinding that area by 2 gives you the vertical area of the wall as we usually need (because each "pane" of the wall has two faces, but we usually want only one side). This might seem clumsy, having to divide by 2, but calculating the vertical area this way is very solid. Any kind of crazy shape of wall, with no matter how many unconventional openings, will yield correct area values. I thought about dividing this value by 2 always, in case of walls, but that would make the walls behave differently than other Arch objects, which could induce errors too.

But there is still room for discussion of course. More than anything, it will need some testing.

The horizontal area is the area of the object when projected vertically onto the ground plane. So to get the area of form of a beam, you would simply add its vertical and horizontal areas.

Roof objects also have two additional properties, Ridge Length and Border Length. Border length is the sum of the lengths of all the border (or "open") edges of the roof, while ridge length is the sum of the lengths of the inner edges (ridges and hips). This will make it easy, when calculaying quantities, to know how much ridge cover element you need, or how much water drain.

Finally, I also added a new utility tool that simply shows/hides all the invisible subcomponents of an Arch object, such as openings. This makes it easy to select them, for example to move or modify them.

in categories  freecad  opensource  permalink:  256   posted on 02.09.2016 20:34
From Yorik

Patreon and more #FreeCAD development news

Last week, encouraged by several comments on the FreeCAD forum, I decided to open an account on Patreon. Often people are asking how they could contribute to FreeCAD with money, and I thought: Why not? If I could get paid for a certain amount of hours, that's a certain amount of hours I could dedicate permanently to FreeCAD. At the moment I work on it when time permits, which can vary a lot.

The patreon campaign is starting well. Several people sponsored me already. So I thought a first thing I could do to give a form of "thank you" is to get back at posting more often about FreeCAD here.

So I'll start that today, by writing about what's going on with FreeCAD development. As I suppose everybody knows, The 0.16 version of FreeCAD has been out in april this year. Since then, many things have been done, and the next version will feature massive changes. Unfortunately I haven't got time to write much about it, but this is about to change!

Here are two things that are currently available in the 0.17 development version:

PartDesign Next

Probably the most sorely missed feature in FreeCAD is a way to work with Assemblies. Jürgen, the father of FreeCAD, started to work on assemblies a long time ago. However, he didn't have more time to work on that, and his work has been left half-done. In the meantime, we gained a workaround, the Assembly2 workbench,which can now be easily installed with our addons installer macro and for many FreeCAD users, has been doing the job perfectly.

Jürgen's assembly workbench, though, required some heavy changes to the FreeCAD core, and specially to the PartDesign workbench. This i sthe main reason why it stayed behind and was very hard to push forward to merge in to FreeCAD. A courageous team of developers, among which ickby, blobfish/tanderson, Fat-Zer, DeepSOIC, the new FreeCAD warriors, took on them to separate the core + PartDesign changes from the assembly itself. This took a very long time, but was finally done, and is the base of what we ended up calling PartDesignNext.

Along the way, more functionality was added too, inspired by another FreeCAD addon workbench, WorkFeature, like a series of helper objects that can be used as bases for sketches and other PartDesign operations. This also helps working around another long-time problem of FreeCAD, topological naming (for which there have actually been some impressive progressesrecently).

In this new PartDesign, Any PartDesign operation, such as creating new sketches, or creating solids out of them, now happens inside a body. A new body will be created if none is present in the document. You can have several PartDesign objects inside a same body. Inside the body, you can also add several helper planes or lines, which can be used to align or construct other parts. You can now also link edges from other objects inside a sketch.

This forum post explains it all.

The result of all this has now been merged, and is available in 0.17 development versions. The road is now clear to work on full assembly funcionality, and work has already started in that way. But the new PartDesign already opens up a lot of possibilities, and working with multi-solid objects is now really good.


For who is following the FreeCAD progresses since a long time, do you remember the work of Luke Parry on upgrading the Drawing workbench? Unfortunately Luke went on other projects and his work stayed where it was. A year later, Ian Rees started a funding experiment similar to this Patreon one, and worked further on it. Once again, the work was stopped because Ian went on to other things. Right after that, fortunately we got a new addon called Drawing Dimensioning which already pushed things a ot forward by bringing a series of on-drawing tools such as dimensions, symbols and annotations.

Finally this year, Wanderefan gave the final effort, and brought all this work to a mergeable state, and it is now included in version 0.17 under a new name, TechDraw. This is to not break the current Drawing workbench, which will still be useful until TechDraw is fully ready. TechDraw is basically th same as the Drawing workbench, but with a series of improvements such as the ability to move views graphically, place dimensions directly on the sheet, or fill areas with hatches.

More things are coming there too, like section tools.

There are also more big changes under the hood, such as the use of VTK, which will first be used with FEM but might prove useful for a qualtity of other areas.

But there is much more to come. FreeCAD is being ported to new verisons of Qt (Qt5) and Python (python3). Most of the work is done, and we might soon see that included. However each of these big changes brings a fair share of unstability, which is normal, and therefore requires some time between each merge for the dust to settle. So we will probably need some time before things have stabilized sufficiently to do a new release.

As I hope you can perceive, the development team has grown a lot, and things are going at higher speed now. Exciting times ahead!

in categories  freecad  opensource  permalink:  255   posted on 31.08.2016 4:09
From Yorik
New rewritten Arch Schedule tool in FreeCAD,

Check the full docs here.

in categories  freecad  opensource  permalink:  252   posted on 20.08.2016 16:19
From Yorik
Plumbing desing in FreeCAD...

The whole functionality is now implemented, and is described here in detail.

in categories  freecad  talks  opensource  permalink:  204   posted on 24.02.2016 23:11
From Yorik

FreeCAD Arch Workbench presentation

A video presentation of the Arch workbench of FreeCAD that I did last week at ODC2016PN