Complex Sections

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Complex Sections

Post by wandererfan »

FBXL5 wrote: Fri Dec 09, 2022 12:41 pm But I have a quite long whishlist and some ideas about the workflow if you are interested...
I think a new auxiliary view feature would be better than hacking section to look like an auxiliary view.

Having a "spec" or even some notes to work from would be very helpful. You can update issue #5810, or make an auxiliary view post and we can link that to the issue.

I've updated issue #5810 with references to this post and your wiki page.
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Complex Sections

Post by wandererfan »

user1234 wrote: Thu Dec 08, 2022 8:12 pm I tested the PR#7972, see https://github.com/FreeCAD/FreeCAD/pull/7972.
IHeartTesters_small.png
IHeartTesters_small.png (2.97 KiB) Viewed 1426 times

- The complex section still have issues, The rotation value are now correct in the task, but the rotation is still wrong (same as before).
>>> Rotation should be fixed now

- open any section object (double click) abort the task with cancel (do nothing else), it still recalculates the view.
>>> now it checks if section has been modified before doing the restore on cancel

- About the recalculation the is a little bit of improvement, but still recalculate too often. For example while opening a file, FreeCAD still blocks,
>>> I found this in your original 2 part model. There was some extra(?) activity when making updates in the PropertyEditor. I don't see it in the minimal working example where everything is in the same FCStd file. Not sure what is going on here.

- when deleting a section object, the original view will be recalculated (intent, since the line is added to the view), but then it can happen, that the view must be recalculated twice (i do not find any kind a recipe for that behavior).
>>> recomputing BaseView on Section delete is part of StdDelete processing, I think. We don't need this recompute, but I don't know if there is a way to turn it off. Will have to dig for a solution.
Attachments
CylinderBase_mwe.FCStd
(680.61 KiB) Downloaded 31 times
User avatar
FBXL5
Posts: 979
Joined: Sat Aug 03, 2019 8:45 pm

Re: Complex Sections

Post by FBXL5 »

wandererfan wrote: Fri Dec 09, 2022 3:41 pm I think a new auxiliary view feature would be better than hacking section to look like an auxiliary view.
Indeed! But I think most of the Auxiliary functionality is already available in the section tools.

First step could be copy and paste the sction view, rename it auxiliary view and remove the segments dealing with cutting the object.
Add a method to determine the view direction within the base view and place an arrow in the base view, says the guy who can hardly read your C++ code. :roll:
The former would benefit the section tools, too.

I missed the discussion about aux views and I still struggle with github
domad
Veteran
Posts: 2053
Joined: Mon Jun 22, 2020 12:16 pm

Re: Complex Sections

Post by domad »

Greetings to the Community!
... an example of a view direction representation.
Nothing prevents you from positioning the view, correctly named, anywhere in the drawing, in the attached example it is positioned along the indicated direction.
Attachments
example of indication of the direction of view.FCStd
(42.53 KiB) Downloaded 35 times
example_of_indication_of_the_direction_of_view.png
example_of_indication_of_the_direction_of_view.png (113.13 KiB) Viewed 1408 times
user1234
Veteran
Posts: 3339
Joined: Mon Jul 11, 2016 5:08 pm

Re: Complex Sections

Post by user1234 »

wandererfan wrote: Fri Dec 09, 2022 3:49 pm - Tthe complex section still have issues, The rotation value are now correct in the task, but the rotation is still wrong (same as before).
>>> Rotation should be fixed now
Confirmed, works now with one grain of salt. When clicking OK before confirming the angle with the green hook, the angle flips randomly to 0° or 90°.

Peek 2022-12-09 18-29.webm
(481.82 KiB) Downloaded 36 times

Also, there was an issue with the test file, or better said, with the view. With this PR when deleting the sections and make a new, it was still faulty. When i delete the view (from there was the sections) and make a new view with sections, it works flawless (except the grain of salt i mentioned before). Since the error was just a few days, i would not bother with that.


