Levels of Distraction. Freecad fun and pain.

[Edit.. I thought I was ready to engage the warp drive but we now have a new level of distraction… the 12.04 screen lock up

Ok well, Christmas break is over and it’s time to get back into the normal routine…    I didn’t get anywhere near what I wanted to get accomplished, but that’s not to say that nothing didn’t get done.   I feel like there where a bunch of subroutine calls but we’re approaching the main loop again.   Hmm. I guess I still think in top down programming style versus OO.

Main Goal
Anyway, the main thread/goal whatever is getting the Sherline mill done and getting more experienced with Freecad.    So, I’m at a point where I want to start designing my x-axis ball screw.   The assemblies features are not yet built yet in free-cad and I caught myself transferring coordinates on a piece of paper and re-type them back in.  This is something that really goes against the grain for me.   I had a need that I wanted to take a 3d point on a vertex on a object, transfer the coordinates to a different document.

Level 1 Diversion (FreeCad Widgits)
This set me of on my first level of diversion in that I wanted to create a custom widget that would do that.   It was fun in that I used the QT gui designer an play around with signals and slots and got me started seriously playing around with Python.    I also gained a pretty good understanding on was going on with the python wrappers and how to get access to with Freecad objects I could extract the info I needed so  I could avoid doing some typing with python.  So in the midst of this I was using gedit it write my python code and importing my object into Freecad.   Python gets real particular with indentation and things get weird when you intermix tabs and spaces….(there is a way to get gedit to give you spaces instead of tabs when you press the tab)..  Anyway writing python code in gedit and then loading it into freeCAD wasn’t exactly what I’d call a fun experience.   It was basically every tedious.    I decided I needed a tool that  was editing python.

Level 2 Diversion(Python and Eric IDE)
So It became sort of clear to me that if I wanted to program in Python, I’d need some better tools.    I did a little research I thought eric4 made sense for me.  It’s IDE is based on QT so I thought it it would be the way to go.   So I started using that at first as a text editor which worked way better than edit.  It has code collapse as well as auto.completion.    So at this point, I thought it would be cool to be able to run code within the IDE

Level 3 Diversion( ATI/10.04 issues)
So at this point, I thought no problem, I get freecad to load within the IDE and I could single step and run programs in it.  Well.. that did go to well.  After much screwing around it had to do my ATI graphics chip in my laptop and the outdated mesa drivers in 10.04.   So I made the decision to upgrade to 12.04

Level 4 Diversion(Unity/12.04)
At first I tried a usb boot of unity.. Wow is that some culture shock over gnome.  Its a very different approach.  This mesa driver things was a nuisance and pain.   Nuisance in that my constraint values where showing up white.   It seemed that the updated drivers in 12.04 cured many of the problems I was dealing with.

So since support was ending in a couple months for 10.04 for this, I thought I should really move on this.   I tried to do the update through synaptic and I was getting all kinds issues.   Soo.  I decided a complete drive wipe and reinstall all my tools. In retrospect this was a good decision

Level 5 Diversions(Issues with Qt-Creator)
So after getting things installed, I needed to rebuild all my IDE’s download libraries and everything.. I had some  weirdess thing going on with Qt-creator and it threw me for a loop for a day or so.   I went to the ubuntu software center downloaded qt-creator.   I got the freecad source download and I was having problems getting the qt qmake wizard to work.  I kept getting this message “No generator selected”.  This was really driving me nuts. After much useless screwing around it turns out the issues was that I downloaded Qt Creator by itself,  and all the bits and pieces need to run qmake weren’t installed… Duhhh.  All that needed to be done to fix that issue was down loaded the Qt SDK (which includes Qt creator) and that issue was solved.  Well at that point, I was having issues rebuilding Freecad from source

Level 6 Diversion Rebuilding Freecad from source.
I started rebuilding freecad from source according to the instructions on the wiki.  A suggestion was made that I use OCE instead of OCC.  Ok so when I did that, I was getting into all kinds of issues with weird errors.  Since I was already 6 Levels deeper than I wanted to go.  I didn’t want to persue this any further.   So I went back to OCC.    I thought it was sort of silly that there was no install script to get going with development on a fresh install of 12.04 so that got me going on my next adventure.

Level 7 Adventures in Bash Scripting
So at this point, I just want to create a basic install script that I thought might be helpful to others.  Since supposedly OCE supposedly represents the future (but doesn’t actually work yet without pain for freecad) but OCC does, I thought it would be easy to write some conditional in a bash script.   So that got me googling a day or so into bash scripting.  It’s clear to me that bash is really a powerful tool but it’s syntax requirements is a bit weird.   In hind site what confused me was that in a if statement you need a space after the “if [” otherwise it’s a command?  Ok… muttering under my breath, and thinking who ever came up with that syntax could have been shot.   Perhaps if I became a Bash expert I’d be shot

Level 8 writing a install script for 12.04 
So I started making a install script for 12.04.  One of the issues that probably  push me to a level 9 was I interesting was I having big issues with this stupid If statement with the bash script so I was ctrl-z it to stop it mid stream.  When I did that, I was screwing up the file locks with sudo.   That got me into  terminal commands of ps, top, and kill.  Anyway, eventually I got that worked out.  At this point, I got a freecad working from source source, and my mesa problems have gone away so, I’m getting pulled back down to my primary goals.   But I still want to automate the installation of a PPA installed version of freecad as well as automatically setup the folders for a freecad build.  I just think it would be cool run a single script that would basically set up up for freecad development..  But for now, I think I want to back to my level 1 project and clean up my point selection and transfer widget.   I think I going to post what I have on the forum and perhaps append it from time to time.

Level 9 12.04 screen lockup

I found this link that hopefully address this issue.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *