Merging hamish2014/assembly2 into v0.17, help wanted

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Merging hamish2014/assembly2 into v0.17, help wanted

Post by triplus »

DeepSOIC wrote:Well, full container support will most likely require making a new assembly2, independent of 0.15/0.16 assembly2.
Therefore assembly3. ;)
But rudimentary container support such as extracting a Part from a 0.17 document is definitely doable, is quite easy, and should be added to the current assembly2.
I see. Well that makes sense.
efyx
Posts: 280
Joined: Fri Sep 26, 2014 7:36 pm

Re: Merging hamish2014/assembly2 into v0.17, help wanted

Post by efyx »

..and btw ;) some kind of inverse kinetic solver - even simple to check movement (not animation) please ;)
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Merging hamish2014/assembly2 into v0.17, help wanted

Post by triplus »

efyx wrote:..and btw ;) some kind of inverse kinetic solver - even simple to check movement (not animation) please ;)
Well yeah. There is always something more that could be achieved in the future and that is a good thing. For example in the past you couldn't add dimensions to FreeCAD drawings.

P.S. And that has changed.
efyx
Posts: 280
Joined: Fri Sep 26, 2014 7:36 pm

Re: Merging hamish2014/assembly2 into v0.17, help wanted

Post by efyx »

triplus wrote:Well yeah. There is always something more that could be achieved in the future and that is a good thing.
..as we talk about that ;), also 3 new constrains would be welcome warm 8-)
- symmetric - two faces of object and for example plane;
- width - for exampe, you want to put square into larger square cutout, you choose one side of square, 2nd side od square then side of cutout and 2nd side of cutout and it positioning square right into middle;
- center of faces - for example you have to join square and tube, you choose round face (it finds its center), you choose square (it find its center) and join them by that point.

If needed I can perform some darwings to explain.
User avatar
r-frank
Veteran
Posts: 2180
Joined: Thu Jan 24, 2013 6:26 pm
Location: Möckmühl, Germany
Contact:

Re: Merging hamish2014/assembly2 into v0.17, help wanted

Post by r-frank »

DeepSOIC wrote: So if there is anyone else wanting to do that... R-frank ;) ?
I'll contact hamish and volunteer for ownership/maintainership.
Deutsche FreeCAD Tutorials auf Youtube
My GrabCAD FreeCAD-Projects
FreeCAD lessons for beginners in english

Native german speaker - so apologies for my english, no offense intended :)
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Merging hamish2014/assembly2 into v0.17, help wanted

Post by triplus »

efyx wrote:If needed I can perform some darwings to explain.
I can't predict the future. From the debate what is likely to happen is @r-frank will fork the repo or take ownership of the existing one and @DeepSOIC will try to add rudimentary container support to it. Therefore FreeCAD 0.17 should still be supported by the assembly2 in a way it works now in FreeCAD 0.16.

Beyond that there is no current plan to do anything. Likely that should be noted on the repo as i do expect overwhelming list of issue reports and new request could flood it. ;)
User avatar
easyw-fc
Veteran
Posts: 3630
Joined: Thu Jul 09, 2015 9:34 am

Re: Merging hamish2014/assembly2 into v0.17, help wanted

Post by easyw-fc »

efyx wrote: ..as we talk about that ;), also 3 new constrains would be welcome warm 8-)
- symmetric - two faces of object and for example plane;
- width - for exampe, you want to put square into larger square cutout, you choose one side of square, 2nd side od square then side of cutout and 2nd side of cutout and it positioning square right into middle;
- center of faces - for example you have to join square and tube, you choose round face (it finds its center), you choose square (it find its center) and join them by that point.
Hi,
I made this macro to align non cylindrical parts or center Faces and/or Edges
viewtopic.php?f=22&t=18655
it can be useful in Assembly2, but it doesn't create any fixed constraint
Maurice
User avatar
CADennis
Posts: 31
Joined: Tue Apr 18, 2017 10:12 am

Re: Merging hamish2014/assembly2 into v0.17, help wanted

Post by CADennis »

Dear FreeCAD developers. I am new to your forum. I joined this week because your tool was of great help recently. I enjoyed it and want to "give back".

So I digged into your open issues and found that Hamish asked for maintenance of his assembly2 addon. To get that addon under control, but unlikely in the future take over ownership as asked by Hamish, my strategy is to
(1.) reduce the degrees of freedom in his Python code. That means to change the dynamic typing to static typing via mypy, starting at the leaves of the dependency graphs, then working my way up.
(2.) after that, write unit tests and ask assembly2 users for macros to collect regression tests.
(3.) fix bugs, write extensions, enhance functionality.
I really don't want to start with Python2.x again. I found your discussions on moving over to Python3.x years back and some success reports in 2016.

Naively, I just tried to vary the Travis build configuration matrix along Python versions beyond "2.7". But the Python version picked by Travis is not propagated down into CMake: Travis and make reuse sources and binaries as cached from other Python version builds. (I think it is good to have your build system independent from Travis. I don't like Travis and similar ecosystems, much prefer Jenkis+GitHubPlugin+docker for continuous integration and Launchpad/... for continuous delivery. Travis is just a big fuzzy hack somewhere in between.)

So for a local build, where do I switch from Python 2.7 to Python 3.x and have sources generated and compiled accordingly? I can take care of switching the Python virtual environment manually if required, but where to instruct code generators etc.?
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Merging hamish2014/assembly2 into v0.17, help wanted

Post by triplus »

Hi @CADennis.

Unfortunately Python 3 port is not finished yet. And i do feel Python2/3 FreeCAD builds will be available in foreseeable future. Therefore i do imagine it would make sense for you to write Python2/3 compatible code for now.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Merging hamish2014/assembly2 into v0.17, help wanted

Post by looo »

There are two problems with python3: 1. master is not python3 compatible, 2. nobody use it.
currently there are not many references for building with python3:
http://freecadweb.org/wiki/index.php?title=Python_3
python3 branch currently up to date with master:
https://github.com/looooo/FreeCAD/commits/py3-26
Post Reply