wandererfan wrote: Fri Dec 09, 2022 3:49 pm - open any section object (double click) abort the task with cancel (do nothing else), it still recalculates the view.
>>> now it checks if section has been modified before doing the restore on cancel
Works!


wandererfan wrote: Fri Dec 09, 2022 3:49 pm - about the recalculation the is a little bit of improvement, but still recalculate too often. For example while opening a file, FreeCAD still blocks,
>>> I found this in your original 2 part model. There was some extra(?) activity when making updates in the PropertyEditor. I don't see it in the minimal working example where everything is in the same FCStd file. Not sure what is going on here.
It is now much much better. I will do a rl drawing tomorrow to test it better.


wandererfan wrote: Fri Dec 09, 2022 3:49 pm - when deleting a section object, the original view will be recalculated (intent, since the line is added to the view), but then it can happen, that the view must be recalculated twice (i do not find any kind a recipe for that behavior).
>>> recomputing BaseView on Section delete is part of StdDelete processing, I think. We don't need this recompute, but I don't know if there is a way to turn it off. Will have to dig for a solution.
It is not important now and for this case, so do not bother with that.


Code: Select all

OS: Debian GNU/Linux 11 (bullseye) (X-Cinnamon/lightdm-xsession)
Word size of FreeCAD: 64-bit
Version: 0.21.0.31253 (Git)
Build type: Release
Branch: fixSlowCS
Hash: 8b511b9103534926ff799ddb5a23718912841353
Python 3.9.2, Qt 5.15.2, Coin 4.0.0, Vtk 9.0.1, OCC 7.6.3
Locale: English/United States (en_US)
Installed mods: 
  * QuickMeasure 2022.10.28
last commit 8b511b9 (up to date now)


As always, many thanks for that improvement you made, really appreciate that!

Greetings
user1234
User avatar
FBXL5
Posts: 979
Joined: Sat Aug 03, 2019 8:45 pm

Re: Complex Sections

Post by FBXL5 »

domad wrote: Fri Dec 09, 2022 4:22 pm Nothing prevents you from positioning the view...
Your example proved that you don't give a (choose yourself) about proper old school drawing creation. That makes me sad. :cry:

But at least you care about proper aligning (which is quite easy since there are no other views demanding this space).
The naming like sections and more than one arrow does not match standards over here (DIN/EN/ISO).
"VIEW" can be omitted as can the scale if it doesn't deviate from the scale of the main view(s).
Snip macro screenshot-3dfea0.png
Snip macro screenshot-3dfea0.png (67.89 KiB) Viewed 1343 times
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Complex Sections

Post by wandererfan »

user1234 wrote: Fri Dec 09, 2022 5:49 pm Confirmed, works now with one grain of salt. When clicking OK before confirming the angle with the green hook, the angle flips randomly to 0° or 90°.
I can't duplicate the random behaviour. Might be something to do with the SectionNormal and XDirection combination you are using? If you post the file, I will check.

If you don't confirm the angle, then the direction is not updated and the original setting is used. Maybe OK could perform a hidden press of the "hook" button, but I don't like trying to outsmart the user.
domad
Veteran
Posts: 2053
Joined: Mon Jun 22, 2020 12:16 pm

Re: Complex Sections

Post by domad »

Greetings to the Community!
....in my short industrial "life" I assure you that I have seen many "transgressions" of the standards, but strangely (for me) none of these have led to execution errors, I cannot say the same about strictly adhering technical drawings to standards.
An "ignorant" ( :o ) professor of mine (more than 50 years ago) used to say: since often skilled toolmakers/workers/machine tool operators, etc. are not fully familiar with the legislation, any clarification/representation useful to unequivocally clarify what one wants to communicate is welcome, beyond the "regulatory doctrine".
In the example contained in the previous reply, this indication could be completely omitted, not only the scale.
In any case I have always used the "sections" indication system also for the auxiliary views, considering it much more effective and flexible than what is recommended by the standard, but they haven't "arrested" me for this. :lol: :lol:
user1234
Veteran
Posts: 3339
Joined: Mon Jul 11, 2016 5:08 pm

