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.

Offset Adjacent Faces

Cache_River_MillCache_River_Mill Member Posts: 217 PRO

    Offset Adjacent Faces


Link:

https://cad.onshape.com/documents/725911b3d26eaad0ab951314/w/1915daf3a2ddbe886b6609db/e/60183b84fdc53387a76d037a


Created by: 

Michael Pascoe, Cache River Mill.


Description: 

This custom feature offsets the faces 

adjacent to the face you select.


Prerequisites: 

A solid body with more than one face.


Notes: 

  1. Select a face.

  2. Choose the offset thickness.


Application:

This feature is most useful when you need to edgeband an entire wall of various panels.




Comments

  • Evan_ReeseEvan_Reese Member Posts: 482 PRO
    hey, cool idea! I can see this being super handy for you after seeing the gnarly cabinet setup you posted. To me, it might make more sense being called "Move adjacent faces" since it's really more similar to the move face command, right? I'll add it to my toolbar.
    Evan Reese / Principal and Industrial Designer with Fractal
    Website: fractalmade.com
    Instagram: @evan.reese.designs
  • Evan_ReeseEvan_Reese Member Posts: 482 PRO
    oh, and you know how much I appreciate that it already has an icon :smiley:
    Evan Reese / Principal and Industrial Designer with Fractal
    Website: fractalmade.com
    Instagram: @evan.reese.designs
  • Cache_River_MillCache_River_Mill Member Posts: 217 PRO
    edited September 9
    Thanks! @Evan_Reese 

    You're right, it is derived from the move command. I intentionally used the word "offset" so that it would be easy to find. I would not have thought to search for a feature called "move" even though it is technically moving the adjacent faces. 
  • Evan_ReeseEvan_Reese Member Posts: 482 PRO
    Well in that case you're experiencing one of the luxuries of writing your own features; you get to do whatever you want! live it up. Seems like a good enough reason to me. It would be nice if we could add tags to features so you could search a similar work, like how searching "round" asks "did you mean fillet?"

    Evan Reese / Principal and Industrial Designer with Fractal
    Website: fractalmade.com
    Instagram: @evan.reese.designs
  • Evan_ReeseEvan_Reese Member Posts: 482 PRO
    Two thoughts on the UI:
    1. it looks like you'd essentially like to have no limit on the number of faces selected since you set it to 100. If you just delete this, it won't have a limit
    , "MaxNumberOfPicks" : 100
    2. if you prefer to have a different default value (this feature seems like it's for clearances so the default is probably too big) you can replace this
          annotation { "Name" : "Offset" }
          isLength(definition.Offset, LENGTH_BOUNDS);
    
    with this
          annotation { "Name" : "Offset" }
          isLength(definition.Offset, {(inch) : [0,YOUR_DEFAULT,1e5)} as LengthBoundSpec);

    Evan Reese / Principal and Industrial Designer with Fractal
    Website: fractalmade.com
    Instagram: @evan.reese.designs
  • Cache_River_MillCache_River_Mill Member Posts: 217 PRO
    Thanks for the tip, much appreciated. I am getting an error when I replace the isLength. I'm very new to featurescript.




  • Evan_ReeseEvan_Reese Member Posts: 482 PRO
    edited September 10
    Try changing "defaultInput" to whatever number you want to be the default value. Looks like you also need to replace ")" with "]" which I also missed in my example  :#
          annotation { "Name" : "Offset" }
          isLength(definition.Offset, {(inch) : [0,2,1e5]} as LengthBoundSpec);
    I'm still fairly new to it as well, so I can still remember all the silly stuff I got hung up on starting out (and still do as you can see).
    Evan Reese / Principal and Industrial Designer with Fractal
    Website: fractalmade.com
    Instagram: @evan.reese.designs
  • Cache_River_MillCache_River_Mill Member Posts: 217 PRO
    That did it. Very nice  B)
  • Cache_River_MillCache_River_Mill Member Posts: 217 PRO
    edited September 10
    I'm trying to put a manipulator on this. It would be nice if it were on one of the moved faces but I will take anywhere for now.

    Could you give me another pointer? My code is not quite there, probably way off actually.

    Here is the feature on branch B1
    https://cad.onshape.com/documents/725911b3d26eaad0ab951314/w/c77dd9c784148297a7d5707a/e/6dee0c37cda944e0b01e5cb0  




  • emagdalenaC2iemagdalenaC2i Member, Developers Posts: 635 ✭✭✭✭✭
    @Cache_River_Mill You can use the Thicken feature to do something like that with a lot of other options


    Un saludo,

    Eduardo Magdalena                           C2i Change 2 improve                           ☑ ¿Por qué no organizamos una reunión online?   
                                                                 Consulting Partner de Onshape                                      Averigua a quién conocemos en común


                                         Live Chat at Discord about Onshape & FeatureScript

    Consulta mis cursos de Onshape en Español:
  • Cache_River_MillCache_River_Mill Member Posts: 217 PRO
    True, that would be another good method. Personally, I like how "move face" calculates extensions, thicken seems to have trouble sometimes depending on the application. Thicken would be great for adding edge band material to a part. Perhaps I could incorporate both as an option; remove the material, then add it back as a new part. 

  • Evan_ReeseEvan_Reese Member Posts: 482 PRO
    True, that would be another good method. Personally, I like how "move face" calculates extensions, thicken seems to have trouble sometimes depending on the application. Thicken would be great for adding edge band material to a part. Perhaps I could incorporate both as an option; remove the material, then add it back as a new part. 

    The thicken solution is good for some things, but isn't super robust to change imo. The selection needs to be redone if a new face is added, Also, the face IDs will change, but with the Move Face they remain, which would update anything downstream that's related. I also don't think the thicken method would work for just changing the edge faces, but not the caps of the hexagonal thing since it would cut in at a non-perpendicular angle. All that to say that @[email protected]_River_Mill will probably still get a lot of value out of this custom feature if it's something they do often.

    re: manipulator. I've never used one, but it has something to do with the Manipulator Change Functions and Editing Logic stuff at the bottom of the page. Let us know how it goes.
    Evan Reese / Principal and Industrial Designer with Fractal
    Website: fractalmade.com
    Instagram: @evan.reese.designs
  • Evan_ReeseEvan_Reese Member Posts: 482 PRO
    Also, since you mentioned that you might need to "edge band an entire wall", you could probably make an option that selects all faces that are co-planar with the first selection to save time picking the rest.
    Evan Reese / Principal and Industrial Designer with Fractal
    Website: fractalmade.com
    Instagram: @evan.reese.designs
Sign In or Register to comment.