Polar pattern bug for angles < 360°

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
mithrandil
Posts: 7
Joined: Tue Jun 20, 2017 8:56 am

Polar pattern bug for angles < 360°

Postby mithrandil » Tue Apr 17, 2018 4:33 pm

That's not what one might expect from 180° polar pattern...

the slice is 360°/8 so 4 slices on 180° should be half a circle
PP-BUG.JPG
PP-BUG.JPG (44.9 KiB) Viewed 300 times
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13509 (Git)
Build type: Release
Branch: releases/FreeCAD-0-17
Hash: 0258808ccb6ba3bd5ea9312f79cd023f1a8671b7
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: Italian/Italy (it_IT)
dbecad
Posts: 80
Joined: Fri Mar 16, 2018 11:10 pm

Re: Polar pattern bug for angles < 360°

Postby dbecad » Tue Apr 17, 2018 6:07 pm

Mithrandil,
this is the classical poles & space problem, you only need 3 angles of 45 to pack the 4 slices in 180, so your angle should be 135degrees.
Cheers
pie.png
pie.png (16.83 KiB) Viewed 287 times
Jee-Bee
Posts: 2040
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Polar pattern bug for angles < 360°

Postby Jee-Bee » Tue Apr 17, 2018 7:01 pm

I ould like it that (even only a option to choose) i can set the spacing (in this case 45 degrees) and the number of instances.
Most of the time faster and more easy...
User avatar
DeepSOIC
Posts: 7655
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Polar pattern bug for angles < 360°

Postby DeepSOIC » Tue Apr 17, 2018 7:12 pm

Jee-Bee wrote:
Tue Apr 17, 2018 7:01 pm
I ould like it that (even only a option to choose) i can set the spacing (in this case 45 degrees) and the number of instances.
Most of the time faster and more easy...
In Lattice2 addon, it is possible. Use 'StepN' generator mode. But Lattice2 can't be used in PartDesign, yet. At least, directly... It may be possible via PD Boolean, I'm not sure.
mithrandil
Posts: 7
Joined: Tue Jun 20, 2017 8:56 am

Re: Polar pattern bug for angles < 360°

Postby mithrandil » Tue Apr 17, 2018 7:37 pm

dbecad wrote:
Tue Apr 17, 2018 6:07 pm
Mithrandil,
this is the classical poles & space problem, you only need 3 angles of 45 to pack the 4 slices in 180, so your angle should be 135degrees.
Cheers
Sure,
I found the same way of doing it,
but it seems kind of a workaround to me.

BTW you don't need 135°C to fit 4 slices of 45°, you need 135° to fit 3 more slices (so you should set the counter to +3...),

Otherwise you should also set 360°-45°=315° to fit the whole 8 slices circle, but what is set by default is 360°, not 315°...

Can you get my point?
dbecad
Posts: 80
Joined: Fri Mar 16, 2018 11:10 pm

Re: Polar pattern bug for angles < 360°

Postby dbecad » Tue Apr 17, 2018 7:39 pm

You can also do it using a polar pattern angle formula like:
Sketch.Constraints.a * (PolarPattern.Occurrences - 1)
Where "a" is the slice angle name, then changing the number of occurrences does compute the right angle directly.
Cheers
mithrandil
Posts: 7
Joined: Tue Jun 20, 2017 8:56 am

Re: Polar pattern bug for angles < 360°

Postby mithrandil » Tue Apr 17, 2018 7:58 pm

Does this also make sense to you? (notice 1 ° of difference)

It totally doesn't!

Your solutions are workarounds, which are surely useful temporary solutions, but this is a bug which needs to be fixed.
Attachments
PP-BUG3.JPG
PP-BUG3.JPG (33.92 KiB) Viewed 260 times
PP-BUG2.JPG
PP-BUG2.JPG (35.61 KiB) Viewed 260 times
chrisb
Posts: 25650
Joined: Tue Mar 17, 2015 9:14 am

Re: Polar pattern bug for angles < 360°

Postby chrisb » Tue Apr 17, 2018 10:13 pm

The 360° case is treated specially as a shortcut for "distribute the number of occurences over a whole circle".
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Polar pattern bug for angles < 360°

Postby NormandC » Thu Apr 19, 2018 2:29 am

mithrandil wrote:
Tue Apr 17, 2018 7:37 pm
Can you get my point?
Your point is wrong.

In your first example, it is exactly what a 180-degree pattern should do. There is no bug there. It's not complicated: take your pie piece, and rotate it 180 degrees on the Z axis either using Part Placement or Draft Rotate. It will end up in the same exact position as the last occurrence in the polar pattern.

...And this is yet another topic that was wrongfully posted in the Part Design module development forum. Which description in the forum index indicates:
About the development of the Part Design module/workbench. PLEASE DO NOT POST HELP REQUESTS HERE!
Tell me, where exactly are we discussing development here?

You're wondering if it's a bug, OK; then please read the Bug submission guidelines topic:
2. If you are unsure, discuss the problem on the forum first. Open a new topic here on the forum, in the help section, and ask if what you found is a bug. Other users will surely be able to help you determining what you should do.
Moderators, part of your job is to move topics to the relevant forums when needed. When I was an admin, I was doing it all the time.