Re: Complex Sections

Post by user1234 »

wandererfan wrote: Fri Dec 09, 2022 10:34 pm
user1234 wrote: Fri Dec 09, 2022 5:49 pm Confirmed, works now with one grain of salt. When clicking OK before confirming the angle with the green hook, the angle flips randomly to 0° or 90°.
I can't duplicate the random behaviour. Might be something to do with the SectionNormal and XDirection combination you are using? If you post the file, I will check.
I notice that only when on +045°, -045°, +315° and -315°. Maybe there are more, but i tested not all +-360° or its unlimited fractions.

Here the files.
CylinderBase.FCStd
(552.22 KiB) Downloaded 28 times
2D_CylinderBase.FCStd
(20.46 KiB) Downloaded 28 times


wandererfan wrote: Fri Dec 09, 2022 10:34 pm If you don't confirm the angle, then the direction is not updated and the original setting is used. Maybe OK could perform a hidden press of the "hook" button, but I don't like trying to outsmart the user.
Generally i second that, that automatic is crap, but i do not think that in this case that is any kind of. Since:

- If a user had edited the field, so it was intended and should be considered.
- Pretty every task, PartDesign, TechDraw or whatever, works this way, also there are nor confirmation needed.
Peek 2022-12-10 18-13.webm
(95.58 KiB) Downloaded 33 times
- Besides that, that the view of the section is rotated, but not the section itself (which make little sense to be).

Also in the testbox, no calculation can be done (example: 45° + 90°). It should be a field like every else, that allowing calculating and expression like everywhere. I also do not think that button is necessary. But that is nitpicking.

Tested with the updated branch:

Code: Select all

OS: Debian GNU/Linux 11 (bullseye) (X-Cinnamon/lightdm-xsession)
Word size of FreeCAD: 64-bit
Version: 0.21.0.31254 (Git)
Build type: Release
Branch: fixSlowCS
Hash: c5e3c549f2654ee2b542b2f490263edfcdca6687
Python 3.9.2, Qt 5.15.2, Coin 4.0.0, Vtk 9.0.1, OCC 7.6.3
Locale: English/United States (en_US)
Installed mods: 
  * QuickMeasure 2022.10.28
last commit: c5e3c54 (yes, you can see it in the hash, but it is easier to see)

Greetings
user1234
user1234
Veteran
Posts: 3339
Joined: Mon Jul 11, 2016 5:08 pm

Re: Complex Sections

Post by user1234 »

An other issue i noticed with the section through testing. The detail view positions (and rotation) are incorrect.

default view:
works correct

default section view:
the x and y position and rotation are (or better can be) incorrect, because the view is rotated (property Rotation). Also the detail circle is (can be) in an incorrect position.

complex section view:
the detail is blank

2022-12-10_21-16.png
2022-12-10_21-16.png (458.33 KiB) Viewed 1080 times
CylinderBase.FCStd
(552.22 KiB) Downloaded 30 times
2D_CylinderBase.FCStd
(16.98 KiB) Downloaded 31 times

(yes again this file and filename, but it is linked and this drawing have many sources to test in it).



This leads me to 2 feature requests, which i want to set longer (or try to do myself, but the time to learn the skills, maybe i can prepare a bounty, must look in the end of the year if a have enough money):

- Set or use from the object(s) to deviate the (a) coordinate system. Reason: all cosmetic objects, dimension or other additions position depends on the coordinate system. When you change the size of the object(s), the position of the x0 and y0 change and their positions is useless (and must be made new). Besides it is not logical, that the x0 y0 is in the middle of a view, this should be always defined.

- As far as i know, all operations and later its deviation are done in 3D and scaled. Since some results depends on its scale (because of OCCT modelling algorithm and/or its hlr), all should done unscaled in the background and scaled later after deviating.

I think with this two features, TechDraw can be more stable.


Greetings
user1234
Post Reply