Complex Sections

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
NewJoker
Veteran
Posts: 3018
Joined: Sun Oct 11, 2020 7:49 pm

Re: Complex Sections

Post by NewJoker »

wandererfan wrote: Sat Nov 26, 2022 3:09 pm
NewJoker wrote: Fri Nov 25, 2022 6:15 pm E:/FreeCAD_weekly-builds-27809-Win-Conda_vc14.x-x86_64
27809 can't be the revision number, can it? That would put the build in Feb 2022, well before ComplexSection was added.
I don't know why it shows this number in report view, I'm using 31097 build and the directory should be E:\FreeCAD_weekly-builds-31097-2022-11-24-conda-Windows-x86_64-py310
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: Complex Sections

Post by Roy_043 »

Check your preferences: TechDraw_Preferences#General.
User avatar
NewJoker
Veteran
Posts: 3018
Joined: Sun Oct 11, 2020 7:49 pm

Re: Complex Sections

Post by NewJoker »

Roy_043 wrote: Sun Nov 27, 2022 8:34 am Check your preferences: TechDraw_Preferences#General.
Right, everything in the Files category was set to the directory of an old deleted build. Shouldn't it update automatically ?

I changed everything there to the current directory and now the section is generated. Just with some unnecessary lines:

section.JPG
section.JPG (29.94 KiB) Viewed 975 times

EDIT: Now it doesn't work again even though I'm using the same settings:

Code: Select all

Unhandled unknown exception caught in GUIApplication::notify.
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Complex Sections

Post by wandererfan »

NewJoker wrote: Sun Nov 27, 2022 12:22 pm
Should be fixed by git commit 13acca7504. Don't know when that will make it into an AppImage.

While waiting for the commit, if you turn on "Debug section" on the Preferences > Advanced tab, it should work. You'll get a bunch of brep files generated that don't do any harm, but take up space.
aapo
Posts: 615
Joined: Mon Oct 29, 2018 6:41 pm

Re: Complex Sections

Post by aapo »

wandererfan wrote: Sun Nov 27, 2022 1:37 pm Should be fixed by git commit 13acca7504. Don't know when that will make it into an AppImage.
Great, thanks! Looking at your commit, it seems that the problem was that the profile wire for cutting was stored inside the class, so in some cases it was not initialized properly. Apparently, it'll now going to be created every time on demand, which to me seems like a robust strategy. Thumbs up! :D
aapo
Posts: 615
Joined: Mon Oct 29, 2018 6:41 pm

Re: Complex Sections

Post by aapo »

NewJoker wrote: Sun Nov 27, 2022 12:22 pm I changed everything there to the current directory and now the section is generated. Just with some unnecessary lines:
The unnecessary lines are likely part seams. You can turn off their rendering in the TD preferences, or per-view in the View properties. I think the default is to render the seams, I always turn them off, because they are "extraneous".
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Complex Sections

Post by wandererfan »

aapo wrote: Sun Nov 27, 2022 2:43 pm Great, thanks! Looking at your commit, it seems that the problem was that the profile wire for cutting was stored inside the class, so in some cases it was not initialized properly.
Even worse, it was always created if debugging was turned on, so when I would test it would work correctly, but when a user would test it, it would fail. :oops:
aapo
Posts: 615
Joined: Mon Oct 29, 2018 6:41 pm

Re: Complex Sections

Post by aapo »

wandererfan wrote: Sun Nov 27, 2022 3:33 pm but when a user would test it, it would fail. :oops:
But curiously, not every time. Sometimes it worked, sometimes it failed! :o

Well now it should always work :D
domad
Veteran
Posts: 2053
Joined: Mon Jun 22, 2020 12:16 pm

Re: Complex Sections

Post by domad »

Greetings to the Community!
With version: 0.21.31109 I was finally able to appreciate the great work of @ wandererfan with whom I want to congratulate and thank him. :D :D
The function works perfectly (both on win and on linux) and I have not found any anomaly in any case in the three options granted: Offset, Aligned, NoParallel, it is absolutely necessary from Preferences-->TechDraw-->Advanced: activate Debug .
If Debug is not activated, the complex section works only with the Offset option which can be modified by re-editing the choice towards another option (Aligned or NoParallel) and saving, but on restarting the section is no longer shown (as if it were hidden ), to make it reappear just activate Debug as suggested above, save, close and reopen the file.
The only (small) problem (if it can be called that) encountered is that of the section lines (Hatch): during the rotation of the section, they do not adapt to the rotation maintaining their original slope, therefore it is necessary to hide and make new ones, moreover it would be useful to have the possibility to offset the alignment of these lines when there is a change of section plane (currently I get this effect by redrawing them and slightly changing the scale of the Hatch).
aapo
Posts: 615
Joined: Mon Oct 29, 2018 6:41 pm

Re: Complex Sections

Post by aapo »

domad wrote: Mon Nov 28, 2022 6:38 pm The only (small) problem (if it can be called that) encountered is that of the section lines (Hatch): during the rotation of the section, they do not adapt to the rotation maintaining their original slope, therefore it is necessary to hide and make new ones,
That is actually a very good point, thanks! I presume that in a drawing, the hatching is traditionally (when using ink and paper, e.g.) supposed to be aligned to the paper. Thus, if respecting traditonal drafting rules, any general use hatching (i.e. cast iron hatching) in FreeCAD TD should be aligned in respect to a TD Page, not to a TD View. So, if one rotates a View e.g. 13 degrees, a general use hatching is still supposed to be at the original 45 degree angle in respect to the Page edges, am I correct?

moreover it would be useful to have the possibility to offset the alignment of these lines when there is a change of section plane (currently I get this effect by redrawing them and slightly changing the scale of the Hatch).
I didn't know this. Is it a general convention for aligned sections, that the hatchings are supposed to have an offset change at the section seams? If it is a common way to do it, it'd be a quite nice way to highlight the uncontinuity in the section cut direction.


traditional hatchings.png
traditional hatchings.png (161.06 KiB) Viewed 775 times
Post Reply