Exciting things happen in freecad Ver.17 and down the Rabbit hole we go.

I’m a long time Freecad user but  I’ve been staying away from the bleeding edge of development since the stable build basically worked and suited my needs.  I have had way too many irons in the fire in my life for a while and I’ve been attempting to avoid the rabbit holes as well as the blinky lights of distraction for what I want to get done.

Most of my area of my limited free-time focus has been on getting my MPCNC to work with Machinekit as well a a semi-secret(at the moment) project I’m planning on Kickstarting.    The sultry calls of the sirens of the .17 daily build of FreeCAD have been getting louder.

The work that’s being done on the freeCAD Path workbench is frankly darn impressive and development has been very rapid.   The version from the Ubuntu repository I had been using was more than a   1000+ commits behind the bleeding edge of development of the  daily-build.  So that basically got me into .17 build.    I really like what’s going on with this stuff, so at this point, so it’s worth it to me to invest some time, since I’m not planning on looking back( I hope I don’t regret this)

My other fun project is a DIY linear bearing project that I’ve been iterating for the last couple of years.  I’m in the rev “L” series at the moment. Here’s a sneak peak.

Prototype Linear bearing for the Wedgie

I’ve gotten comfortable to the idiosyncrasies of pre .17 Part Design and can work around them and saw no compelling reason to really change.
Well that’s what I was telling myself anyway.

So, I wanted to do another variant to my L series bearing and I wound up  using the daily build of .17 which I was using for Path.

There have been some major changes as you can see from the Release Notes.   Basically, the part design workbench have had a major revamp.  The most significant to me are the new  Body and Part containers.   This is a huge paradigm shift that got me feeling like a total beginner at the moment.   Unfortunately the dust hasn’t settled yet since there is still very active development, and the documentation on this stuff is a bit scattered at the moment.
There are some of the new things that you’ll be able to do.

I need to wrap my head around this, and as I figure it out and get used to it, hope to do a few blog post/videos about this.


Posted in Uncategorized | Leave a comment

Problems Ssh’ng into my Beaglebone Black using my W530 with Nvidia drivers

I was moving along, having all kinds of fun ssh’ng into my Beaglebone using my W530 laptop with out any difficulties.  My problems started when I wanted do use dual monitors with my docking port.   In order to do that, I needed to install the Nvidia proprietary drivers.   I got that working and than  wound up having all kinds of problems running axis in machinekit.

Here’s what was happening:

ssh -X machinekit@
Debian GNU/Linux 8

Machinekit Debian Image 2017-02-12

Support/FAQ: http://www.machinekit.io/

default username:password is [machinekit:machinekit]

machinekit@’s password:
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Mar 5 06:17:03 2017 from
machinekit@beaglebone:~$ machinekit &
[1] 6183
machinekit@beaglebone:~$ MACHINEKIT – 0.1
Machine configuration directory is ‘/home/machinekit/machinekit/configs/MPCNC’
Machine configuration file is ‘MPCNC.ini’
Starting Machinekit…
io started
emc/iotask/ioControl.cc 752: can’t load tool table.
halcmd loadusr io started
cape-universal overlay found
cape-bone-iio overlay found
task pid=7902
emcTaskInit: using builtin interpreter
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 154 (GLX)
Minor opcode of failed request: 3 (X_GLXCreateContext)
Value in failed request: 0x0
Serial number of failed request: 692
Current serial number in output stream: 693
Shutting down and cleaning up Machinekit…
Cleanup done
Machinekit terminated with an error. You can find more information in the log:
as well as in the output of the shell command ‘dmesg’ and in the terminal

So this took me a while to figure out which a little help from from Linux guru’s from the makerspace I belong to.

I found some suggestions at https://elrepo.org/bugs/view.php?id=610
This solution talked about  adding this to an xorg,config file in the /etc/X11/ folder

Section “ServerFlags”
Option “AllowIndirectGLX” “on” # or “off”

I tried that and I couldn’t get that to work.
I found another fix here: https://bugzilla.gnome.org/show_bug.cgi?id=586777#c8

So first things first we need to locate Xorg

