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.

cPlane Line at Angle to edge

graham_lockgraham_lock Member Posts: 177 PRO

Hi,

I want to create a plane at angle to a reference edge.

When I reference the edge in cPlane as the entity it cannot determine the rotation axis, so I'm now experimenting with creating a sketch line along that edge and passing the sketch line to cPlane.

The below code doesn't work - how should I pass the line to cPlane or is there a better way to do this?

var sketchSpacer1 = newSketchOnPlane(context, id + "sketchEdgeLine", {
"sketchPlane" : sketchPlane1
});

    skLineSegment(sketchSpacer1, "sketchEdgeLine", {
            "start" : startPoint1,
            "end" : endPoint1
    });
    
    skSolve(sketchSpacer1);


   cPlane(context, id + "planeAtAngle", { 
        "entities" : qSketchRegion(id + "sketchEdgeLine"),
        "cplaneType" : CPlaneType.LINE_ANGLE, 
        "offset" : 0 * millimeter, 
        "angle" : 0 * degree, 
        "oppositeDirection" : false, 
        "flipAlignment" : false, 
        "flipNormal" : false
        });

I've also tried using qCreatedBy for the entities but to no avail.

Any help appreciated.

Thank you.

Best Answer

Answers

Sign In or Register to comment.