Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. 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.

Maintaining a stable body id when copying flat pattern body into standard part studio edit space

shawn_crockershawn_crocker Member, OS Professional Posts: 1,005 PRO

I have a feature that contains an option which allows the user to copy the flat pattern of a sheet metal part into the standard part studio editing space. The problem I have been having is, any time the part studio is edited and a new feature is added or removed which interacts with the parent sheet metal body, the flat pattern that is being copied changes id and any feature linked to the body breaks. Does anyone know how the following code could be changed to maintain a stable id on the resultant copied body?

for(var i = 0; i < partCount; i += 1) {
    const part = partsAndAtributes[i].body;            
    const flatPattern = qCorrespondingInFlat(part);
    opPattern(context, id + "flatPart-" + i, {
            "entities" : flatPattern,
            "transforms" : [identityTransform()],
            "instanceNames" : ["flatPattern"]
    });
}
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.