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.
Custom table/property for sheet metal area
Lucas_Kuhns
Posts: 109 PRO
Does anyone know how I could create a custom property for the area of a sheet metal part's flat pattern?
0
Comments
-
Haven't tried this but if you can't get it directly you could use the volume and divide by the thickness... Depends if you want to include any cutouts or not...0
-
I would want the true area of the part like this:

0 -
This should just be (part volume / thickness) since the thickness is uniform...2
-
That is very true. The thing is, I'm not a programmer. Is it simple enough that taking the training course in FeatureScript would get me everything to do this? Is there someone on here I could pay to build this?0
-
I haven't tried it yet but it should be fairly straightforward I think?
Here's a "step by step" process for created a computed property (the example computes the volume so all you need to do is figure out how to get the thickness and divide the two):
https://cad.onshape.com/FsDoc/computed-part-properties.html
0 -
If you are having someone write your custom features or API, CADSharp is the way to go. I have seen tasks automated that I didn't know were possible in Onshape. You can reach out to me or visit our website CADSharp.com
About this specific question, yes, this is possible. @eric_pesty is right.
Here are some different approaches you could take:
Face area: Custom feature
Volume / thickness: Custom featureNote that to set it as a custom property, you will need to create that property as a company admin or owner first, see this Onshape tutorial.FeatureScript 1821; import(path : "onshape/std/geometry.fs", version : "1821.0"); export enum Options { Description, Custom } annotation { "Feature Type Name" : "Set property area (CADSharp)" } export const setPropertyArea = defineFeature(function(context is Context, id is Id, definition is map) precondition { annotation { "Name" : "Face", "Filter" : EntityType.FACE } definition.face is Query; annotation { "Name" : "Tangent connected faces", "Default" : true } definition.tanConnectedFaces is boolean; annotation { "Name" : "Save as", "UIHint" : UIHint.SHOW_LABEL } definition.options is Options; if (definition.options == Options.Custom) { annotation { "Name" : "Custom property ID" } definition.customPropertyId is string; } } { const part = qOwnerBody(definition.face); var face = definition.face; if (definition.tanConnectedFaces) { const tangentConnectedFaces = qTangentConnectedFaces(definition.face); face = tangentConnectedFaces; } const area = evArea(context, { "entities" : face }); debug(context, face, DebugColor.GREEN); if (definition.options == Options.Description) { setProperty(context, { "entities" : part, "propertyType" : PropertyType.DESCRIPTION, "value" : toString(roundToPrecision(area.value, 3)) ~ " m^2" }); } else if (definition.options == Options.Custom) { setProperty(context, { "entities" : part, "propertyType" : PropertyType.CUSTOM, "customPropertyId" : definition.customPropertyId, "value" : area }); } });
RENDERCAD
rendercad.ai - Photorealistic product rendering.
▚▞▚▞▚▞▚▞▚
________________________________________________________________________0 -
@MichaelPascoe Thank you for your help. I may have a project or two for CADSharp.1
-
Of course.
Great, I'll send you a DM.
RENDERCAD
rendercad.ai - Photorealistic product rendering.
▚▞▚▞▚▞▚▞▚
________________________________________________________________________0 -
Here is babby's attempt at it: Sheet Metal Area. Pls let me know if it needs additional functionality - or if it's completely off the mark. Cheers!


0 -
WOW! Very cool. It seems to work great.0


