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.
rounding extruded edges on sides, not faces
adamohern
Member, OS Professional Posts: 216 PRO
I'm extruding rectangles, and by trial and error I found that the following code does exactly what I want:
This works for rectangular extrudes, because it just-so-happens that Onshape puts the extruded edges (the ones running normal to the sketch plane) first in the qNthElement() list. All I have to do is gather up the first four, and I know I've got all of the vertical edges.
Two questions:
1) Is there a cleaner way to do this in my situation?
2) Is there a generalized way to access all of the non-end-cap edges of an extrude regardless of profile shape?
var filletCandidates = qCreatedBy(id + ("extrude" ~ i), EntityType.EDGE);
var filletEdges = qUnion([
qNthElement(filletCandidates, 0),
qNthElement(filletCandidates, 1),
qNthElement(filletCandidates, 2),
qNthElement(filletCandidates, 3)
]);
opFillet(context, id + ("fillet1"), {
"entities" : filletEdges,
"radius" : definition.edgeRadius
});
This works for rectangular extrudes, because it just-so-happens that Onshape puts the extruded edges (the ones running normal to the sketch plane) first in the qNthElement() list. All I have to do is gather up the first four, and I know I've got all of the vertical edges.
Two questions:
1) Is there a cleaner way to do this in my situation?
2) Is there a generalized way to access all of the non-end-cap edges of an extrude regardless of profile shape?
0
Comments
id + ("extrude" ~ i)
) and a boolean for whether to return the start or end cap entities (I don't see a way to get both at once). Using a qSubtraction() between yourfilletCandidates
and the results of the qCapEntity()s should give you just the non-cap edges.