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: Wed Sep 28, 2022 10:38 pm
Thanks for your answers, very helpful.
User avatar
FBXL5
Posts: 979
Joined: Sat Aug 03, 2019 8:45 pm

Re: Complex Sections

Post by FBXL5 »

aapo wrote: Thu Sep 29, 2022 10:44 am Domad's section A-A, which also adds an extra line ending
I haven't seen such an angled end in real life in the the last 30+ years, example C-C as well.

Section like examples B-B, D-D, and E-E is what I used regularly.
aapo
Posts: 615
Joined: Mon Oct 29, 2018 6:41 pm

Re: Complex Sections

Post by aapo »

FBXL5 wrote: Thu Sep 29, 2022 2:27 pm I haven't seen such an angled end in real life in the the last 30+ years, example C-C as well.

Section like examples B-B, D-D, and E-E is what I used regularly.
I'm sure they are not commonly used, but Domad seems to have a very extensive knowledge about what the standards actually allow. I believe he made these examples just to show what is possible when still adhering to the conventions. I agree that these corner cases are not that important in practice, and not much effort should be directed to achieve those oddball situations. I still think it's nice to know what can be done in those rare cases, so personally I give much respect to Domad's insight about these technical matters.
aapo
Posts: 615
Joined: Mon Oct 29, 2018 6:41 pm

Re: Complex Sections

Post by aapo »

I finished testing the latest version of WandererFan's PR (Git 30420 +10), and it's works mostly very very good! There are still some bugs, which I'll list here. I recreated Domad's examples with this new ComplexSection tool, and it was remarkably easy: Just create sketches in 3D-view for the desired section profiles; select a View and a section profile Sketch, and press the icon "turquoise Pac-man eating a staple" in TD. Domad's examples A - A, B - B, C - C, and D - D worked perfectly, while E - E failed because one of the section segments wasn't actually a cut:

Code: Select all

23:47:54  DVS: Section cut has failed in ComplexSection005
23:47:54  DVS::makeSectionCut - prism & input don't intersect - Section E - E
23:47:54  DVS::prepareShape - failed to build shape ComplexSection005 - Bnd_Box is void **
But anyways, the four first examples easily and automatically re-created the section images in Domad's examples perfectly, without the painstaking manual operations. IMHO, this is already a very well-done new feature, and a must-have addition to TechDraw! I found some minor bugs, which hopefully are easy to fix:
  • The "can't make a cut"-problem in one segment causes the whole section to fail, as mentioned above
  • FreeCAD crashes, if you make a piecewise section in direction [0,1,0] and later change that into [0,-1,0] in the Data tab (or into any other value). Directly making section in direction [0,-1,0] is fine, though, but later changing the direction value causes crash
  • In parallel section if you similarly change the section direction, and update the whole TD, the edges are re-drawn correctly in new position, but the hatching is a weird mix of old, new and missing hatching. No crash, though!
Test file is included. Please note the example C2 - C2, which is a three-piece aligned section (definitely not standard layout!). It renders correctly, but shows how using aligned piecewise sections requires some careful considerations from the user, too. But it seems to be a super-efficient tool, love it already! :D

20220929 TD ComplexSection test_p05.png
20220929 TD ComplexSection test_p05.png (103.14 KiB) Viewed 1564 times
20220929 TD ComplexSection test_p06.png
20220929 TD ComplexSection test_p06.png (123.14 KiB) Viewed 1564 times
20220929 TD ComplexSection test_p07.png
20220929 TD ComplexSection test_p07.png (100.15 KiB) Viewed 1564 times

Code: Select all

