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

Austin_KeetAustin_Keet Member Posts: 6 PRO
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

  • MBartlett21MBartlett21 Member Posts: 1,536 EDU
    Call sheetMetalStart
    MB - I make FeatureScripts: view FS (My FS's have "Official" beside them)
  • Austin_KeetAustin_Keet Member Posts: 6 PRO
    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.

  • MBartlett21MBartlett21 Member Posts: 1,536 EDU
    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 + "SM_ID", {
    "process" : SMProcessType.THICKEN,
      "regions" : Sketch_Regions,
      "thickness" : Sm_Thickness,
      "radius" : Bend_Radius,
      "kFactor" : K_Factor,
      "kFactorRolled" : K_Factor_Rolled
    })



    MB - I make FeatureScripts: view FS (My FS's have "Official" beside them)
  • Austin_KeetAustin_Keet Member Posts: 6 PRO
    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
           });
  • lanalana Onshape Employees Posts: 453
    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_KeetAustin_Keet Member Posts: 6 PRO
    @lana
    Awesome, thanks lana
Sign In or Register to comment.