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 63 messages in this blog, showing only last 20. Click here to show the last 50 or here to show all, or browse by tag: sketches, freecad, opensource, 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 ...

in categories  sketches  permalink:  385   posted on 24.07.2017 1:32
From Yorik
Couple of bad ones this week, just for the record... The last one was waiting for a concert to begin






in categories  sketches  permalink:  384   posted on 16.07.2017 21:24
From Yorik
Traditional Sunday Minhocão sketch




in categories  sketches  permalink:  383   posted on 15.07.2017 24:13
From Yorik
Today's drawing with Urban Sketchers São Paulo, in São Paulo city centre.






in categories  sketches  permalink:  382   posted on 05.07.2017 23:43
From Yorik
Drawing I did today at praça Roosevelt


permalink:  381   posted on 04.07.2017 3:02
From Yorik
Commenting post 379: Hi,

This is not so easy unfortunately, you cannot just take a script written for one application and make it run on another, even if they are written in the same language. It would take days or weeks and might be even easier to rewrite from zero.

It might be easier/more fficient for you to work in Blender, no?

permalink:  380   posted on 03.07.2017 19:24
From Arq German Alcala
Commenting post 372: Tengo interes en Patrocinar FreeCAD, favor de contactarme, te envie solicitud de amistad Facebook.

permalink:  379   posted on 03.07.2017 9:11
From amer
Hi yorik
I am amateur interested in the history and the immitation of citadels and old castles built in stone and brick
And as I want models with details cornices, bow, pilaster, ceiling, etc.
I try to write a macro for freecad
For this I find a program written in python to blender:
Add_mesh_masonry.py written by Paul Spooner
Can you help me to make it compatible with freecad especially with the architecture workshop of freecad

Thank you in advance and here is the code:
##
#
# add_mesh_masonry.py (c) 2007 - 'til now; Paul Spooner (Dudecon)

snipped (...)
#
# optimize for speed. Make it run faster?
# Grout model... yeah.
# consider removing wedge crit for small "c" and "cl" values
# wrap around for openings on radial stonework?
# auto-clip wall edge to SMALL for radial and domes.
# unregister doesn't release all references.
# repeat for opening doesn't distribute evenly when radialized - see wrap around
# note above.
# if opening width == indent*2 the edge blocks fail (row of blocks cross opening).
# if openings overlap fills inverse with blocks.
# Negative grout width creates a pair of phantom blocks, seperated by grout
# width, inside the edges.
# I was going to add an "inner/outer" toggle for steps and shelves but user can just rotate 180
# though you can't set shelf and steps on opposite sides of wall...

permalink:  378   posted on 02.07.2017 22:52
From Yorik
Commenting post 376: Hehe I thought someone would ask... We linux users cannot resist desktop screenshots.