OS: Debian GNU/Linux bookworm/sid (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.21.30420 +10 (Git)
Build type: Release
Branch: (HEAD detached at WandererFan/ComplexSection)
Hash: c7ac6d7cc1ceed415aad1a4b3a7ab88bdce4b909
Python 3.10.7, Qt 5.15.4, Coin 4.0.0, Vtk 7.1.1, OCC 7.6.3
Locale: English/United States (en_US)
Installed mods: 
  * Assembly4
  * Render
  * fasteners
  * FCGear
  * Manipulator
  * Curves
  * sheetmetal
Attachments
20220929 TD ComplexSection test v4.FCStd
(110.82 KiB) Downloaded 33 times
domad
Veteran
Posts: 2053
Joined: Mon Jun 22, 2020 12:16 pm

Re: Complex Sections

Post by domad »

Greetings to the Community!
Another example of an aligned and concurrent section, here a way of how you could implement the section line functionality with changes of direction (or placed on different floors) https://help.spaceclaim.com/2015.0.0/en ... ctions.htm
Attachments
Example_of_aligned-concurrent_section_domad.FCStd
(81.14 KiB) Downloaded 32 times
Example_of_aligned-concurrent_section.png
Example_of_aligned-concurrent_section.png (180.85 KiB) Viewed 1494 times
domad
Veteran
Posts: 2053
Joined: Mon Jun 22, 2020 12:16 pm

Re: Complex Sections

Post by domad »

aapo wrote: Thu Sep 29, 2022 9:32 pm .... while E - E failed because one of the section segments wasn't actually a cut...
Hi @aapo, hello to the community!
Very well your experimentation!
Great development work by @wandererfan, as I see very soon we will have the "Create Complex Section" function available.
... section E-E of the previous intervention can also be represented as a half-section
Attachments
Half-section.png
Half-section.png (176.26 KiB) Viewed 1479 times
aapo
Posts: 615
Joined: Mon Oct 29, 2018 6:41 pm

Re: Complex Sections

Post by aapo »

domad wrote: Fri Sep 30, 2022 2:49 pm Greetings to the Community!
Another example of an aligned and concurrent section, here a way of how you could implement the section line functionality with changes of direction (or placed on different floors) https://help.spaceclaim.com/2015.0.0/en ... ctions.htm
Thanks for the interesting example! I'm not sure that this case will be possible in FreeCAD, unless extra code will be added to make it possible to ignore selected segments in the piecewise ComplexSection projection. Then, it would be possible to do this in the piecewise ComplexSection mode, by ignoring the two perpendicular segments. I think this could be as easily added later on, so maybe it could be postponed to after WandererFan has finished coding the main feature.


EDIT: Added ComplexSection version of Domad's new example, it doesn't seem to work as well as simpler examples, unfortunately.
20220930 TD ComplexSection test_p08.png
20220930 TD ComplexSection test_p08.png (90.73 KiB) Viewed 1463 times

Code: Select all

OS: Debian GNU/Linux bookworm/sid (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.21.30420 +10 (Git)
Build type: Release
Branch: (HEAD detached at WandererFan/ComplexSection)
Hash: c7ac6d7cc1ceed415aad1a4b3a7ab88bdce4b909
Python 3.10.7, Qt 5.15.4, Coin 4.0.0, Vtk 7.1.1, OCC 7.6.3
Locale: English/United States (en_US)
Installed mods: 
  * Assembly4
  * Render
  * fasteners
  * FCGear
  * Manipulator
  * Curves
  * sheetmetal
Attachments
20220929 TD ComplexSection test v5.FCStd
(34.79 KiB) Downloaded 32 times
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Complex Sections

Post by wandererfan »

aapo wrote: Fri Sep 30, 2022 4:26 pm [EDIT: Added ComplexSection version of Domad's new example, it doesn't seem to work as well as simpler examples, unfortunately.
Awesome test file. It exposed lots of unstated assumptions in the code. Thank you.
Attachments
csManySegmentPiecewise.png
csManySegmentPiecewise.png (25.66 KiB) Viewed 1399 times
aapo
Posts: 615
Joined: Mon Oct 29, 2018 6:41 pm

Re: Complex Sections

Post by aapo »

wandererfan wrote: Tue Oct 04, 2022 12:36 pm Awesome test file. It exposed lots of unstated assumptions in the code. Thank you.
You're most welcome, and thanks for developing this! We should thank domad for the example, though, as it's his design on the previous page. I just converted it to work with your new ComplexSection branch, in order to see how the new code handled domad's more esoteric example. I can confirm that it now works correctly with the newest code, and everything else I just tested with the newest version also worked nicely, except that the hatchings in example 4 (re-attached) have some weird problems with circular disks at the fillet sections (see example pic).

Apart from that, are we now maybe close to get your excellent code for the main branch, soon? It's a really important feature, and to me it seems that everything is starting to be in place now. :)

20221005 TD ComplexSection test_p09.png
20221005 TD ComplexSection test_p09.png (53.69 KiB) Viewed 1363 times

Code: Select all

OS: Debian GNU/Linux bookworm/sid (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.21.30429 +102 (Git)
Build type: Release
Branch: (HEAD detached at WandererFan/ComplexSection)
Hash: 29525fdbef2cfc2ad1846a33741eb5c32def3f95
Python 3.10.7, Qt 5.15.6, Coin 4.0.0, Vtk 7.1.1, OCC 7.6.3
Locale: English/United States (en_US)
Installed mods: 
  * Assembly4
  * Render
  * fasteners
  * FCGear
  * Manipulator
  * Curves
  * sheetmetal
Attachments
20220929 TD ComplexSection test v4.FCStd
(110.82 KiB) Downloaded 32 times
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Complex Sections

Post by wandererfan »

aapo wrote: Tue Oct 04, 2022 9:33 pm Apart from that, are we now maybe close to get your excellent code for the main branch, soon?
I'd really like to get it working for profiles and section normals not on the XY plane before merging. "It's done when it's done". :D
Post Reply