feature req: Part WB - aditionally reference cube and cylinder at their midpoints
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
feature req: Part WB - aditionally reference cube and cylinder at their midpoints
Hello everybody,
(I already posted this message to "developers' corner - which was not the right place. Sorry for that)
I can hardly believe that this has not already been discussed in depth, but I could not find it.
So please apologize if I'm warming up really old stuff.
In my daily work, more than half of my parts are somehow symmetric. And cubes and cylinders are always involved.
I'm easily creating them in the Part work bench. When it now comes to resizing the parts, cubes or cylinders move out of their position, as they are referenced at a corner (cube) or the bottom (cylinder). In many circumstances this makes sense - but in the context of symmetric parts, it does not, because I always have to do two steps: resize AND reposition.
Wouldn't it be a good idea to offer the user a choice - reference your cube or cylinder
* either as it is now, or
* in addition - at the midpoint of the part ?
Ball and torus already have midpoint as reference - so hopefully it's not so complicated to use code from these to cube and cylinder.
Looking forward to your comments.
Wolf
(I already posted this message to "developers' corner - which was not the right place. Sorry for that)
I can hardly believe that this has not already been discussed in depth, but I could not find it.
So please apologize if I'm warming up really old stuff.
In my daily work, more than half of my parts are somehow symmetric. And cubes and cylinders are always involved.
I'm easily creating them in the Part work bench. When it now comes to resizing the parts, cubes or cylinders move out of their position, as they are referenced at a corner (cube) or the bottom (cylinder). In many circumstances this makes sense - but in the context of symmetric parts, it does not, because I always have to do two steps: resize AND reposition.
Wouldn't it be a good idea to offer the user a choice - reference your cube or cylinder
* either as it is now, or
* in addition - at the midpoint of the part ?
Ball and torus already have midpoint as reference - so hopefully it's not so complicated to use code from these to cube and cylinder.
Looking forward to your comments.
Wolf
- DeepSOIC
- Veteran
- Posts: 7896
- Joined: Fri Aug 29, 2014 12:45 am
- Location: used to be Saint-Petersburg, Russia
Re: feature req: Part WB - aditionally reference cube and cylinder at their midpoints
Hi!
You can achieve what you want by binding expressions to Cube.Placement. If that's too tedious, you can create a macro.
It becomes a little bit more important when dealing with attachment (in v0.17). But you can still do the same using expressions, now to superPlacement.
You can achieve what you want by binding expressions to Cube.Placement. If that's too tedious, you can create a macro.
It becomes a little bit more important when dealing with attachment (in v0.17). But you can still do the same using expressions, now to superPlacement.
Re: feature req: Part WB - aditionally reference cube and cylinder at their midpoints
Hi, thanks for your reply.
Sorry that I cannot understand what you are writing. I'm not into python and coding - just a user who had an idea which may make life a little easier...
Cheers,
Wolf
Sorry that I cannot understand what you are writing. I'm not into python and coding - just a user who had an idea which may make life a little easier...
Cheers,
Wolf
Re: feature req: Part WB - aditionally reference cube and cylinder at their midpoints
Expressions are not only for python programmers, although programming skills are helpful. Almost everywhere when you have an edit field for entering a distance you can use an expression instead: https://www.freecadweb.org/wiki/Expressions. It is the blue f(x) symbol. Sidenote: Expressions are extremely helpful to make a model robust against topological naming issues.
I will attach a file later.
I will attach a file later.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: feature req: Part WB - aditionally reference cube and cylinder at their midpoints
Here is a file, that contains a cube and a cylinder. The cube is using expressions for X and Y placement to be centered at the center of the cylinder. When you move the cylinder in X or Y direction the cube stays centered.
Watchout: If you want to see or change the expressions don't use the placement dialog! Use the data tab instead.
Watchout: If you want to see or change the expressions don't use the placement dialog! Use the data tab instead.
- Attachments
-
- exprDemoCubeCenter.FCStd
- (3.65 KiB) Downloaded 29 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: feature req: Part WB - aditionally reference cube and cylinder at their midpoints
Thank you for your hint, good to know about the "expressions" feature anyway.
But I think, it does not have to do so much with my request, my major concern is items changing their position when resized.
W
But I think, it does not have to do so much with my request, my major concern is items changing their position when resized.
W
Re: feature req: Part WB - aditionally reference cube and cylinder at their midpoints
They don't, if you fix the midpoint by means of expressions to a certain point in 3D space. Please have a look at the example I gave above and change the length of the cube: The middle stays in the middle of the cylinder.herrdeh wrote:Thank you for your hint, good to know about the "expressions" feature anyway.
But I think, it does not have to do so much with my request, my major concern is items changing their position when resized.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: feature req: Part WB - aditionally reference cube and cylinder at their midpoints
It's not the first time it is discussed.
I totally agree with you, mostly all part primitives are created with its centre in the origin. It doesn't happens with the cube and it could be tedious to after its creation to place it back where you wanted to be placed (as it has been said with the help of expressions).
IMHO the cube primite should be revised in order to change this behaviour or to add a new "origin parameter", I guess it is not very difficult for any skilled coder to change or add this new parameter...
I totally agree with you, mostly all part primitives are created with its centre in the origin. It doesn't happens with the cube and it could be tedious to after its creation to place it back where you wanted to be placed (as it has been said with the help of expressions).
IMHO the cube primite should be revised in order to change this behaviour or to add a new "origin parameter", I guess it is not very difficult for any skilled coder to change or add this new parameter...
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
Re: feature req: Part WB - aditionally reference cube and cylinder at their midpoints
I agree with you, a option called "reference point, corner, midpoint" could be very useful.
Estudié ingeniería técnica industrial en España y sólo me ha servido para estar en el paro, no me contratan porque no tengo experiencia, y no tengo experiencia porque no me contratan. No debí estudiar esa carrera.
Re: feature req: Part WB - aditionally reference cube and cylinder at their midpoints
Do we have a volunteer to make a high quality feature request on the tracker and reference the issue here so it doesn't get lost?
"fight the good fight"