about the new detail view dialog
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
about the new detail view dialog
Hello Wandererfan, I had a look at the new detail dialog and have the following questions:
- I would like to add more setting to the dialog. Am I allowed to do this?
- how does the "Drag Highlight" button work? When Creating a new detail dialog i would like to click on the position in the view where i want to have the detail centered.
When clicking on "Drag Highlight", nothing happens visible for me. Also when i click this button on existing details, nothing happens and the button stays disabled the whole time after it has been clicked.
- I would like to add more setting to the dialog. Am I allowed to do this?
- how does the "Drag Highlight" button work? When Creating a new detail dialog i would like to click on the position in the view where i want to have the detail centered.
When clicking on "Drag Highlight", nothing happens visible for me. Also when i click this button on existing details, nothing happens and the button stays disabled the whole time after it has been clicked.
Last edited by uwestoehr on Tue Jun 09, 2020 6:00 pm, edited 1 time in total.
- wandererfan
- Veteran
- Posts: 6326
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: about the new detail view dialog
Please wait a day or two. See next answer.
The dragger is broken. What is supposed to happen is an overlay appears at the current anchor position and then you LMB drag it to the new position.- how does the "Drag Highlight" button work? When Creating a new detail dialog i would like to click on the position in the view where i want to have the detail centered.
When clicking on "Drag Highlight", nothing happens visible for me. Also when i click this button on existing details, nothing happens and the button stays disabled the whole time after it has been clicked.
After you click Drag Highlight, press View All. You'll see the draggable symbol somewhere, but it is the wrong size and in the wrong place.
- wandererfan
- Veteran
- Posts: 6326
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: about the new detail view dialog
The dragger should be fixed by git commit 2d29ac5fc1.
Re: about the new detail view dialog
This works now. Many thanks.wandererfan wrote: ↑Tue Apr 14, 2020 1:02 am The dragger is broken. What is supposed to happen is an overlay appears at the current anchor position and then you LMB drag it to the new position.
However, there are some issues:
1. We have the preferences setting "Detail View Outline Shape" but no property to change this later.
2. The detail view has the 3 highlight properties, but they have no effect. Only in the base view they have an effect. Therefore they should not appear in the Detail View properties.
3. The highlight adjust property does not work correctly. Take for example this file: Here is how this file looks on my PC: 3.1 You can see that the detail is rotated in the base view but not in the actual detail view.
3.2 Also the detail dialog must now state what the size of the view is. "Radius" is not useful, since the outline is a square the dialog must state "Edge length". -> Since I want to add new features to the dialog I can take care of this.
3.3 The scaling is incorrect. Both, the base view and the detail view have the same scaling, but the detail view is smaller.
3.4 Go to the preferences and change the outline shape for details to Circle. Note that the preferences dialog states, that this setting only affects new objects. Now change e.g. the Radius property of the detail view -> Result: now the outline shape of the existing detail view gets round.
- wandererfan
- Veteran
- Posts: 6326
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: about the new detail view dialog
Are both shapes typically used in a drawing? I thought this was a "shop standard" and a given drawing office used circles or squares, but not both. If you feel it is important, go ahead and add a property on the Gui side. IIRC, the geometry generation on the App side always uses a circle. This depends on how we handle 3.4.
Yes, they should be set to App::Property::Hidden in the section ctor.2. The detail view has the 3 highlight properties, but they have no effect. Only in the base view they have an effect. Therefore they should not appear in the Detail View properties.
This property was a hack to circumvent errors in the highlight positioning. It was never meant to rotate anything.3. The highlight adjust property does not work correctly. Take for example this file:
3.1 You can see that the detail is rotated in the base view but not in the actual detail view.
Those errors have been fixed, so this property can be removed.
Just changing the ui will not be enough, unless we use something generic like "highlight size". As is, the square is constructed to just fit inside a circle with the specified radius.3.2 Also the detail dialog must now state what the size of the view is. "Radius" is not useful, since the outline is a square the dialog must state "Edge length". -> Since I want to add new features to the dialog I can take care of this.
looks the same here at 1:1 and 2:1.3.3 The scaling is incorrect. Both, the base view and the detail view have the same scaling, but the detail view is smaller.
We should change the literal in the preferences ui to match the behaviour of the code.3.4 Go to the preferences and change the outline shape for details to Circle. Note that the preferences dialog states, that this setting only affects new objects. Now change e.g. the Radius property of the detail view -> Result: now the outline shape of the existing detail view gets round.
Re: about the new detail view dialog
Sorry, the scale is correct but not the position:
Look where the circle border is and what is in the Detail view.
- wandererfan
- Veteran
- Posts: 6326
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: about the new detail view dialog
I see now the bug is because of the property "Highlight Adjust" since its rotation is not performed at the center of the circle.
Take this testfile:
Re: about the new detail view dialog
This PR fixes the following Detail issues: https://github.com/FreeCAD/FreeCAD/pull/3365
- when the user sets the ScaleType "Page" only the page scale can be used - this is already the case in the other views
- there is no class DrawDetail but DrawViewDetail
- the detail outline shape affects existing views, therefore it must be upright in the preferences
- set keyboardTracking to false in the dialog, see also https://doc.qt.io/qt-5/qabstractspinbox ... cking-prop
The latter is important because a dialog in which I can change something but don't see any effect is useless. The detail dialog is there to be able to find the right location and size. This involves fine-tuning, so a millimeter more or less. If I would need to close the dialog just to see the effect, then open it again, then changing another mm, then close etc. as it is now, having a dialog is no help.
I also think that we have a phantom discussion in this respect because of course as user I always want to see the effect immediately. If I e.g. drag a complex 3D model in FC, of course this involves a lot of computations, but this is CAD. Nobody will use a netbook for CAD because he knows it might become dog slow.
Besides this, could you please provide a sample file where you thin the user is lost when a dialog makes e.g. 10 recomputes in a row? I still cannot see any problem because moving a 3D model recomputes much more and e.g. in the Detail dialog the user clicks just a few times.
- This PR does not fix the issue that the property "HighlightLineColor" should be hidden in the DetailView beaus there is no "ViewProviderDetail" yet and I don't know the reason.
- when the user sets the ScaleType "Page" only the page scale can be used - this is already the case in the other views
- there is no class DrawDetail but DrawViewDetail
- the detail outline shape affects existing views, therefore it must be upright in the preferences
- set keyboardTracking to false in the dialog, see also https://doc.qt.io/qt-5/qabstractspinbox ... cking-prop
The latter is important because a dialog in which I can change something but don't see any effect is useless. The detail dialog is there to be able to find the right location and size. This involves fine-tuning, so a millimeter more or less. If I would need to close the dialog just to see the effect, then open it again, then changing another mm, then close etc. as it is now, having a dialog is no help.
I also think that we have a phantom discussion in this respect because of course as user I always want to see the effect immediately. If I e.g. drag a complex 3D model in FC, of course this involves a lot of computations, but this is CAD. Nobody will use a netbook for CAD because he knows it might become dog slow.
Besides this, could you please provide a sample file where you thin the user is lost when a dialog makes e.g. 10 recomputes in a row? I still cannot see any problem because moving a 3D model recomputes much more and e.g. in the Detail dialog the user clicks just a few times.
- This PR does not fix the issue that the property "HighlightLineColor" should be hidden in the DetailView beaus there is no "ViewProviderDetail" yet and I don't know the reason.
- wandererfan
- Veteran
- Posts: 6326
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: about the new detail view dialog
this is a good "discovery". Sounds like it makes "valueChanged" behave more like "editingFinished".uwestoehr wrote: ↑Sat Apr 18, 2020 12:55 pm - set keyboardTracking to false in the dialog, see also https://doc.qt.io/qt-5/qabstractspinbox ... cking-prop
Yes, I understand this. But in the current configuration, there is no need to close the dialog to see the update. The tab key will trigger an update, as will changing focus to another widget. The enter key should do it also, but that is trapped somewhere and never delivered to the widget in the dialog.The latter is important because a dialog in which I can change something but don't see any effect is useless. The detail dialog is there to be able to find the right location and size. This involves fine-tuning, so a millimeter more or less. If I would need to close the dialog just to see the effect, then open it again, then changing another mm, then close etc. as it is now, having a dialog is no help.
The issue was that the recompute was being triggered by the dialog for every keystroke in the changed field. So if you wanted to change the X position of the highlight from 350 mm to 500 mm the recalculation would be done approximately 6 times - 3 backspaces to remove the old value, then 3 keys to enter the new value.
A similar condition occurs when a recompute is triggered by the onChanged method. The changed signal occurs for every digit changed. onChanged should only call recompute if the execute method is very light - as in Annotation, say.
Not an expert in Coin, but I don't believe a drag in the 3D window involves a lot of calculation for FC, just a tweak or two to the existing scene graph.I also think that we have a phantom discussion in this respect because of course as user I always want to see the effect immediately. If I e.g. drag a complex 3D model in FC, of course this involves a lot of computations, but this is CAD. Nobody will use a netbook for CAD because he knows it might become dog slow.
In TD also, a drag should not recompute geometry as the position on the page is not relevant to the projection.
I believe I was using "screwjack_assembly.fcstd". The initial section origin point is too far to the right, and trying to move the position back to the origin triggered the loop/slow response.Besides this, could you please provide a sample file where you thin the user is lost when a dialog makes e.g. 10 recomputes in a row? I still cannot see any problem because moving a 3D model recomputes much more and e.g. in the Detail dialog the user clicks just a few times.
The drawing process for the detail view is the same as for the regular view (except for the "matting" overlay), so it uses the same view provider as the regular view.- This PR does not fix the issue that the property "HighlightLineColor" should be hidden in the DetailView beaus there is no "ViewProviderDetail" yet and I don't know the reason.
The "HighlightLineColor" property can be selectively hidden by testing if the feature is a DrawViewDetail, and setting App::Property::Hidden appropriately.
- Attachments
-
- screwjack_assmbly.FCStd
- (104.25 KiB) Downloaded 32 times