cPlane Line at Angle to edge

graham_lock
graham_lock Member Posts: 277 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