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.
How to perform Extrude Surface + Thicken in FS?
cory_isaacson
Member, Developers Posts: 43 PRO
Am I correct to assume that I should just create a sketch with a very thin border and extrude that area to perform the same thing as done in the standard Onshape Extrude Feature? And the Thicken would not be needed, as I can specify the thickness in the sketch itself.
For example, I would just make 2 rectangles, and the outer one would be .005 wider than the inner one. Then I can just extrude that area.
If there is an easier way let me know.
For example, I would just make 2 rectangles, and the outer one would be .005 wider than the inner one. Then I can just extrude that area.
If there is an easier way let me know.
0
Best Answer
-
Jake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 1,646Cory,
it sounds like the two ways you lay out are both valid. In FeatureScript you could either:
1. sketch 2 rectangles and extrude just the outer 'border' portion by using the following query to get the entities:qSketchRegion(yourSketchId, true)
https://cad.onshape.com/FsDoc/library.html#qSketchRegion-Id-boolean
2. sketch the rectangle you want to extrude->thicken, extrude it as a surface with a call to extrude() with entities as:qBodyType(qCreatedBy(yourSketchId), BodyType.WIRE)
then thicken the resulting surfaces (and possibly delete the surfaces from the extrude after)
Both options have advantages and disadvantages. Let us know if you need additional help.<br>
Jake Rosenfeld - Modeling Team5
Answers
it sounds like the two ways you lay out are both valid. In FeatureScript you could either:
1. sketch 2 rectangles and extrude just the outer 'border' portion by using the following query to get the entities: https://cad.onshape.com/FsDoc/library.html#qSketchRegion-Id-boolean
2. sketch the rectangle you want to extrude->thicken, extrude it as a surface with a call to extrude() with entities as:
then thicken the resulting surfaces (and possibly delete the surfaces from the extrude after)
Both options have advantages and disadvantages. Let us know if you need additional help.
<br>
Now let's say I want to take an existing part, a rectangular flat part with a radius on each corner, and add a thickened edge around all sides as a separate part. Is there a way to create a new sketch that matches the existing part exactly, then add another curve to the sketch slightly larger, so I can do the extrude? I can easily query the face of the part I want to use as the basis for the first sketch, but not sure how to create a sketch that would match all curves. Seems like maybe with BodyType.Wire it may be possible? I just don't know how to turn that into a sketch.
As to your other question, "op" commands are the interface directly into our internal geometry creation, and are generally easier to use because they take direct mathematical representations of the information they require (like a Vector) for the extrude direction. Onshape Features (like "extrude" that you referred to) are actually the FeatureScript that is running when you click the "extrude" button in the Onshape UI. Because of this, something like "revolve" may require a Query as an axis (because we need the user to click on some edge in the UI, and then break that down into its mathematical representation in the revolve code) while "opRevolve" can just take the internal mathematical representation: Line.
TL;DR Onshape features such as extrude or revolve take user UI input and transform them into calls to opExtrude and opRevolve. Hope this answered your question.
And to directly answer your confusion, if you provide edges as definition.entities to opExtrude instead of faces, it should create sheet bodies for you without you having to explicitly set anything to BodyType.SHEET.