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.
Suppressing automatic filling of disjoint polylines and keeping sketches extrudeable
Paul_Arden
Member, Onshape Employees, Developers Posts: 212
I'm working on a little FeatureScript just as a learning exercise which generates a sketch based on the 10 PRINT routine. It's still rough but I am hitting a problem early on. Onshape is creating faces correctly for my closed polyline entities, however it is also creating additional faces if multiple polyline objects vertices join to form a face, despite the fact that these are separate entities. See this image:
The areas inside the diagonal boundaries should not be filled with a face. While when using Onshape outside FeatureScript I usually think of this as a nice feature, in this case I don't want that behaviour. Is there any way to suppress it?
It may or may not be related, however when I go to extrude the sketch that the feature generates it does not work selecting the entire feature at once. I have to select the individual faces one at a time. Doing the extrusion inside the FeatureScript fails as well if I try and query all entities on the sketch with qSketchRegion (commented out in the shared version below).
You can check out the Onshape document here. FeatureScript code is WIP, just looking to resolve these two issues first.
The areas inside the diagonal boundaries should not be filled with a face. While when using Onshape outside FeatureScript I usually think of this as a nice feature, in this case I don't want that behaviour. Is there any way to suppress it?
It may or may not be related, however when I go to extrude the sketch that the feature generates it does not work selecting the entire feature at once. I have to select the individual faces one at a time. Doing the extrusion inside the FeatureScript fails as well if I try and query all entities on the sketch with qSketchRegion (commented out in the shared version below).
You can check out the Onshape document here. FeatureScript code is WIP, just looking to resolve these two issues first.
Tagged:
0
Best Answers
-
NeilCooke Moderator, Onshape Employees Posts: 5,671Hi Paul, to prevent the areas filling, you could create a new sketch for each polyline inside one FeatureScript feature. Also, the reason you cannot extrude the entire feature after the fact is because it is not a sketch, it is a custom feature that created lines and faces. Can you create the extrude inside the feature?Senior Director, Technical Services, EMEAI5
-
NeilCooke Moderator, Onshape Employees Posts: 5,671qCreatedBy(id, EntityType.FACE) will get you all faces within your feature, which should just be the faces created by the sketches.Senior Director, Technical Services, EMEAI5
-
NeilCooke Moderator, Onshape Employees Posts: 5,671paul_arden said:I am guessing it might be due to the way the shapes are coplanar along some of their faces but not sure.Senior Director, Technical Services, EMEAI5
Answers
https://cad.onshape.com/documents/9cd2a1622fc9ce8d26314a16/v/a80f215aca690e8886c06784/e/c47d5f43eb33e8799630d20a
It has been shared with support also. I am guessing it might be due to the way the shapes are coplanar along some of their faces but not sure.