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.

Featurescript - Sheet Metal Thicken

Hello, I have a simple task. I am trying to create a sheet metal model by thickening it from a sketch in a featurescript. My FeatureScript creates the sketch correctly, however I am uncertain on how to use the sheet metal commands. Any guidance would be greatly appreciated! 

Comments

  • MBartlett21
    MBartlett21 Posts: 2,064 ✭✭✭✭✭
    Call sheetMetalStart
    mb - draftsman - also FS author: View FeatureScripts
    IR for AS/NZS 1100
  • Austin_Keet
    Austin_Keet Posts: 6
    Thanks for the reply mbartlett21. After looking through the library's sheet metal functions though I still don't understand. Where do I call sheetMetalStart? How do I do what I want to do after I call sheetMetalStart? If you have an example that would be great!  :)

    There is "SMProcessType.THICKEN" which looks like it might be what I want? But I have no idea how to assign the value of thickness that I want.

  • MBartlett21
    MBartlett21 Posts: 2,064 ✭✭✭✭✭
    You can look up this link for the sheetMetalStart function
    https://cad.onshape.com/documents/12312312345abcabcabcdeff/w/a855e4161c814f2e9ab3698a/e/d72cde0155be691657609507?jumpToIndex=3679

    Callit by inserting

    sheetMetalStart(context, id + "<b><i>SM_ID</i></b>", {<br>        "process" : SMProcessType.THICKEN,<br>&nbsp;       "regions" : <b><i>Sketch_Regions</i></b>,<br>&nbsp;       "thickness" : <b><i>Sm_Thickness</i></b>,<br>&nbsp;       "radius" : <b><i>Bend_Radius</i></b>,<br>&nbsp;       "kFactor" : <b><i>K_Factor</i></b>,<br>&nbsp;       "kFactorRolled" : <b><i>K_Factor_Rolled</i></b><br>    })



    mb - draftsman - also FS author: View FeatureScripts
    IR for AS/NZS 1100
  • Austin_Keet
    Austin_Keet Posts: 6
    Thanks! Helped a lot and I have it now.

    In case anyone reads this later I did have to add "bends" : qSketchRegion(id+("sketch1")~j)), in the code. Let me know if I shouldn't have inputted the sketch as the query for bends though haha
     
     sheetMetalStart(context, id + "SM_ID", {
           "process" : SMProcessType.THICKEN,
           "regions" : qSketchRegion(id + ("sketch1"~j)),
           "bends" : qSketchRegion(id + ("sketch1"~j)),
           "thickness" : thickness,
           "radius" : 0.25 * inch,
           "kFactor" : 0.5,
           "kFactorRolled" : 0.5
           });
  • lana
    lana Posts: 779 image
    edited November 2018
    @Austin_Keet

    You probably had to supply a query for bends parameter, it should not be  qSketchRegion(id + ("sketch1"~j)), even though it gets ignored. Please use qNothing() instead - it is exactly what it says it is.
  • Austin_Keet
    Austin_Keet Posts: 6
    @lana
    Awesome, thanks lana