jonasthomas@jonasthomas-ThinkPad-W530:~$ which Xorg

sudo cp /usr/bin/Xorg /usr/bin/Xorg.original

So with the with Xorg program copied into Xorg.original just replace the contents of Xorg with the file above.

This worked for me. If you have this issue as well, I hope it helps you out as well.


Posted in Uncategorized | Leave a comment

Its been a while. Playing around with screen resolution on a atrix lapdock for beaglebone black and machinekit

I’ve been playing around with machinekit lately and I’ve gotten around to using with my Beaglebone Black with a Cramps board.  It’s been a huge amount of fun.   I had a Atrix Lapdock that I wanted to use but I was having some issues with screen resolution.  This can be a little troublesome since I can’t to shut off warning messages that pop up.  The other issues, that I’ve been having is that if my usb is plugged into the bbb while it’s booting the keyboard and atrix mouse don’t work.  If I plug the usb in after boot up, it’s fine(weird)

The Atrix lapdock screen resolution is 1366 x 768:

So I was looking at a post   and  came up with this per the suggestion to add to  uEnv.txt

Well, that didn’t work. Then a little more googling brought me to this.


which suggested adding this to the uEnv.txt file:

optargs=quiet drm.debug=7 capemgr.disable_partno=BB-BONELT-HDMI video=HDMI-A-1:1360x768M@60

That worked.


Posted in Uncategorized | Leave a comment

Problems with the Rockbot.

I’ve been having some intermittent skipping issues on the Y-axis on my Rockbot and I wanted to go over some of my settings on my polulos..  My table is very smooth running, although in hind site it’s inertial mass is probably a little more than it should be.

Going back through my notes, I have this motor https://ultimachine.com/content/kysan-1124090-nema-17-stepper-motor

and this driver https://ultimachine.com/content/pololu-a4988-stepper-driver-heatsink-kit

If memory serves me, I sorted calibrated by feel and sound..  It probably should be dialed in a little better.

Anyway, I found this guide.


So According to this it looks like my limiter is the A4988 Driver..  It looks like they only want  me to drive 1 amp with air cooling only…  My motors can handle up to 1.5 amps.

The magic formula’s are here

Another way to set the current limit is to measure the voltage on the “ref” pin and to calculate the resulting current limit (the current sense resistors are 0.05Ω). The ref pin voltage is accessible on a via that is circled on the bottom silkscreen of the circuit board. The current limit relates to the reference voltage as follows:

Current Limit = VREF × 2.5

So, for example, if the reference voltage is 0.3 V, the current limit is 0.75 A. As mentioned above, in full step mode, the current through the coils is limited to 70% of the current limit, so to get a full-step coil current of 1 A, the current limit should be 1 A/0.7=1.4 A, which corresponds to a VREF of 1.4 A/2.5=0.56 V. See the A4988 datasheet for more information.

So  I measured a reference voltage of  .156 Volts X 2.5   = 0.39 amps…
Yikes.  It looks like I’m stalling out the motor versus triggering the thermal shut off for the motors.

So seems like I want to crank this up to 1/2.5 = .4 Volts.  Something for tomorrow.





Posted in Uncategorized | Tagged | Leave a comment

More refactoring with the polyline.

I haven’t much time lately for playing around with pencil2d.   Work as well as other life commitments haven’t left much gas in the tank for me to pursue fun stuff like this.  Currently I’m having a rare quiet Sunday morning moment more or less where I can take a 50k foot view to see what I’m trying to do and hopefully break things down into some manageable bites that I can squeeze in between the chaotic moments of life.  This is going to a train of thought post that probably won’t be of any interest to anyone but me, so read at your own risk.

So far I managed to separate the bezier from the polyline in the code.  There was a desire by the pencil2d developers to have the polyline function in both the bitmap and vector modes.   This dual functionality requirement is giving me some headache at the moment.  In bitmap mode lines are stored as a bitmap.    Trying to maintain this dual functionality at the moment is just slowing me down.

But.. Some of the design requirements are…

Polyline saved as a bitmap can never be edited as a polyline.
As new polyline can be either a bitmap or vector.

