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.
opExtendSheetBody missing from documentation
freya_who175
Member Posts: 2 ✭
Several times in the standard library documentation, a reference to opExtendSheetBody is used, e.g. for
extendSurface (context is Context, id is Id, definition is map)
Extends a surface body by calling opExtendSheetBody.
But the entry for opExtendSheetBody itself is actually missing.
I'm not sure whether this is the correct forum to report this. I've been starting to work with FeatureScript somewhat recently and have noticed some other (minor) things missing from the documentation.Is there a way to help out with the documentation for community members?
Comments
I asked this exact question to the support team a couple of weeks ago. Their reply was that it's an internal call and not very stable. You're better off just using the
extend.fsinstead. You'll need to import it into your Feature studio. Here's an example of how I used it:extendSurface(context, id + "extendSrf1", {"entities" : qCreatedBy(id + "sweep1", EntityType.BODY),
"endCondition" : ExtendBoundingType.BLIND,
"extendDistance" : definition.blendDiameter * 3
});
Or else just try it as a feature in a part studio and copy the parameters that you see in the code. Quite often, I struggle with how a feature is supposed to be used. Besides the obvious answer of "just Google it" and asking in the forums, trying the feature out in a part studio and then looking at the code is a good first step.
Ramon Yip | glassboard.com
I suppose that it would be unwise to base an entire feature core to company practices on the undocumented internal call to opExtendSheetBody then, huh?
(¬、¬)
Derek Van Allen | Engineering Consultant | MeddlerI mean, if you guys want the deets, I got them here as provided to me. But ✌️"unstable"✌️was the official response.
/*** @internal* Extends or trims the perimeter of a sheet body by moving sheet edges by distance or up to a target sheet body* @param id : @autocomplete `id + "extendBody1"`* @param definition {{* @field endCondition {ExtendEndType} : @autocomplete `ExtendEndType.EXTEND_BLIND`. Condition that terminates the extension. May be blind or up to target.* @field entities {Query} : Bodies or edges to extend.*. @field tangentPropagation {boolean} : Whether additional edges should be added to the selection by tangent propagation. Default `true`. @optional* @field extendDistance {ValueWithUnits} : @requiredif {'endCondition' is 'ExtendEndType.EXTEND_BLIND'} The distance to extend by. Negative values may be used to trim.* @autocomplete `0.1 * inch`* @field target : @requiredif {'endCondition' is 'ExtendSheetBoundingType.EXTEND_TO_TARGET'} Target part to extend up to.* @field extensionShape {ExtendSheetShapeType} : @autocomplete `ExtendSheetShapeType.LINEAR`. Shape characteristic of extension, whether curvature continuity is maintained or not.* }}*/export const opExtendSheetBody = function(context is Context, id is Id, definition is map){return @opExtendSheetBody (context, id, definition);};Ramon Yip | glassboard.com
I mean, this is for a sheet metal script so I'm already treading the unstable waters pretty deep. More deets appreciated.
Derek Van Allen | Engineering Consultant | MeddlerThere is a bunch of functionality that isn't documented in FeatureScript - some of it quite important to building advanced features. I've written a few blog articles about it (https://www.smartbenchsoftware.com/post/hidden-featurescript-functions), (https://www.smartbenchsoftware.com/post/the-hidden-parameter-in-newsketch). opExtendSheetBody probably gets used the most with constructPaths as a close second.
Sharing featurescript sleuthing on the forums is how people were able to figure out how to make fs buttons before they made an official appearance.
As annoying as it is that this stuff is undocumented, at least its available. Its nice when new features comes out and are fs based, you're able to use them. Things like cosmetic threads and query variables. I'm excited to see how MBD gets implemented, because a fs based approach means that fully fs built parts can have MBD baked into them.
Custom FeatureScript and Onshape Integrated Applications