[bug] Cyclic reference with subshapebinder in new file.

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
kisolre
Veteran
Posts: 4162
Joined: Wed Nov 21, 2018 1:13 pm

[bug] Cyclic reference with subshapebinder in new file.

Post by kisolre »

Edit: happens only with new file, see posts below.

I am trying to create a piece that will consist of two bodies, glued together to form a single part. So naturally i wanted to model then as separate bodies under a single Part container. But since they are interdependent I wanted to reference a sketch from one of the bodies under the other by using SubShapeBinder. And FC refuses to create it, citing some nonsense about cyclic reference. Which should clearly not exist here. In the attached file with Rim body active try to select the sketch from SphericalFace and then create SubShapeBinder. I get this:
Unnamed#Part
12:13:31 <Exception> ShapeBinder.cpp(907): Cyclic reference to Unnamed#Part
12:13:42 <Exception> ShapeBinder.cpp(907): Cyclic reference to Unnamed#Part
12:14:08 Save AutoRecovery file: Needed time: 45ms
12:14:35 <Exception> ShapeBinder.cpp(907): Cyclic reference to Unnamed#Part
And why "Unnamed#Part" when the file clearly has a name?
When removing the Part container everything works as expected.

Code: Select all

OS: Windows 8.1 Version 6.3 (Build 9600)
Word size of FreeCAD: 64-bit
Version: 0.21.29865 (Git)
Build type: Release
Branch: master
Hash: fb5c731847398c5bfbc37468ba851e70860a86d5
Python 3.8.8, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.2
Locale: Bulgarian/Bulgaria (bg_BG)
Installed mods: 
  * 3DfindIT 1.2.0
  * A2plus 0.4.56a
  * AirPlaneDesign 0.4.0
  * AnimationFreeCAD 1.0.0
  * ArchTextures
  * Assembly3 0.11.3
  * Assembly4 0.12.3
  * BIM 2021.12.0
  * BOLTSFC
  * CfdOF 1.17.4
  * CubeMenu
  * CurvedShapes 1.0.3
  * Curves 0.3.0
  * CycloidGearBox
  * Defeaturing
  * Design456 0.0.1
  * DesignSPHysics 0.6.1-2207-03-01
  * dodo
  * DynamicData 2.46.0
  * ExplodedAssembly
  * fasteners 0.3.50
  * fcgear 1.0.0
  * FCPDWorkbench 0.2.0
  * FEM_FrontISTR 0.1.0
  * frame 0.1.0
  * freecad.xray 2022.4.17
  * FreeCAD_mcm_addon
  * Help 1.0.3
  * InvGears 0.1.2
  * kicadStepUpMod 10.13.6
  * lattice2 1.0.0
  * Launcher
  * MakerWorkbench
  * Manipulator 1.4.9
  * Mechatronic
  * MeshRemodel 1.8919.0
  * MnesarcoUtils 0.1.0
  * Nikra-DAP
  * nurbs
  * OpticsWorkbench 1.0.8
  * ose-piping
  * parts_library
  * PlacementTools
  * Plot 2022.4.17
  * Pyramids-and-Polyhedrons
  * Reinforcement
  * Render 2022.2.0
  * Rocket 2.5.1
  * SearchBar 1.0.1
  * SelectorToolbar
  * sheetmetal 0.2.50
  * Ship 2022.4.11
  * Silk 1.0.0
  * SlopedPlanesMacro
  * StemfieWB
  * symbols_library
  * ThreadProfile 1.81.0
  * toSketch
  * Woodworking 0.20.29177
  * workfeature
  * workfeature-macro
Attachments
CabinetLeg.FCStd
(12.48 KiB) Downloaded 17 times
Last edited by kisolre on Fri Aug 05, 2022 2:06 pm, edited 1 time in total.
User avatar
mfro
Posts: 662
Joined: Sat Sep 23, 2017 8:15 am

Re: [bug] Cyclic reference with subshapebinder.

Post by mfro »

kisolre wrote: Fri Aug 05, 2022 9:22 am... In the attached file with Rim body active try to select the sketch from SphericalFace and then create SubShapeBinder ...
Cannot reproduce. Works for me as intended.
Cheers,
Markus
Bance
Veteran
Posts: 4185
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: [bug] Cyclic reference with subshapebinder.

Post by Bance »

Can't reproduce in:-

Code: Select all

OS: Manjaro Linux (XFCE/xfce)
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.10.5, Qt 5.12.9, Coin 4.0.0, Vtk 9.1.0, OCC 7.5.3
Locale: English/United Kingdom (en_GB)
Installed mods: 
  * Curves 0.5.2
  * fasteners 0.3.50
  * A2plus 0.4.56a
  * fcgear 1.0.0
  * CurvedShapes 1.0.4
  * kicadStepUpMod 10.14.3
  * BIM 2021.12.0
