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...).

Also, get me on twitter, facebook or google+.

Already 48 messages in this blog, showing only last 20. Click here to show the last 50 or here to show all, or browse by tag: freecad, opensource, sketches, linux, works, architecture, projects, 3d, blender, detail, talks, inthepress, animations, opensurce, firefoxos, bede, idsampa, photo, gaming, wordpress, webdesign, Architecture, trilhas, orange, cooking, or search the 2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009, 2008, .

First and foremost, your name:

And your message:

To publish it, just press this ...

permalink:  370   posted on 20.06.2017 21:28
From Alex
Commenting post 361: Hi Yorik.

I'm reading your blog from some time now and I'm happy to see some advancement into the Freecad development.

As a furniture designer/manufacturer I have plenty of experience on using different profesional software solutions into this field. As you can imagine my interest is to see implemented in Freecad more features related to the furniture CAD/CAM.

I can help with my expertise and also financially if you want to develop this kind of features. I begun to learn myself puthon thinking to begin to develop by myself the tools that I need, but my free time it is very limited and I didn't made much progress.


As I see you are interested on implementing some nesting capabilities in Freecad, so I will share with you some algorithms that I found. I will send to you by email.

For furniture manufacturing, besides nesting and CNC mechanisation, Freecad will ned to have also support for the automatic generation of drawings, BOM and edgebanding capabilities.

in categories  opensource  linux  permalink:  369   posted on 15.06.2017 23:30
From Yorik

Writing a task list powerline segment


This is one of these notes to self, in case I want to redo/extend/modify this in the future... Not sure it is of any interest to anybody less nerd, but here it goes for your enjoyment anyway I use powerline since quite some time, it prints fancy prompts in your terminal, where you can plug all kinds of nice nerdy info to be printed, like time, cpu throttle, weather, etc.. If you have a shell that has two prompts (left and right), powerline uses it too. It's easy to install on any linux distro, it's in all packages repositories, and very configurable.

Basically I only used the left segment that shows the current path, and a short right one that shows the current branch if you are in a VCS-controlled folder (git, hg, etc..) and if it's dirty or clean. This is basically how powerlines comes out of the box.

Recently I also discovered taskwarrior, and I quite liked it too. It's a very simple command-line based task list system (I like doing lists) and it has a powerline plugin that shows you the most urgent task to do. I liked that a lot too, having the task under your eyes there kinds of makes you want to get rid of it, so you end up doing it so you can mark it as done, and this has marvelous effects on the processing of your whole list...

I also wanted to sync these tasks somewhere online too, so when you are in the street and you remember something you need to do, you can add it to the list directly from your phone, and forget about it.

Taskwarrior has a server system, but it seemed a bit too much to me, plus I don't have a full-featured server to install the taskwarrior server to (only a standard webhosting service),so this didn't work either.

I use a lot the notes system of nextcloud, pretty easy to use from your cellphone, it has beautiful markdown support, etc. I use that for about everything. So I thought about a very simple task list system, that you could manage from nextcloud's notes app. It's basically a simple text file, where tasks are lines that begin with a *. Lines that don't begin with a * are not tasks, you can write or organize the way you want:



It is synced to your computer, so locally it's a simple text file that you can edit the way you want (I put an alias in my .zshrc like this so I can just run "taskedit" from the teminal

alias taskedit='nano /home/yorik/Documents/Notes/Tasks.txt'




Then finally I wanted the most urgent task to appear in a powerline segment. It's actually pretty simple. All you need is to write a python script like this:

from powerline.segments import Segment, with_docstring
from powerline.theme import requires_segment_info

class ActiveTaskSegment:

    def __call__(self, pl, segment_info=None, create_watcher=None):
        
        #pl.debug('Running powerline_tasks'
        
        taskfile = "/home/yorik/Documents/Notes/Tasks.txt"
        f = open(taskfile,"rb")
        lines = [l for l in f]
        f.close()
        for l in lines:
            if l[0] == "*":
                l = l[1:].strip()
                l = l.replace("**","")
                if "T:" in l:
                    t = l.split("T:")
                    l = t[0].strip()
                    t = t[1].strip()
                else:
                    t = None
                segs = [{'contents':l.decode("utf8"),'highlight_groups':['critical:success']}]
                if t:
                    segs.append({'contents':t.decode("utf8"),'highlight_groups':['critical:failure']})
                return segs
        return []

