Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. 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]

otaolafrotaolafr Member Posts: 113 EDU
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:
            fCylinder(context, id + "cylinder1", {
                    "topCenter" : p1,p3
                    "bottomCenter" : p2,p4
                    "radius" : definition.r
            });
best regards,
franco
Tagged:

Best Answer

Answers

  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,671
    If the transform between the points can be calculated, then create one fCylinder and opPattern will be faster. Otherwise, just put fCylinder in a loop.
    Senior Director, Technical Services, EMEAI
  • otaolafrotaolafr Member Posts: 113 EDU
    NeilCooke said:
    If the transform between the points can be calculated, then create one fCylinder and opPattern will be faster. Otherwise, just put fCylinder in a loop.
    thanks!
  • otaolafrotaolafr Member Posts: 113 EDU
    NeilCooke said:
    If the transform between the points can be calculated, then create one fCylinder and opPattern will be faster. Otherwise, just put fCylinder in a loop.
    neil sorry for bothering,
    at the end i used fCylinder for each one without a loop,
    i wanted to boolean in one part,
    i tried:
            opBoolean(context, id + "boolean1", {
                    "tools" : qGeometry(qEverything(), GeometryType.CYLINDER),
                    "operationType" : BooleanOperationType.UNION
            });
    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?
Sign In or Register to comment.