Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- 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.
Sketching on plane generated with cPlane

Hi,
I'm using cPlane to create a plane at line angle which I want to sketch on.
cPlane(context, id + "cPlane", {
...
Then I'm creating the sketch plane:
var sketchPlane = evPlane(context, {
"face" : qCreatedBy(id + "cPlane", EntityType.FACE)
});
And finally creating the sketch:
var sketch = newSketchOnPlane(context, id + "sketch1", {
"sketchPlane" : sketchPlane
});
This feels inefficient, is there a way to sketch directly onto the plane generated by cPlane?
Thnak you.
Answers
you dont even need the cPlane, you can just do newSketchOnPlane and feed in a plane definition
Custom FeatureScript and Onshape Integrated Applications
Thank you - looking at cPlane source there is a function lineAnglePlane that generates the plane - it's pretty complicated.
Could you give me some pointers for defining a plane at an angle to an edge without cPlane please?