Another requirement, that will need to be implemented at some point.
Need to know in the mouse movements we’re dragging a point to move a line(s) or if we’re creating a new line from an existing point.

Rather than stripping bitmap out of the polyline code completely I think I should treat it as a non-implemented feature.  I think once I get the main functionality implemented for vector mode shouldn’t be that hard to implement for bitmap.

In addition, the way the polyline data structure is going to change as well.  If memory serves me it appears the app assumes that a line will be drawn point to point… In essence there is no line object… A line object needs to be implemented.  This also means that container objects will also need to be designed etc… etc.. blah blah blah…

Also, I noticed(working from memory) that when qt renders lines it is using a 3 dimensional data to project on a 2d plane.    The pencil2d  polyline points should be 3 dimensional as opposed to planar. (This doesn’t mean we’re going to use the z at this point, but I think since qt can handle it, why not lay the foundation to have a 3d polyline so it can eventually be implemented…)   Ultimately I could see  some type vector tool of a  a constrained stick figure that could be manipulated  frame to frame in 3d space but proect on a 2d plan.,  This would give the animator a stick figure to place and  could draw around it.  Seems like that would be pretty cool to do.

As with anything all great journeys being with a single step…
Hopefully  I can map out some small additional steps as well that I can knock off on something other that a quiet Sunday.

Anyway…..  Next steps(more or less)

Research how best practise for handling non-implemented features so I get a break when debugging through the IDE, but doesn’t throw an exception when the IDE is running.

Refactor Code to polyline.cpp (et all?) that bitmap mode is a non implemented feature.

(?Need to add code that editing an existing object is a non implemented feature?)

(?Need to add code that saving an existing object is a non implemented feature?)

Create a line object.

modify the container objects to accommodate both lines and points.
(When I get this point, I need to break down a bunch of small digestible steps)

Sub goal. Draw the polyline out with a point to point line using the line object.

Get the polyline object to save.
(More sub steps to detail)
Get object to retrieve
(More sub steps to detail)

Get this working with bitmap mode.

(Need to break down additional steps)

When I get this point, the new polyline should mimic the currently existing polyline both in bitmap and vector mode. I would say that would be the point where we’re saying we’re done with that phase of the project.

That’s not to say we’re done, done… but at least it gives me a hard edge to strive for..
The next project after that would be do be able to drag a point and have the lines follow it.

Posted in Uncategorized | Leave a comment

Refactoring the polyline in pencil2d

So I’ve managed to get myself deep into the rabbit hole now.    https://github.com/pencil2d/pencil/issues/423

The way things are structured in pencil2d is that a polyline would be drawn in bitmap mode and  a bezier would be drawn in vector mode.  In my mind these are two very distinct ways of doing things and it makes no sense to me that they should be combined in the same class.
So….  I created a branch called polylineRefactor and  basically copied bezier.cpp into a separate class called \graphics\vector\polyline.cpp and commented out anything that looked like it had something to do with a bezier as well as anything else that keeps the program from building and running. https://github.com/JonasThomas/pencil/commit/ab9c2ad4e0588097e590c9518e5d493de9c1e89d

I left bezier.cpp intact for the most part for now and tried disconnecting it from pencil.  I think at some point it will need refactoring as well and at some point there should be a bezier icon on the pencil2d sight.
Anyway… At this point, the polyline tool is totally unusable.   If I do a mousedown I get a line starting at the start of the screen and the line drawing to the current  mouse position.   This is both vector and bitmap.
So… I’m thinking next steps.

Get the start of the line to appear at mouse down event.
Get the end of the line and new line to start and the second mouse down event.
Don’t have much time this weekend, but if I could get this done it would be a good start.Fun fun fun…. 😉

Posted in Uncategorized | Tagged | Leave a comment

Converting a Ogv to Avi in youtube in ubuntu 14.04

Sometime Linux can really be annoying(I still like like it though).
So I’ve been trying to use recordmydesktop to record which saves natively in OGV.   Unfortunately youtube doesn’t like OGV you need to convert to AVI.

So I tried the magical incantation that google seems to say and this happened:

