[Feature Request] Radial array/polar pattern in Sketcher

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!
Crow
Posts: 31
Joined: Thu Nov 04, 2021 10:14 am

Re: [Feature Request] Radial array/polar pattern in Sketcher

Post by Crow »

chrisb wrote: Mon Nov 08, 2021 10:16 pm Let's assume it was 6 weeks before christmas and I want to model this:
Ha! joke is on you! Its six weeks and three days, and you did model it!

Just kidding, Thank you for the thoughtful reply. And thank you for making the example. I've taken a look. :)
Helix_Advent.PNG
Helix_Advent.PNG (60.15 KiB) Viewed 1680 times
I was able to helix sweep a surface of your model along the correct axis. And yes, this is a way to accomplish this kind of geometry. In this picture I'm using a subtractive primitive to remove your 2mm extrusion. I tried and failed to use the "pocket" function.
Helix_Advent_2.PNG
Helix_Advent_2.PNG (60.43 KiB) Viewed 1680 times
Taking a look at the resultant feature tree has me worried though. I'm getting "topological Naming Problem -anxiety" thinking about how this is just a simple demo piece.

So if it's OK with you guys, I'm going to continue to be of the opinion that a parametric polar array feature would be a good addition to the Sketcher workbench. Again, not making any demands, and with no expectations.
drmacro
Veteran
Posts: 8979
Joined: Sun Mar 02, 2014 4:35 pm

Re: [Feature Request] Radial array/polar pattern in Sketcher

Post by drmacro »

Crow wrote: Tue Nov 09, 2021 4:13 pm ...I'm going to continue to be of the opinion that a parametric polar array feature would be a good addition to the Sketcher workbench. ...
A sketch array tool will have the same TNP possibilities.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
adrianinsaval
Veteran
Posts: 5548
Joined: Thu Apr 05, 2018 5:15 pm

Re: [Feature Request] Radial array/polar pattern in Sketcher

Post by adrianinsaval »

drmacro wrote: Tue Nov 09, 2021 6:08 pm A sketch array tool will have the same TNP possibilities.
Not really, in there he used the face from the pad for the helix, that's not very robust (and I wouldn't want a helix that takes many seconds to recompute to break and reference the wrong face)
If the array was inside sketcher he would have used the sketch for the helix directly, so no TNP. And you could say that he should use the helix on the individual sketches and make a pattern from the helix... but that gives shitty results:
adrianinsaval wrote: Mon Nov 08, 2021 9:15 pm
drmacro wrote: Mon Nov 08, 2021 8:23 pm Three simple sketches, five operations in the tree.
I don't think that was the intended shape but yeah, it can be made simple like that. It's computationally intensive to make the helix and patterns though (I assume making a single helix feature would be less intensive), and it has real trouble with tangent stuff. I'm not very satisfied with this result:
example.pngexample.FCStd
I had to put the teeth profile something like a milimiter (0.1 wasn't enough) inside the octagon so it doesn't give broken results with the pattern
(the parallel discussion is driving me nuts :?)
drmacro
Veteran
Posts: 8979
Joined: Sun Mar 02, 2014 4:35 pm

Re: [Feature Request] Radial array/polar pattern in Sketcher

Post by drmacro »

adrianinsaval wrote: Tue Nov 09, 2021 6:59 pm ...
Not really, in there he used the face from the pad for the helix, that's not very robust (and I wouldn't want a helix that takes many seconds to recompute to break and reference the wrong face)
If the array was inside sketcher he would have used the sketch for the helix directly, so no TNP. And you could say that he should use the helix on the individual sketches and make a pattern from the helix... but that gives shitty results:
Any parametric change to the array in the sketch that causes an edge to be added or deleted will cause TNP.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
adrianinsaval
Veteran
Posts: 5548
Joined: Thu Apr 05, 2018 5:15 pm

Re: [Feature Request] Radial array/polar pattern in Sketcher

Post by adrianinsaval »

drmacro wrote: Tue Nov 09, 2021 7:10 pm Any parametric change to the array in the sketch that causes an edge to be added or deleted will cause TNP.
In features that reference geometry from the helix or specific edges of the sketch yes, but the helix feature itself only references the sketch as a whole, whatever happens inside the sketch won't break the helix or at least not from TNP

Edit: a file speaks 1000 words so I made two similar bodies using both methods to get a cross shape used in a helix then disabled recompute and added circles to the sketches, open the file and recompute and see which one breaks from TNP ;)
Spoiler alert: the one with the simpler sketch and PD pattern + pad breaks, the one with the hand made pattern inside the sketch works no problem
Attachments
example.FCStd
(117.12 KiB) Downloaded 39 times
freedman
Veteran
Posts: 3465
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: [Feature Request] Radial array/polar pattern in Sketcher

Post by freedman »

