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.
Forum Code Block's Broken
MichaelPascoe
Member Posts: 1,988 PRO
FeatureScript 2411;<br>import(path : "onshape/std/common.fs", version : "2411.0");<br><br>annotation { "Feature Type Name" : "My Feature", "Feature Type Description" : "" }<br>export const myFeature = defineFeature(function(context is Context, id is Id, definition is map)<br> precondition<br> {<br> // Input for selecting a sketch<br> annotation { "Name" : "Sketch", "Filter" : EntityType.FACE }<br> definition.sketch is Query;<br> }<br> {<br> opExtrude(context, id + "extrude1", {<br> "entities" : definition.sketch,<br> "direction" : evOwnerSketchPlane(context, { "entity" : definition.sketch }).normal,<br> "endBound" : BoundingType.THROUGH_ALL,<br> "endDepth" : 1 * inch<br> });<br><br> const extrudedPart = qCreatedBy(id + "extrude1", EntityType.BODY);<br> var targets = qAllSolidBodies();<br> targets = qSubtraction(targets, extrudedPart);<br><br> opBoolean(context, id + "boolean1", {<br> "tools" : extrudedPart,<br> "targets" : targets,<br> "operationType" : BooleanOperationType.SUBTRACTION<br> });<br> });
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
0
Comments
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