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.
Extruding with an offset on all 4 side
RyanAvery
Member Posts: 93 EDU
I want to extrude the 5 drawers selected here, but I want a 1/8th inch gap on top, left, bottom, and right
So i dont want to extrude the squares I have selected, but rather the squares i have selected but each of them trimmed on all 4 sides by 1/8th inch.
Is there an easy / fast way to do this?

So i dont want to extrude the squares I have selected, but rather the squares i have selected but each of them trimmed on all 4 sides by 1/8th inch.
Is there an easy / fast way to do this?

0
Answers
I.e. a tool / FS that can do this to any cube that I select after I select the face of it (so it knows to extrude the 4 faces connected to that face)
If you want to try your hand at FeatureScript, this would be a pretty simple feature to write. In moderate-pseudocode it breaks down to
export const trimmedExtrude = defineFeature(function(context, id, definition) precondition { annotation{...} // <- Filter should probably be EntityType.FACE && GeometryType.PLANE definition.profiles is Query; annotation{...} isLength(definition.depth, LENGTH_BOUNDS); annotation{...} isLength(definition.trim, LENGTH_BOUNDS); } { // Find the extrudeDirection const dir = evFaceTangentPlane(..., {"face" : qNthElement(definition.profiles, 0)}).normal; // Extrude the profiles opExtrude(context, id + "extrude", { "entities" : definition.profiles, "direction" : dir, "endDepth" : definition.depth, ... }); // Find the side faces const capEntities = qUnion([qCapEntity(id + "extrude", true, EntityType.FACE), qCapEntity(..., false, ...)]); const sideFaces = qSubtraction(qCreatedBy(id + "extrude", EntityType.FACE), capEntities); // Push the side faces in opOffsetFace(..., { "moveFaces" : sideFaces, "offsetDistance" : -definition.trim }); }, {};