Collection of TD issues, proposals and ideas for FC 0.19

Discussions about the development of the TechDraw workbench
User avatar
uwestoehr
Posts: 1368
Joined: Sun Jan 27, 2019 3:21 am

Re: Collection of TD issues, proposals and ideas for FC 0.19

Postby uwestoehr » Mon Nov 25, 2019 1:03 pm

wandererfan wrote:
Mon Nov 25, 2019 1:22 am
If it happens as soon as you click on Front in the page display, then it could be in the selection logic in MDiViewPage and that's messy.
This is the case. I'll have a look at MDiViewPage this evening. Thanks for your help.

Where do I find a description of what files do what? I mean where is documented what "MDi" means and what files cover the page view handling (to find out by myself that this is MDiViewPage)?
(For the Win installer, I e.g. created a visual documentation because this is drawn quickly and sometimes an image tells more than text: https://github.com/FreeCAD/FreeCAD/blob ... ucture.odg ) Maybe this could also be an option for TechDraw?
User avatar
wandererfan
Posts: 3680
Joined: Tue Nov 06, 2012 5:42 pm

Re: Collection of TD issues, proposals and ideas for FC 0.19

Postby wandererfan » Mon Nov 25, 2019 2:57 pm

uwestoehr wrote:
Mon Nov 25, 2019 1:03 pm
Where do I find a description of what files do what? I mean where is documented what "MDi" means and what files cover the page view handling (to find out by myself that this is MDiViewPage)?
MDI is "multiple document interface". TechDraw::MDIViewPage is derived from Gui::MDIView which provides the tabbed windows in the main display.

I've been meaning to make some useful docs (as opposed to pretty printed .h files) for TD for a few years now. Some day.

Just for kicks, I build a version with X & Y defined as PropertyLength and no other changes. It seems to work fine when selecting items on the page - old or new files. Don't know what's going on with your selection problem.
User avatar
uwestoehr
Posts: 1368
Joined: Sun Jan 27, 2019 3:21 am

Re: Collection of TD issues, proposals and ideas for FC 0.19

Postby uwestoehr » Mon Nov 25, 2019 11:56 pm

wandererfan wrote:
Mon Nov 25, 2019 2:57 pm
MDI is "multiple document interface". TechDraw::MDIViewPage is derived from Gui::MDIView which provides the tabbed windows in the main display.
Thanks.

wandererfan wrote:
Mon Nov 25, 2019 2:57 pm
Just for kicks, I build a version with X & Y defined as PropertyLength and no other changes. It seems to work fine when selecting items on the page - old or new files. Don't know what's going on with your selection problem.
My patch does exactly this. I have several test documents that work fine, bit this one does not:
TechDraw-test2.FCStd
(16.18 KiB) Downloaded 8 times

It has 2 bugs after my PR is applied:
- the mentioned "Access violation - no RTTI data" issue when clicking in the page on "Front"
- the X and Y of the annotation got zeroed
wmayer
Site Admin
Posts: 15501
Joined: Thu Feb 19, 2009 10:32 am

Re: Collection of TD issues, proposals and ideas for FC 0.19

Postby wmayer » Tue Nov 26, 2019 11:26 am

uwestoehr wrote:
Mon Nov 25, 2019 11:56 pm
It has 2 bugs after my PR is applied:
- the mentioned "Access violation - no RTTI data" issue when clicking in the page on "Front"
To me it looks like an object has been deleted and the dangling pointer is accessed afterwards. So, it's probably only luck that others don't get the crash while you see it now.

See: https://stackoverflow.com/questions/724 ... a-function
User avatar
wandererfan
Posts: 3680
Joined: Tue Nov 06, 2012 5:42 pm

Re: Collection of TD issues, proposals and ideas for FC 0.19

Postby wandererfan » Tue Nov 26, 2019 1:59 pm

uwestoehr wrote:
Mon Nov 25, 2019 11:56 pm
My patch does exactly this. I have several test documents that work fine, bit this one does not:
I built your branch last night and played with it a bit. I could not cause a failure, but I was not using your test file. I will try again this afternoon with your sample.

My steps were:
- open a file created in FreeCAD-daily which contains a ProjGroup
- click and drag Front
- add Annotation
- click and drag Annotation
- click and drag Front
- save file
- reopen file and repeat

If I missed a step, please let me know.

Werner's suggestion of the cause is good. We have had problems with dangling pointers in the past when something gets deleted outside the current execution path.
wmayer
Site Admin
Posts: 15501
Joined: Thu Feb 19, 2009 10:32 am

Re: Collection of TD issues, proposals and ideas for FC 0.19

Postby wmayer » Tue Nov 26, 2019 3:56 pm

uwestoehr wrote:
Mon Nov 25, 2019 11:56 pm
It has 2 bugs after my PR is applied:
- the mentioned "Access violation - no RTTI data" issue when clicking in the page on "Front"
I don't get a crash here either. It's theoretically possible that your build is corrupted. So you should at least rebuild the TechDraw module from scratch.
- the X and Y of the annotation got zeroed
Confirmed. The problem is that DrawViewAnnotation overrides the method handleChangedPropertyType() but it doesn't call the method of its base class DrawView
User avatar
uwestoehr
Posts: 1368
Joined: Sun Jan 27, 2019 3:21 am

Re: Collection of TD issues, proposals and ideas for FC 0.19

Postby uwestoehr » Tue Nov 26, 2019 11:19 pm

wmayer wrote:
Tue Nov 26, 2019 3:56 pm
I don't get a crash here either. It's theoretically possible that your build is corrupted. So you should at least rebuild the TechDraw module from scratch.
Thanks. I don't know why this happens. I already rebuilt TechDraw completely. Now I rebuilt the whole FC and now the issue is gone.

Confirmed. The problem is that DrawViewAnnotation overrides the method handleChangedPropertyType() but it doesn't call the method of its base class DrawView
Thanks. I see now. With this git commit a1ac069f everything works now fine.
User avatar
uwestoehr
Posts: 1368
Joined: Sun Jan 27, 2019 3:21 am

Re: Collection of TD issues, proposals and ideas for FC 0.19

Postby uwestoehr » Sat Nov 30, 2019 5:15 pm

uwestoehr wrote:
Tue Nov 26, 2019 11:19 pm
With this git commit a1ac069f everything works now fine.
Hi Wandererfan, I had a brief look today and I cannot see a problem with my patch. I merged my patch with yesterday's master and rebuilt the whole FC from scratch. I don't get any compilation issues and also my balloon test document work fine:
TD_balloon_lock_position.FCStd
balloon test file
(21.92 KiB) Downloaded 5 times
So from my point of view my PR can be pulled.

Update 1:
I see that Travis hat an error with the balloon test. Seems I have to learn more. Where are these tests documentded?
I had now a look and it seems that I only need to adapt the test case since its python code can of course not know that we have now a unit.

Update 2: I realized that I have to update the test cases too. Unfortunately the description in Quantity is outdated. I therefore browsed the source code how other WBs are doing it: git commit 3bcd2928

wandererfan wrote:
Tue Nov 26, 2019 1:59 pm
.
svbol
Posts: 41
Joined: Mon Dec 09, 2019 8:29 pm

Re: Collection of TD issues, proposals and ideas for FC 0.19

Postby svbol » Sat Dec 14, 2019 7:29 am

Good day.
I have problem with TD.
Can you resolve this?

I can't select features (Line, Arcs and Point) nearest Circle or Arc center.
This center have big cross and catch my mouse:
Scale21.png
Scale21.png (7.94 KiB) Viewed 227 times
On picture I select Arc feature. But right Cross block my choice.
Right cross must be Disabled for enabled work with Line, Points and Arcs about this Cross.
But I can't disabled this Cross.
I using Scale 2:1.
When I use Scale 8:1 - I can select this Arc and Line, but not other Arc and Points.

Variant for resolve:
Add "Filter of Features" options (Panel).
Draft WB have it. And LibreCAD use this filter.

As example:
If I need use Arc only I ON this Filter for Arc. OFF other features.
If I need Circle center and Polar points I ON this Filter for "Circle center" and "Circle Polar points".
And other features are OFF and not be selected on draw.

And not use Cross as Circle center. Use point.
User avatar
wandererfan
Posts: 3680
Joined: Tue Nov 06, 2012 5:42 pm

Re: Collection of TD issues, proposals and ideas for FC 0.19

Postby wandererfan » Sat Dec 14, 2019 1:42 pm

svbol wrote:
Sat Dec 14, 2019 7:29 am
But I can't disabled this Cross.
In the PropertyEditor on the View tab, there is an option to show/hide the center marks ("+").
ShowHideCenterMark.png
ShowHideCenterMark.png (34.39 KiB) Viewed 199 times
And not use Cross as Circle center. Use point.
As far as I know, a "+" is the traditional marker for an arc center in a technical drawing. I'm not aware of a standard that calls for a dot as arc center mark.
Variant for resolve:
Add "Filter of Features" options (Panel).
Draft WB have it. And LibreCAD use this filter.
Sounds like a good idea. But it will be forgotten if you don't make a FeatureRequest on the bug tracker.