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.
For (var i = .. Sketch and Plane and Circular pattern

How could you create a with a "for (var i = ...." a Sketch in each plane.


And how Extrude each Sketch.

jhljlñkjñl

jhljlñkjñl
var sketch2 = newSketch(context, id + "sketch2", { "sketchPlane" : qCreatedBy(makeId("Top"), EntityType.FACE) }); for (var i = 0; i < 5; i += 1) { var miPlane is string = "plane" ~ i; var Circle is string = "Circle" ~ i; skCircle(sketch2, miPlane, { "center" : vector(i, 0) * inch, "radius" : 1 * inch }); opPlane(context, id + miPlane, { "plane" : plane(vector(0, 0, i) * inch, vector(0, 0, 1)), "width" : 6 * inch, "height" : 6 * inch }); } // Create sketch entities here skSolve(sketch2);
Tagged:
0
Comments
@billy2 did something like this a while ago: https://forum.onshape.com/discussion/2568/showing-whats-in-a-query
opPattern documentation:
https://cad.onshape.com/FsDoc/library.html#opPattern-Context-Id-map
Just typing this up directly on the forum, so there may be some slight typos, but the general idea is:
Hope this helps. Feel free to comment back with questions.
it's wrong?
You should use
var <b>originExtrudeId</b> = id + "extrude1";
where you had
var originExtrudeId = qCreatedBy(id + "extrude1", EntityType.FACE);// originExtrudeId ???????
and leave the rest of the code the same.
The reason it is saying "variable originalExtrudeId not found" is because you are trying to use the variable "originalExtrudeId", and earlier you declared it as "var originExtrudeId = ...". These two names aren't the same.
Otherwise, @MBartlett21 is correct:
That is exactly what I didn't notice.
I thought that his feature was failing because it would have been
qCreatedBy(qCreatedBy(id + "extrude", EntityType.FACE), EntityType.BODY)