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.
fCylinder multi entries? [feature script]
hello,
I have to do some cylinders between several points,
is it possible to do in an easier way than doing fCylinder for each pair of points? (i should clarify all of them are the same radius)
for example if i want to do two cylinders from p1 to p2 and from p3 to p4
do something like:
franco
I have to do some cylinders between several points,
is it possible to do in an easier way than doing fCylinder for each pair of points? (i should clarify all of them are the same radius)
for example if i want to do two cylinders from p1 to p2 and from p3 to p4
do something like:
fCylinder(context, id + "cylinder1", {
"topCenter" : p1,p3
"bottomCenter" : p2,p4
"radius" : definition.r
});
best regards,franco
Tagged:
0
Best Answer
-
NeilCooke Moderator, Onshape Employees Posts: 5,671opBoolean requires bodies, your query will just find the cylindrical faces, so try
qOwnerBody(
qGeometry(qEverything(), GeometryType.CYLINDER));
But better still would be to useqUnion([qCreatedBy(id+"cylinder1", EntityType.BODY),
qCreatedBy(id+"cylinder2", EntityType.BODY)]);Senior Director, Technical Services, EMEAI7
Answers
at the end i used fCylinder for each one without a loop,
i wanted to boolean in one part,
i tried:
but it doenst work and the error says : invalid input, qGeometry(qEverything(), GeometryType.CYLINDER) would normally select all the cylinders that exist in the context isnt it? what i am missing?
qOwnerBody(
qGeometry(qEverything(), GeometryType.CYLINDER));But better still would be to use
qUnion([qCreatedBy(id+"cylinder1", EntityType.BODY),
qCreatedBy(id+"cylinder2", EntityType.BODY)]);