cPlane Line at Angle to edge
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
-
Have you tried:
"entities" : qCreatedBy(id + IDOFYOURSKETCH, EntityType.EDGE)
using the id of the sketch not the id of the line segment…www.smartbenchsoftware.com --- Renaissance --- Kestrel -- SmartLink
Experts in Onshape Automation - Custom Features and Integrated Applications0
Answers
-
Have you tried:
"entities" : qCreatedBy(id + IDOFYOURSKETCH, EntityType.EDGE)
using the id of the sketch not the id of the line segment…www.smartbenchsoftware.com --- Renaissance --- Kestrel -- SmartLink
Experts in Onshape Automation - Custom Features and Integrated Applications0 -
Fantastic, thank you!
0
