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.

PLANE_OFFSET_BOUNDS

papawopapawo Member, Developers Posts: 206 PRO


can somebody explain why I am getting this error?
Tagged:

Best Answer

Answers

  • Jake_RosenfeldJake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 1,646
    Whatever you're passing in as 'offset' is not a length between 0 and 500 meters:



    It may also be that what you're passing in is not a length, or that you're not passing in an 'offset' at all.  Screenshotting more of the call stack, or the line that the error is complaining on may be more useful for debugging.
    Jake Rosenfeld - Modeling Team
  • lanalana Onshape Employees Posts: 704
    This probably comes from a call  to cPlane either without specifying offset, or giving it a value, which is not a length.
    You can try using something like  "offset" : 0.01 * meter
  • papawopapawo Member, Developers Posts: 206 PRO
      cPlane(context, id + i + "cPlane1", {
                            "entities" : qUnion([ planeOffset]),
                            "cplaneType" : CPlaneType.OFFSET,
                             "offset" : definition.myLength, //----------sorry my mistake , definition.myLength doesnt exist
                             "offset" : selection.myLength //<<<<<it should be this. but it doesnt work . selection.myLength is inside an array in the precondition
                     });

    if I use-----> "offset" : 0.01 * meter , it does work, but I need to get the length from the precondition 
  • Jake_RosenfeldJake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 1,646
    Could you post the part of your precondition where selection is defined?
    Jake Rosenfeld - Modeling Team
  • lanalana Onshape Employees Posts: 704
    edited May 2018
    please try putting
    println("myLength" ~&nbsp;selection.myLength);
    before this call.
    May be it should be
    definition.<arrayParameterName>.[0].selection.myLength&nbsp;
     ? Not sure what you meant by  "selection.myLength is inside an array in the precondition"
  • papawopapawo Member, Developers Posts: 206 PRO
    it says variable selection not found
  • lanalana Onshape Employees Posts: 704
    papawo said:
    it says variable selection not found
    Probably needs to be accessed via definition
  • papawopapawo Member, Developers Posts: 206 PRO
     if (definition.faceToMove)
            {
                annotation { "Name" : "Select Face  ",
                            "Item name" : "Face",
                            "Driven query" : "entities",
                            "Item label template" : "#entities - ( #myLength )" }
                definition.selFace  is array;

                for (var selection in definition.selFace )
                {
                    annotation { "Name" : "Select Face To Offset",
                                "Filter" : ModifiableEntityOnly.YES && ((EntityType.FACE && ConstructionObject.NO) || (EntityType.BODY && BodyType.SOLID)),
                                "UIHint" : "ALWAYS_HIDDEN" }
                    selection.entities is Query;
     
                    annotation { "Name" : "Offset Length" } 
                    isLength( selection.myLength, PLANE_OFFSET_BOUNDS);    //how to access this?
                   
                }

            }
Sign In or Register to comment.