Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Problem] PartDesign Loft between two shapbinders fails, but Part Loft works with only an out of scope warning #6291

Open
FreeCAD-Bug-Importer opened this issue Feb 7, 2022 · 5 comments
Labels
Bug This issue or PR is related to a bug WB Part Design Related to the Part Design Workbench

Comments

@FreeCAD-Bug-Importer
Copy link
Collaborator

Issue imported from https://tracker.freecad.org/view.php?id=4799

  • Reporter: drmacro
  • Date submitted: 12/8/2021
  • FreeCAD version: 0.2
  • Category: Bug
  • Status: new
  • Tags:

Original report text

Part Design Loft between two shapbinders fails, but Part Loft works with only an out of scope warning.

This inconsistent behavior; shapebinders can be used with Part Design Pad.

In addition, A Part Sweep of a Part Helix and a shapebinder works, but the Part Design Helix also fails with a Shapebinder.

Unless there is a specific reason the ShapeBinder can't work with Part Design tools, for consistency, it should work with none or all?

Forum thread contains example file and discussion.

Steps to reproduce

Create two shapbinders and attempt to Loft, Helix etc.

Forum thread contains example file and discussion.

FreeCAD Info

OS: Debian GNU/Linux 10 (buster) (XFCE/lightdm-xsession)
Word size of FreeCAD: 64-bit
Version: 0.20.26583 (Git)
Build type: Release
Branch: master
Hash: 4bd77b3b35ea794057ffe6a55858b7b1abee7ed0
Python version: 3.7.3
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)

Other bug information

  • Priority: normal
  • Severity: minor
  • Category: Bug
  • Updated: 12/8/2021
@FreeCAD-Bug-Importer FreeCAD-Bug-Importer added Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD Bug This issue or PR is related to a bug labels Feb 7, 2022
@adrianinsaval
Copy link
Member

a forum thread is mentioned but no link is provided, anybody knows were it is? I suspect the real issue is that the selection method necessary to use shapebinders in PD is to select the face in 3d view while Part can work with tree view selection.
I believe Part desing should be made to accept tree view objects as long as their shape is a face or closed wire in all features that require a closed contour and when applicable open wires too

@luzpaz luzpaz closed this as completed Feb 9, 2022
@luzpaz luzpaz reopened this Feb 9, 2022
@mfro0
Copy link
Contributor

mfro0 commented Apr 8, 2023

It's not so simple, unfortunately. The issue doesn't have anything to do with Tree view selection in PD (which works fine if you change tabs, btw.).

PartDesign explicitly filters the selection for objects derived from Part2DObject (which SketchObject is but ShapeBinder/SubShapeBinder isn't) at numerous places.

I played around and extended all these places for Binders which appears to work somehow. At least I was able to modify an existing PD Loft by manually editing Sections and Profile references from Sketches to ShapeBinders in the Property editor (as I didn't touch the PD Loft UI yet).

My feeling is that this is an extremely ugly approach, however, as it completely bypasses the rather clean PD class hierarchy and one would need to add code to check for the binders to be 2D only at all these places.

I'm wondering if it would be cleaner (and versatile enough) if we only allowed Binders that directly reference Sketches only for selection? Or do we need a specialisation of the binder classes that would only allow referencing 2D objects inheriting from Part2DObject?

@mfro0
Copy link
Contributor

mfro0 commented Apr 9, 2023

The original report stated ShapeBinders could be padded.

While this is true, there appears to be no check at all if the binder is 2D (or at least face-shaped only) or solid. In the latter case, the Pad must fail.
So, basically same problem there.

@Roy-043 Roy-043 added WB Part Design Related to the Part Design Workbench and removed Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD labels Jul 19, 2023
@ghost
Copy link

ghost commented Jul 27, 2023

Through a few test i found some interesting results.

The first thing is, that even when a sketch is not needed, while starting a task and there is no sketch in it, PartDesign comes with an error message,

No sketch is available in the document.

This in not only in Loft, this is in all PartDesign operations. When a empty sketch is in the document (note, also an unattached sketch, which is not in the body), it works. This is the first issue i found (i will crate a ticket for that later).

Also i can confirm @adrianinsaval suspects, that have something to do with the tree object or 3D selection. While on sketch objects it does not really matter, if 3D selection or tree selection is used, for the shapebinder there is an difference. It works only while using the face of the shapebinder.

2023-07-27.17-52.webm

test1.zip

Also her a second test file with differnt shapes, shapebinders and wires.

2023-07-27.17-55.webm

test2.zip

@ghost
Copy link

ghost commented Jul 27, 2023

version forgotten

OS: Debian GNU/Linux 11 (bullseye) (X-Cinnamon/lightdm-xsession)
Word size of FreeCAD: 64-bit
Version: 0.21.0.33657 (Git)
Build type: Release
Branch: master
Hash: 2a1d4d4994bf3707f7a07aef07e17f5270b4854b
Python 3.9.2, Qt 5.15.2, Coin 4.0.0, Vtk 9.0.1, OCC 7.7.1
Locale: English/United States (en_US)
Installed mods: 
  * QuickMeasure 2022.10.28
  * CurvedShapes 1.0.4
  * Curves 0.6.12

@luzpaz luzpaz changed the title Part Design Loft between two shapbinders fails, but Part Loft works with only an out of scope warning. [Problem] PartDesign Loft between two shapbinders fails, but Part Loft works with only an out of scope warning Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This issue or PR is related to a bug WB Part Design Related to the Part Design Workbench
Projects
None yet
Development

No branches or pull requests

5 participants