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.
New Feature: Attractor Pattern
I'm happy to release Attractor Pattern for use. There are more things I'd like to do with this sometime, but the core functionality is there. Since it's a kind of complex UI, I made a 6-minute video explaining what everything is. Here's an example of one of the many things you could use it for.
I want to thank @maximilian_schommer for his Surface Pattern feature, which I dissected and borrowed from heavily for this feature. Couldn't have done it without that great reference. Also, big thanks to @ilya_baran whose pseudo-random number generator I co-opted for the random pattern function.
If you run into unexpected behavior while using it, please let me know and share a document with an example so I can improve it.
If you check out my code and see any obvious ways to optimize the performance, I'm very open to ideas. Since it's such a heavy feature efficiency is extra important, and I don't know much about shaving milliseconds off of operations.
I want to thank @maximilian_schommer for his Surface Pattern feature, which I dissected and borrowed from heavily for this feature. Couldn't have done it without that great reference. Also, big thanks to @ilya_baran whose pseudo-random number generator I co-opted for the random pattern function.
If you run into unexpected behavior while using it, please let me know and share a document with an example so I can improve it.
If you check out my code and see any obvious ways to optimize the performance, I'm very open to ideas. Since it's such a heavy feature efficiency is extra important, and I don't know much about shaving milliseconds off of operations.
Evan Reese
17
Comments
Could you add a HSV input for the colour?
It seems more intuitive than RGB for some colours (at least for me).
I did do an algorithm a little while ago for converting HSV to a colour (based on a StackExchange answer):
https://cad.onshape.com/documents/44a687b24ed2559c60798e23/w/376aa1c19dcc30a04d5ed003/e/7491f2707f2ef42a181f1a22
IR for AS/NZS 1100
This is very, very nice.
Or - could we have all the instance's Y-axis (say) point toward your attractor...if the attractor was a point, it would be kind of a radial pattern.
Anyway - super cool feature. Thanks for sharing it with us!
I had a bit of a look at the speed of the feature, and found that the default transforms for scaling and rotation are taking up a fair proportion of the time. If they are instead done with identityTransform, the total time reduces somewhat.
IR for AS/NZS 1100
If you use the ANGLE_360_BOUNDS and ANGLE_360_ZERO_DEFAULT_BOUNDS for the input, it will allow all available angles including negative ones.
IR for AS/NZS 1100
As for the angles, I'm using custom bounds so you can actually put in numbers much higher than 360, which can give some cool effects. I can update it so it can go just as far in the negative direction in case that's useful. I actually don't think I understand the request fully though since I can't imagine why I'd need to enter a negative value, when I can just tick the opposite direction boolean. What am I missing?
The names of the Onshape bounds are misleading.
If you look at the source[1], it allows from -100000 to 100000.
[1]: https://cad.onshape.com/documents/12312312345abcabcabcdeff/v/812aa61a84190f49bc3c509d/e/87b09e244a234eb791b47826?jumpToIndex=7367&showReturnToWorkspaceLink=true
The reason I would like it to be able to have negative numbers is to have it configurable more easily, rather than having to configure opposite direction. For instance, the move face feature does not allow a negative number, so I have to configure its opposite direction input as well.
IR for AS/NZS 1100
Could you make it use booleanBodies instead of opBoolean, please, so that it can work with sheet metal parts?
IR for AS/NZS 1100
I still also need to implement your identity transform suggestion too
I think I did it. Is this what you meant? https://cad.onshape.com/documents/ca03eaf542826bb98f6cc90e/v/d83c9f27cad81d04dc25ef10/e/3d918f5d92e84cb0a54d4605
IR for AS/NZS 1100
Thanks!
The solution is the make a new base surface out of a single surface, which isn't always easy. One solution for you would be to use the Fit Spline feature in Edges mode, then sweep it to make the entire set of gray faces as one surface, and use it as the base. You could still keep your gray part as-is, with the different faces, and just make a new unified base surface. Here's an example: https://cad.onshape.com/documents/43a99515b33961b8380b7217/w/44e0d2c915df97cb45b76506/e/ba1ffb71ee263fa0091c235f
Failing that, I did make a feature to solve this problem for myself, but I didn't make a big deal out of announcing it it, because it's very finicky, unintuitive, and requires a lot of understanding of what the feature is actually doing, and I don't feel like fielding a bunch of questions about it . I don't expect that it will ever be "production ready", but you're welcome to give it a try if you like. You need to make a single surface that has a UV structure you like, then it will find points on a nearby body, and try to either make a bunch of edges and loft them, or make a fill surface through the points. For that reason, it's fairly approximate, but can totally be close enough for use with Attractor Pattern, which is its only purpose. I wouldn't use it for an actual production surface, because the surface quality tends to be pretty wobbly. https://cad.onshape.com/documents/47de2b0c7db2d5832380fcd3/w/86e1200ed3cc9b96ed6f7d7f/e/e9054bb9ce23d613323dc398
I've tried everything I can think of and I can't get the pattern to space evenly.
This is an issue I'm aware of, but not something I've not gotten around to improving. Not sure if/when I'd get to it though. I agree it should be able to handle it though.
@Shaolo I think I found a workaround to get a evenly distributted pattern around a 360º revolved surface.
This is my case and how I found a way to solve it.
I wanted to use an attractor pattern to look something similar to this
Which looked good, except for this detail over here
What I did was to revolve only 30º the base surface and then apply a rotational pattern that would overlap the patterned surface by 1/3, so that it would match the attractor pattern evenly.
I grouped the remaining parts into a composite part since the bolean addition would be too costly in terms of regeneration time.
I know it's not the ideal solution, but it worked while mantaining a fairly low regen. time (5.00 sec)