The desktop is fluxbox (yeah I'm old-school but I really like it), with a theme I did and modified a bit afterwards to match the gtk theme base color, the gtk theme is elementary dark, the icon theme is Surfn Numix, the background I don't remember, and the geany theme is made by hand, just editing the filetypes.common file.

permalink:  377   posted on 02.07.2017 22:37
From Yorik
Commenting post 375: Thanks! Those are indeed good ideas... You are thinking ahead of me!

permalink:  376   posted on 02.07.2017 16:44
From Gergő
Commenting post 372: Hey,

I don't know the first thing about FreeCAD, but when I saw your screenshot I instantly fall in love with your Geany (and GTK) theme. Could you possible share what themes do you use (and where can I get them)?

Thank you very much!
Gergő

permalink:  375   posted on 02.07.2017 6:33
From Rafael (bitacovir)
Commenting post 372: Thanks for the news and congrats for the grant. About the patron. maybe you could give printed copies of your book. Or send them t-shirts with the FreeCAD logo (or with legends like "I am a FreeCAD patron", etc)

permalink:  374   posted on 29.06.2017 21:16
From Yorik
Commenting post 373: Oh thanks!!! I didn't know that. Will look at it right now.

permalink:  373   posted on 29.06.2017 20:27
From viralata
Commenting post 372: Hi Yorick, I don't know if you had a look at it but BlenderCam in it's last releases had a slicing part with a way to pack curves on a sheet. No idea what algorithm it uses but should be opensource.
blendercam.blogspot.fr/
A bientôt

in categories  freecad  opensource  permalink:  372   posted on 29.06.2017 20:08
From Yorik

FreeCAD Arch development news - June 2017

Hi all,

This is time for a new review of what has been going on in Arch development this month. Quite a lot actually, it's exciting that several things I've been working on during the last couple of months begin to flourish into pretty interesting and usable features.

There is another interesting thing happening, is a very good synergy between the WikiLab project I'm working on now, which you must grow tired of hearing about, and FreeCAD developement. FreeCAD fuels the project development, which in turns fuels FreeCAD with bugfixes and new features. Me and other FreeCAD community members are really keen to pursue and extend that synergy further with other projects.

As always, don't forget you can help me spending more time on FreeCAD, by sponsoring me via my Patreon campaign. As a side note, that campaign is really taking flight, sooner than I had expected, I'm highly overdue to update the campaign page, and add some whistles and bells such as goals and rewards.

As a possible reward, I am thinking about doing some short videos, explaining in detail specific feature of the Arch workbench, and more generally, doing BIM with FreeCAD. For example, one about walls, one about working with imported dwg files, things like that. These videos would be, in a first time, available to Patreon supporters only, as a kind of present to thank them, and then, after a couple of months, added on youtube for everybody. What do you think? Good idea? Lousy idea?

So enough of this, here is the real stuff:

WikiLab

If you are following the progresses of our WikiLab project, you might have seen that the crowdfunding campaign ended successfully, and we are now getting started. The wood panels have been ordered already, the final cutting sheets are being made, and the cutting should begin next week. This will take roughly two months, during which we will contract a constructor to build the foundation and base walls, and hopefully everything will be ready to build the WikiHouse-based part, at the end of August, during the university holidays, and just before the rainy season.

On the image above is a first "rib" we've been mounting this month, as a kind of proof-of-feasability, and to boost the crowdfunding campaign too. It went amazingly well, this element was built in about 2 hours by 5 people, it is very easy to understand and build, and the solidity is really impressive.

I'm also starting to write a manual (in portuguese) that willbe the actual construction document. No plans and sections in this project!

There are still several details to solve, some of them have been already discussed and solved on the WikiHouse community slack, which is a really cool way to solve these issues collaboratively, something we've been doing with OpeningDesign for quite some time already

Last month I also had an online conversation with Harry Knight from the WikiHouse Foundation, and wrote an article on Medium.com about our project. Check it up!

We are also studying small changes and improvements to the design, such as holders for shelf supports, and ventilation holes at the top, that can be closed with 3D-printed custom lids.

Draft Label

This is a new feature I've been working on, inspired by Revit's tag objects. In Revit, you have different types of tags, that you can attach to an existing object. That tag will then automatically display a certain information about the attached object. For example, material tags will show the material of the object, door tags will show the door number, etc.

In FreeCAD I decided to go for a bit more generic approach: There is a new generic Draft Label object, which is made of a piece of text and a two-segment line, which can have an arrow at its end. The text can be made to display some property from the attached object. At the moment only a small list of properties are available, and can be selected from a drop-down box, but the system is very extensible and you could have those Labels display just any kind of information that can be retrieved from the base object.

As always, this is only the first, rough version, it works, but over time and use it will certainly refine ito something more solid and powerful. It should also gain additional feature so it can be used for all the Revit scenarios: show component numbers, space tags, etc. All these should be displayable in a distinct manner (in a rounded rectangular frame, in a circle, etc...)

Shuttleworth Foundation

The other big news of this month, is that I've been elected for a Shuttleworth Foundation Flash Grant! Thanks to OpenSourceEcology fellows, who indicated me! I still don't have fully formed plans for what to do with the money, but a couple of things I definitely want to do: 1) Help founding the wikilab project above (that is done already), 2) Turn the FreeCAD manual into a printed book. Most of the work is done already, it still needs a professional editor review, then it can be printed and sold, which nowadays is very easy thanks to sites like lulu.com. And 3) extend what I'm doing with the money from my Patreon campaign, spend more time coding for FreeCAD. I would be able to work half-time on FreeCAD for a coupe of months, I'm trying to see how to set that up now. As a point 4), I might have more/better ideas later on, still thinking about it.

GSOC / Rebar

This year, FreeCAD has received four student projects for the Google Summer of Code. For who doesn't know, it is a program by Google to sponsor students to work on open-source projects during the (northern hemisphere) summer months. We are now approximately at the middle of the coding period, and our 4 students are doing great!

