Support for assembly2 continuing

Info about new implemented features, classes, modules or APIs. Might get technical!
User avatar
easyw-fc
Posts: 604
Joined: Thu Jul 09, 2015 9:34 am

Re: Support for assembly2 continuing

Postby easyw-fc » Sun Dec 04, 2016 6:03 pm

yorik wrote:you could make a helper function like this, that should work for both 0.16 and 0.17:

Code: Select all

def isLine(something):
    if hasattr(Part,"LineSegment"):
        return isinstance(something,(Part.Line,Part.LineSegment))
    else:
        return isinstance(something,Part.Line)

great @yorik!
that's exactly what I was looking for...
this is working in both FC releases with a simple and clean solution :D ...
I only still have a warning message on FC 0.17

Code: Select all

DeprecationWarning: For future usage 'Curve' will return 'Line' which is infinite instead of the limited 'LineSegment'.
If you need a line segment then use this:
Part.LineSegment(edge.Curve,edge.FirstParameter,edge.LastParameter)To suppress the warning set BaseApp/Preferences/Mod/Part/General/LineOld to false
DeprecationWarning: For future usage 'Curve' will return 'Line' which is infinite instead of the limited 'LineSegment'.
If you need a line segment then use this:
Part.LineSegment(edge.Curve,edge.FirstParameter,edge.LastParameter)To suppress the warning set BaseApp/Preferences/Mod/Part/General/LineOld to false

that I have to investigate further to discover where is coming from...
thx again
Maurice
User avatar
easyw-fc
Posts: 604
Joined: Thu Jul 09, 2015 9:34 am

Re: Support for assembly2 continuing

Postby easyw-fc » Sun Dec 04, 2016 9:38 pm

PR https://github.com/hamish2014/FreeCAD_a ... 2/pull/127
- added function to manage Part.Line and Part.LineSegment in FC 0.16 and FC 0.17 (ref. FC PR #359)
(thx to @yorik ; to do: find how to remove warning message in Report panel)
- allow to constraint circular edges and faces
new-faces-constraint.gif
new-faces-constraint.gif (838.86 KiB) Viewed 545 times
User avatar
yorik
Site Admin
Posts: 8563
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Support for assembly2 continuing

Postby yorik » Mon Dec 05, 2016 3:03 pm

easyw-fc wrote:I only still have a warning message on FC 0.17

Yes this is normal, that message is there so all python developers get warned that things are changing. In the future it will disappear. You can already remove it by setting LineOld to false as explained earlier in this thread.

BTW, hamish2014, the author of assembly2, doesn't wish to work further on his two workbenches. I've been thinking we could in a fist time move them to the FreeCAD github...
User avatar
r-frank
Posts: 1976
Joined: Thu Jan 24, 2013 6:26 pm
Location: Möckmühl, Germany
Contact:

Re: Support for assembly2 continuing

Postby r-frank » Mon Dec 05, 2016 3:12 pm

Hello yorik.

I am collaborator for the two workbenches, so i have write/push access.
Depending on hamish's wishes i guess ownership/location could be transferred but remember that there are a lot
of links in the forum pointing to hamish's user github-account ...

Roland
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 :)
User avatar
easyw-fc
Posts: 604
Joined: Thu Jul 09, 2015 9:34 am

Re: Support for assembly2 continuing

Postby easyw-fc » Mon Dec 05, 2016 3:42 pm

yorik wrote:
easyw-fc wrote:I only still have a warning message on FC 0.17

Yes this is normal, that message is there so all python developers get warned that things are changing. In the future it will disappear. You can already remove it by setting LineOld to false as explained earlier in this thread.

nice, thx


yorik wrote:BTW, hamish2014, the author of assembly2, doesn't wish to work further on his two workbenches.

not really ... see this commit: hamish2014 committed on Oct 12 2016
https://github.com/hamish2014/FreeCAD_a ... b37fdfd588
probably he just has less time to work on these wb :)

yorik wrote:I've been thinking we could in a fist time move them to the FreeCAD github...

moving to FC github a fork of these wb is a good idea to give these useful wb a more official weight... and letting hamish to be a contributor there :D
User avatar
yorik
Site Admin
Posts: 8563
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Support for assembly2 continuing

Postby yorik » Tue Dec 06, 2016 2:09 am

Aha, didn't know that roland...
Well for me it depends on hamish's wish. I remember we discussed that with him, and he said he would like to have these two modules merged in the FreeCAD code. But now I'm thinking, since the workbenches ecosystem is growing, and it becomes easier to install new workbenches, why not keep them separate, like now. But indeed then there is less reason to not leave them on hamish's github, specially if others like roland can work on it...
hehe not sure anymore what to do now :)
User avatar
sgrogan
Posts: 2999
Joined: Wed Oct 22, 2014 5:02 pm

Re: Support for assembly2 continuing

Postby sgrogan » Tue Dec 06, 2016 3:16 am

yorik wrote:hehe not sure anymore what to do now :)

IMHO nothing. @hamish was a ground breaker on how an "add-on" could work with FreeCAD. @r-frank is breaking ground on "what happens then?"
Thanks @r-frank for stepping up. From the beginning to the present, this is a model for how it could/should work.
efyx
Posts: 153
Joined: Fri Sep 26, 2014 7:36 pm

Re: Support for assembly2 continuing

Postby efyx » Tue Dec 06, 2016 7:10 am

Hi, the axial constrain works brilliant :D
but what I missing is a symmetric constrain (see picture) is it possible to add it?

Next question is it possible to add instead of animation a manipulator to see inverse kinematics? Or this is problematic?
Attachments
symmetric_constrain.png
symmetric_constrain.png (32.44 KiB) Viewed 457 times
User avatar
easyw-fc
Posts: 604
Joined: Thu Jul 09, 2015 9:34 am

Re: Support for assembly2 continuing

Postby easyw-fc » Tue Dec 06, 2016 9:09 pm

efyx wrote:Hi, the axial constrain works brilliant :D

I'm glad it works fine!
thx for the positive feedback! :)
jbe
Posts: 160
Joined: Sun Nov 10, 2013 4:18 pm
Location: France, Châteauroux

Re: Support for assembly2 continuing

Postby jbe » Thu Dec 22, 2016 8:26 pm

Hello,
I use Freecad with pupil from 13 to 16 year's old ( I am teacher in technology).

Could you do something very useful :
When we click on a constraint, could you show on the assembly, the face, the line, the circle .... that are use by this constraint.

Best regard