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.
GeometryType.SURFACE error

Hello,
I was trying to implement a function to select a gore created by a loft, and i wanted the user to select the different gores to add an offset surface. But when I add the GeometryType.OTHER_SURFACE, I have this error.
I heard about using qGeometry but I don't know how to use it and when.
If someone can help me, thank you.
Best Answer
-
GregBrown Member, Onshape Employees, csevp, pcbaevp Posts: 288
You can make a query for the lofted walls:
const qLoftedWalls = qGeometry(qOwnedByBody(definition.selectedBody, EntityType.FACE), GeometryType.OTHER_SURFACE);
But this is not in the precondition of the feature… in my example the definition.selectedBody was just the query for a EntityType.BODY, but it could already be a query in your code.
0
Answers
You can make a query for the lofted walls:
const qLoftedWalls = qGeometry(qOwnedByBody(definition.selectedBody, EntityType.FACE), GeometryType.OTHER_SURFACE);
But this is not in the precondition of the feature… in my example the definition.selectedBody was just the query for a EntityType.BODY, but it could already be a query in your code.