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.

how to get dimension?

papawopapawo Member, Developers Posts: 206 PRO
edited October 2016 in FeatureScript

Comments

  • papawopapawo Member, Developers Posts: 206 PRO
    is this possible?
  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 927
    Sorry, I'm not following what you're asking. The dimension the diagram seems to be asking for is labeled "3 inches", so you know that value... Perhaps if you posted a link to a public document with a custom feature that's producing something close and a sketch that is what you want, we would be able to help better.
    Ilya Baran \ Director, Architecture and FeatureScript \ Onshape Inc
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 2,277
    It's not entirely clear what you're trying to do. evDistance will give you any measurement you need. If that's not what you're looking for, please explain the purpose of the feature you're creating and we may be able to suggest a way.
    Neil Cooke, Director of Technical Marketing, Onshape Inc.
  • papawopapawo Member, Developers Posts: 206 PRO
    edited October 2016
    the 3" varies and depends from point to converted line, 
    the 1" is fixed dim.
    and the 4" varies and depends on the first dim (3").
    this can be skrectangle or sklinesegment.
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 2,277
    So are the 3 blue lines all the same length?
    Neil Cooke, Director of Technical Marketing, Onshape Inc.
  • papawopapawo Member, Developers Posts: 206 PRO
    the top blue line is fixed dim and not the same length as the 2 vertical line.  it can be any dim from the point.
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 2,277
    So evDistance will give you the distance between the point and the line, then you have the coordinate of the bottom left corner, relative to the point.
    Neil Cooke, Director of Technical Marketing, Onshape Inc.
  • papawopapawo Member, Developers Posts: 206 PRO
    Thats my problem, I dont know how to use evDistance.
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 2,277
    var distance = evDistance(context, { "side0" : <query for point>, "side1" : <query for line> }).distance;
    if you don't know how to query the point and the line, you'll have to share your script.
    Neil Cooke, Director of Technical Marketing, Onshape Inc.
  • papawopapawo Member, Developers Posts: 206 PRO
      
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 2,277
    definition.line and definition.pt are already queries so no need to query them again.

    var distance = evDistance(context, { "side0" : definition.pt , "side1" : definition.line }).distance;
    Neil Cooke, Director of Technical Marketing, Onshape Inc.
  • papawopapawo Member, Developers Posts: 206 PRO
    edited November 2016
    ok thanks
Sign In or Register to comment.