Possible documentation to help people starting to use FreeCAD

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!
TheMarkster
Posts: 1060
Joined: Thu Apr 05, 2018 1:53 am

Re: Possible documentation to help people starting to use FreeCAD

Postby TheMarkster » Thu Jul 18, 2019 3:03 am

It's hard to say what happened because I don't have a before and after to know what changes you made. My guess is you probably moved some of the elements in the master sketch that the shapebinder was linked to. It is to be expected, even desired, that the shapebinder will change as you change the elements it is linked to.
Halfa
Posts: 56
Joined: Fri Jan 08, 2016 3:40 am

Re: Possible documentation to help people starting to use FreeCAD

Postby Halfa » Thu Jul 18, 2019 3:20 am

chrisb wrote:
Thu Jul 18, 2019 1:48 am
The upper part remained stable, but Sketch002 references the second ShapeBinder which is a proxy for the lower part of the master sketch.

How did Sketch002 look before it broke? Sometimes it happens that a sketch flips to a sketch where still all the constraints are met, but which has a (completely) different layout.
Hi chrisb,
I'm afraid I don't follow you. Sketch 2 and the shapebinder it uses were, and still are, based solely on the original master sketch of the top half.
Sk sb before.jpg
Sk sb before.jpg (15.13 KiB) Viewed 198 times
All I have done is add the lower part of the sketch and this is the result.
sk sb after.jpg
sk sb after.jpg (5.45 KiB) Viewed 198 times
Could you please expand a bit on "which is a proxy for the lower part of the master sketch" when it should still be referencing the top half. Although Sketch002 has become useless it actually looks like it could now be based on the new part of the sketch judging by the shape of part of it.

Thanks,
Arthur
Halfa
Posts: 56
Joined: Fri Jan 08, 2016 3:40 am

Re: Possible documentation to help people starting to use FreeCAD

Postby Halfa » Thu Jul 18, 2019 3:26 am

TheMarkster wrote:
Thu Jul 18, 2019 3:03 am
It's hard to say what happened because I don't have a before and after to know what changes you made. My guess is you probably moved some of the elements in the master sketch that the shapebinder was linked to. It is to be expected, even desired, that the shapebinder will change as you change the elements it is linked to.
As explained in the reply I just sent to chrisb which has before and after images, the only thing I knowingly did to the top half was to to use coincident constraints along the X-axis to line up the added lower half. As far as I know, nothing I did should have affected the shapebinder, but obviously something did.
The file in my original post is what I used to add the extra lines to the master sketch.

Arthur
chrisb
Posts: 19039
Joined: Tue Mar 17, 2015 9:14 am

Re: Possible documentation to help people starting to use FreeCAD

Postby chrisb » Thu Jul 18, 2019 9:39 am

I had understood that you added the lower part of MasterSketches later. Here is how I understand it now, please confirm that I understand it right: You did not change MasterSketches, the lower part existed before and was unchanged.
You only added a coincident constraint which should not affect the ShapeBinder.
Halfa wrote:
Thu Jul 18, 2019 3:26 am
The file in my original post is what I used to add the extra lines to the master sketch.
In the OP is only a pdf attached. I could not find how Sketch002 should look like. Can you please attach a screenshot of how it was before it broke?

My guess is that the coincidence forced a recompute of all subsequent sketches and features and that recompute made Sketch002 flip.
Halfa
Posts: 56
Joined: Fri Jan 08, 2016 3:40 am

Re: Possible documentation to help people starting to use FreeCAD

Postby Halfa » Thu Jul 18, 2019 10:36 am

chrisb wrote:
Thu Jul 18, 2019 9:39 am
I had understood that you added the lower part of MasterSketches later. Here is how I understand it now, please confirm that I understand it right: You did not change MasterSketches, the lower part existed before and was unchanged.
You only added a coincident constraint which should not affect the ShapeBinder.
Halfa wrote:
Thu Jul 18, 2019 3:26 am
The file in my original post is what I used to add the extra lines to the master sketch.
In the OP is only a pdf attached. I could not find how Sketch002 should look like. Can you please attach a screenshot of how it was before it broke?

My guess is that the coincidence forced a recompute of all subsequent sketches and features and that recompute made Sketch002 flip.
My apologies chrisb. You are right that I didn't post the original file, but what you understood originally is correct. I DID add the bottom half of the sketch later. I have attached the original file.

This is the original sketch.
orig sketch.jpg
orig sketch.jpg (58.12 KiB) Viewed 175 times
and the case with slots developed from it.
orig case.jpg
orig case.jpg (7.56 KiB) Viewed 175 times
This is the sketch after I added the bottom half without touching the original sketch except for where I made coincident constraints on the X-axis.
new sketch.jpg
new sketch.jpg (88.62 KiB) Viewed 175 times
This is what the case looks like if I go back in the model tree and it is the same as it originally was. At this point in the tree there are no "error indicators".
new case before adding slots.jpg
new case before adding slots.jpg (6.26 KiB) Viewed 175 times
It looks like there is a limit of five images so I will continue in another post.

Arthur
Attachments
LabPowerSupply_1d.FCStd
(46.37 KiB) Downloaded 6 times
Halfa
Posts: 56
Joined: Fri Jan 08, 2016 3:40 am

