Pad creating a Pocket

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!
Post Reply
leoheck
Veteran
Posts: 1223
Joined: Tue Mar 13, 2018 5:56 pm
Location: Coffee shop

Pad creating a Pocket

Post by leoheck »

Hi, I am sharing a bug I am seeing, here.

There is a pad feature (the last one), after a polar pattern that has the refine true. This feature should be a pad, but it is being created as a pocket. To be able to share, I removed some of the objects/features of this file tho.
lala.FCStd
(54.62 KiB) Downloaded 32 times
I was able to fix this by removing the polar pattern and recreating it. Then maybe because it was not created with the Refine = True, it started to work fine.

OS: Ubuntu 21.10 (GNOME/gnome)
Word size of FreeCAD: 64-bit
Version: 0.20.
Build type: Release
Branch: unknown
Hash: 8fceac17628778bd0b2ba4c60bafd6494348ac08
Python version: 3.9.5
Qt version: 5.15.2
Coin version: 4.0.0
OCC version: 7.5.2
Locale: English/United States (en_US)
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

Re: Pad creating a Pocket

Post by TheMarkster »

If you turn off the transparency you see that all the faces turn black, indicating inverted normals. I have no idea what's causing that. Obviously, the refine has something to do with it somehow.
chrisb
Veteran
Posts: 53933
Joined: Tue Mar 17, 2015 9:14 am

Re: Pad creating a Pocket

Post by chrisb »

I don't see any faces turning black here, but I can confirm the pad turing into a pocket.

OS: macOS 10.16
Word size of FreeCAD: 64-bit
Version: 0.20.26155 (Git)
Build type: Release
Branch: master
Hash: 0926a4148bcff11249fd4f56bc30256102ffe105
Python version: 3.9.7
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: C/Default (C)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

Re: Pad creating a Pocket

Post by TheMarkster »

This happens if I delete the final pad and do it again.
Snip macro screenshot-3d515a.png
Snip macro screenshot-3d515a.png (50.7 KiB) Viewed 942 times
OS: Windows 10 (10.0)
Word size of FreeCAD: 64-bit
Version: 0.20.25997 (Git)
Build type: Release
Branch: master
Hash: 77b198048a63f1e9ca15eef64c8042d599a14cf3
Python version: 3.8.12
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.2
Locale: English/United States (en_US)
chrisb
Veteran
Posts: 53933
Joined: Tue Mar 17, 2015 9:14 am

Re: Pad creating a Pocket

Post by chrisb »

This is how it looks here, when I do
- load file
- remove pad
- add pad
- set transparency to 0

the same with other sequence:
- set transparency to 0
- load file
- remove pad
- add pad

It could be the slightly different OCC versions. Correct seems none of these.

OS: macOS 10.16
Word size of FreeCAD: 64-bit
Version: 0.20.26155 (Git)
Build type: Release
Branch: master
Hash: 0926a4148bcff11249fd4f56bc30256102ffe105
Python version: 3.9.7
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: C/Default (C)
Attachments
SnipScreenshot-d9ff3f.png
SnipScreenshot-d9ff3f.png (44.03 KiB) Viewed 882 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Pad creating a Pocket

Post by wmayer »

I can confirm it for OCC 7.3 and 7.6 that the shape gets inverted when the Refine option is set. It's also possible to independently test it from this project. Therefore make sure Refine is set to false, make a simple copy of the last pad feature and now apply the Refine shape command from the Part wb.
chrisb wrote: Fri Oct 22, 2021 12:00 am I don't see any faces turning black here, but I can confirm the pad turing into a pocket.
If you have set a certain back face color in the settings then it may be not black. And you have to set the Lighting of the shape to One side rendering
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Pad creating a Pocket

Post by wmayer »

When looking at the non-refined pad then many faces have orientation forward and many others are reversed. The refinement algorithm seems to ignore the orientation of the joined faces and creates a resulting face with orientation forward. Because the first face of the refined model has wrong orientation the whole solid will be wrong, too.

Here is the extracted bottom part of this model
Attachments
reversed_faces.brp
(84.26 KiB) Downloaded 20 times
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Pad creating a Pocket

Post by wmayer »

Post Reply