[Fixed] "Polar Pattern" compatibility between 0.19 and 0.20

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!
User avatar
Forthman
Veteran
Posts: 2669
Joined: Fri Apr 27, 2018 11:23 am
Location: Tarn-et-Garonne (82)

[Fixed] "Polar Pattern" compatibility between 0.19 and 0.20

Post by Forthman »

Good evening,
With some members of the French forum, we realized a problem between
the files created with version 0.19 and 0.20 containing the polar pattern.

Example:
I create a new file and Body with version 0.19 containing a polar pattern with 10 repeats.
I open this file with version 0.20, it is displayed correctly, but the repeat value is set to "3" instead of "10" .
If I refresh the model, the repeat is changed to 3.

The problem is the same with a file created with version 0.20
opened with version 0.19 the number of repetitions of the polar pattern is still 3

I didn't find any info on the forum about this, is it something known?

my 0.19 version :
OS: Linux Mint 20.1 (XFCE/xfce)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: 9e3b630bbfb6807e93eeffb655e6c20f218644fc
Python version: 3.8.5
Qt version: 5.12.8
Coin version: 4.0.0
OCC version: 7.5.1
Locale: French/France (fr_FR)


my 0.20 version :
OS: Linux Mint 20.1 (XFCE/xfce)
Word size of FreeCAD: 64-bit
Version: 0.20.25157 (Git) AppImage
Build type: Release
Branch: master
Hash: 257cdd8f423f1530b8df6f53e242de629fee4e85
Python version: 3.9.5
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.2
Locale: French/France (fr_FR)
Last edited by Forthman on Sat Oct 02, 2021 1:59 pm, edited 1 time in total.
User avatar
M4x
Veteran
Posts: 1485
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: "Polar Pattern" compatibility between 0.19 and 0.20

Post by M4x »

Would've been nice to add an example directly ;) Therefore I've created one. But I'm not able to reproduce what you've described. My example looks fine in both versions.

Snip macro screenshot-8c26ab.png
Snip macro screenshot-8c26ab.png (48.5 KiB) Viewed 1666 times

I've used this versions:

Code: Select all

OS: Ubuntu 20.04.2 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24276 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 0.19.1)
Hash: a88db11e0a908f6e38f92bfc5187b13ebe470438
Python version: 3.8.8
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)

Code: Select all

OS: Ubuntu 20.04.2 LTS (ubuntu:GNOME/ubuntu)
Word size of FreeCAD: 64-bit
Version: 0.20.25131 (Git) AppImage
Build type: Release
Branch: master
Hash: 7c519689f0d5ea78fb3292be36a857d283c05507
Python version: 3.9.5
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.2
Locale: English/United States (en_US)

edit

added my example :roll:
Attachments
PD_Polar_Pattern_10_times_v0.19.FCStd
(43.22 KiB) Downloaded 35 times
User avatar
Shalmeneser
Veteran
Posts: 9591
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: "Polar Pattern" compatibility between 0.19 and 0.20

Post by Shalmeneser »

If I open this file in 0.20.25313, then PolarPattern give 3 occurrences.

Code: Select all

OS: Linux Mint 19.3 (MATE/mate)
Word size of FreeCAD: 64-bit
Version: 0.20.25131 (Git) AppImage
Build type: Release
Branch: master
Hash: 7c519689f0d5ea78fb3292be36a857d283c05507
Python version: 3.9.5
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.2
Locale: French/France (fr_FR)
Attachments
Snip macro screenshot-934aee.png
Snip macro screenshot-934aee.png (64.27 KiB) Viewed 1659 times
bouton(3).FCStd
(46.92 KiB) Downloaded 29 times
Last edited by Shalmeneser on Tue Jun 29, 2021 9:46 pm, edited 1 time in total.
User avatar
Forthman
Veteran
Posts: 2669
Joined: Fri Apr 27, 2018 11:23 am
Location: Tarn-et-Garonne (82)

Re: "Polar Pattern" compatibility between 0.19 and 0.20

Post by Forthman »

Like Shalmeneser, if I open your file with version 0.20 the display is correct,
but the number of occurrences in the polar pattern is set to 3

with 0.19
Capture d’écran_2021-06-29_23-36-22.png
Capture d’écran_2021-06-29_23-36-22.png (69.8 KiB) Viewed 1639 times


With 0.20
Capture d’écran_2021-06-29_23-35-45.png
Capture d’écran_2021-06-29_23-35-45.png (65.99 KiB) Viewed 1639 times
User avatar
M4x
Veteran
Posts: 1485
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: "Polar Pattern" compatibility between 0.19 and 0.20

Post by M4x »

Ups, I've forgot to have a look at the polar pattern setting and to recompute :oops:

I can confirm, looks like a bug to me. This is how it looks after a recompute.

Snip macro screenshot-b511fe.png
Snip macro screenshot-b511fe.png (5.82 KiB) Viewed 1626 times
chrisb
Veteran
Posts: 54293
Joined: Tue Mar 17, 2015 9:14 am

Re: "Polar Pattern" compatibility between 0.19 and 0.20

Post by chrisb »

Shalmeneser wrote: Tue Jun 29, 2021 9:11 pm If I open this file in 0.20.25313, then PolarPattern give 3 occurrences.
Confirmed.

OS: macOS 10.16
Word size of FreeCAD: 64-bit
Version: 0.20.25131 (Git)
Build type: Release
Branch: master
Hash: 7c519689f0d5ea78fb3292be36a857d283c05507
Python version: 3.9.5
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.2
Locale: C/Default (C)

Edit: I looked directly at the file. In Document.xml it has the correct number of 10 Occurrences.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Syres
Veteran
Posts: 2902
Joined: Thu Aug 09, 2018 11:14 am

Re: "Polar Pattern" compatibility between 0.19 and 0.20

Post by Syres »

Forthman wrote: Tue Jun 29, 2021 9:40 pm Like Shalmeneser, if I open your file with version 0.20 the display is correct,
but the number of occurrences in the polar pattern is set to 3
The bug also applies to LinearPattern so I believe the regression was caused by git commit 7f1b47d
User avatar
M4x
Veteran
Posts: 1485
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: "Polar Pattern" compatibility between 0.19 and 0.20

Post by M4x »

uwestoehr wrote: pinged by pinger macro
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: "Polar Pattern" compatibility between 0.19 and 0.20

Post by uwestoehr »

Syres wrote: Wed Jun 30, 2021 7:04 am The bug also applies to LinearPattern so I believe the regression was caused by git commit 7f1b47d
Why do you think so? This commit only fixed the bug that one could e.g. enter zero occurrences.
As you can see in the PR, the

Code: Select all

ADD_PROPERTY(Occurrences, (3));
was there before.

However, this fixed value seems to cause the bug. When I find time, i can have a look why this happens.
Syres
Veteran
Posts: 2902
Joined: Thu Aug 09, 2018 11:14 am

Re: "Polar Pattern" compatibility between 0.19 and 0.20

Post by Syres »

uwestoehr wrote: Wed Jun 30, 2021 12:09 pm Why do you think so? This commit only fixed the bug that one could e.g. enter zero occurrences.
In the simple debugging I carried out, it seems the PolarPattern::handleChangedPropertyType isn't being triggered when the user opens a 0.19 file in 0.20 so the number of Occurrences isn't being read in from the file. Maybe my debugging skills aren't up to scratch but that's where I concentrated my investigation.
Post Reply