Sketching on plane generated with cPlane

graham_lock
graham_lock Member Posts: 277 PRO

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

  • Caden_Armstrong
    Caden_Armstrong Member Posts: 472 PRO

    you dont even need the cPlane, you can just do newSketchOnPlane and feed in a plane definition

    www.smartbenchsoftware.com --- Renaissance --- Kestrel -- SmartLink
    Experts in Onshape Automation - Custom Features and Integrated Applications
  • graham_lock
    graham_lock Member Posts: 277 PRO

    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?