Showing posts with label GIT. Show all posts
Showing posts with label GIT. Show all posts

Monday, 31 March 2014

Testing the Drawing Module: Part 1

After initial round of testing, we discovered a re-occurring crash when you tried to open a newly created page. The result of last nights work this is now fixed. For those unfamiliar, in the FreeCAD_sf_master directory run 'git pull'.

If you have any comments after testing the drawing module, please also consult this forum topic

-------------------------------------------------------

I haven't managed to do much recently. Work has snowballed and I've been having to work on a binary file converter for an Additive Manufacturing Machine. The experience from that I can imagine may be quite useful for writing and parsing other file formats if we ever need to in FreeCAD. I never would have thought I would read binary numbers as an engineer...

It appears there is a demand for testing the Drawing Module. It's in the stage where I any testing would be quite helpful, mainly to get feedback on the user interface and push this into the master for testing. I am aware there are some deficiencies both in missing features and bugs, but I need some motivation to finish up the GUI to make it more user friendly. Input on this would be helpful. In particular GUI mocks - hand drawings on tissue paper are accepted!

Note: Windows testers would be helpful!

 The idea of this post is to give a brief overview building FreeCAD to test out the Drawing Module.
mkdir test && cd test

The run "git clone http:://repositoryaddress" like the below to clone my Github repository into your testing directory.
git clone https://github.com/mrlukeparry/FreeCAD_sf_master.git

It should look like below. Cloning FreeCAD shouldn't take too long (it's about a 70mb download).


Ensure you have the prerequisites for compiling and building FreeCAD - consult either the wiki
or if you are really ensure ask on the forums. 

You now need to checkout out the drawing branch 
cd FreeCAD_sf_master && git checkout origin/drawing

You should now be on the drawing branch in a detached state. 


Now we create a build directory outside of the source directory and then we configure using CMake

You now need to checkout out the drawing branch 
cd ../ && mkdir build && cd build

Now we build using CMake. The options that you pass may depend on your platform or distribution. If you have problems please consult the forums. Configure the build using debug options for testing:
cmake - DCMAKE_BUILD_TYPE=Debug ../FreeCAD_sf_master


Eventually you should be configured and ready to build. All you then have to do is run make. To build faster, the option 'j' is the number of make jobs to run in parallel - set this to CPU cores + 1
make -j 7
The build procedure can take between 10-30 minutes depending on your computer specification. An SSD helps considerably more so than memory. Once built you can easily test FreeCAD without having to make an installation. 

In the build directory you can simply run FreeCAD
./bin/FreeCAD

To use the Drawing Module change the workbench once you have a part.

Part 2 to follow! 

I think I will try and record a screen-cast for the next guide.

Saturday, 6 October 2012

Back to University. Back to FreeCAD. Updates

After my intermission of going on holiday in Europe (if you could call it that) , I am now back at University and have some free time to work on FreeCAD.

Coding Improvements to the Render Module:

The past few days I've tidied up the Render Module and improve the QML code to improve the quality of the UI presentation. In addition I have now implemented the saving and restoration of material properties, so this means for example you can save the 'colour' within the Matte material.

During mid-September inside the Render Module, I tidied up some QT and Coin3D GUI dependencies that existed in the core application functionality. These were trivial changes and other small coding improvements were made to the Render Module.

Building on Windows:

To give the Render Module a greater spectrum of Testers, we would like to get the Render Module compile on Windows. Work was done to implement class definitions that were missing.

There was a brief discussion on building using QT 4.5/ QT 4.6, which the current Windows Libpack includes. Unfortunately this doesn't include QML or/ QtDeclarative Modules, therefore it isn't possible to build the render module on Windows yet. In practice this means that the Render Module will not be available till the 0.14 release, when we can guarantee that most Linux distributions will include this. However, this will give another 6 months of testing to ensure that this module contains more features and improve the quality through testing.

GIT Housekeeping:

Having been working solely on the Render Module over the past three months, in my own ignorance, I have refrained from keeping an updated revision of the FreeCAD source. I've now forked and cloned from the FreeCAD source mirror on github and have set up a new repository and merged the Render Module into a new branch:

This somewhat both complicates and simplifies keeping upto date with the FreeCAD repository and there is always the added difficulty of learning something new!

CAM Module:

I am looking into helping start an initiative to implement CAM functionality into FreeCAD with guidance from Daniel Falck and Brad Collette. Currently trying to work out how this system will work and draw up a structure for this. I will report back on this in short time.

Saturday, 4 August 2012

Help us test FreeCAD!

Last Updated: 06.04.2014

We need testers to give useful information back to us FreeCAD developers.  We know there are missing features and we wish we could grow additional limbs to increase productivity. Nevertheless, we want to produce something hight quality and when FreeCAD crashes we want to fix it. 

The more descriptive the information you can provide, the more easier and faster we can fix it. So here's a few hints to help test FreeCAD.

How to test a branch using GIT:

FreeCAD is now using GIT which is allowing more rapid development of features from contributors FreeCAD has mainline branches on source forge and from individuals. Firstly to test a feature, find the branch you want to test which can be found on the forums.

First ensure that you have git installed and also the correct development libraries - help is available on the FreeCAD wiki and Forum, but feel free to ask on the IRC channel #freecad

These will be 

Checking out a branch

Developers use github to track and share development more easily. Various modules I am developing can be found here on Github



When you've found the git address (at the top) in your console or terminal application create a testing directory and change into the directory.

mkdir test && cd test

The run "git clone http:://repositoryaddress" like the below to clone this repository into your testing directory.
git clone https://github.com/mrlukeparry/FreeCAD_sf_master.git

It should look like below. Cloning FreeCAD shouldn't take too long (it's about a 70mb download).


When it's finished it will create a free-cad directory. Change to this and you will be in the source directory. To switch to a specific branch (e.g. render) run the command below:

git checkout -b render

Now you can begin compiling!

Compile with Debug Information:

Compiling with debug information is more useful to report errors and doesn't cause too much slowdown. It is first a good idea to build outside the source directory. So make a new build directory like...

mkdir Build && cd Build

In the build directory we configure to build a debug version and we need to append "../" or equivalent to point to the source directory like
cmake - DCMAKE_BUILD_TYPE=Debug ../
Now you can run make and let it build.
make
If you have multiple CPU cores or have hyperthreading available, take advantage of this and build even faster by creating parallel build jobs. Add the argument -jN where N is the number of cores
make -j4

FreeCAD will begin compiling: A full compile of FreeCAD for me takes around 20-30 minutes.

Testing: when something goes wrong

If you find a problem. First try and find a definite way to replicate it. Otherwise it's very difficult to isolate the behavior. Once its repeatable, you can run a debugger like so: Browse to the bin directory and run the command from terminal / console:
gdb FreeCAD
This will use the GNU debugger and load the program symbols and present to you a console. Next run the command to disable real time messages
handle SIG33 noprint nostop
Then type 'run' to start debugging FreeCAD. 
run
Replicate the crash and when it becomes unresponsive, back in the debugger you can run 
stacktrace
Use a pastebin site and then give this back to the developers to figure out with additional information on IRC or the forums. 

Additionally take a look my valgrind post to help further.