So memcoder isn’t working.  And FFmpeg doesn’t seem to be loaded in 14.04 for some reason or another…  But I did find some instructions to get it loaded.


So looking for the magical incantation: http://ubuntuforums.org/showthread.php?t=1613179

So  I tried this:

Ok… Now I found this: http://ubuntuforums.org/showthread.php?t=1957290

This incantation seems to work.

Hoo… Hoo… Success.


Posted in Uncategorized | Leave a comment

Just some quick notes on enabling/Disabling stuff in qt

I’m a little to tired to work on this at the moment,  but I had some links that I want to look at





Posted in Uncategorized | Tagged | Leave a comment

Pencil2d Initial thoughts on the Copy paste within a frame bugs #414

I’ve been looking at the code and playing with the app  figure out how to replicate this
It seems that the selection/move tool by themselves are working pretty good.

I was playing the the move tool and noticed a couple of features that are pretty cool.  If you use the move tool with a shift enter, the object gets moved along the x-y and the hold the control down will rotated the selection, you can scale the selected bitmap….All  pretty cool… but that’s not our bug.

I’ve been trying to come up with a consistent way to generate the bug for testing.  I can’t seem I can seem to find it at the moment.  One thing that I’m observing multiple times but I can’t do it intentionally, is that a copy based occurs if I draw on the original, the copy also updates. (I’m assuming this is a bug and not a feature.)

Also if I do a file new, I’m seeming a invisible selection that blanks out what ever I’m drawing.  This seems to be happens only after the weird copy occurs.  My suspicion root cause is some combination of mouse clicks, key-strokes that you would normally never do, but are allowed.

One thing that does seem strange to me is that cut- copy and paste from the command from the pull down are enabled at all times.   It seems me that the business rule should be if you perform any of these actions the selection box should be displayed.   The corollary would be if the selection box is not displayed the copy-cut-paste should not be enabled,  If ctrl-x ctrl-v, ctrl-c is attempted with no selection box is displayed, a modal message pops saying that you can’t do that from the pop-up menu.

Now in my mind when a paste if performed via a ctrl-v the copy should be placed where the mouse cursor resides (upper left corner)
If we don’t want to give an error message when some does  a edit-paste it seems to me that when some does a edit->paste the copy should be placed in the middle of the screen, the selection is switched to the copy.

My current thinking is that if a ctrl-v is pressed (after initial ctrl-c) the selection could move to the copy (and in the background perform a new copy to the selection.  This should enable you to keep hitting ctrl-V to get multiple copies.

Whenever the selection is not visible, the clipboard is cleared.

In my mind, the next step should be only to allow Edit=>copy, Edit=>Paste,Edit=>cut, Ctrl-C, Ctrl-V,Ctrl-X only if the selection grid.   Before, I invest the time in doing that, I think I should get the ok from Matt to go for it.

I was just looking at this post..  http://www.pencil2d.org/forums/topic/capturing-paper-animation/   That might just mess up my perfect plan..  Could we want to paste images from outside pencil2d?  I suppose that could be a Edit-Past-Special(with behavior the same as Edit-Paste?





Posted in Uncategorized | 2 Comments

Exploring the pencil2d F6

So one of thing I’m starting to  taking a look at this: https://github.com/pencil2d/pencil/issues/414

Playing around with the app, it looks like the F6 duplicate frame in combination with a pencil draw, F6 is yielded correct results.  (I’m thinking it might be worth understanding what’s happening on something that’s working correctly, for when I deal with the stuff that’s broke.
So… I wanted follow the trail on what’s going on with the F6 key..  I was thinking it was going to be sometype of keypress event, but I think I found the link here:

I guess  kb.ini file is some type of initialization file.
Anyway it’s referenced here:



So the magic search term at the moment is

I think we’re getting close

Okkk… Now I think I found it.


I just did some testing and everything within this routine is functioning properly.

(This seemed like more work than it should have been)
My think the next step is to see where pasting is occuring.   The critters are laying in there some where.
(Well the morning is blown and nothing really fixed yet.)
I think my next steps are probably to isolate the wacko behavior and put a break point on paste() so I can see what’s going on.


Posted in Uncategorized | Tagged | Leave a comment