Persistent section cut inconsistent behavior in assembly

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!
mcdanlj
Posts: 68
Joined: Sun Dec 01, 2019 12:10 am

Persistent section cut inconsistent behavior in assembly

Post by mcdanlj »

I'm enjoying the new 0.20 release. I have an Assembly4 document that references external parts and contains fasteners. I don't know whether fasteners are based on Part/PartDesign parts and even intended to work right now with persistent section cut. But what I am seeing is inconsistent.

The FCStd files from https://gitlab.com/mcdanlj/SnatchBlock are attached. Opening SnatchBlock.FCStd works fine.

Then View → Persistent section cut → Cutting X, Offset 0 has the following result:
  • * The arms and pulley are properly sectioned
    * One washer is properly sectioned
    * Its associated screw is not sectioned
    * The bushing is not sectioned
    * The other washer and screw go missing
Screenshot from 2022-06-30 21-50-45.png
Screenshot from 2022-06-30 21-50-45.png (26.03 KiB) Viewed 1046 times
The same thing happens if I hide the hardware first. Even though the fasteners are all hidden, one screw and washer (always the same ones) show up in the cut, and the washer is cut but not the screw, and the bushing is not cut at all. If I delete all the hardware entirely from both Parts and Model, the section works. Deleting the parts from the Model alone isn't enough; I have to remove them entirely from the Parts as well.

This seems like not ultimately desired behaviour; I just don't know whether it's a known bug, known weakness/limitation, or what. There are no error messages shown on the console in any case.

Code: Select all

OS: Fedora Linux 36 (Thirty Six) (GNOME/gnome)
Word size of FreeCAD: 64-bit
Version: 0.20.29177 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 0.20)
Hash: 68e337670e227889217652ddac593c93b5e8dc94
Python 3.9.13, Qt 5.12.9, Coin 4.0.0, Vtk 9.1.0, OCC 7.5.3
Locale: English/United States (en_US)
Installed mods: 
  * sheetmetal 0.2.49
  * A2plus 0.4.56
  * ExplodedAssembly
  * dxf_library
  * MeshRemodel 1.8919.0
  * fasteners 0.3.46
  * Assembly4 0.12.0
  * CurvedShapes 1.0.3
  * Pyramids-and-Polyhedrons
  * Manipulator 1.4.3
  * parts_library
  * Defeaturing
Attachments
Bracket.FCStd
(92.95 KiB) Downloaded 10 times
Bushing.FCStd
(11.71 KiB) Downloaded 10 times
Pulley.FCStd
(11.72 KiB) Downloaded 13 times
SnatchBlock.FCStd
(20.09 KiB) Downloaded 11 times
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Persistent section cut inconsistent behavior in assembly

Post by adrianinsaval »

confirmed, Hardware001 has many errors when running the BOP check, this seems to be the issue. The washer and the bolt don't seem to play nice with each other
mcdanlj
Posts: 68
Joined: Sun Dec 01, 2019 12:10 am

Re: Persistent section cut inconsistent behavior in assembly

Post by mcdanlj »

What is the BOP check, and how do I do it? Did I do something wrong that created this problem? I wouldn't put it past me! :D
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: Persistent section cut inconsistent behavior in assembly

Post by chrisb »

mcdanlj wrote: Fri Jul 01, 2022 10:15 pm What is the BOP check, and how do I do it? Did I do something wrong that created this problem? I wouldn't put it past me! :D
Part CheckGeometry
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
mcdanlj
Posts: 68
Joined: Sun Dec 01, 2019 12:10 am

Re: Persistent section cut inconsistent behavior in assembly

Post by mcdanlj »

Thanks!

I see that the washer and the screw individually pass the BOP check, but the Hardware Part that combines them fails.

I have attached a file that I created after making sure that my Fastener WB is up to date, and BOP check fails for each of three washer/screw combinations I tried. I grouped them with a simple group to avoid Assembly4, to remove variables. Is this then a bug in the parts included in the Fasteners workbench?

With that example with only fasteners in it, I get "SectionCut error: there are no objects in the document that can be cut" when trying to make a section through one of those groups.
Attachments
WasherScrewGroupBOPFail.FCStd
(29.77 KiB) Downloaded 6 times
User avatar
Roy_043
Veteran
Posts: 8449
Joined: Thu Dec 27, 2018 12:28 pm

Re: Persistent section cut inconsistent behavior in assembly

Post by Roy_043 »

The washer intersects the screw. The highlighted curve belongs to the screw, the vertical edge on the right belongs to the washer.
Attachments
washer-intersects-screw.png
washer-intersects-screw.png (4.32 KiB) Viewed 852 times
mcdanlj
Posts: 68
Joined: Sun Dec 01, 2019 12:10 am

Re: Persistent section cut inconsistent behavior in assembly

Post by mcdanlj »

Regardless of whether that intersection is a bug, intersection should happen very often with fasteners, because the norm is to model the tap drill size for the holes. Does this basically mean that most fasteners can't be compatible with persistent section cut?

Additionally, in the original SnatchBlock document, even if I hide all the fasteners, which is supposed to cause them not to be in the persistent section cut, I end up with the same nonsense where the mirrored fasteners are partially included in the results.

