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.

Sensor Custom Feature

TimRiceTimRice Member, Moderator, Onshape Employees Posts: 315
edited April 2020 in FeatureScript
Often in the design process there may be specific geometric constraints on the parts that need to be considered along the way. I created this Sensor custom feature to measure certain geometry and compare it to a specified value and warn if it is out of spec. Currently only edge length and fillet radius are supported but I am looking for more ideas!




Add it to your toolbar: 
https://cad.onshape.com/documents/9497bc5595799f48dc143063/v/2481e8a40355bf553bfc1af8/e/b0ba07534e569d763885e5c2
Tim Rice | User Experience | Support 
Onshape, Inc.
«1

Comments

  • romeograhamromeograham Member Posts: 656 PRO
    Thanks @TimRice. How about volume?

    (and I know there are folks out there wondering if this could be the start of a "wall thickness" sensor too)
  • Jake_RosenfeldJake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 1,646
    @romeograham

    There isn't really a great way to implement a wall thickness algorithm in FeatureScript that could be trusted for production use.  It is something we would like to come up with a more reliable solution for internally.
    Jake Rosenfeld - Modeling Team
  • alnisalnis Member, Developers Posts: 447 EDU
    edited February 2020
    One area I see this potentially being very useful is for CNC mill/router machinability analysis if you could specify to check only inside radii and check for unfilleted inside corners. I like the idea a lot!
    Student at University of Washington | Get in touch: contact@alnis.dev | My personal site: https://alnis.dev | Currently an Onshape intern: asmidchens@onshape.com
  • TimRiceTimRice Member, Moderator, Onshape Employees Posts: 315
    Tim Rice | User Experience | Support 
    Onshape, Inc.
  • TimRiceTimRice Member, Moderator, Onshape Employees Posts: 315
    Tim Rice | User Experience | Support 
    Onshape, Inc.
  • romeograhamromeograham Member Posts: 656 PRO
    Hey @TimRice
    That's awesome. 
    I mostly deal with volumes in the 50cc - 5L range - do you think you could use cm^3 as a unit too? mm^3 are too small, and m^3 are too big!

    Thanks!
  • TimRiceTimRice Member, Moderator, Onshape Employees Posts: 315
    @romeograham
    Added Liters and CM^3! Simply update your referenced feature to the latest version.
    Tim Rice | User Experience | Support 
    Onshape, Inc.
  • romeograhamromeograham Member Posts: 656 PRO
    @TimRice
    That's fantastic. Works perfectly.
    Thanks!
    Romeo
  • romeograhamromeograham Member Posts: 656 PRO
    edited March 2020
    Sorry to add a new topic to this conversation, but it's kind of related:

    @konstantin_shiriazdanov

    Do you think you could add other units to your Measure Value FS (https://cad.onshape.com/documents/77baa8153589a7fc5f289829/v/ceb4a03e4ac77173bf6d0074/e/181cb871f3008e6b885df46a) ?

    I'd love to be able to have my Document in mm, but my Volumes I get from Measure Value displayed in cm^3 or liters.
    I can understand there may be issues downstream when I use that Measure Value as a #variable....

    Romeo

  • Evan_ReeseEvan_Reese Member Posts: 2,060 PRO
    wow! this is freaking cool. nice idea
    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
  • konstantin_shiriazdanovkonstantin_shiriazdanov Member Posts: 1,221 ✭✭✭✭✭
    Do you think you could add other units to your Measure Value FS (https://cad.onshape.com/documents/77baa8153589a7fc5f289829/v/ceb4a03e4ac77173bf6d0074/e/181cb871f3008e6b885df46a) ?

    I'd love to be able to have my Document in mm, but my Volumes I get from Measure Value displayed in cm^3 or liters.
    I can understand there may be issues downstream when I use that Measure Value as a #variable....
    For some reason I there was no notification from your comment and just saw it. As you say I would prefer this type of unit translation to happen outside of Measure Value script, for example you could measure the volume into #V variable then call Variable feature and redefine #V as #V/liter
  • romeograhamromeograham Member Posts: 656 PRO
    @konstantin_shiriazdanov
    I also didn't get this notification.
    OK - I'll use the #V method you suggest (I already use this for some other unit conversion in the Feature List
    Thanks
  • romeograhamromeograham Member Posts: 656 PRO
    @TimRice
    Using the sensor again to find fillets that are smaller than my injection mold supplier's smallest ball end mill. However, when I use the Sensor to find all fillets that are smaller than 0.28mm (for instance) it finds all the fillets that are smaller - which is great.

    But I don't need to fix all of them: I only care about fixing the ones that are OUTSIDE corners (on my part) - since the inside corners are outside corners in the tooling, and therefore are not created by this ball end mill.

    Can you add a check box or something that would filter out or let pass any fillets that are "outside" vs " inside" ? (concave / convex?). Not sure if this is possible, but it would be very helpful.

    Thanks!
    Romeo
  • TimRiceTimRice Member, Moderator, Onshape Employees Posts: 315
    Great idea @romeograham! I will take a look and see if I can incorporate inside/outside detection.
    Tim Rice | User Experience | Support 
    Onshape, Inc.
  • Evan_ReeseEvan_Reese Member Posts: 2,060 PRO
    edited April 2020
    One area I see this potentially being very useful is for CNC mill/router machinability analysis if you could specify to check only inside radii and check for unfilleted inside corners. I like the idea a lot!
    A while back I started making a feature for this called "Find Sharp Edges", but because I'm no good with Featurescript, @Jake_Rosenfeld pretty much scrapped it all and re-wrote it correctly. Up till now, it highlighted all sharp edges, which is all I need for injection molded parts, but I liked your use case so I just added a checkbox to filter for concave edges only. Give it a go.

    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
  • TimRiceTimRice Member, Moderator, Onshape Employees Posts: 315
    @alnis_smidchens @romeograham

    In V1.3.1 I added a filter for concave/convex under the fillet sensor type:


    Thank you for the improvement ideas!
    Tim Rice | User Experience | Support 
    Onshape, Inc.
  • romeograhamromeograham Member Posts: 656 PRO
    Nice @TimRice
    Works great!
  • romeograhamromeograham Member Posts: 656 PRO
    @Evan_Reese If we're using your Find Sharp Edges FS on our injection-molded part, wouldn't we want to find Outside Corners only...since they are created by inside corners on tooling, which are (in many cases) created with a ball end mill that leaves a round corner.

    Could you add an Outside Corners filter as well?
  • Evan_ReeseEvan_Reese Member Posts: 2,060 PRO
    edited April 2020
    @Evan_Reese If we're using your Find Sharp Edges FS on our injection-molded part, wouldn't we want to find Outside Corners only...since they are created by inside corners on tooling, which are (in many cases) created with a ball end mill that leaves a round corner.

    Could you add an Outside Corners filter as well?
    good thinking. If you're making tools by EDM it would be the opposite too, so I think the lesson is that it's not versatile enough. I updated it to have checkboxes for "convex" and "concave" set True by default. Does that do it? https://cad.onshape.com/documents/23d455dcfdc024e5576ab083/w/5fa01a21b209401d3e67c5a9/e/624cab307d1f9bd841cf53ca
    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
  • romeograhamromeograham Member Posts: 656 PRO
    @Evan_Reese - yep - that's nice. I like it with the versatility of the two options. Nice work!
  • Evan_ReeseEvan_Reese Member Posts: 2,060 PRO
    @Evan_Reese - yep - that's nice. I like it with the versatility of the two options. Nice work!
    Thanks for the prodding. I think it will be more useful for myself now too, but wouldn't have gotten it around to it without some input.
    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
  • TimRiceTimRice Member, Moderator, Onshape Employees Posts: 315
    Tim Rice | User Experience | Support 
    Onshape, Inc.
  • TimRiceTimRice Member, Moderator, Onshape Employees Posts: 315
    edited June 2020
    Tim Rice | User Experience | Support 
    Onshape, Inc.
  • c_17c_17 Member Posts: 10 EDU
    Really like the feature with the new custom tables! :)

    Feature request of mine would be to be able to compare multiple for example distances against the set value. This would allow to group certain distances into groups.
  • TimRiceTimRice Member, Moderator, Onshape Employees Posts: 315
    V1.6.1 Now with Feature and Part columns in the sensor table! This should make debugging and identification much easier! Add to your toolbar:
    https://cad.onshape.com/documents/9497bc5595799f48dc143063/v/5bb91accadc6c2e35c4bb658/e/b0ba07534e569d763885e5c2
    Tim Rice | User Experience | Support 
    Onshape, Inc.
  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,014 PRO
    This is really nice.


  • TimRiceTimRice Member, Moderator, Onshape Employees Posts: 315
    V1.7.4 now adds the ability to reference a coordinate system when measuring the distance between entities. Update your feature to get the latest!


    Tim Rice | User Experience | Support 
    Onshape, Inc.
  • MichaelPascoeMichaelPascoe Member Posts: 1,694 PRO
    This is really cool, nice work Tim!

    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   cadsharp.com/featurescripts 💎
  • John_StringerJohn_Stringer Member Posts: 6 PRO
    Would it be possible to add a wall thickness checker or would this be better off as a new feature script like we have with the draft analysis.
    The company i work for are injection moulders and one of our common checks is to check the wall thickness prior to tool build. At present we have to use an external package like moldflow or Altair.
  • John_StringerJohn_Stringer Member Posts: 6 PRO
    Hi Michael,
    I would just like to say a big thankyou to all of the feature scripts you have created.
    I've made really good use out of most of them. (if that makes sense).
Sign In or Register to comment.