[merged] PR #4835 New sketch object rounded rectangle
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Posts: 225
- Joined: Fri Apr 26, 2019 3:14 pm
Re: PR #4835 New sketch object rounded rectangle
Because of beeing afraid of beeing misunderstood:
imho a object ( special case rectangle - here ) could always be intrinsic constraint ... the (intrinisc) constrains force the vertexes among themselves into a certian relationship.
... while some (rather) extrinsic constraints define the relative position of the given Object in relation to the origin or other objects of the 3d space the object is exsitng in.
What will happen if a vertex in the e.g. rectangle get's deleted or split ... ?
Just to keep in Mind.
Regards,
Stefan
imho a object ( special case rectangle - here ) could always be intrinsic constraint ... the (intrinisc) constrains force the vertexes among themselves into a certian relationship.
... while some (rather) extrinsic constraints define the relative position of the given Object in relation to the origin or other objects of the 3d space the object is exsitng in.
What will happen if a vertex in the e.g. rectangle get's deleted or split ... ?
Just to keep in Mind.
Regards,
Stefan
Re: PR #4835 New sketch object rounded rectangle
There are some corners of what exactly to do with some constraints, but I think that what is shown above is in line with what you say.C_h_o_p_i_n wrote: ↑Fri Jun 18, 2021 4:30 pm Because of beeing afraid of beeing misunderstood:
imho a object ( special case rectangle - here ) could always be intrinsic constraint ... the (intrinisc) constrains force the vertexes among themselves into a certian relationship.
... while some (rather) extrinsic constraints define the relative position of the given Object in relation to the origin or other objects of the 3d space the object is exsitng in.
What will happen if a vertex in the e.g. rectangle get's deleted or split ... ?
Just to keep in Mind.
Regards,
Stefan
Re: PR #4835 New sketch object rounded rectangle
Of course, the commitment is not "make it rotatable by guessing what the user may want to constraint", but just "remove alignment to axes". This weaker commitment appears to match user expectations without too much automation.
So that not all are cheers:
So that not all are cheers:
Re: PR #4835 New sketch object rounded rectangle
Ok. Today I coded this tool to remove alignment with axes on a selection. It may not be absolutely polished yet, but it works nice with your rounded rectangle that I have modified to use horizontal/vertical constraints.uwestoehr wrote: ↑Mon Jun 14, 2021 7:14 pm Good point. Geometrically a rounded rectangle is a special case of a rectangle, and thus should maybe appear under the rectangle icon, not the slot.
However, the slot is a special case of a rounded rectangle, there 2 parallel lines have the length zero. And a circle is a special case of a slot
So you are right, maybe we don't group the rounded rectangle under the slot but under the rectangle.
I do not have much time. If you could modify the PR (or make a new PR if you want to keep that one for the moment), so that:
1. The rounded rectangle is under the rectangle.
2. The rounded rectangle is created with horizontal/vertical constraints instead of parallel/perpendicular
then, I could merge this PR and my tool one after the other. What do you think?
Re: PR #4835 New sketch object rounded rectangle
This is a very good balance between convenience and not too much automation. What would happen if you have a vertical constraint between two or all three of the arc centers?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: PR #4835 New sketch object rounded rectangle
As for now, alignment constraints (vertical/horizontal on points) are left in the model unchanged. I do not think there is "a way" to handle these constraints transparently in a general case. I think this belongs to the user.
Re: PR #4835 New sketch object rounded rectangle
My idea ATM is to merge it and let you guys play with it. You will tell me how it goes.
Of course we can improve it. There will be corner cases (there might be a huge corner I did not test too ).
For me it was sufficient that it covers the general case of existing complex geometries, as this enables to split creation following stable constraints from creation following convenient constraints and avoid having to provide specific code for each.
If there is demand from users wanting the convenient as default, we can add a preference to run the tool just after the creation of the complex geometry. However, the tool works in one direction only, from stable to convenient...
Re: PR #4835 New sketch object rounded rectangle
Yes, this the issue I am aware of and which I cannot resolve and thus requested for help. I must have a thinko somewhere in my code. I had now a look again but still cannot find out what I am doing wrong.
Re: PR #4835 New sketch object rounded rectangle
Very good. I will start doing this hopefully tomorrow.abdullah wrote: ↑Sat Jun 19, 2021 7:06 am I do not have much time. If you could modify the PR (or make a new PR if you want to keep that one for the moment), so that:
1. The rounded rectangle is under the rectangle.
2. The rounded rectangle is created with horizontal/vertical constraints instead of parallel/perpendicular
then, I could merge this PR and my tool one after the other.
And your rotateable tool is very nice!