kisolre
Veteran
Posts: 4162
Joined: Wed Nov 21, 2018 1:13 pm

Re: [bug] Cyclic reference with subshapebinder.

Post by kisolre »

@mfro FC info?
@Bance that is some 700 commits behind. Maybe some weird logic was introduced in the mean time...
User avatar
mfro
Posts: 662
Joined: Sat Sep 23, 2017 8:15 am

Re: [bug] Cyclic reference with subshapebinder.

Post by mfro »

kisolre wrote: Fri Aug 05, 2022 10:47 am @mfro FC info?
this (local build)

Code: Select all

OS: Debian GNU/Linux bookworm/sid (GNOME/gnome)
Word size of FreeCAD: 64-bit
Version: 0.21.29849 (Git)
Build type: Release
Branch: attach_to_wire
Hash: 46bc43dcb1398e8cc659a73f6b42d164ad836eb7
Python 3.10.5, Qt 5.15.4, Coin 4.0.0, Vtk 7.1.1, OCC 7.5.2
Locale: German/Germany (de_DE)
Installed mods: 
  * fc_wb
  * Design456 0.0.1
  * 3DfindIT 1.2.0
  * lattice2 1.0.0
  * Silk 1.0.0
  * fasteners 0.3.49
  * ProDarkThemePreferencePack 1.0.0 (Disabled)
  * sheetmetal 0.2.50
  * POV-Ray-Rendering
  * fcgear 1.0.0
  * CurvedShapes 1.0.4
  * Help 1.0.3
  * Assembly4 0.12.2
  * DynamicData 2.46.0
  * Curves 0.5.1
and that (latest AppImage)

Code: Select all

OS: Debian GNU/Linux bookworm/sid (GNOME/gnome)
Word size of FreeCAD: 64-bit
Version: 0.21.29936 (Git) AppImage
Build type: Release
Branch: master
Hash: 3db79c907cd7ef2f75597efdd82ae288ac23ad01
Python 3.10.5, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.2
Locale: German/Germany (de_DE)
Installed mods: 
  * fc_wb
  * Design456 0.0.1
  * 3DfindIT 1.2.0
  * lattice2 1.0.0
  * Silk 1.0.0
  * fasteners 0.3.49
  * ProDarkThemePreferencePack 1.0.0 (Disabled)
  * sheetmetal 0.2.50
  * POV-Ray-Rendering
  * fcgear 1.0.0
  * CurvedShapes 1.0.4
  * Help 1.0.3
  * Assembly4 0.12.2
  * DynamicData 2.46.0
  * Curves 0.5.1
Cheers,
Markus
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: [bug] Cyclic reference with subshapebinder.

Post by chrisb »

A difference could be, that @kisolre did it starting from a new file within the same session. That's also where the Unnamed filename may come from.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
kisolre
Veteran
Posts: 4162
Joined: Wed Nov 21, 2018 1:13 pm

Re: [bug] Cyclic reference with subshapebinder.

Post by kisolre »

@chrisb you are correct.
New steps to reproduce:
Create new file.
Create new part container, create new body under it.
Create new sketch under the body, exit edit mode.
Create new body under same part.
With the second body active select sketch from first body and try to create SubShapeBinder - error.
User avatar
mfro
Posts: 662
Joined: Sat Sep 23, 2017 8:15 am

Re: [bug] Cyclic reference with subshapebinder.

Post by mfro »

kisolre wrote: Fri Aug 05, 2022 2:05 pm @chrisb you are correct.
New steps to reproduce:
Create new file.
Create new part container, create new body under it.
Create new sketch under the body, exit edit mode.
Create new body under same part.
With the second body active select sketch from first body and try to create SubShapeBinder - error.
Confirmed.

Strangely, the same action works fine after it failed once when you do a double click on the second body and recompute.
Cheers,
Markus
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: [bug] Cyclic reference with subshapebinder.

Post by chrisb »

mfro wrote: Fri Aug 05, 2022 3:39 pm Strangely, the same action works fine after it failed once when you do a double click on the second body and recompute.
It is indeed the activation of the body that gets lost, as you can see by the non existant blue background color. If I activate the body after creation everything works (no recompute needed).
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: [bug] Cyclic reference with subshapebinder in new file.

Post by openBrain »

There is something really weird.
If I double-click on the 2nd body (in the tree view) immediately after it has been created, it is deactivated.
But if I select another object in the tree, then double-click it, it is activated again (can see it in the Python console). :?
Post Reply