Element widget for Sketcher WB

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
jmaustpc
Posts: 9566
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Element widget for Sketcher WB

Postby jmaustpc » Tue Sep 02, 2014 7:53 am

Hi Abdullah
I was just now testing your elements widget in master

OS: Ubuntu 14.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.15.3976 (Git)
Branch: master
Hash: f647f254903047d7b410e878fbf465f91021b654
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
SoQt version: 1.6.0a
OCC version: 6.7.1


I just realised that it does not support external geometry. It does support construction mode elements, but not external geometry linked elements.

I have created a feature request and assigned it to you....I hope that is OK with you...if not I will unassigned it. :)

Jim
jmaustpc
Posts: 9566
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Element widget for Sketcher WB

Postby jmaustpc » Tue Sep 02, 2014 8:00 am

@ Abdullah
This is the feature request on the bug tracker

issue #1728

by the way I think congratulations are in order....if I am not mistaken this is your first ticked assigned to you relating to code in master..!!! :)

Jim
abdullah
Posts: 3174
Joined: Sun May 04, 2014 3:16 pm

Re: Element widget for Sketcher WB

Postby abdullah » Sat Sep 06, 2014 9:21 am

Thanks!! Well it is ok to assign it to me... I will take a look after the ellipse implementation...
jmaustpc
Posts: 9566
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Element widget for Sketcher WB

Postby jmaustpc » Sat Sep 27, 2014 11:02 am

This topic was just about to be bumped off the first page of topics one the developer's forum, it was the last item....not any more! :)

I noticed a while back that external geometry items are not supported in you element selector tool and I kept forgetting to ask...is this intended, or a bug or is this post of mine a feature request? :)
elementsselectorexternalgeometrynotsupported.jpg
elementsselectorexternalgeometrynotsupported.jpg (39.77 KiB) Viewed 2027 times
Jim
abdullah
Posts: 3174
Joined: Sun May 04, 2014 3:16 pm

Re: Element widget for Sketcher WB

Postby abdullah » Sat Sep 27, 2014 2:13 pm

Hi Jim!

I know I have it assigned to me. I was planning to do it after ellipse support, but I will try to do it this week.

It wasn't included in the original package because:
1. I have never used external geometry :oops:
2. I was totally unaware of it.

What you can do to help me is upload that freecad file (or any other using exrernal geo), so that I can test the implementation...
:)
abdullah
Posts: 3174
Joined: Sun May 04, 2014 3:16 pm

Re: Element widget for Sketcher WB

Postby abdullah » Sat Sep 27, 2014 5:15 pm

Hi Jim!!

I did something (basically add all the external elements to the widget), apparently everything started working "out of the box", which I was not expecting as I am not aware of all the implications of working with external geometry (constraints working?). Therefore I can only tell you: it seems (to me) it works, but someone knowing how to work with external geometry (knowing how to expect from working with it) shall test very well the widget before we can propose this for master.

Specially, anyone using python with FreeCAD, this "Edge-3" is what you would expect as extended name, or more "ExternalEdge3", or does not matter??
elementwidget1.png
elementwidget1.png (54.43 KiB) Viewed 1997 times
Let me know if you find any bug, or anything does not work as expected...

Code:
https://github.com/abdullahtahiriyo/Fre ... master.git
* [new branch] elementwidget_externalgeometry

If you have some idea and want to create "specific icons" (circle, line, arc,...) for the external geometry, I can integrate them. Do not feel compelled to do it, just if you find it useful and want...
jmaustpc
Posts: 9566
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Element widget for Sketcher WB

Postby jmaustpc » Sat Sep 27, 2014 5:49 pm

I'll try it and think about it.

My first thought is that all external geometry elements should just use the same icons as their equivalent normal entities, as this is what we do with construction geometry.

Here is a multi step model using quite a few construction lines and external geometry (point, line, arc and circle).
fancy_block_external_geometry_examples1.fcstd
(115.01 KiB) Downloaded 29 times
the file was made in FreeCAD from today's master, with both the auto-refine options turned off.

OS: Ubuntu 14.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.15.4087 (Git)
Branch: master
Hash: f0bf3cb6abba823ef152f616780bde6beb7e2740
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.7.1

fancyboxexternalgeometrytest.jpg
fancyboxexternalgeometrytest.jpg (22.46 KiB) Viewed 1991 times

:)

Jim
abdullah
Posts: 3174
Joined: Sun May 04, 2014 3:16 pm

Re: Element widget for Sketcher WB

Postby abdullah » Sun Sep 28, 2014 4:49 am

jmaustpc wrote:I'll try it and think about it.

My first thought is that all external geometry elements should just use the same icons as their equivalent normal entities, as this is what we do with construction geometry.
Of course, in addition and only if you want and find it useful, construction geometry can also be differentialed. This is your choice.
jmaustpc wrote: Here is a multi step model using quite a few construction lines and external geometry (point, line, arc and circle).
Beautiful!! :shock: I played a little bit with it. I see no strange behaviour... but I am new to external geometry... I wait for your tests...
abdullah
Posts: 3174
Joined: Sun May 04, 2014 3:16 pm

Re: Element widget for Sketcher WB

Postby abdullah » Thu Oct 02, 2014 1:44 pm

Jim,

when you have this tested, let me know, so that I ask for the pull request...
jmaustpc
Posts: 9566
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Element widget for Sketcher WB

Postby jmaustpc » Thu Oct 02, 2014 5:14 pm

Hi Abdullah
I Have compiled it, and started testing...I'll come back to it soon.

Jim