Assembly 2 workbench for FreeCAD v0.15

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
danielfalck
Posts: 395
Joined: Fri Oct 07, 2011 8:58 pm
Location: Beaverton,Oregon, USA
Contact:

Re: Assembly 2 workbench for FreeCAD v0.15

Postby danielfalck » Sat Nov 29, 2014 6:38 pm

hamish wrote:Hi danielfalck, glad you found the wb useful :)

Regarding the constraint solver breaking down, please pm FreeCAD assembly file with the parts already imported and the constraints setup. I will then see if i can fix the bug.
I am wondering if it is the way that I am trying to use the command to constrain two planes, or the way that I am selecting things. I am clicking on the 'Add a Plane Constraint' icon and then clicking on a face on each box. My processor then works on the problem for about 30 seconds and then I get that error that I pasted into my earlier message. I have also tried clicking on two faces on the two boxes and then clicking on the icon.

I am running Linux Mint Maya with python-scipy 0.9.0 and python-numpy 1.6.1 if that has any relevance on the problem.

OS: Linux Mint 13 Maya
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.15.4226 (Git)
Branch: path-module2
Hash: cbf104768df8cfac2b2dabb39dfa55e36a49e54e
Python version: 2.7.3
Qt version: 4.8.1
Coin version: 3.1.3
OCC version: 6.7.0
Attachments
cube2.fcstd
simple box with unaltered placement
(2.59 KiB) Downloaded 93 times
cube1.fcstd
simple box with placement of x = 5.0
(2.64 KiB) Downloaded 86 times
assemblye_test.fcstd
simple test of two boxes from Part workbench
(4.22 KiB) Downloaded 105 times
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Assembly 2 workbench for FreeCAD v0.15

Postby NormandC » Sat Nov 29, 2014 8:27 pm

danielfalck wrote:OCC version: 6.7.0
Dan,

Any specific reason why you're using 6.7.0? Our OCE Releases PPA offers version 0.16 of OCE, which is based on OCC 6.7.1. It's pretty easy to update your OCE without having to compile it. Linux Mint 13 is based on Ubuntu 12.04 LTS which means you should be able to use these packages.

https://launchpad.net/~freecad-maintain ... ce-release

My aim is to update the PPA not too long after the OCE guys make a new release. On the oce-dev group they seem to indicate they will make a last maintenance release before merging the OCC 6.8.0 code.
danielfalck
Posts: 395
Joined: Fri Oct 07, 2011 8:58 pm
Location: Beaverton,Oregon, USA
Contact:

Re: Assembly 2 workbench for FreeCAD v0.15

Postby danielfalck » Sat Nov 29, 2014 9:02 pm

normandc wrote:
danielfalck wrote:OCC version: 6.7.0
Dan,

Any specific reason why you're using 6.7.0? Our OCE Releases PPA offers version 0.16 of OCE, which is based on OCC 6.7.1. It's pretty easy to update your OCE without having to compile it. Linux Mint 13 is based on Ubuntu 12.04 LTS which means you should be able to use these packages.

https://launchpad.net/~freecad-maintain ... ce-release

My aim is to update the PPA not too long after the OCE guys make a new release. On the oce-dev group they seem to indicate they will make a last maintenance release before merging the OCC 6.8.0 code.
I'm still using an older version of Heekscad that gave me problems last time I upgraded OCE. In a little bit of time, that problem will be taken care of. I am already parsing some FreeCAD objects and extracting gcode with some home grown python scripting.
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Assembly 2 workbench for FreeCAD v0.15

Postby NormandC » Sat Nov 29, 2014 9:04 pm

Ok, I understand. I noticed the GitHub repo has not been updated in more than a year, but Dan Heeks' repo on Google code seems to be quite active.

I should stop hijacking this topic, sorry! :oops:
jmaustpc
Posts: 9566
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Assembly 2 workbench for FreeCAD v0.15

Postby jmaustpc » Sun Nov 30, 2014 8:02 am

A bit more hijacking ... :)

those two OCE versions should be binary compatible

I didn't realise HeeksCAD was still being developed, I thought it was abandoned....nice to hear it is not abandoned.
hamish
Posts: 72
Joined: Wed Nov 12, 2014 7:08 am

Re: Assembly 2 workbench for FreeCAD v0.15

Postby hamish » Sun Nov 30, 2014 3:59 pm

Hi danielfalck, thanks for posting your files.
The problem is that unsolvable constraints have been specified:
[*] a plane constraint is setup between cube1,face5 and cube2,face4
[*] a plane constraint is setup between cube1,face5 and cube2,face1
which cannot be done.

A user-friendly code would have warned the user of this, so my apologies for that.
My recomendation if you encounter this error in the future is to delete the constraints, and re-add them.
hamish
Posts: 72
Joined: Wed Nov 12, 2014 7:08 am

Re: Assembly 2 workbench for FreeCAD v0.15

Postby hamish » Sun Nov 30, 2014 4:02 pm

Thanks for the all the encouragement everyone.
To avoid undue credit, i have a disclaimer to make.
Namely, the workflow for the Assembly 2 workbench is based upon that what i remeber when i used autodesk inventor a couple of years back.
So please do not credit me for that part of the work.
danielfalck
Posts: 395
Joined: Fri Oct 07, 2011 8:58 pm
Location: Beaverton,Oregon, USA
Contact:

Re: Assembly 2 workbench for FreeCAD v0.15

Postby danielfalck » Sun Nov 30, 2014 4:20 pm

Sorry for my ignorance. I use Pro/E Creo at work, where one will select faces or other features on two different parts and then choose the type of constraint needed. I have a feeling that I am using the wrong sequence of keyboard/mouse clicks. Is holding a ctrl key needed? Select one face, select another face, then click the 'Add a plane constraint' icon- or is it select the icon first then select the faces?

Could you post a tutorial showing the workflow for this?
Thanks.
Last edited by danielfalck on Sun Nov 30, 2014 9:50 pm, edited 1 time in total.
Reason: I realized that we might be thinking in terms of totally different CAD workflows.
hamish
Posts: 72
Joined: Wed Nov 12, 2014 7:08 am

Re: Assembly 2 workbench for FreeCAD v0.15

Postby hamish » Mon Dec 01, 2014 8:54 am

Assembly 2 workbench git repo updated, as to make the constraint direction property more intuitive.
Take note that this update does not support constraint objects created using the previous version of assembly 2 wb;
so the constraints will have to be redefined in already existing assembly files.
(not user-friendly i know :( but trying to keep the code clean...)
hamish
Posts: 72
Joined: Wed Nov 12, 2014 7:08 am

Re: Assembly 2 workbench for FreeCAD v0.15

Postby hamish » Wed Dec 03, 2014 7:41 am

Hi danielfalck, i have added some user-friendliness to the solver code.
A dialog now pops up if the constraint solver fails, giving the user advice on how to remedy the problem.
With regard to a tutorial, what i have done is created a screen recording of the assembly2 wb in action.
Have a look at https://www.youtube.com/watch?v=dhaYJKDk4GI