Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Part Appearance. Can we configure it like a feature, not a property?
Hi, (this may be an improvement request - however...)
The fact that part colour/appearance is a property (like meta-data) and not a feature (like extrude height) means that it must be configured in the "configured properties" table.
For colour stability across a configured part, every permutation must be resolved in this table making the number of rows a factor of the other config tables present in the part studio. This has the potential to be a huge number of entries.
It would be great if it was possible to configure colour/appearance in an independent table in a similar way to part features.
Kind regards,
Alex Pitt
Fig 1. Two independent tables each with 3 configs. Results in 3x3 = 9 permutations.
Fig 2. In "Configured part properties" (right), each permutaion must be defined in the table to maintain colour stability.
Best Answers
-
AlexPitt Member Posts: 22 ✭✭...so fixed the above by simply adding a new "Red2" colour config (which did work) and deleted the original faulty "Red" config. (below shows the renamed Red2 colour config).
Thanks Neil, this is exactly what I was looking for! I'll try it with some more complex assemblies.
1 -
EvanReese Member, Mentor Posts: 2,186 ✭✭✭✭✭Inspired by Neil's snippet, I made this Part Color feature. Notable additions and differences.
- RGB ranges go from 0-255 like the native edit appearance UI (and other things I'm used to like Photoshop). I left alpha as 0.00-1.00 to match the edit appearance UI, even though I'm used to 0-255.
- The value bounds are custom so it limits only to relevant entries
- there's an option to use a hexadecimal code, so you could copy and paste it in if you know the one you want.
- it has an icon.
Evan Reese6
Answers
I'll copy/paste this into a simple doc and have a play. Still a little intimidated by feature script but hopefully this will help me get a grip!
Much appreciated!
Thanks Neil, this is exactly what I was looking for! I'll try it with some more complex assemblies.
@NeilCooke
I'm thinking of using this as a starting point to make a set of standard color ways for a product line. We currently have 5 choices, and those end up being applied to ~6 parts in various levels of the assemblies. We will be expanding the number of choices, but they will be finite. I'm also planning to capture the choice in a "variant" custom property (e.g. a dash number like black = "-04", appended to the P/N). I like the idea of defining these choices in a single document so they don't have to be updated multiple places if there are tweaks to the color definitions (it seems like this would happen in the featurescript code itself, in this case).
Is there a better way to handle this now?
Now that we have Renderstudio, I'm also wondering how to connect Onshape appearances to Renderstudio (or vice-versa).
using it looks like this:
colorway.blue.code should equal "-05"
I'm digging into your Part Color FS again. I noticed something weird. Not sure if this is a bug in the code, or something about Onshape, but I made a simple part studio with a cube and then did a linear pattern of the cube. So I have "Part 1", "Part 2" etc. If I select "Part 1" and use the Part Color FS, it colors all of the parts. If I select "Part 2" or any other part but "Part 1" it will color just that one part.
I agree. I tested this out with some very simple code, and it did the same thing, and with a part studio with just the extrude and linear pattern. As long as I edit the appearance for "Part 1", all the parts change.
It does seem like odd behavior (or a bug) on Onshape's part though. Solidworks has the "propagate visual properties" checkbox for patterns and mirroring. Seems like this should be optional here too.