Changing a value then reverting change results in different dimensions

Post here for help on using FreeCAD's graphical user interface (GUI).
SIXe
Posts: 11
Joined: Sat Mar 16, 2019 3:10 pm

Changing a value then reverting change results in different dimensions

Postby SIXe » Sat Mar 16, 2019 3:27 pm

Hi,

I just started using FreeCAD and tried to draw a stool as a learning project. However, two things don't work as expected.

Issue 1: If I increase the leg angle and put it back on the same value as before, the angle changed and the legs aren't positioned correctly. See attached screenshots. Why is that? Possibly I've done something wrong but I can't figure out what. A nudge in the right direction would be appreciated.

To reproduce: Take the attached file and change Spreadsheet.legextent from 30mm to 130mm and then back to 30mm. After this change the legs are not symmetric any more.
Image
Image
Image

Issue 2: I don't know how to extend the foot rest so it sits in between the legs. I just don't know how to approach that. Pad → Type → To first doesn't work here. Any tips appreciated.

I have tried to search the forum and mailing list (which seems rather low volume), but frankly, I have no clue what terms to search for.

OS: Debian GNU/Linux buster/sid
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.
Build type: Release
Python version: 3.7.2+
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)
Attachments
stool.FCStd
(139.17 KiB) Downloaded 6 times
kisolre
Posts: 270
Joined: Wed Nov 21, 2018 1:13 pm

Re: Changing a value then reverting change results in different dimensions

Postby kisolre » Sun Mar 17, 2019 12:17 am

1. It looks like when doing such drastic change (relative to sketch edge sizes) somehow changes the order of edges so the points now have different numbers and constraint are applied to the wrong point. Changing that value in smaller increments (10-50) does not create a problem. Probably some solver problem.

2. Some trigonometry in spreadsheet will probably solve that.
SIXe
Posts: 11
Joined: Sat Mar 16, 2019 3:10 pm

Re: Changing a value then reverting change results in different dimensions

Postby SIXe » Sun Mar 17, 2019 10:05 am

kisolre wrote:
Sun Mar 17, 2019 12:17 am
1. It looks like when doing such drastic change (relative to sketch edge sizes) somehow changes the order of edges so the points now have different numbers and constraint are applied to the wrong point. Changing that value in smaller increments (10-50) does not create a problem. Probably some solver problem.
Indeed small changes work. But small or big changes shouldn't make a difference. “Some solver problem” means a problem (bug) in freecad (in contrast to an issue with my drawing)? If yes, should I report this?
kisolre wrote:
Sun Mar 17, 2019 12:17 am
2. Some trigonometry in spreadsheet will probably solve that.
Indeed, but since freecad offers so much functionality I thought there's an easier way than calculating it manually. Which further complicates things is that it's not just a straight cut, the angle of the cut depends on the leg angle. I mean it's basically “pad until reaching next surface”. AFAIK there's a function in freecad that does exactly that, but it doesn't work in this case.

If you say, there's no way in freecad to do that automatically and it has to be calculated manually, I'm fine with that. Then I'll go that route. It just seems quite complicated for a seemingly simple pad.

Thanks anyway for your quick response.
kisolre
Posts: 270
Joined: Wed Nov 21, 2018 1:13 pm

Re: Changing a value then reverting change results in different dimensions

Postby kisolre » Sun Mar 17, 2019 11:53 am

Sketcher_Workbench does not provide any info for the actual solvers used and their parameters (which are hidden by default since the defaults work in 99% of the cases) so I am not sure if this should be considered a bug.
SketcherSolverParameters.JPG
SketcherSolverParameters.JPG (133.17 KiB) Viewed 130 times
.
Using reference dimension to the center of the foot rest and named constratint to calculate foot rest length:
StoolSketch.JPG
StoolSketch.JPG (122.62 KiB) Viewed 130 times
.
edit: actually I should have used bottom right vertex but you get the idea :)
Attachments
stool_kiss1.FCStd
(114.49 KiB) Downloaded 2 times
Last edited by kisolre on Sun Mar 17, 2019 12:31 pm, edited 1 time in total.
chrisb
Posts: 14104
Joined: Tue Mar 17, 2015 9:14 am

Re: Changing a value then reverting change results in different dimensions

Postby chrisb » Sun Mar 17, 2019 12:02 pm

This behaviour is sure not a bug, the solver finds a valid solution. That does not mean that there is no improvement possible.
SIXe
Posts: 11
Joined: Sat Mar 16, 2019 3:10 pm