Re: Possible documentation to help people starting to use FreeCAD

Postby Halfa » Thu Jul 18, 2019 10:42 am

Continuing,
If I now make the case with slots visible, this is what it looks like, and the sketches for the front and rear slots are nothing like they were. The features in the tree for the front and rear slots show "error indicators". (I don't know the correct term).
new case with slots.jpg
new case with slots.jpg (9.01 KiB) Viewed 174 times
This is the original sketch and space binder for the front panel pocket.
Sk sb before.jpg
Sk sb before.jpg (15.13 KiB) Viewed 174 times
and this is what they look like since I simply added the bottom half of the sketch. That is the only change I have made.
sk sb after.jpg
sk sb after.jpg (5.45 KiB) Viewed 174 times
The space binder and hence the sketch have drastically changed.

Arthur
chrisb
Posts: 19039
Joined: Tue Mar 17, 2015 9:14 am

Re: Possible documentation to help people starting to use FreeCAD

Postby chrisb » Thu Jul 18, 2019 11:59 am

So my former guess was better:

ShapeBinder SlotOutlineSB references edges 13, 14, 15 from the master. In your version 1d these are the middle lines from the upper part. In version 1e edges 13,14,15 are from the lower part. I selected them here:
Bildschirmfoto 2019-07-18 um 13.54.29.png
Bildschirmfoto 2019-07-18 um 13.54.29.png (14.93 KiB) Viewed 165 times
.

So as a conclusion: yes this seems to work as expected. What you can try: If you add the lower part to the master from 1d, does the numbering of the existing edges change?
Halfa
Posts: 56
Joined: Fri Jan 08, 2016 3:40 am

Re: Possible documentation to help people starting to use FreeCAD

Postby Halfa » Mon Jul 22, 2019 11:05 pm

chrisb wrote:
Thu Jul 18, 2019 11:59 am
So my former guess was better:

ShapeBinder SlotOutlineSB references edges 13, 14, 15 from the master. In your version 1d these are the middle lines from the upper part. In version 1e edges 13,14,15 are from the lower part. I selected them here:
Bildschirmfoto 2019-07-18 um 13.54.29.png
.

So as a conclusion: yes this seems to work as expected. What you can try: If you add the lower part to the master from 1d, does the numbering of the existing edges change?
The name of the original file which is the top half of the instrument case with slots for the front and rear panels, ends in "1d" and that is how I will refer to it.
The name of the second file which continued on from 1d, but where I added to the master sketch for the bottom half of the case, I will refer to as "1e".

The outline of the slots in the master sketch in 1d uses lines 13, 14 and 15, and the Shapebinder for the slots uses the edges 13, 14 and 15 (which correspond to the line numbers) and gives the expected result.

The outline of the slots in the master sketch in 1e also uses lines 13, 14 and 15, and the Shapebinder also uses the edges 13, 14 & 15, however these edges refer / link to lines 19,20 and 21 which are new lines in the bottom half of the sketch, not lines 13, 14 and 15.

I have compared the Constraints and Elements in both files and the numbered Constraints and Elements apply to the same things for the top part of the case in both files.

Added:
I decided to try to repair the model by editing the Shape binder for the slots (SlotOutlineSB). I removed edges 13, 14 and 15 and clicked on each of the lines I wanted in the top half of the sketch and these came in as edges 23, 24 and 25. The model is now completely repaired.

I then went back to the master sketch and these lines are still labelled 13, 14 and 15.
end edit.

From this I have to assume that edges aren't the same as lines and something has happened when I added to the original master sketch that has upset the Shapebinder linking. (My terminology is probably wrong).

Arthur

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17352 (Git)
Build type: Release
Branch: master
Hash: ec0049921b813ee78c1fd4ea304e70904a3208f7
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Australia (en_AU)

Edit: Removed "Is it worth me taking up more of your time helping me follow this up further, or should I just accept, and document that it is definitely not a good idea to add to a sketch which has already had features based on it? If this isn't a possible bug, and I'm not suggesting it is, there probably isn't much to gain by spending more time on it." Added more information.
chrisb
Posts: 19039
Joined: Tue Mar 17, 2015 9:14 am

Re: Possible documentation to help people starting to use FreeCAD

Postby chrisb » Wed Jul 24, 2019 12:03 am

I have investigated this a bit further, although not in full depth. As soon as you add things to a sketch there is a certain danger that the resulting edges will be renamed. If that happens then your model will break, if you have used those edges. Let's hope that the integration of realthunder's code will improve this.
Halfa
Posts: 56
Joined: Fri Jan 08, 2016 3:40 am

Re: Possible documentation to help people starting to use FreeCAD

Postby Halfa » Wed Jul 24, 2019 1:00 am

chrisb wrote:
Wed Jul 24, 2019 12:03 am
I have investigated this a bit further, although not in full depth. As soon as you add things to a sketch there is a certain danger that the resulting edges will be renamed. If that happens then your model will break, if you have used those edges. Let's hope that the integration of realthunder's code will improve this.
Thanks for following it up.
I will mention what you have said in my document and basically say "don't do it". At the end of the document I will show what can happen, and how I could repair the model, but I will keep the main body of the document as simple as possible.

Arthur