active_task = with_docstring(
    ActiveTaskSegment(),
    '''Returns the next active task
    Highlight groups used: ``critical:success``
    '''
Then you need to save that file in some place where python can find and import it (for ex. one of the folders indicated by sys.path in python). Then in your .config/powerline/themes/shell/default.json, together with the other segments:

{
            "function": "powerline_tasks.active_task",
            "priority": 40
 }
And that's it. powerline_tasks is the name of your .py file. The first task found in the file will be printed, and if there is "T:" in that task, what comes after is printed differently so you can use it to set a deadline or something:



Finally I also wrote a short "taskdone" script to delete the first task when it is done:

#!/usr/bin/python

taskfile = "/home/yorik/Documents/Notes/Tasks.txt"
f = open(taskfile,"rb")
lines = [l for l in f]
f.close()
f = open(taskfile,"wb")
done = False
for l in lines:
    if l.startswith("*") and not done:
        done = True
        print "Marking task",l.strip(),"as done"
    else:
        f.write(l.strip()+"\n")
f.close()

in categories  sketches  permalink:  368   posted on 10.06.2017 23:54
From Yorik
Todays drawings with Urban Sketchers São Paulo, at Vila Maria Zélia, a 1917 housing compound built for factory workers




permalink:  367   posted on 05.06.2017 16:34
From Yorik
Commenting post 366: Yes, that is true. At the moment the best way is to export a SVG file, then open it in inkscape and print it frmo there, this will give you total precision.
In 0.17 development version, TechDraw now has PDF export available too.

permalink:  366   posted on 05.06.2017 16:05
From Prashant Patil
Commenting post 361: I Love FreeCAD app its a great tool. Easier to learn and master, you dont have to be an engineering -drafting major to use it. I have learnt it all by myself and some tutorials on youtube. It's great.

I often try yo take prints of my drawings but the print feature still needs more work to be done.

in categories  sketches  permalink:  365   posted on 04.06.2017 23:45
From Yorik
Chinese ink, on the Minhocão


in categories  sketches  permalink:  364   posted on 03.06.2017 24:35
From Yorik
A quick drawing made today in Higienopolis...


permalink:  363   posted on 29.05.2017 22:50
From Rafael (bitacovir)
Commenting post 361: Great news and very interesting the online chat. We hope to see the release of V0.17 soon.

permalink:  362   posted on 29.05.2017 16:39
From Danilson Gomes
Commenting post 361: Estou gostando

in categories  freecad  opensource  permalink:  361   posted on 28.05.2017 24:18
From Yorik

FreeCAD Arch development news - May 2017

So here we are for our monthly report of what has been going on on the FreeCAD front this month. As usual, I will mostly talk about what I have been doing myself, but don't forget that many people are working on FreeCAD, so there is always much more happening than what I talk about in these notes.

To resume quickly, Werner has been busy working on the whole FreeCAD, as usual, but specially enhancing several issues in the tree view, making selection of large objects much faster, added several FEM tools, and fixed hundreds of other things. Looo has started merging core stuff from his Python3 branch into master (step by step, we will get there), WandererFan made a big update to TechDraw, Abdullah worked on better exceptions handling, and Realthunder is pursuing his work on PathArea, a set of tools inside the Path workbench, that work a bit differently than the others (they rely more on shapes).

But there is much more. For a deeper look at what has been worked on recently by me and others, check the commits log on github. Also, don't forget that more and more is happening outside the strict circle of FreeCAD source code, since it becomes more and more convenient to plug external workbenches into your existing FreeCAD installation. By the way, one of these external workbenches that becomes more and more interesting for BIM work, is Flamingo Tools. Check it if you haven't yet (look at the very professional pdf files in the "tutorials" folder)

So below are the highlights of what I have been doing recently. I also fixed a lot of small issues, but that are not worth mentioning here.

Don't forget you can help me spend more time on FreeCAD by collaborating to my Patreon campaign. This campaign is beginning to grow to impressive levels (special thanks to AlephObjects!) and I might soon have more impressive news to reveal! So next month I'll start improving it a bit, add goals and maybe rewards. I have a couple of ideas already. Don't worry, all of you early backers will automatically qualify for the whole suite

Multimaterials

The most important feature I've been working on this month is a new Multi-Materials system. The idea is simple: Arch objects (and already some other FreeCAD objects, such as FEM) already have a Material property. If you give an Arch object a material, it will take the color of that material. Scripts and macros can already use the information contained in that material, for example the density, but so far that is all it does.

Arch objects can now, instead of a Material, take a Multimaterial. The multimaterial simply holds a list of materials, each with a given thickness:

This can already be used in Walls, Panels and Windows. Walls and Panels will use this to construct multi-layer walls and panels, and windows will use this to give a different material to each window part (frame, panels, etc). These objects all become multi-solid, and will contain a same number of solids and materials. With this, the paradigm change of the Arch workbench to multi-solid is now complete: Before, Arch objects were made of exactly one solid. Now, Arch objects can be made of one or more solids.

So far intersections of these multi-layer walls are not done automatically, I am still investigating the best way to achieve that...

Snapping and Working Plane improvements

With other users we were recently looking at Microstation's AccuDraw system. If you ever used Microstation, that is one of its most interesting features. Everytime you click a point to draw a shape (polyline, etc), you have an incredible amount of options available. The snapping system in Dratft/Arch is very much inspired from it, but there are still a couple of interesting features missing:

One first improvement is a new button in the task panel to realign the Draft working Plane while drawing a Wire/Polyline, along the latest segment drawn. This gives you a series of new alignment options and works very much like AccuDraw.

There are also a couple of new tools to place the Working Plane accurately: The Working Plane button now also works with 3 vertices selected, instead of a face, there is a new tool to place a Working Plane proxy in the document, that has the effect to save a working plane position. At any moment later, you can simply reset the working pane to that saved position.

Finally, I have added a couple of convenient macros to the Macros repository (remember that with FreeCAD v0.17 you can now install any of these macros directly from the Addons Manager): A first one rotates the view so it faces the current working plane perpendicularly, which basically allows Draft to behave like the Sketcher when drawing in a certain plane, and another that does the contrary: It moves the working plane so its center is exactly at the center of the current view. This is useful when you are drawing far from the working plane origin, and therefore you are out of the grid limits.

Wikilab

Another area I've been pretty busy this month, is not fully FreeCAD. It is our WikiLab project. By the way, I will have a chat online with people from the WikiHouse Foundation on youtube, on monday 29th. If this subject interests you, be sure to join us! I also recently wrote an article about the project for the WikiHouse website that you might like.

The project crowdfunding is also coming dangerously close to its end, if you have a couple of Reals to spare, please consider helping it, the experience gathered with it will be precious for everybody...

We also started cutting a couple of test pieces like these:

This was basically to calibrate the machine. One of the partners of the project is 123painéis, that is where the cutting (and part of the assembly too) is done. But it also served to test if OSB panels would work well, and I can tell you they work amazingly well. I was afraid the cut would be a bit rough, but the cut is just perfect, and the finish is very nice.

"Enough of that!" will you tell me. "What relation with FreeCAD does this have!" Well, a lot actually. To begin with, the project is entirely developed on FreeCD. Also, I did a lot of coding for the Path workbench which was a sponsored job, made with Brad Collette (sliptonic in the FreeCAD world) and Daniel Falck. But at that time, I didn't know much about CNC manufacturing. Many ideas were implemented under their guidance, but, I must admit it with great shame, without fully knowing what I was doing. Now that I'm going through the whole process, everything is making sense and clicking into place.

Also a lot of subjects, that I was aware already, such as tolerance, dogbones, nesting, etc. now required some thought from me. This didn't result into actual coding, but rather on design strategies. FreeCAD proves to be an amazing tool to work with these panel constructions, you can take high advantage of parametric objects. To give you a small example, all the holes are parametric. Changing a hole (adding dogbones) requires you to only change one hole to adapt the whole project.

Be sure to check the main work file if you want to have a better look. All the project development is done in FreeCAD, the full model is also available here

All the generation of DXF cut profiles is automatic. The only missing part is automatic nesting, which is not easy. The only open-source app I found that can do nesting is SVGNest, unfortunately its code is very hard to adapt to FreeCAD. I'm currently studying it to try to understand how the algorithm works, and maybe try to rebuild it in FreeCAD.

Next step will be to generate the GCode directly from FreeCAD.

Start center redesign

I am also working on a new version of the Start Center:

It has several tabs, and will be vey configurable. You can play with it here, and discuss it on the forum if you have ideas.

Todo list

I will finish with adding here a couple of ideas I had while talking with other users, that I'm currently working on or will attack one way or another in the coming weeks:

  • Add a "snap between 2 points" mode. That could be easily done with the new teporary snap points feature added last month:
  • Add a "snap from" mode that allows you to snap to a certain distance from a point
  • Add a system to check if addons need another addon or a specific python module
  • Add a way to check if an update is available for a given addon
  • Add a series of intelligent 2D BIM-oriented objects in Draft/Arch: Section marks (if possible placed automatically on TechDraw sheets), parking slots, vegetation symbols, etc...
  • Add a kind of magic leader/tag object that can display automatically some info about its target object, such as material, name, size, etc... Similar to the series of tag objects in Revit.
  • Adopt a wider concept for Arch Floors, that would embrace a much wider scope than simply floors, but could be used to gather other Arch objects in any kind of situation, not only per floor. It should also be based on App::Part to benefit from its nice handling capabilities (it can be moved like if it was one single object).

in categories  sketches  permalink:  360   posted on 27.05.2017 24:21
From Yorik
Today's drawings with Urban Sketchers São Paulo, at Horto Florestal park




permalink:  359   posted on 24.05.2017 23:39
From Chris Badger
Hi, Yorik - I really hate to bother you through this channel, but I cannot get my FreeCAD registration activation, after several attempts over last 24 hours. The FreeCAD Forum has a catch-22 for this: "if having trouble with activation, contact Forum Admin". But....haha...to contact admin, I need an activated account. I tracked you down here thru github.
Can you ping someone to investigate? username: olddognewtricks email: nospam@ameritech.net.
Sorry again to pester you. Thanks!!

permalink:  358   posted on 15.05.2017 10:53
From leo
Commenting post 67: i using Ubuntu how to install this script

in categories  sketches  permalink:  357   posted on 07.05.2017 22:26
From Yorik
Today's drawings with #USKSP at São PAulo Pinacoteca, in the middle of a pretty cool antique car fair...










permalink:  356   posted on 07.05.2017 21:50
From Yorik
Commenting post 355: I'm really sorry but there is no way to answer this question.. It's done when it's done, that the motto of FreeCAD But have a try at one of the 0.17 development versions, they are very stable already.

permalink:  355   posted on 07.05.2017 17:12
From Rusty Feather
Please speculate: when will the next stable version of FreeCAD be released?

permalink:  353   posted on 03.05.2017 20:01
From Yorik
Commenting post 352: I can't understand what your problem is... Could you register on the freecad forum at http://forum.freecadweb.org and post your problem there? Try to explain better what is exactly the difficulty thart you have, you will have more chance to get the right answer. Thanks!

permalink:  352   posted on 03.05.2017 18:30
From marcus
Hello,
I'm having the following difficulty in freecad.
My tools do not remain.
It's the macros!
Parts library
Work features
Pipe
How do I make them stay?
Can someone help me?

permalink:  349   posted on 03.05.2017 13:05
From sudha
hi rying soemthing in python

permalink:  348   posted on 02.05.2017 20:27
From Yorik
Commenting post 347: Normalmente cuando este erro aparece (undefined symbol), es porque una biblioteca fue correctamente incluida durante la compilación, pero no fue correctamente linkada. En consecuencia, el código compila, pero no ejecuta correctamente porque no se encuentra el .so que contiene este symbol. Debes procurar donde existe esta DlgCreateSpur16staticMetaObjectE (u algo similar, este nombre debe significar algo), y verificar que el archivo .so que lo contiene está correctamente linkado en cmake. Me disculpe no poder te indicar mas precisamente como hacer eso, no soy muy bueno con gcc y todo eso, pero debe ser relativamente fácil de encontrar la solución...