CosmeticEraser and FaceCenterLine Alpha Release

Discussions about the development of the TechDraw workbench
wandererfan
Posts: 2665
Joined: Tue Nov 06, 2012 5:42 pm

CosmeticEraser and FaceCenterLine Alpha Release

Postby wandererfan » Fri Jun 07, 2019 12:08 am

Preliminary (alpha) versions of TechDraw_CosmeticEraser and TechDraw_FaceCenterLine are available in master branch.

Test reports are very welcome.
FaceCLandDims.png
FaceCLandDims.png (12.2 KiB) Viewed 532 times
wandererfan
Posts: 2665
Joined: Tue Nov 06, 2012 5:42 pm

Re: CosmeticEraser and FaceCenterLine Alpha Release

Postby wandererfan » Fri Jun 07, 2019 12:19 am

Known shortcoming: The editor for centerline isn't ready yet. Erase the old one and create a new one for now.
aapo
Posts: 35
Joined: Mon Oct 29, 2018 6:41 pm

Re: CosmeticEraser and FaceCenterLine Alpha Release

Postby aapo » Tue Jun 11, 2019 6:51 am

wandererfan wrote:
Fri Jun 07, 2019 12:08 am
Test reports are very welcome.
Both are fairly useful additions, thanks!

CosmeticEraser: Works great for me with all types of CosmeticVertices and FaceCenterLine. Small nitpick: Selecting a CosmeticVertex and pressing "Delete" on keyboard deletes the View, not the CosmeticVertex. Using the mouse button icon works fine.

FaceCenterLine: Worked great for all the faces I tested. However, I was able to select other objects, like edges or vertices, which caused some errors in report view after trying to make a FaceCenterLine and pressing the OK button (Unhandled unknown exception caught in GUIApplication::notify.) Also, I could not understand what the option "Aligned" should do, I did not find any difference to "Vertical" or "Horizontal" there.

Feature request: It would be nice to have numerical offset values for the FaceCenterLine in the config box, i.e. user defined horizontal and vertical offsets in mm for the centerlines, so that the centerline could be moved up, down, left or right as needed by the user.

Feature request 2: It would also be nice to have a tilted centerline with an angle offset (0 - 360°). Maybe this is what the option "Aligned" is planned for?

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16945 (Git)
Build type: Release
Branch: master
Hash: d818a9638424a934bd9da74d187a1af4cb773f05
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)
wandererfan
Posts: 2665
Joined: Tue Nov 06, 2012 5:42 pm

Re: CosmeticEraser and FaceCenterLine Alpha Release

Postby wandererfan » Tue Jun 11, 2019 11:39 am

aapo wrote:
Tue Jun 11, 2019 6:51 am
Small nitpick: Selecting a CosmeticVertex and pressing "Delete" on keyboard deletes the View, not the CosmeticVertex. Using the mouse button icon works fine.
Not sure how to fix this off the top of my head. Will take a bit of digging.
aapo wrote:
Tue Jun 11, 2019 6:51 am
FaceCenterLine: Worked great for all the faces I tested. However, I was able to select other objects, like edges or vertices, which caused some errors in report view after trying to make a FaceCenterLine and pressing the OK button (Unhandled unknown exception caught in GUIApplication::notify.) Also, I could not understand what the option "Aligned" should do, I did not find any difference to "Vertical" or "Horizontal" there.
Plans are to have centerline between two edges and perpendicular centerline between two vertices, so I didn't block selection of those geometries. Probably should put that in until edge/vertex CLs are ready.
aapo wrote:
Tue Jun 11, 2019 6:51 am
Feature request: It would be nice to have numerical offset values for the FaceCenterLine in the config box, i.e. user defined horizontal and vertical offsets in mm for the centerlines, so that the centerline could be moved up, down, left or right as needed by the user.
I like this idea. Will see what I can do
aapo wrote:
Tue Jun 11, 2019 6:51 am
Feature request 2: It would also be nice to have a tilted centerline with an angle offset (0 - 360°).
So I would start with a CL of a Face, then rotate by X* about it's midpoint?

Great suggestions and comments. Thanks for testing.

wf
aapo
Posts: 35
Joined: Mon Oct 29, 2018 6:41 pm

Re: CosmeticEraser and FaceCenterLine Alpha Release

Postby aapo » Tue Jun 11, 2019 12:19 pm

wandererfan wrote:
Tue Jun 11, 2019 11:39 am
So I would start with a CL of a Face, then rotate by X* about it's midpoint?

Great suggestions and comments. Thanks for testing.
Exactly! That way one could add a centerline, when e.g. a screw hole or some other feature happens to be at 45° to the horizontal axis in a section drawing. It'd make sense to tilt the CenterLine to align to the hole. Thanks for coding!
FreeCAD-TechDraw-FaceCenterLine.png
FreeCAD-TechDraw-FaceCenterLine.png (35.4 KiB) Viewed 398 times
Stq_Niko
Posts: 3
Joined: Fri Jun 14, 2019 7:07 pm

Re: CosmeticEraser and FaceCenterLine Alpha Release

Postby Stq_Niko » Fri Jun 14, 2019 7:39 pm

Hello,

I use FreeCad occasionnely and I think cosmetic features can be a real help in drawing

For cometic FaceCenterLine, don’t you think it would be easier to select 2 edges and draw the middle line ...
With this method, edges even don’t need to be parallel nor equal lengh
2 parameters could be use to increase or reduce the size of each end of this line.

I hope m’y suggestion can help
wandererfan
Posts: 2665
Joined: Tue Nov 06, 2012 5:42 pm

Re: CosmeticEraser and FaceCenterLine Alpha Release

Postby wandererfan » Fri Jun 14, 2019 8:42 pm

Stq_Niko wrote:
Fri Jun 14, 2019 7:39 pm
For cometic FaceCenterLine, don’t you think it would be easier to select 2 edges and draw the middle line ...
With this method, edges even don’t need to be parallel nor equal lengh
2 parameters could be use to increase or reduce the size of each end of this line.
This is on the TODO list, actually, along with a "centerline" that splits the segment between two points.

In the case of a middle line between two edges, the current stumbling block is a fool-proof way of choosing the corresponding ends of each edge. If I choose the correct ends of the white lines, I get the green (correct) line. If I choose wrong, I get the fairly useless red line. :cry:
mid2Lines.png
mid2Lines.png (4.86 KiB) Viewed 316 times
Stq_Niko
Posts: 3
Joined: Fri Jun 14, 2019 7:07 pm

Re: CosmeticEraser and FaceCenterLine Alpha Release

Postby Stq_Niko » Sat Jun 15, 2019 1:15 pm

sorry,I didn't checked the to do list before write the message

Since you post the answer, I try to think how to build a center line of 2 edges and I realized that the problem is not as easy as it seem to be ...
Stq_Niko
Posts: 3
Joined: Fri Jun 14, 2019 7:07 pm

Re: CosmeticEraser and FaceCenterLine Alpha Release

Postby Stq_Niko » Tue Jun 18, 2019 6:19 pm

The last few days I think about the CenterLine Fonction and Then I wondered what should this function do. For me, when we want a “center line” in a drawing we want in fact the symmetry axis (in general I think).
The symmetry axis of 2 different segments (edge) is not really possible, but it is possible for the lines that go through these segments. It is necessary in this case to construct the bisector of these 2 lines.
What do you think ?