[TechDraw] Fixes #6527 - Implement face transparency#11315
Merged
WandererFan merged 1 commit intoFreeCAD:mainfrom Nov 10, 2023
Merged
[TechDraw] Fixes #6527 - Implement face transparency#11315WandererFan merged 1 commit intoFreeCAD:mainfrom
WandererFan merged 1 commit intoFreeCAD:mainfrom
Conversation
Contributor
|
Thank you for the contribution! |
Closed
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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%:
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.