[solved] TechDraw Deleting "cosmetic" objects

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Batucada
Posts: 213
Joined: Mon Jul 18, 2022 9:03 am

[solved] TechDraw Deleting "cosmetic" objects

Post by Batucada »

Code: Select all

OS: macOS 10.16
Word size of FreeCAD: 64-bit
Version: 0.21.30398 (Git)
Build type: Release
Branch: master
Hash: b3dfdc568a92810449bf47bc73b6784d65dfa206
Python 3.10.6, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: C/Default (C)
Installed mods: 
  * Behave-Dark-Colors 0.1.1
  * CurvedShapes 1.0.4
  * Assembly4 0.12.3
When deleting "cosmetic" objects I am confronted with the message "You cannot delete the anchor view of a projection group."

This is of course less nice if it is a centre circle lines type marker, when due to a change in PartDesign the actual centre of the hole is now slightly off. Until now, unfortunately, the "cosmetic" objects are not editable.

Now I realise that the "cosmetic" objects are actually just a snapshot of the past if the design behind them should change. One must be able to correct drawing errors if one can recognise such when looking through the drawings. In this case, however, the correction starts in the construction at the level of PartDesign and inevitably Techdraw must be able to follow.
Bildschirmfoto 2022-09-22 um 10.16.39.png
Bildschirmfoto 2022-09-22 um 10.16.39.png (90.79 KiB) Viewed 1039 times
All this would not be so bad if one could delete the "cosmetic" objects, but TechDraw counters with the argument "You cannot delete the anchor view of a projection group". Who wins? At the moment I get the impression that I am one of the few users who deal intensively with TechDraw. OK, that's not bad if you can turn the insights into solutions.
Last edited by Batucada on Thu Sep 22, 2022 1:59 pm, edited 1 time in total.
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: TechDraw Deleting "cosmetic" objects

Post by chrisb »

You should upload a minimal example showing the issue with a detailed description of how to reproduce.
Batucada wrote: Thu Sep 22, 2022 8:17 am At the moment I get the impression that I am one of the few users who deal intensively with TechDraw.
Look at other forum topics and realise that you are very wrong here. Furthermore there is a lot to learn from others.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: TechDraw Deleting "cosmetic" objects

Post by chrisb »

Batucada told me via PM, that he will not particpate any further here in this topic. I provide a small example of what I think he is talking about:
I had added circle centerlines to the upper circle, which used to be at the right. I moved it, and the centerlines no longer correspond.
However, I cannot reproduce OP's issue, I can select the centerlines and remove them.
SnipScreenshot-8984b3.png
SnipScreenshot-8984b3.png (16.5 KiB) Viewed 943 times
(same OS and version as OP)
Attachments
cosmetic_cb.FCStd
(5.38 KiB) Downloaded 12 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
wandererfan
Veteran
Posts: 6317
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: TechDraw Deleting "cosmetic" objects

Post by wandererfan »

Batucada wrote: Thu Sep 22, 2022 8:17 am All this would not be so bad if one could delete the "cosmetic" objects, but TechDraw counters with the argument "You cannot delete the anchor view of a projection group".
The delete key is captured by FreeCAD and invokes Std_Delete which wants to delete the selected DocumentObject (in this case the Front View).

You can't delete the Front view of a ProjectionGroup because it is the anchor that all the other views use for positioning. The Front view is deleted from the document when the ProjectionGroup is deleted.

To remove any cosmetic feature, use the TechDraw_CosmeticEraser tool.
User avatar
adrianinsaval
Veteran
Posts: 5551
Joined: Thu Apr 05, 2018 5:15 pm

Re: TechDraw Deleting "cosmetic" objects

Post by adrianinsaval »

can't techdraw add an event filter to catch the delete key and perform the appropriate action according to selection? Sketcher is able to delete elements within the sketch with the delete key for example.
Batucada
Posts: 213
Joined: Mon Jul 18, 2022 9:03 am

Re: TechDraw Deleting "cosmetic" objects

Post by Batucada »

wandererfan wrote: Thu Sep 22, 2022 12:50 pm To remove any cosmetic feature, use the TechDraw_CosmeticEraser tool.
Thank You, It's good to know that you can also delete these objects. When setting additional points, I regularly began to sweat about the possibility that such a point might be positioned in an unsuitable place.
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: [solved] TechDraw Deleting "cosmetic" objects

Post by chrisb »

Would it also be possible to show the cosmetic stuff as subobjects in the tree? That's where I would expect them, and they could then easily be identified - and deleted.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Batucada
Posts: 213
Joined: Mon Jul 18, 2022 9:03 am

Re: [solved] TechDraw Deleting "cosmetic" objects

Post by Batucada »

That would be the request to the developers.
User avatar
wandererfan
Veteran
Posts: 6317
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: TechDraw Deleting "cosmetic" objects

Post by wandererfan »

adrianinsaval wrote: Thu Sep 22, 2022 1:42 pm can't techdraw add an event filter to catch the delete key and perform the appropriate action according to selection? Sketcher is able to delete elements within the sketch with the delete key for example.
Added to my todo list.
User avatar
wandererfan
Veteran
Posts: 6317
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: [solved] TechDraw Deleting "cosmetic" objects

Post by wandererfan »

chrisb wrote: Thu Sep 22, 2022 3:07 pm Would it also be possible to show the cosmetic stuff as subobjects in the tree? That's where I would expect them, and they could then easily be identified - and deleted.
A document object for each vertex/line/etc? Could make the tree very busy, but would simplify the code for cosmetic add/change/delete.
Post Reply