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.

Getting the value

papawopapawo Member, Developers Posts: 206 PRO
Tagged:

Answers

  • MBartlett21MBartlett21 Member Posts: 1,649 EDU
    @papawo
    Do you mean in the UI?
    MB - I make FeatureScripts:View FeatureScripts
  • paul_chastellpaul_chastell Onshape Employees Posts: 116
    cPlane is a feature function and contains fields that will be provided to the user to allow them to specify planes through the Onshape UI in a useful way that captures relations to other objects. If you look at the source code of cPlane you will see that what gets passed to the operation opPlane is just the regular definition of a plane, the 'oppositeDirection' field is used to calculate which side of the input plane to make the new plane but is then forgotten. opPlane really doesn't care about other objects, just where the plane should go.

    https://cad.onshape.com/documents/12312312345abcabcabcdeff/v/f8bab07052a79eabcbfa78d1/e/577e2aaf45a542f98d9343c7

    Maybe you would like to enquire these values after creation of the plane, which isn't possible because it isn't part of the final plane definition. 

    Maybe you want to know what value you should pass programmatically when creating a plane in Featurescript. The new plane, by default, is offset in the direction of the normal of the input plane and setting oppositeDirection negates the offset distance. To work out what the flag should be set to you would need to know where you want the output to be, and enquire the normal of the input plane, and if you know all that I would suggest using opPlane to create the plane instead, not cPlane. 

    If neither of those answer you're question then could you be more clear about what you are trying to do?
    Paul Chastell / VP of R&D / Onshape Inc.
Sign In or Register to comment.