How do I transform PartDesigner Bodies into a plane representing a 4x8 sheet?

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!
SixHourDays
Posts: 10
Joined: Wed May 15, 2019 10:44 pm

Re: How do I transform PartDesigner Bodies into a plane representing a 4x8 sheet?

Postby SixHourDays » Fri May 17, 2019 5:07 pm

Ok - this has become a more interesting bug.

I now have 2 proofs, that it also breaks choosing Geometry and selecting a face..but only after a certain complexity in the file.

File1 works fine - activate Body001, you can create a ShapeBinder, base a sketch off it, all is well. Note, there is only 1 curved corner in the model.

File2 - activate Body001, create a ShapeBinder, Add Geometry button, select a face of the pad, same camera bug. Note, there are 2 curved corners now.

File3 - here, I've kept the same 1st curve, and added a different 2nd curve elsewhere in the model. Same bug as File2.

I hope this helps someone figure out the bug? I at least feel justified in me claiming it was buggy a few posts back.
Attachments
File3.FCStd
(15.33 KiB) Downloaded 5 times
File2.FCStd
(15.37 KiB) Downloaded 6 times
File1.FCStd
(14.03 KiB) Downloaded 5 times
User avatar
bejant
Posts: 5934
Joined: Thu Jul 11, 2013 3:06 pm

Re: How do I transform PartDesigner Bodies into a plane representing a 4x8 sheet?

Postby bejant » Sun May 19, 2019 5:29 pm

SixHourDays wrote:
Fri May 17, 2019 5:07 pm
File2 - activate Body001, create a ShapeBinder, Add Geometry button, select a face of the pad, same camera bug.

I can't reproduce it. I also tried the following steps using your File2:

SixHourDays wrote:
Fri May 17, 2019 3:46 pm
create 2nd new body & activate
I tried by activating Body001 in your file, and also by creating a new Body. After that, I did this:

SixHourDays wrote:
Fri May 17, 2019 3:46 pm
create new shape binder
click Task's Object button (don't click the pad yet!)
note camera rotate / pan with shift+rightclick is fine, and camera cube control is fine
now select the pad in the view
And it worked using your Body001, and worked again using a freshly created Body002.


OS: Ubuntu 18.04.2 LTS
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.18.1.
Build type: Release
Python version: 3.6.7
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
User avatar
bejant
Posts: 5934
Joined: Thu Jul 11, 2013 3:06 pm

Re: How do I transform PartDesigner Bodies into a plane representing a 4x8 sheet?

Postby bejant » Sun May 19, 2019 6:16 pm

chrisb wrote:
Thu May 16, 2019 4:41 pm
If you have added a whole body no faces can be selected. This is possibly a bug, which others should please confirm
After experimenting a bit more, I see that I really don't know. Without first populating the Object field I can use the Add Geometry button and select an Edge or a Face directly in the 3D view, and it will be included in the new ShapeBinder. To include a whole Feature as the ShapeBinder, I can, for example, select Pad in the history tree and then click the ShapeBinder tool to make a ShapeBinder of the entire Pad. If I make a ShapeBinder of a BodyX, the ShapeBinder updates as BodyX changes. By choosing a Body as the Object I think the thought is that the user wants the ShapeBinder to always be the newest Feature of the Body, so that the ShapeBinder updates as the Body evolves. Maybe if I come back to it later I'll be able to collect my thoughts about this a bit better.
User avatar
bejant
Posts: 5934
Joined: Thu Jul 11, 2013 3:06 pm

Re: How do I transform PartDesigner Bodies into a plane representing a 4x8 sheet?

Postby bejant » Sun May 19, 2019 7:46 pm

I just stumbled across this forum topic, maybe the OP will find it useful:
https://forum.freecadweb.org/viewtopic.php?f=9&t=35635
chrisb
Posts: 18911
Joined: Tue Mar 17, 2015 9:14 am

Re: How do I transform PartDesigner Bodies into a plane representing a 4x8 sheet?

Postby chrisb » Sun May 19, 2019 10:31 pm

SixHourDays wrote:
Fri May 17, 2019 3:46 pm
Here are steps to reproduce breaking the camera when making a Shape Binder:
new document
part design wb
create new body
create new sketch, XY plane
draw any full constrained sketch
create new pad from sketch, any size
create 2nd new body & activate
create new shape binder
click Task's Object button (don't click the pad yet!)
note camera rotate / pan with shift+rightclick is fine, and camera cube control is fine
now select the pad in the view
note the camera breaks, and the camera control cube goes away

