-
Notifications
You must be signed in to change notification settings - Fork 27
fix(autocad): CNX-318 better color inheritance for blocks #167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(autocad): CNX-318 better color inheritance for blocks #167
Conversation
…t-sent-well-in-blocks-from
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #167 +/- ##
=====================================
Coverage 8.64% 8.64%
=====================================
Files 236 236
Lines 4490 4490
Branches 526 526
=====================================
Hits 388 388
Misses 4085 4085
Partials 17 17 ☔ View full report in Codecov by Sentry. |
finally! this is super nice to have! |
I suggest to use another proxy class for {
"colorSourceProxies": [
{
"speckle_type": "ColorSourceProxy",
"name": "ByLayer",
"objects": ["12345", "12346", "12347", "12348"]
},
{
"speckle_type": "ColorSourceProxy",
"name": "ByBlock",
"objects": ["22345", "22346", "22347", "22348"]
}
]
} |
Because block definition object colors can inherit their colors by layer or by block, and block instance colors can also be by layer or by block, this pr is setting the color for block definition objects as if they are by color in both conditions, to simulate the correct colors in the viewer (and hopefully when receiving in other apps).
NOTE: also sending a
source
string prop on the color proxies to identify propery color inheritance on receiveincludes a refactor for speckle application ids by adding extension methods for layers, entities, materials, colors, etc to guarantee we are always using the same app id.
Original autocad file:

Received (old): https://app.speckle.systems/projects/b53a53697a/models/66aca735ab@0836579d97

Received (new):

https://app.speckle.systems/projects/b53a53697a/models/66aca735ab@55ecf653c7