Element widget for Sketcher WB

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Element widget for Sketcher WB

Post by jmaustpc »

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
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Element widget for Sketcher WB

Post by jmaustpc »

@ 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
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Element widget for Sketcher WB

Post by abdullah »

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

Re: Element widget for Sketcher WB

Post by jmaustpc »

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 3699 times
Jim
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Element widget for Sketcher WB

Post by abdullah »

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
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Element widget for Sketcher WB

Post by abdullah »

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 3669 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
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Element widget for Sketcher WB

Post by jmaustpc »

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 58 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 3663 times

:)

Jim
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Element widget for Sketcher WB

Post by abdullah »

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
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Element widget for Sketcher WB

Post by abdullah »

Jim,

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

Re: Element widget for Sketcher WB

Post by jmaustpc »

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

Jim
Post Reply