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.

A question on preconditions.

darren_13darren_13 Member, Developers Posts: 117 PRO
Can I somehow separate the preconditions out of the main function? 

there are two reasons I wish to do this:
  1. it's getting too long and messy.
  2. I want to take a precondition of queries and split it and return it in two separate definition maps i.e. definition.plane and definition.lines, I could split it into two queries from the start but I wanted it in 1 query to reduce clicks.
the reason I wouldn't split this in the main function is that I then want to use the new array UI on just the definition.lines. 

If 2 is not possible I can work around but number 1 would be good.

Many thanks,
Darren
Tagged:

Comments

  • lanalana Onshape Employees Posts: 477
    1. You can write a predicate and use it as a line in precondition. See 

    booleanStepScopePredicate() implemented in boolean.fs and used in extrude and other features precondition.

    2. Precondition can't change definition, so you'll have to split your input with qGeometry() filter inside the feature

Sign In or Register to comment.