Skip to content

[TechDraw] Fixes #6527 - Implement face transparency#11315

Merged
WandererFan merged 1 commit intoFreeCAD:mainfrom
pavltom:techdraw_faces_transparency
Nov 10, 2023
Merged

[TechDraw] Fixes #6527 - Implement face transparency#11315
WandererFan merged 1 commit intoFreeCAD:mainfrom
pavltom:techdraw_faces_transparency

Conversation

@pavltom
Copy link
Contributor

@pavltom pavltom commented Nov 8, 2023

This pull request implements #6527 with the possibility to set color and transparency of faces per view. The default color and transparency are obtained from TechDraw Preferences - Color - (Transparent) Faces setting. On top of that, also the color and transparency of the section cut surface can be set independently of the color of the faces.

For transparency values 0 (opaque) and 100 (invisible) everything works perfectly. However because the transparency can be set as a percentage (identically what the 3D view allows), there are some issues, which can not be easily resolved. Let's inspect the figure below, all views have faces color set to blue rgb(0, 0, 255) and transparency to 50%:

Transparency

  • View1 is drawn as desired and expected. There are no problems with single face views.

  • View2 consists of 3 faces. Left, right and the "big" one hidden underneath, covering the area of both mentioned before. The color is darker than for View1, because left and right faces are drawn on top of the big face. To get the same look as View1 has, we would need to increase the transparency to values around 70%.

  • View3 is a view of a thick frame. It consists of 2 faces, the large one (outer border) and the small one (inner border). Because the small face is drawn on the top of the large face, the inner square is darker than the outer one. Unfortunately, there is no way around this, as long as the large face covers the whole area of the inner face.

With regards to these limitations, I believe the pull request overall increases the TechDraw abilities and the benefits prevail the known issues.

If you find any other problem than the one discussed above, please let me know.

@github-actions github-actions bot added the Mod: TechDraw Related to the TechDraw Workbench label Nov 8, 2023
@luzpaz luzpaz requested a review from WandererFan November 8, 2023 12:25
@luzpaz
Copy link
Contributor

luzpaz commented Nov 8, 2023

Thank you for the contribution!
Note: Please add 'Fix' or 'Fixes' before the issue number you're fixing so github auto-links and auto-closes said issue when merge is made. Ref: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue

@pavltom pavltom changed the title [TechDraw] Issue #6527 - Implement face transparency [TechDraw] Fixes #6527 - Implement face transparency Nov 8, 2023
@WandererFan WandererFan merged commit 4c888b6 into FreeCAD:main Nov 10, 2023
@pavltom pavltom deleted the techdraw_faces_transparency branch November 21, 2023 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Mod: TechDraw Related to the TechDraw Workbench

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants