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.
Pattern & Sweep (New Custom Feature!)
Pattern & Sweep
(New Custom Feature!)

How to add a custom feature to your toolbar:

RENDERCAD
rendercad.ai - Photorealistic product rendering.
▚▞▚▞▚▞▚▞▚
________________________________________________________________________
Comments
-
wow! very clever!!
www.accuratepattern.com0 -
dang. That's cool.0
-
That's pretty cool. And thank you for making a nice icon too!0
-
Thanks guys, enjoy!
RENDERCAD
rendercad.ai - Photorealistic product rendering.
▚▞▚▞▚▞▚▞▚
________________________________________________________________________0 -
Nice one, Michael! It's always great to see people solving their industry-specific challenges with automation like this. Someone over there should give you a raise for the time you're saving everyone.1
-
Thanks Evan!
This one will save tons of time for those who do panels and walls. The example room took me about an hour with these tools due to my indecision. Without these tools it probably would have taken 6 hours give or take some.
RENDERCAD
rendercad.ai - Photorealistic product rendering.
▚▞▚▞▚▞▚▞▚
________________________________________________________________________0 -
That could be very useful. I played with a copy for about 15 minutes but couldn't comprehend the relationship between the profile sketch and the faces. I could not predict the outcome of applying the feature. - Scotty
0 -
@robert_scott_jr_ I have updated example 2 to show what the feature is doing behind the scenes. This should help you visualize it.
RENDERCAD
rendercad.ai - Photorealistic product rendering.
▚▞▚▞▚▞▚▞▚
________________________________________________________________________1 -
Thanks. Now that I unsupressed the second mate connector in the lower part of the feature tree that you exposed I could then see the relationship between the face and the profile sketch. How was that mate connector chosen/placed since I There is no indication that it even exists other than to unsupress it? - Scotty
0 -
@robert_scott_jr_
There is a configuration button to show that folder, you shouldn't have to unsuppress anything manually.
The profile origin mate can be selected from an existing mate, or created on the spot. To create it on the spot, press the mate button over to the right. You can manually adjust the orientation of the mate by pressing the tiny mate icon in the input box, or you can click the quick orientation buttons I placed below the Profile origin mate box. The quick adjuster buttons are very helpful for this feature.
RENDERCAD
rendercad.ai - Photorealistic product rendering.
▚▞▚▞▚▞▚▞▚
________________________________________________________________________1 -
@MichaelPascoe
Could you use opExtractSurface[1] instead of fill, when getting the faces for transforming?
That means that faces with inner loops will work.
[1]: Onshape
2 -
@MBartlett21 Thanks, I was wondering how to do that. That will probably be much more efficient.
RENDERCAD
rendercad.ai - Photorealistic product rendering.
▚▞▚▞▚▞▚▞▚
________________________________________________________________________0 -
UPDATE!
- Profiles can be selected from other part studios (@Evan_Reese I learned how to do this from your Attractor Pattern feature)
Note, when using profiles from a different studio:
- Profiles from a different studio will require a surface instead of a sketch or face.
- Profile will be oriented based on the world origin of the profile's studio.

RENDERCAD
rendercad.ai - Photorealistic product rendering.
▚▞▚▞▚▞▚▞▚
________________________________________________________________________3 -
cool! Pretty sure I referenced Neil's Beams feature for mine.0
-
I was working on 4 story stairs today and kept having to derive profiles and sweep them along a single curve. This update will save time for applications that require derives and standard sweeps.
Update!
- New mode: sweep along curve (like the standard sweep)

RENDERCAD
rendercad.ai - Photorealistic product rendering.
▚▞▚▞▚▞▚▞▚
________________________________________________________________________3 -
Cool functionality, Michael! any reason to not just make it as a single query param for all of the curves, and generate the start origins your need at the ends of the curves? I'm not sure if this is the best way or not, but I've had luck with batch sweeping like this by grouping curves into contiguous chains using opExtractWires(), then just finding a plane at the end of the path like so:
opExtractWires(context, id + "opExtractWires", { "edges" : inputCurves }); var compositeCurves = qCreatedBy(id + "opExtractWires", EntityType.BODY); forEachEntity(context, id + "makeWires", compositeCurves, function(curve is Query, id is Id) { var curves = dissolveWires(curve); var path = constructPath(context, curves); var start = evPathTangentLines(context, path, [0]).tangentLines[0]; var startOrigin = start.origin; var startNormal = start.direction; var startPlane = plane(startOrigin, startNormal); var sketch = newSketchOnPlane(context, id + "sketch", { "sketchPlane" : startPlane }); skCircle(sketch, "circle", { "center" : vector(0, 0) * inch, "radius" : definition.diameter / 2 }); skSolve(sketch); var profile = qEntityFilter(qCreatedBy(id + "sketch"), EntityType.FACE); // sweep the wire body opSweep(context, id + "sweep", { "profiles" : profile, "path" : qUnion(path.edges) }); var wireBody = qCreatedBy(id + "sweep", EntityType.BODY); }
1 -
@Evan_Reese
Thanks for the input! Great idea, it would be a lot faster depending on the situation. I didn't choose the best example, but the reason I have the inputs in an array is so that you can do multiple complex sweeps. Lol, then I went and showed 4 straight simple lines... It would be good to have something like your code inside each sweep input in the array. This way if you want to sweep 4 straight lines, you only have to select the orientation once then click all 4 lines.
RENDERCAD
rendercad.ai - Photorealistic product rendering.
▚▞▚▞▚▞▚▞▚
________________________________________________________________________0 -
Is it possible to select the end mate connector to allow rotation along the path of the curve? Think roller coaster tracks where you want to have a bank angle, so you would start a 0-degree rotation normal to the curve's start, and end with whatever the mate connecter had set since you can rotate a mate connector along its primary axis fairly easily.
0 -
The Pattern & Sweep doesn't allow this functionality. However you can achieve this with the standard sweep feature by setting the Sweep Profile Control to Lock profile faces. Here is an example of how to do this:
https://cad.onshape.com/documents/38982e08a0853f0999682f95/w/f8057202b9bea051887ed79c/e/…
RENDERCAD
rendercad.ai - Photorealistic product rendering.
▚▞▚▞▚▞▚▞▚
________________________________________________________________________0