I am myself mentoring one of these projects, together with Bernd, which is Amritpal Singh's proposal to extend the Reinforcement bar tools in FreeCAD's Arch module. So far so (very) good, Amritpal is surprising us with the quality of his code, which you can already test if using a development version of FreeCAD: Just install the Reinforcement addon via the addons manager, and on next run, the Arch workbench will detect it and add its tools under its current Rebar tool.

The objective of Amritpal's work is to extend the User Interface around the Rebar tool, to add it a series of tailored dialogs to create specific types of reinforcement bars, such as straight bars, U-shaped bars, stirrups, etc. All this UI work integrates with the current Rebar object, which is kept as the overall, can-do-everything Rebar object. The different dialogs help the user to create and edit these rebars in a more friendly way, but doesn't remove anything of the power of the base rebar object, which is simply made of a profile, an extrusion path, and a series of placements, and can therefore represent any kind of rebar we can think of.

Everybody wins with this approach: The normal user, who just wants a clear and easy way to add reinforcement bars, and the power user, for who these dialogs are not enough and who wants to tweak or script these rebars in any way possible.

Nester

Here is the best part, in my opinion. I'm working (it's not finished yet, but working already) on an algorithm to perform bin packing in FreeCAD. It is an operation that consists in placing/packing different shapes inside a container (the bin), so it uses as little space as possible. The immediate output, obviously, is toproduce cut sheets for WikiHouse-style constructions, like this:

Interestingly, this is a subject that renders a lot of theory (lots of research papers on the net), but few open-source applications. The only "readable" ones I found were SVGNest and the WikiHouse plugin for SketchUp. None of them is usable directly in FreeCAD (different coding language, too tied into their host system, etc), but they provided precious resource to understand how such an algorithm should work.

They both use the same concept, which is the no-fit polygon. The idea is more or less this: You place a first piece inside the container. Then, for each other piece, you try to "rotate" it around the already placed piece(s). You are basically trying to place the new piece as close as possible to the ones already there. By doing this, you end up defining a "no-go" zone, that is, a zone where our piece cannot go otherwise it would overlap the already placed pieces. By subtracting that zone from the container area, you obtain an "available zone" where the new piece can be placed. You then place the piece at the leftmost available position in that zone, try again with different rotations of the piece, measure the results, and keep the one that occupies the smallest space.

The above concept is working already. It takes a lot of time now, it still needs a lot of optimization. But the concept seems solid. Later on, I will try to implement a genetic algorithm which would run several passes, swapping the order of some pieces, and keeping the best solution. There is a lot of space for improvements.

In the coming days/weeks I should have a basic implementation ready in FreeCAD, so we can start playing!

Panels

The nesting system described above is made to work with any shape or feature of FreeCAD. You select a series of flat objects, and another flat object as the container, and the algorithm will return a series of placement transformations, that you can apply to the object to have them packed into the space defined by the container shape. So this will work with any Part-based object.

However, the main interest for me is to use this with Arch Panel objects, for constructions such as our WikiHouse-based project above. These panels, at the moment, already have several features that will be useful for this kind of use, such as the Panel Cut feature that produces a flat view of a Panel, to be placed on a Panel sheet, you see that everything is ready for the nesting, we already have both the shapes and the container.

I already added a couple of useful features such as individual margin settings for each Panel Cut (the minimal distance it must keep with other pieces on the sheet), and the ability to render a Panel Cut either as a Wire or a Face. I also added a way to define and represent wood fiber orientation on a Panel Sheet:

This, allied with a way to restrict possible orientations of a piece on the sheet, will allow to have the nesting algorithm respect the fiber orientation when placing the pieces. There are also other features to come, such as the possibility to use any shape as the container (at the moment it is restricted to rectangular shapes), and I believe we will have a pretty powerful and flexible system.

Then the last operation needed in order to make FreeCAD produce WikiHouse components entirely, is to generate Path objects from the Panel Sheets, a task that has been already worked on extensively by Sliptonic (check this video where he explains it all).

That's it for this month I guess, as always,all comments and ideas are welcome, be it by posting on Patreon, on my blog, or on the FreeCAD forum!


in categories  sketches  permalink:  371   posted on 25.06.2017 22:13
From Yorik
Drawings I did today on the Minhocão. First aquarelle in ages, there is work down the road...




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.