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.
holes to points in circular pattern
björn_britz
Member Posts: 14 EDU
i want to do holes. i created points in a circular pattern as the center for the holes.
no i have difficulties defining the locations and the scope in fs for the holes.
const anzahl = dimensions.Rotation;
for (var i = 0; i < anzahl; i += 1)
{
const t= rotationAround(rotationAxis, (2*PI* radian) * (i/anzahl) );
const point3d = t * patternPoint;
const point2d = vector(point3d[0],point3d[1]);
skPoint(PointSketch, "point" ~i, {
"position" : point2d
});
/* hole(context,"hole"~i, {
"style" : HoleStyle.SIMPLE,
"endStyle" : HoleEndStyle.BLIND,
"holeDiameter": 2*millimeter,
"holeDepth":3*millimeter,
"locations": XX,
"scope": XX
});
*/
}
for (var i = 0; i < anzahl; i += 1)
{
const t= rotationAround(rotationAxis, (2*PI* radian) * (i/anzahl) );
const point3d = t * patternPoint;
const point2d = vector(point3d[0],point3d[1]);
skPoint(PointSketch, "point" ~i, {
"position" : point2d
});
/* hole(context,"hole"~i, {
"style" : HoleStyle.SIMPLE,
"endStyle" : HoleEndStyle.BLIND,
"holeDiameter": 2*millimeter,
"holeDepth":3*millimeter,
"locations": XX,
"scope": XX
});
*/
}
heres the file: the problem starts in line 247
0
Comments
As described in the FS documentation:
Under the "Queries" section of https://cad.onshape.com/FsDoc/uispec.html
The `&&` operator in the body of a feature can only take booleans as its left and right hand side. "EntityType.BODY && BodyType.SOLID" would just be a syntax error because neither of those are booleans. The &&, ||, and ! operators are special cased for Query Parameter filters, but there is no special case within the code itself, and queries must be composed using the provided query functions.