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.
Fill Pattern where the shape of the body to be patterned is different each direction
BStump
Member Posts: 19 ✭✭
I am looking to see if there is a fill pattern in Featurescript that has the ability to control both direction dimensions independently. I have a fill where the shape of the body to be patterned is different each direction, so to pattern it I need to control both directions. Anyone done this or suggestions?
Tagged:
0
Comments
-
I'd suggest copying the FeatureScript Fill Pattern, adding a parameter named definition.length2 and making the following changes:
Change line 70 tovar maximumIndex = round((norm(diagonal) - (definition.border * 2)) / min(definition.distance, definition.distance2));
and change line 90 tovar translation = (direction * i) * definition.distance + (angled * j)) * definition.distance2;
If you want the two directions to be perpendicular (rather than the current hex grid), you'll also want to change line 45 to use 90 degree angles.
Cheers to @NeilCooke for writing clean code that's this easy to modify
Let us know if you encounter any issues!0 -
Well that is a good start. In this case you need to consider the shapes I want to pattern to be something like dog bones (https://macrotrac.com/wp-content/uploads/2016/12/i-trac-pic.png ). I just need to be able to do a fill using the basic shape with appropriate offsets in each direction ( I don't need the surface details, the tabs, pins, locks, or tread). The shape nests, so a bounding box would show significant overlap. The angle is not 0, 45 , or 90, but about 29.56 degrees. I am seeing if I can find a way to simplify layouts using Onshape.0
-
@kevin_o_toole_1 as much as I'd like to take credit for it, the master code comes from the master coder himself @paul_chastellSenior Director, Technical Services, EMEA0


