Sorry, I can not understand what you mean. What is a non-icon constraint? Do you mean by this something like the two arrows on the points to which a symmetry with respect another point or a line are set?where the non-icon constraints are setup for drawing. It should be a minor change to adapt this code to display the same way the icon is displayed.
Suggestion for Symmetry Constrant Symbol Enhancement
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Suggestion for Symmetry Constrant Symbol Enhancement
Re: Suggestion for Symmetry Constrant Symbol Enhancement
There are constraints which are not represented by a icon but by additional drawings and text eg angular constrainrs and distance constraints. I can't check the exact line number right now, but I will get back to you with that info.
hope that is more clear,
cheers
hope that is more clear,
cheers
Re: Suggestion for Symmetry Constrant Symbol Enhancement
Ok. I am having problems following it.
So interpreting the previous message with this new information.
... then it should be a minor change to adapt this code (that if I understood correctly is able to paint a symmetry constraint), to display (the symmetry constraint?) the same way the icon (the symmetry icon?) is displayed...
... but then, why should I want to use some code that is available where the constraints not having an icon are drawn to adapt it to draw the same icon that the current code currently draws?
I am really really sorry. I am not an english native speaker and I am really missing something. But I can not understand what ...
So interpreting the previous message with this new information.
So in the code, in the place where constraints not having an icon are drawn, there is code for displaying "a" symmetry constraint. I do not know what exactly you mean with the double quotes "a" (it is a special one, a different one, this code is commented or unused?). Ok, I understand there is some code that would draw a symmetry constraint (of some type)...I had a look at this a while back and if I recall correctly, there is code for displaying "a" symmetry constraint where the non-icon constraints are setup for drawing. It should be a minor change to adapt this code to display the same way the icon is displayed."
... then it should be a minor change to adapt this code (that if I understood correctly is able to paint a symmetry constraint), to display (the symmetry constraint?) the same way the icon (the symmetry icon?) is displayed...
... but then, why should I want to use some code that is available where the constraints not having an icon are drawn to adapt it to draw the same icon that the current code currently draws?
I am really really sorry. I am not an english native speaker and I am really missing something. But I can not understand what ...
Re: Suggestion for Symmetry Constrant Symbol Enhancement
Hi Abdullah
Firstly I would think that your work here making the current symmetry icon align to the line of symmetry is a good idea as it is.
It is a small change from a gui perspective (I know nothing of the changes to code but I assume it is not a large or invasive change). But it greatly helps with identifying what the symmetry applies to.
I would think it is a simple small change that deserves to be pulled into master as it is. This does not mean that you or someone else could not decide to extend it further in the future.
However if you are interested in doing something more extensive I have an idea. I have no idea how easy or hard this would be to code or if it is even possible. But here is an idea.
I don't know if my idea is realistic or not.
Jim
Firstly I would think that your work here making the current symmetry icon align to the line of symmetry is a good idea as it is.
It is a small change from a gui perspective (I know nothing of the changes to code but I assume it is not a large or invasive change). But it greatly helps with identifying what the symmetry applies to.
I would think it is a simple small change that deserves to be pulled into master as it is. This does not mean that you or someone else could not decide to extend it further in the future.
However if you are interested in doing something more extensive I have an idea. I have no idea how easy or hard this would be to code or if it is even possible. But here is an idea.
- Think of the distance constraint, it has a value and two arrows, think of how you can drag it around to move it to a visually more pleasing or less confusing location if desired.
- Now imagine that when the number is displayed in distance constraint, that instead it had the symmetry symbol.
- Also imagine that the arrows were three rather than two, and that they radiated from the symmetry icon rather than being on the same line like distance constraint.
- Imagine that the arrow head points where fixed at the points being controlled by symmetry constraint (or lines and points combination) and that the other end of the arrow lines stayed fixed relative to where ever one dragged the symmetry icon
I don't know if my idea is realistic or not.
Jim
Re: Suggestion for Symmetry Constrant Symbol Enhancement
I agree. I am waiting for your answer: did you manage to fit the football team in the motorcycle?Firstly I would think that your work here making the current symmetry icon align to the line of symmetry is a good idea as it is. It is a small change from a gui perspective (I know nothing of the changes to code but I assume it is not a large or invasive change). But it greatly helps with identifying what the symmetry applies to.I would think it is a simple small change that deserves to be pulled into master as it is.
Seriously, if you can improve the spacing it would be great. If not, just let me know.
I would like to think about your idea with some calm. Today is not my best day...However if you are interested in doing something more extensive I have an idea. I have no idea how easy or hard this would be to code or if it is even possible. But here is an idea.
Re: Suggestion for Symmetry Constrant Symbol Enhancement
Hi Abdullah,
The code I'm referring to is first setup in ViewProviderSketch.cpp @ line 3193 and the drawing code is in SoDatumLabel.cpp @ line 336, master branch at github. When I said `"a" symmetry constraint` I wanted to suggest the symbol drawn was not the same as the normal symbol. If you look at nahshons post viewtopic.php?p=60443#p60443 there is the normal symmetry icon and one arrow from each symmetry endpoint. These two extra arrows are what the code I am talking about is drawing or at least something similar.
The normal symmetry icon is approximately the two arrowheads drawn at the midpoint with no lines from the endpoints to the arrowheads. I don't remember exactly what I did to make these arrows visible, but I think it was just a matter of scaling( ie the arrows were already drawn but they weren't scaled correctly). I could be wrong though. I don't know if you are interested in using this code but it's already there. The main advantage is you don't need to rotate the icon, and if you want to draw more than a small icon you can start from there. It's just a suggestion.
The code I'm referring to is first setup in ViewProviderSketch.cpp @ line 3193 and the drawing code is in SoDatumLabel.cpp @ line 336, master branch at github. When I said `"a" symmetry constraint` I wanted to suggest the symbol drawn was not the same as the normal symbol. If you look at nahshons post viewtopic.php?p=60443#p60443 there is the normal symmetry icon and one arrow from each symmetry endpoint. These two extra arrows are what the code I am talking about is drawing or at least something similar.
The normal symmetry icon is approximately the two arrowheads drawn at the midpoint with no lines from the endpoints to the arrowheads. I don't remember exactly what I did to make these arrows visible, but I think it was just a matter of scaling( ie the arrows were already drawn but they weren't scaled correctly). I could be wrong though. I don't know if you are interested in using this code but it's already there. The main advantage is you don't need to rotate the icon, and if you want to draw more than a small icon you can start from there. It's just a suggestion.
Re: Suggestion for Symmetry Constrant Symbol Enhancement
Hi all
To be honest I had not understood what DevJohan and nahshons were talking about either until DevJohan's last post above.... Now I finally get it!
If you compile Jürgen's development branch "Assembly2" which with yesterday's updates now compiles for me on Kubuntu 14.04 64bit, and create a sketch with a rectangle with a diagonally opposed symmetry constraint on origin and then drage the rectangle from square to long and skinny or short and fat (highly technical geometric terminology there! ) you can see how those arrows work with the current icon.
Indeed this does something with similarities to what I suggested.
I have made some screen shots here.
OS: Ubuntu 14.04.1 LTS
Platform: 64-bit
Version: 0.14.3772 (Git)
Branch: dev-assembly2
Hash: dffff67f7430ea5af1dc1d6202413af664d74943
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 think
I’ll come back to you on that shortly.
Jim
To be honest I had not understood what DevJohan and nahshons were talking about either until DevJohan's last post above.... Now I finally get it!
If you compile Jürgen's development branch "Assembly2" which with yesterday's updates now compiles for me on Kubuntu 14.04 64bit, and create a sketch with a rectangle with a diagonally opposed symmetry constraint on origin and then drage the rectangle from square to long and skinny or short and fat (highly technical geometric terminology there! ) you can see how those arrows work with the current icon.
Indeed this does something with similarities to what I suggested.
I have made some screen shots here.
OS: Ubuntu 14.04.1 LTS
Platform: 64-bit
Version: 0.14.3772 (Git)
Branch: dev-assembly2
Hash: dffff67f7430ea5af1dc1d6202413af664d74943
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 think
- if we added Abdullah's rotating icon to the Assembly2 style symmetry constraint symbols, it would produce a great result.
- another useful advancement could be to make the arrows directly selectable and pre-selectable and possibly even be able to drag them closer to, or further away from, the symmetry point.
abdullah wrote:I agree. I am waiting for your answer: did you manage to fit the football team in the motorcycle?
Seriously, if you can improve the spacing it would be great. If not, just let me know.
I’ll come back to you on that shortly.
Jim
Re: Suggestion for Symmetry Constrant Symbol Enhancement
Ok!!!
Now I understand you Johan!!!
Yes I am interested in that. Thanks!!
I am going to look into it. I agree with Jim. I want the icon definitely rotated. It gives a much better user experience, it is much more clear. But I also like the arrows, so probably the combination would be great... Starting from there (if I arrive there), I will see about dragging the arrows.
Thanks to you all for your feedback!!!
Now I understand you Johan!!!
Yes I am interested in that. Thanks!!
I am going to look into it. I agree with Jim. I want the icon definitely rotated. It gives a much better user experience, it is much more clear. But I also like the arrows, so probably the combination would be great... Starting from there (if I arrive there), I will see about dragging the arrows.
Thanks to you all for your feedback!!!
Re: Suggestion for Symmetry Constrant Symbol Enhancement
Hi all
Abdullah I had a look at that symmetry icon....my new icon is not much better. I just moved the two halves further apart, I think it does look a bit better. The difference is subtle, I compiled my new 16px version into a FreeCAD and you can't see much or any difference...
here is the current icon from master today top left, beside it on the right is my modified icon from today, for get the lower left, the lower right is the simplified svg file from which the smalle xpm file can be exported from Inkscape.
this zip contains the above files and some exported in png and xpm at both 16 and 32 px, of course you only needed the one svg and one xpm, but I zipped them all up together, if you would like to have a look at them.
in this next picture below you can see the current/old icon in the tool bar and at origin.
and this is what my new one would look like
I don't see much, if any, difference.
Jim
Abdullah I had a look at that symmetry icon....my new icon is not much better. I just moved the two halves further apart, I think it does look a bit better. The difference is subtle, I compiled my new 16px version into a FreeCAD and you can't see much or any difference...
here is the current icon from master today top left, beside it on the right is my modified icon from today, for get the lower left, the lower right is the simplified svg file from which the smalle xpm file can be exported from Inkscape.
this zip contains the above files and some exported in png and xpm at both 16 and 32 px, of course you only needed the one svg and one xpm, but I zipped them all up together, if you would like to have a look at them.
in this next picture below you can see the current/old icon in the tool bar and at origin.
and this is what my new one would look like
I don't see much, if any, difference.
Jim
Re: Suggestion for Symmetry Constrant Symbol Enhancement
I managed to recover the arrows (good pointers Johan!). The problem is explained in the git comment.
To https://github.com/abdullahtahiriyo/Fre ... master.git
6f66964..0e457de sketcher_symmetry_constraint -> sketcher_symmetry_constraint
Now it looks like this: I can change the size of the arrows, I think this is a suitable size, but let me know if you think otherwise.
Give it a try, before I pull request it.
Now I am going to integrate your icon...
To https://github.com/abdullahtahiriyo/Fre ... master.git
6f66964..0e457de sketcher_symmetry_constraint -> sketcher_symmetry_constraint
Now it looks like this: I can change the size of the arrows, I think this is a suitable size, but let me know if you think otherwise.
Give it a try, before I pull request it.
Now I am going to integrate your icon...