ShapeBinder headache

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!
dobredani
Posts: 9
Joined: Tue Nov 10, 2020 7:21 am

ShapeBinder headache

Post by dobredani »

Hi,

I am designing a multi-part mechanism and I wanted to have one master sketch simulate the joints and movement of the parts. I have 4 bodies linked to the master sketch with ShapeBinder. On each body, certain edges from the master sketch are binded and the sketch then uses the edge's vertexes to lock into place.
When I drag a point/edge in the master sketch, I am expecting the bodies to update their positions accordingly. However, this screws up all the ShapeBinders, having each body change the edge it was binded to.

The FCstd files are attached, before and after draging on point in the master sketch.

I have just started to use ShapeBinders, based on this tutorial https://www.youtube.com/watch?v=8Bmcgn2RBGI&t=600s.


OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24291 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: 7b5e18a0759de778b74d3a5c17eba9cb815035ac
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)
2022-08-07.png
2022-08-07.png (11.59 KiB) Viewed 987 times
Attachments
broken master - Before Point Drag.FCStd
(73.45 KiB) Downloaded 14 times
broken master - After Point Drag.FCStd
(70.68 KiB) Downloaded 13 times
User avatar
ppemawm
Veteran
Posts: 1240
Joined: Fri May 17, 2013 3:54 pm
Location: New York NY USA

Re: ShapeBinder headache

Post by ppemawm »

dobredani wrote: Sat Aug 06, 2022 9:22 pm I wanted to have one master sketch simulate the joints and movement of the parts.
You should fully constrain the master sketch (4 DOFs are missing) and then exercise the sketch before ever using it for shapebinders to insure that it behaves properly.
"It is a poor workman who blames his tools..." ;)
User avatar
Shalmeneser
Veteran
Posts: 9474
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: ShapeBinder headache

Post by Shalmeneser »

Do the shapebinder follow the master sketch when there is a problem ?
I think it's the master which is breakable. When it's broken, is the master sketch correct ?

I think this skech should have less DOF (degrees of freedom) than 4 DOF (just 2 for the center of the big circle ?).

Sometimes, there are different mathematical solutions for a sketch with the same set of constraints.

What is the blue form in Pin-Sketch056 ?
dobredani
Posts: 9
Joined: Tue Nov 10, 2020 7:21 am

Re: ShapeBinder headache

Post by dobredani »

ppemawm wrote: Sat Aug 06, 2022 11:46 pm You should fully constrain the master sketch (4 DOFs are missing)
The purpose of the master is to simulate the movement of the assembly, so the 4 DOFs are just the way I need them. I tried now to fully constraint the master with angle constraints, then edit one angle, but it still messes up the bindings.
ppemawm wrote: Sat Aug 06, 2022 11:46 pm exercise the sketch
What do you mean?
dobredani
Posts: 9
Joined: Tue Nov 10, 2020 7:21 am

Re: ShapeBinder headache

Post by dobredani »

Shalmeneser wrote: Sun Aug 07, 2022 12:10 am Do the shapebinder follow the master sketch when there is a problem ?
The shapebinder changes the binded edges when I move the master edges around.
Shalmeneser wrote: Sun Aug 07, 2022 12:10 am I think it's the master which is breakable. When it's broken, is the master sketch correct ?
I see no problem with the master. It performs the way I wanted, which is to illustrate the position of the joints in different assembly layouts.
Shalmeneser wrote: Sun Aug 07, 2022 12:10 am Sometimes, there are different mathematical solutions for a sketch with the same set of constraints.
I tried to fully constrain and then edit just one constraint and it still brakes the bindings.
Shalmeneser wrote: Sun Aug 07, 2022 12:10 am What is the blue form in Pin-Sketch056 ?
Ignore this one. It is there for reference, a real-world part that the assembly should avoid touching.

Note:
The edge highlighted below has one DOF which I forgot to constrain. The edge itself is there only to show how close to being symetrical by the vertical axis is the assembly.
So it is 3 DOFs that I need for the master
2022-08-07 (2).png
2022-08-07 (2).png (41.07 KiB) Viewed 819 times
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: ShapeBinder headache

Post by chrisb »

Using a MasterSketch is helpful, if it is very simple or doesn't change at all. Here you have a topological naming problem, where the numbering of the edges changes when modifying the MasterSketch. The problem is thus not the ShapeBinders, but the sketch itself.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
Shalmeneser
Veteran
Posts: 9474
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: ShapeBinder headache

Post by Shalmeneser »

chrisb wrote: Sun Aug 07, 2022 8:21 am Using a MasterSketch is helpful, if it is very simple or doesn't change at all. Here you have a topological naming problem, where the numbering of the edges changes when modifying the MasterSketch. The problem is thus not the ShapeBinders, but the sketch itself.
How can the numbering of the edges can change ?
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: ShapeBinder headache

Post by chrisb »

Before changing the master, the selected edge is Edge4.
SnipScreenshot-5b7901.png
SnipScreenshot-5b7901.png (13.9 KiB) Viewed 683 times
Dragging the nearly horizontal line upwards, the same line becomes Edge5.
Attachments
SnipScreenshot-b14a59.png
SnipScreenshot-b14a59.png (13.21 KiB) Viewed 683 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
Shalmeneser
Veteran
Posts: 9474
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: ShapeBinder headache

Post by Shalmeneser »

@chrisb : true :o
In this file, opening master and showing Sketch(000), it's possible to see the effect of the changing of the red line.
What is the problem ? I understand TNP, but it's not the same here (no modification of the number of anything) ?
Attachments
Capture d’écran 2022-08-07 141814.jpg
Capture d’écran 2022-08-07 141814.jpg (42.63 KiB) Viewed 652 times
broken master FlipFlap.FCStd
(7.9 KiB) Downloaded 5 times
User avatar
ppemawm
Veteran
Posts: 1240
Joined: Fri May 17, 2013 3:54 pm
Location: New York NY USA

Re: ShapeBinder headache

Post by ppemawm »

dobredani wrote: Sun Aug 07, 2022 5:34 am ppemawm wrote: ↑Sat Aug 06, 2022 7:46 pm
exercise the sketch

What do you mean?
Change the independent values of the sketch over the full range of those values to insure it will not break.

Please see the below simplified problem. Is this how your assembly is supposed function? It is not clear to me what your design intent is.
Question: Is Body_2 suppose to be attached to the short Body_5?

Note that I fixed the vertical dimension of the large circle in your master sketch, anchored it to the Y axis, and chose the long lever angle as the independent variable. The master will tolerate a wide range of the long lever angle of +/-20 deg or so without breaking.

The bodies were each created from carbon copies of the master sketch rather than referencing shapebinders as shown in the first image. Each body sketch is constrained to the construction geometry of the carbon copy.

Capture.JPG
Capture.JPG (178.58 KiB) Viewed 599 times
Capture2.JPG
Capture2.JPG (188.38 KiB) Viewed 599 times
Capture3.JPG
Capture3.JPG (183.11 KiB) Viewed 599 times
broken master - Before Point Drag2.FCStd
(79.84 KiB) Downloaded 9 times
This kind of assembly is more readily done with an assembly workbench such as Assembly4 if you like to work with master sketches. Assembly4 also includes an animator which will record .mp4 videos.

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.21.29936 (Git)
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: English/United States (en_US)
Installed mods: 
  * Assembly4 0.12.2
  * fasteners 0.3.46
  * fcgear 1.0.0
"It is a poor workman who blames his tools..." ;)
Post Reply