Maybe this is more powerful;
COPY TO VERTEX
Select a target sketch object, for instance a circle, then draw a selection box around any sketch elements or group of vertex, then click the copy icon. Any vertex inside the selection box gets the target sketch object applied to it, I suppose there would also be constraints applied.

This way we could do selective work. Also using polygon to the nth (pic) would give us a constrained circle by applying the method to the hole polygon and you then have an array tool.

The selection box vertex could contain any shape, we could also place an unorganized group of vertexes and do the operation.

The first selection sketch object could be limited to a single vertex and line combination, like a circle or a line.

This might be easier for the Devs to program.
Attachments
vertex1.png
vertex1.png (87.65 KiB) Viewed 1531 times
Crow
Posts: 31
Joined: Thu Nov 04, 2021 10:14 am

Re: [Feature Request] Radial array/polar pattern in Sketcher

Post by Crow »

freedman wrote: Tue Nov 09, 2021 9:28 pm Maybe this is more powerful;
COPY TO VERTEX
Select a target sketch object, for instance a circle, then draw a selection box around any sketch elements or group of vertex, then click the copy icon. Any vertex inside the selection box gets the target sketch object applied to it, I suppose there would also be constraints applied.
(...)
I'm not really qualified to comment on how viable this is, but I like the thought process.

I'm concerned that the proposed method does not maintain a parametric array feature though (as is the case shown in the example from NX). If you use copy to duplicate the desired elements around the array, then they will not (I assume) be updated when you modify the "Master" lines/curves.

The same goes for the n-sided polygon. Would it be possible to edit the number of n ?

Also, there is a need to define an anchor point (in the master geometry) to constrain to the polygon vertexes. And in the case of a circular pattern the rotation of the slave-clones has to follow the circle (normal to sides of polygon?).
adrianinsaval wrote: Tue Nov 09, 2021 6:59 pm (the parallel discussion is driving me nuts :?)
Lets keep any further discussion in this thread, since it's the oldest. :)
freedman
Veteran
Posts: 3465
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: [Feature Request] Radial array/polar pattern in Sketcher

Post by freedman »

I'm concerned that the proposed method does not maintain a parametric array .The same goes for the n-sided polygon. Would it be possible to edit the number of n ?
I'm not sure the goal is parametrics, thats what happens when you apply the polar array in solids.

The copied objects would have constraints so they would all update together. I like this because it gives us more options, we already have an array tool.
Crow
Posts: 31
Joined: Thu Nov 04, 2021 10:14 am

Re: [Feature Request] Radial array/polar pattern in Sketcher

Post by Crow »

freedman wrote: Tue Nov 09, 2021 11:24 pm I'm not sure the goal is parametrics, thats what happens when you apply the polar array in solids.
I know, and it's a very good idea in terms of making the sketch creation more convenient, but I believe some of the people on this thread had reservations about the Sketch Array not being parametric (I suspect for the sake of making the final model more robust?).
freedman wrote: Tue Nov 09, 2021 11:24 pm The copied objects would have constraints so they would all update together. I like this because it gives us more options, we already have an array tool.
Oh ok, you're completely right. I see now that the copy function creates some (=) constraints that keep the "Slave Geometry" defined. I was confused because this for some reason does not happen when I use the Sketcher Symmetry (Mirror).

I put together a crude array using copies in the suggested way. I acknowledge this was a sub-optimal way of defining the geometry and there is a lot of construction lines to create an "anchor" in the middle of the triangles and a radial line to the center of the array. The latter is to rotate each triangle so the round corner faces out. I guess I could have referenced the circle or polygon edges but I assume the copy function won't be smart enough to copy an angular constraint to another reference for each copy.
Copy_based_array.PNG
Copy_based_array.PNG (97.02 KiB) Viewed 1392 times
Copy_based_array2.PNG
Copy_based_array2.PNG (103.24 KiB) Viewed 1392 times
Copy_based_array3.PNG
Copy_based_array3.PNG (123.33 KiB) Viewed 1392 times
Copy_based_array4.PNG
Copy_based_array4.PNG (82.66 KiB) Viewed 1392 times
_
So I tried another setup where I have the anchor on the middle of one of the triangle lines, and then made this line tangent with the circle that comes with the polygon. That works and it's certainly much better than the previous version, but the tangent constraints have to be added individually as suspected. Still though, the slave triangles update nicely from the original once everything is set up. :)
Copy_based_array5.PNG
Copy_based_array5.PNG (35.91 KiB) Viewed 1392 times
User avatar
adrianinsaval
Veteran
Posts: 5548
Joined: Thu Apr 05, 2018 5:15 pm

Re: [Feature Request] Radial array/polar pattern in Sketcher

Post by adrianinsaval »

Crow wrote: Wed Nov 10, 2021 2:09 pm I believe some of the people on this thread had reservations about the Sketch Array not being parametric (I suspect for the sake of making the final model more robust?).
It's more about avoiding unnecessary complexity for the solver (solving time does not grow linearly)
Post Reply