it will remain broken until you reload a file.
Add / Remove Geo buttons seem fine to use - it's just Object button causing problems.
Thanks for the clear step by step description.
However, I cannot confirm the issues. There are several possibilities why it happens at your site:

- it can be OS specific
- it can depend on the mouse model
- it can depend on your graphics card or card driver.
- it can depend on the FreeCAD version

I'm here on a Mac version with a trackpad using gesture mouse model.

OS: macOS 10.13
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16790 (Git)
Build type: Release
Branch: master
Hash: 15f440525e59c3caf89f847a490981abf5a45f8f
Python version: 3.7.3
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
chrisb
Posts: 18911
Joined: Tue Mar 17, 2015 9:14 am

Re: How do I transform PartDesigner Bodies into a plane representing a 4x8 sheet?

Postby chrisb » Sun May 19, 2019 10:36 pm

I tried File2.FCStd as well and like bejant I could not find any issue.
My assumption is, that it is your graphics card/driver. The ShapeBinder causes z-fighting, because it is, of course, in exactly the same place as the face to which it is attached. Perhaps the graphics driver cannot handle this if the shapes become complicated.
SixHourDays
Posts: 10
Joined: Wed May 15, 2019 10:44 pm

Re: How do I transform PartDesigner Bodies into a plane representing a 4x8 sheet?

Postby SixHourDays » Thu May 30, 2019 7:48 pm

chrisb:
Hi again, sorry for long delay.

I'm an ex-graphics programmer - so I can help with this some more.
1 - the mouse? cmon :-) this made me laugh
2 - it's not z fighting, I know what that looks like.
3 - I'm running Win10x64 Pro, Ryzen7 1700X cpu, and two Radeon R7 260X gpu's in Crossfire( gpu driver is 19.3.3, only a few months old).
4 - I've attached 3 screenshots, so you can see exactly what it looks like.

Setup of screenshots - made Body1's cylinder, made Body2 and started making it's Shapebinder.
A - Have clicked the Task's Object button, but have not clicked the cylinder yet. Note the camera controls top right are fine.
B - Now I've clicked the flat end of the cylinder. Note Object button deselects and "Pad" is added to the field. Also note the camera controls are gone.
C - I've now shift+rightclick rotated the view downward a bit: see how the visual is corrupted.

Taking an educated guess: that looks like an invisible copy of the cylinder's orientation in B is clipping away the visible model. Either a real copy is there only drawing into depth buffer, or the depth buffer stopped updating (keeping a depth-hull of the B orientation).

Hopefully this helps you reproduce!
Attachments
FreeCadCamBugA.png
FreeCadCamBugA.png (100.1 KiB) Viewed 130 times
FreeCadCamBugB.png
FreeCadCamBugB.png (106.27 KiB) Viewed 130 times
FreeCadCamBugC.png
FreeCadCamBugC.png (107.71 KiB) Viewed 130 times
chrisb
Posts: 18911
Joined: Tue Mar 17, 2015 9:14 am

Re: How do I transform PartDesigner Bodies into a plane representing a 4x8 sheet?

Postby chrisb » Thu May 30, 2019 8:21 pm

SixHourDays wrote:
Thu May 30, 2019 7:48 pm
1 - the mouse? cmon :-) this made me laugh
While laughing you should nevertheless tell us which of the eight Mouse Models you use :roll: .
SixHourDays
Posts: 10
Joined: Wed May 15, 2019 10:44 pm

Re: How do I transform PartDesigner Bodies into a plane representing a 4x8 sheet?

Postby SixHourDays » Thu May 30, 2019 10:45 pm

Ahhh I thought you meant the physical mouse :-) I'm in CAD navigation style.
User avatar
bejant
Posts: 5934
Joined: Thu Jul 11, 2013 3:06 pm

Re: How do I transform PartDesigner Bodies into a plane representing a 4x8 sheet?

Postby bejant » Sat Jun 01, 2019 12:59 am

SixHourDays wrote:
Thu May 30, 2019 7:48 pm
C - I've now shift+rightclick rotated the view downward a bit: see how the visual is corrupted.
...snip...
Image


It sorta looks like the Clipping Plane is messed up. What happens if you click the View > Fit tool button (first one in the View toolbar)? The keyboard shortcut is "vf" (without the quotes), or from the pull-down menu it's View > Standard Views > Fit All.