Are we able to return a Computed Suface Area of the Sheet Metal Top Side Only in FeatureScript?

Dieselboy
Dieselboy Member Posts: 4 PRO

I've been searching without luck to see if there is a FeatureScript that outputs into a custom table, the computed surface area of only the top or 'good side' of a flat sheet metal part on the flat? If not, is there a way to return this value in a FeatureScript that I'm not seeing?

The basic evArea returns the entire surface area.

The end goal is to include this in a custom table for use in drawings on a given sheet metal flat part drawing.

Thanks in advance for any assistance!

Best Answer

  • Caden_Armstrong
    Caden_Armstrong Member Posts: 471 PRO
    Answer ✓

    You will need to take a query for the faces of your part and narrow them down to just the faces on one side.


    You can use qCorrespondingInFlat for a sheet metal part to find the flat version
    and then use qParallelPlanes with antiparallel set to false. All flat pattern parts are in the Z direction so putting the XY plane will get the non edge faces.


    var flatModel = qCorrespondingInFlat(part);

    var faces = qParallelPlanes(qOwnedByBody(flatModel, EntityType.FACE), plane(WORLD_ORIGIN, Z_DIRECTION), false);

    or


    qTangentConnectedFaces could also be used from a seed face without needing the flat, you just need to reliably find a face that isn't an edge face.

    and for those who want this without doing it themselves, I sell a library of computed properties, which includes one that can do this. You can check it out through the fs.place marketplace: https://fs.place/Listings/HUK1UHJF8EQ6HS1NEVJ2SWH4BI1TOMT1

    www.smartbenchsoftware.com --- Renaissance --- Kestrel -- SmartLink
    Experts in Onshape Automation - Custom Features and Integrated Applications

Answers

  • Caden_Armstrong
    Caden_Armstrong Member Posts: 471 PRO
    Answer ✓

    You will need to take a query for the faces of your part and narrow them down to just the faces on one side.


    You can use qCorrespondingInFlat for a sheet metal part to find the flat version
    and then use qParallelPlanes with antiparallel set to false. All flat pattern parts are in the Z direction so putting the XY plane will get the non edge faces.


    var flatModel = qCorrespondingInFlat(part);

    var faces = qParallelPlanes(qOwnedByBody(flatModel, EntityType.FACE), plane(WORLD_ORIGIN, Z_DIRECTION), false);

    or


    qTangentConnectedFaces could also be used from a seed face without needing the flat, you just need to reliably find a face that isn't an edge face.

    and for those who want this without doing it themselves, I sell a library of computed properties, which includes one that can do this. You can check it out through the fs.place marketplace: https://fs.place/Listings/HUK1UHJF8EQ6HS1NEVJ2SWH4BI1TOMT1

    www.smartbenchsoftware.com --- Renaissance --- Kestrel -- SmartLink
    Experts in Onshape Automation - Custom Features and Integrated Applications
  • Dieselboy
    Dieselboy Member Posts: 4 PRO

    Thanks Caden! Appreciated!