Feature Request: Expression engine for rectangular array creation tool.

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
jruiz
Posts: 480
Joined: Tue Oct 28, 2014 1:07 pm
Contact:

Feature Request: Expression engine for rectangular array creation tool.

Post by jruiz »

How hard would be add expression engine feature to the tool for creating rectangular pattern of the sketcher?
I have uploaded many FreeCAD video tutorials to my YouTube channel
chrisb
Veteran
Posts: 54293
Joined: Tue Mar 17, 2015 9:14 am

Re: Feature Request: Expression engine for rectangular array creation tool.

Post by chrisb »

Please give some more details. Are you talking about something happening during editing a sketch or something with a sketch? perhaps you can provide a mockup showing what the tool should do.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Feature Request: Expression engine for rectangular array creation tool.

Post by openBrain »

Actually it is already expression aware. But only through the property editor. ;)
The initial dialog isn't.
I think it is due to fact that dialog is developed in Python and expression binding isn't possible with Python UIs...
Or should I say "wasn't possible". Super good news, @wmayer recently implemented expression binding in Python API. So it is now available and thus shouldn't be a much hard work. ;)

EDIT : wmayer's related commit -> git commit ce3eadf289b18bd70ed28c35a3afe6982edf9d41
User avatar
jruiz
Posts: 480
Joined: Tue Oct 28, 2014 1:07 pm
Contact:

Re: Feature Request: Expression engine for rectangular array creation tool.

Post by jruiz »

chrisb wrote: Tue Mar 31, 2020 5:31 pm Please give some more details. Are you talking about something happening during editing a sketch or something with a sketch? perhaps you can provide a mockup showing what the tool should do.
I am talking about the tool pointed by the arrow in rectangularArrayPattern.png and the Expression engine shown in expressionEngineIcon.png to be added in what are pointed by the arrows in featureRequest.png.
Attachments
rectangularArrayPattern.png
rectangularArrayPattern.png (244.93 KiB) Viewed 787 times
expressionEngineIcon.png
expressionEngineIcon.png (1.04 KiB) Viewed 787 times
featureRequest.png
featureRequest.png (258.53 KiB) Viewed 787 times
I have uploaded many FreeCAD video tutorials to my YouTube channel
User avatar
jruiz
Posts: 480
Joined: Tue Oct 28, 2014 1:07 pm
Contact:

Re: Feature Request: Expression engine for rectangular array creation tool.

Post by jruiz »

openBrain wrote: Tue Mar 31, 2020 5:36 pm Actually it is already expression aware. But only through the property editor. ;)
Cannot find the expression engine icon for modifying the number of columns/rows ithe pattern array...
I have uploaded many FreeCAD video tutorials to my YouTube channel
kisolre
Veteran
Posts: 4166
Joined: Wed Nov 21, 2018 1:13 pm

Re: Feature Request: Expression engine for rectangular array creation tool.

Post by kisolre »

This will not be parametric. It will not create any new instances later. Also this can be only integer numbers and have meaning only at the moment of creation. Could you provide an example expression that you want to enter there?
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Feature Request: Expression engine for rectangular array creation tool.

Post by openBrain »

jruiz wrote: Tue Mar 31, 2020 6:27 pm
openBrain wrote: Tue Mar 31, 2020 5:36 pm Actually it is already expression aware. But only through the property editor. ;)
Cannot find the expression engine icon for modifying the number of columns/rows ithe pattern array...
I was talking about the rectangular array tool of Draft WB. Not one of Sketcher. Conclusion is that you should always provide details about your feature requests. :)

I think the one of Sketcher can't be expression aware as it isn't parametric. It would have no sense. ;)
User avatar
jruiz
Posts: 480
Joined: Tue Oct 28, 2014 1:07 pm
Contact:

Re: Feature Request: Expression engine for rectangular array creation tool.

Post by jruiz »

kisolre wrote: Tue Mar 31, 2020 6:32 pm This will not be parametric. It will not create any new instances later. Also this can be only integer numbers and have meaning only at the moment of creation. Could you provide an example expression that you want to enter there?
Just want to store the number of rows(or columns) in a spreadsheet cell for using it as a parameter in a sketch.
Please see:
Designing a bolt with a helix of just one turn
Re: Designing a bolt with a helix of just one turn
Last edited by jruiz on Tue Mar 31, 2020 7:30 pm, edited 1 time in total.
I have uploaded many FreeCAD video tutorials to my YouTube channel
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Feature Request: Expression engine for rectangular array creation tool.

Post by openBrain »

jruiz wrote: Tue Mar 31, 2020 6:58 pm Just want to store the number of rows(or columns) a spreadsheet cell for using it as a parameter in a sketch.
Kisolre understood well (I guess) and explained also well. Before a function to be expression aware, it shall first be parametric, i.e. be implemented and stored in the model as a dedicated feature that can be varied and recomputed. This is absolutely not the case for the sketch pattern, which is a helper tool that generates a static result. ;)
tjpinkert
Posts: 1
Joined: Fri Jul 02, 2021 12:09 pm

Re: Feature Request: Expression engine for rectangular array creation tool.

Post by tjpinkert »

I'm actually running into similar "problems" with the sketcher array tool.

My feature request would be to have LinearPattern, PolarPattern, or MultiTransform
functions of the PartDesign workbench for the Sketcher too.

I fear however, that the Sketcher is too basic yet? because it seems to maintain mainly
"bunches of objects" It probably would require something like grouping features to achieve
true parametric operations like the proposed? (Basically a sort of layer / tree model in
which operations can be applied to multiple objects).

My current "workaround" is to create a Sketch of the item that is to be parametrically
repeated based on some equations in a spreadsheet. Then create the repetition with
LinearPattern, PolarPattern, or MultiTransform function of the PartDesign workbench.

It would be very nice to have such parametric operations in the Sketch too in some
cases. E.g. when creating patterns of holes to be drilled. Although the Sketch gets
"bussier", the 3D tree stays cleaner and more self explaining (at least in my opinion).

I typically use the Sketcher to do Parametrics and not so much the 3D stuff, but maybe
I'm not "advanced" enough yet with FreeCAD, or do not fully grasp the advantage of doing
these parametrics in the 3D PartDesign in stead of in the 2D Sketch.
Post Reply