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.

Infill a sketch face with choice of vertical or horizontal lines

Dylan_StewartDylan_Stewart Member, Developers Posts: 106 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!
Digital Engineering

Answers

  • konstantin_shiriazdanovkonstantin_shiriazdanov Member Posts: 901 ✭✭✭✭✭
    i think features like infill some area by some pattern better to create using operations with solids. you fill the rectangular area of the sketch on the face by lines, extrude them like surfaces, thicken them, then perform boolean remoove, or any other operation you need with solids in 3d/
  • Dylan_StewartDylan_Stewart Member, Developers Posts: 106 PRO
    Do you have an example of this? Perhaps I am over complicating it. 
    Digital Engineering
  • konstantin_shiriazdanovkonstantin_shiriazdanov Member Posts: 901 ✭✭✭✭✭
    not really an example, but a plan:
    - 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
  • Dylan_StewartDylan_Stewart Member, Developers Posts: 106 PRO
    I'll have to give this some thought. 
    I really appreciate your help @konstantin_shiriazdanov

    Digital Engineering
Sign In or Register to comment.