Creating a sketch in a new coordinate system and rotating it
Hi guys!
I am going to create a custom feature which would make an engraving logo on a flat round surface with parametric radius.
For that purpose I need:
1. Create a coordinate system.
2. Create a plane based on that coordinate system.
3. Create a sketch.
4. Rotate it.
But my code doesn't work and breaks when I assign a variable plane to a sketch:
// Coordinate system
var coordinateSystem1 = coordSystem(
vector(0, 0, 0) * millimeter, // origin
vector(1, 0, 0), // X axis
vector(0, 1, 0) // Y axis
);
// Plane based on the coordinate system
var plane1 = plane(coordinateSystem1);
// Create sketch
var sketch1 = newSketch(context, id + "sketch1", {
"sketchPlane" : plane1 < ——— Breaks here
});
// Example geometry
skCircle(sketch1, "circle1", {
"center" : vector(0, 0) * millimeter,
"radius" : 10 * millimeter
});
// Solve sketch
skSolve(sketch1);
Why is that?
Comments
-
Use newSketchOnPlane - newSketch is asking for a query
Senior Director, Technical Services, EMEA0

