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.
Query Bodies Created by OpSplitByPart
ben_smith548
Member Posts: 2 ✭
I want to query the bodies created by a split. This doesn't work. Documentation doesn't make it clear why.
<div>FeatureScript 1447;</div><div>import(path : "onshape/std/geometry.fs", version : "1447.0");</div><div><br></div><div>annotation { "Feature Type Name" : "My Split" }</div><div>export const mySplit = defineFeature(function(context is Context, id is Id, definition is map)</div><div> precondition</div><div> {</div><div> annotation { "Name" : "Select body", "Filter" : EntityType.BODY }</div><div> definition.bodyToSplit is Query;</div><div> </div><div> annotation { "Name" : "Select splitting plane", "Filter" : EntityType.FACE }</div><div> definition.splittingPlane is Query;</div><div> </div><div> }</div><div> { </div><div> opSplitPart(context, id + "splitPart", {</div><div> "targets" : definition.bodyToSplit,</div><div> "tool" : definition.splittingPlane</div><div> });</div><div> debug(context, qCreatedBy(id + "splitPart", EntityType.BODY), DebugColor.RED);</div><div> });</div>
debug: Query resolves to nothing
Result: Regeneration complete
Result: Regeneration complete
0
Comments
Here is how I use it in one of my features Section:
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