I can make a persistent section cut only if I actually completely delete the fasteners from the document before making the persistent section cut. When I delete all fasteners entirely from the document, I get this:
Screenshot from 2022-07-02 08-52-35.png
Screenshot from 2022-07-02 08-52-35.png (29.58 KiB) Viewed 805 times
But even with the fasteners entirely hidden:
Screenshot from 2022-07-02 08-54-52.png
Screenshot from 2022-07-02 08-54-52.png (46.42 KiB) Viewed 805 times
When I make a persistent section cut with all fasteners hidden, it brings them back in that weird state:
Screenshot from 2022-07-02 08-55-55.png
Screenshot from 2022-07-02 08-55-55.png (28.33 KiB) Viewed 805 times
That persistent interaction with hidden components still seems like a bug in Persistent section cut to me, regardless of whether a visible fastener fails the BOP check. Am I wrong?
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Persistent section cut inconsistent behavior in assembly

Post by onekk »

mcdanlj wrote: Sat Jul 02, 2022 12:45 pm That persistent interaction with hidden components still seems like a bug in Persistent section cut to me, regardless of whether a visible fastener fails the BOP check. Am I wrong?

Hiding an object is simply telling the "visualization engine" Coin3D to make it not visible, so it will not affect the "modelling engine", so turning Visible = False will not make the solid "non existent" to the modelling engine.

probably you are not familiar with some base FreeCAD concepts, like the "Scenegraph" (Coin3D) that is responsible to show you things and the "modelling engine" that is doing all the "solid operations", setting a property of the Scenegraph will not affect the "solid model" so it is not a bug, it is simply a "feature", in other word "the way FreecDA is working".

YES it is different from other programs, as FreeCAD is a different program.

Better, Worse the answers is usually "It depends" :-D

Out of Joke, probably it depends on your workflow, when modelling things, probably there are some other ways to make fastener don't interfere with the model.

Did you read this document:

https://wiki.freecadweb.org/Feature_edi ... ble_models

Sadly I don't know how, as I'm modelling using scripting and my solid are referenced "as objects" so if I want to section something I simply copy the solid and then subtract a "cut solid", showing the result, but this is a consequence of the different between a DocumentObject and a TopoShape.


Document Objects
https://wiki.freecadweb.org/App_DocumentObject

TopoShapes
https://wiki.freecadweb.org/Part_TopoShape

Other interesting reading could be:

3D modelling link and paradigm explained
https://forum.freecadweb.org/viewtopic.php?f=8&t=47493

Topology and Geometry Primer
https://forum.freecadweb.org/viewtopic. ... 89#p500989

Consideration about 2D to 3D objects
https://forum.freecadweb.org/viewtopic. ... 11#p463511

Basic Attachment Tutorial
https://wiki.freecadweb.org/Basic_Attachment_Tutorial

Only to copy some "reminders" I have saved for "future references" for my personal use, so sorry if they are not 100% related to your problem.

And sorry for bothering if my post will not be useful.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
mcdanlj
Posts: 68
Joined: Sun Dec 01, 2019 12:10 am

Re: Persistent section cut inconsistent behavior in assembly

Post by mcdanlj »

onekk wrote: Sat Jul 02, 2022 2:30 pm Hiding an object is simply telling the "visualization engine" Coin3D to make it not visible, so it will not affect the "modelling engine", so turning Visible = False will not make the solid "non existent" to the modelling engine.
I'm not sure whether you've read the Persistent section cut documentation? As referenced in the FreeCAD 0.20 release notes https://wiki.freecad.org/Release_notes_0.20 please read the following:

https://wiki.freecad.org/Part_SectionCut
Screenshot from 2022-07-02 10-59-26.png
Screenshot from 2022-07-02 10-59-26.png (33.69 KiB) Viewed 774 times
It would make complete sense to me to have to hide the fasteners to make a section cut of the PartDesign parts, and then unhide the fasteners to show how the fasteners fit in place.

I understand that it's also possible for the documentation to have a bug! Perhaps the answer is that because most uses of the Fastener WB end up creating intersecting parts by design, the Part_SectionCut documentation should just say that it is incompatible with most fasteners, even if they are hidden. It might be that while parts are only included in the cut if they are visible, intersecting parts are still a problem, and it would be useful to add that warning to Pat_SectionCut documentation. This might apply to more than just fasteners; it might be a core part of Part_SectionCut that isn't clear (at least to me) from the documentation.
probably you are not familiar with some base FreeCAD concepts, like the "Scenegraph" (Coin3D) that is responsible to show you things and the "modelling engine" that is doing all the "solid operations", setting a property of the Scenegraph will not affect the "solid model" so it is not a bug, it is simply a "feature", in other word "the way FreecDA is working".
No, I'm not new to FreeCAD. I'm just trying to use a feature that is new to FreeCAD, following the documentation. :D

Ultimately, I can get along without this working; I was just exploring the FreeCAD 0.20 new features from the release notes, and ran into what looked like it was a bug somewhere, and wanted to contribute by reporting it.

This isn't really for me. This is for the next person who runs into this.
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Persistent section cut inconsistent behavior in assembly

Post by onekk »

No I haven't read documentation.

In this case you are right as the documentation is telling explicitly visible.

Although it seem strange, but probably it is not.

But as a side note probably the cutation of Part WB could be the discrimating point.

Are you sure you are using some other WB maybe Part Design and that fasteners are modeled in Part WB?

If you are not new to FC probably you know that they are rather different.

Sorry for bothering and Regards.

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
Post Reply