Re: Changing a value then reverting change results in different dimensions

Postby SIXe » Sun Mar 17, 2019 1:13 pm

kisolre wrote:
Sun Mar 17, 2019 11:53 am
Sketcher_Workbench does not provide any info for the actual solvers used and their parameters (which are hidden by default since the defaults work in 99% of the cases) so I am not sure if this should be considered a bug.
Thanks for the clarification. Bug or not, this behaviour is undesirable as it distorts the drawing in unexpected ways. What do I need to change to prevent this from happening?
kisolre wrote:
Sun Mar 17, 2019 11:53 am
Using reference dimension to the center of the foot rest and named constratint to calculate foot rest length:
edit: actually I should have used bottom right vertex but you get the idea :)
This allows for dynamic length adjustment. But it does not extend just to the legs (in fact it extends *into* to legs). Even if the bottom right vertex is used, the footrest protrudes into the legs. Or alternatively if the top right vertex is used, there's a gap at the bottom of the footrest. I might have to use your centre point solution and try to cut away the part that protrudes into the leg. Thanks for the hint. I'll check if I can find a solution.
SIXe
Posts: 11
Joined: Sat Mar 16, 2019 3:10 pm

Re: Changing a value then reverting change results in different dimensions

Postby SIXe » Sun Mar 17, 2019 1:17 pm

chrisb wrote:
Sun Mar 17, 2019 12:02 pm
This behaviour is sure not a bug, the solver finds a valid solution.
Thanks for the clarification. Frankly, I have no clue how freecad works internally and how to fine tune the solvers (or really understand what's going on for that matter).
chrisb wrote:
Sun Mar 17, 2019 12:02 pm
That does not mean that there is no improvement possible.
As I mentioned, I just started out with FreeCAD. I'm happy to learn how I can improve my drawing to prevent this issue from happening.
kisolre
Posts: 270
Joined: Wed Nov 21, 2018 1:13 pm

Re: Changing a value then reverting change results in different dimensions

Postby kisolre » Sun Mar 17, 2019 2:28 pm

Why are you designing this model?
If it is for production and you need proper dimensions/cutting angles then you can add a sketch from the side and pocket the extra bits. A could try that later.
If it is just for visual representation why is this a problem?
SIXe
Posts: 11
Joined: Sat Mar 16, 2019 3:10 pm

Re: Changing a value then reverting change results in different dimensions

Postby SIXe » Sun Mar 17, 2019 2:58 pm

kisolre wrote:
Sun Mar 17, 2019 2:28 pm
Why are you designing this model?
To learn FreeCAD.
kisolre wrote:
Sun Mar 17, 2019 2:28 pm
If it is for production and you need proper dimensions/cutting angles then you can add a sketch from the side and pocket the extra bits. A could try that later.
I need to build a new stool for the workshop, so I thought I'll use that project to start learning FreeCAD. In the end it should be a proper drawing with correct angles (provided by FreeCAD instead of calculating them manually) drawn in a flexible way, so I can easily go e.g. from 25mm to 20mm tubing. In the end I want to be able to use FreeCAD to generate part lists and assembly directions, which of course, need to have correct dimensions.

I am trying to create a cut between the legs and the footrest at the moment. Not quite succeeding, yet.
kisolre wrote:
Sun Mar 17, 2019 2:28 pm
If it is just for visual representation why is this a problem?
It's a problem because I just started to learn FreeCAD and am running into these issues and want to solve them. You know, learn how to do it right. If I manage to build something as simple as a stool I can move forward and eventually use it for real, more complex drawings that actually need a 3D model. (BTW: It took much longer to create the cad drawing than to build the complete stool, but that's expected when you start out with something new, I guess.)
kisolre
Posts: 270
Joined: Wed Nov 21, 2018 1:13 pm

Re: Changing a value then reverting change results in different dimensions

Postby kisolre » Sun Mar 17, 2019 3:42 pm

Since you already started with Shapebinders (which used like that are prone to "Topological naming" issues) here is a solution: Create shapebinder of the face you want to cut to. Create datumplane based on the shapebinder. Create sketch on that datumplane. Draw a shape that will always envelop the end that needs to be cut (see constraints). Pocket the that sketch outside. Mirror to fix the other end.
StoolProperCut.JPG
StoolProperCut.JPG (139.96 KiB) Viewed 84 times
Attachments
stool_kiss2.FCStd
(127.05 KiB) Downloaded 2 times