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.
Infill a sketch face with choice of vertical or horizontal lines
Dylan_Stewart
Member, Developers Posts: 107 PRO
I'm creating a feature that will allow the user to query a face entity and the FS will fill in the sketch bounds with either vertical or horizontal lines.
I've been looking at the HexInFill feature, but I feel that it is much more complicated than what I'm trying to do.
Eventually, for each line the FS creates, I'll add a profile that extrudes along those lines with a border in the shape of the sketch (if that makes sense).
So, anyone care to take a jab at it?
I've created a public document that has an example (w/o FS) to show the intended purpose.
https://cad.onshape.com/documents/cb1ec1022d600cc62ed00546/w/c8ca520a1a8d35c80d26600d/e/4cdccdcfad5157f0b83a223c
Thank you!
I've been looking at the HexInFill feature, but I feel that it is much more complicated than what I'm trying to do.
Eventually, for each line the FS creates, I'll add a profile that extrudes along those lines with a border in the shape of the sketch (if that makes sense).
So, anyone care to take a jab at it?
I've created a public document that has an example (w/o FS) to show the intended purpose.
https://cad.onshape.com/documents/cb1ec1022d600cc62ed00546/w/c8ca520a1a8d35c80d26600d/e/4cdccdcfad5157f0b83a223c
Thank you!
Digital Engineering
0
Answers
- query a planar face of the solid body
- evaluate 3d box of the face using evBox3d
- create sketch on the face
- evaluate start and end limits of the sketch lines using worldToPlane to the minCorner and maxCorner of the box3d
- create a number of lines in the loop from minCorner to maxCorner in the sketch
- solve the sketch and extrude the lines using qCreatedBy( ..., EntityType.EDGE)
- thicken extruded surfaces to solids
- delete extruded surfaces using opDeleteBodies
- delete sketch lines
- make some boolean with those solids and the original body obtained from qOwnerBody
I really appreciate your help @konstantin_shiriazdanov