Topographinator (Update)

MichaelPascoe
MichaelPascoe Member Posts: 2,956 PRO
edited September 2020 in FeatureScript

     Topographinator

Link

https://cad.onshape.com/documents/af87f92a8aacda9b29d58899/w/895817513a38f6bc735f701b/e/4782d8b17fc1f4ca112070c4

Created by: 

Michael Pascoe, Cache River Mill.


Description: 

This custom feature extrudes your 

sketch into multiple layers.


Prerequisites: 

A single sketch containing 3 or more fully enclosed shapes.


Notes: 

  1. The order that you draw the faces will 

be the order that they are extruded.

  1. Choose the layer thickness.

  2. Select a center face.

  3. Select the outer face as a boundary.


Application:

This feature is most useful when you need to stack multiple layers of plywood to create the base for a glass top river table.










RENDERCAD - Photorealistic product rendering.
CADSharp - Professional CAD + software consulting.

▚▞▚▞▚▞▚▞▚

Comments

  • MichaelPascoe
    MichaelPascoe Member Posts: 2,956 PRO
    @Evan_Reese

    Still learning the basics of featurescript. Any coding suggestions you have would be great!

    This is my personal account. 

    RENDERCAD - Photorealistic product rendering.
    CADSharp - Professional CAD + software consulting.

    ▚▞▚▞▚▞▚▞▚
  • matthew_stacy
    matthew_stacy Member Posts: 489 PRO
    Very cool @MichaelPascoe :)
    Neat idea!
  • EvanReese
    EvanReese Member, Mentor Posts: 3,090 PRO
    woooow! this is cool. There are a lot of more qualified folks here to give input, but one bit of feedback off the top of my head is to use opDeleteBodies to get rid of the splitting planes at the end. Before you do that though, I'd double-check whether you even need opPlane (which produces a user-visible, user-selectable plane like the plane feature) for all of those planes, or if simple planes could work (which are just a map consisting of an origin, x axis, and normal direction).

    You could also use "MaxNumberOfPicks" : 1 for the query parameters. If it's set to 1 it will auto-advance once a selection is made, so you can just click. click. done.

    A next-step in my mind is finding ways to automate the sketch creation somehow. Here's an example of an approach you might take (but using featurescript)
    Evan Reese
    The Onsherpa | Reach peak Onshape productivity
    www.theonsherpa.com
  • MichaelPascoe
    MichaelPascoe Member Posts: 2,956 PRO
    edited September 2020
    woooow! this is cool. There are a lot of more qualified folks here to give input, but one bit of feedback off the top of my head is to use opDeleteBodies to get rid of the splitting planes at the end. Before you do that though, I'd double-check whether you even need opPlane (which produces a user-visible, user-selectable plane like the plane feature) for all of those planes, or if simple planes could work (which are just a map consisting of an origin, x axis, and normal direction).

    You could also use "MaxNumberOfPicks" : 1 for the query parameters. If it's set to 1 it will auto-advance once a selection is made, so you can just click. click. done.

    A next-step in my mind is finding ways to automate the sketch creation somehow. Here's an example of an approach you might take (but using featurescript)
    Thank you @Evan_Reese , I like each of those ideas.

    I have now incorporated the opDeleteBodies, and the "MaxNumberOfPicks" : 1. The planes gave me a lot of trouble yesterday, I decided to keep it like this for now.





    RENDERCAD - Photorealistic product rendering.
    CADSharp - Professional CAD + software consulting.

    ▚▞▚▞▚▞▚▞▚
  • MichaelPascoe
    MichaelPascoe Member Posts: 2,956 PRO
    @NeilCooke I'm so glad someone got my reference! 

    Your featurscript videos are most helpful.

    RENDERCAD - Photorealistic product rendering.
    CADSharp - Professional CAD + software consulting.

    ▚▞▚▞▚▞▚▞▚
  • Aaron_Magnin
    Aaron_Magnin Member, Onshape Employees Posts: 122 image
    This is so cool, thanks for sharing! Can we talk about the name though? Bravo. 
  • MichaelPascoe
    MichaelPascoe Member Posts: 2,956 PRO
    edited September 2020
    Change the best part about this feature?? @Aaron_Magnin

    Yes, we can talk about the name. It is derived from Phineas & Ferb.


    RENDERCAD - Photorealistic product rendering.
    CADSharp - Professional CAD + software consulting.

    ▚▞▚▞▚▞▚▞▚
  • MichaelPascoe
    MichaelPascoe Member Posts: 2,956 PRO
    edited September 2020


    Update (9-21-2020)

    You now have the option to use manual layers or auto layers. Auto layers only needs 1 enclosed shape created by a single edge.




    RENDERCAD - Photorealistic product rendering.
    CADSharp - Professional CAD + software consulting.

    ▚▞▚▞▚▞▚▞▚
  • EvanReese
    EvanReese Member, Mentor Posts: 3,090 PRO
    This feature got my gears turning during a drive, so when I got back I played around with a way to simplify the Manual Layers selections. Right now, it relies on creation order, since that drives the order each face shows up in an evaluated query. I used a loop to just radiate the selection out from the center face, so now you can do it with just one selection (the center face) and creation order doesn't matter. Feel free to copy/paste this code directly, just take it as inspiration, or ignore it completely.
    https://cad.onshape.com/documents/bcce8c3417a55687b55aca94/w/351327f0355ee49ec59055fb/e/54527ec5915c0633eb6f1ff2
    Evan Reese
    The Onsherpa | Reach peak Onshape productivity
    www.theonsherpa.com
  • MichaelPascoe
    MichaelPascoe Member Posts: 2,956 PRO
    This is perfect. I was wondering how to do that. Thank you Evan.

    RENDERCAD - Photorealistic product rendering.
    CADSharp - Professional CAD + software consulting.

    ▚▞▚▞▚▞▚▞▚
  • john_mcclary
    john_mcclary Member, Developers Posts: 4,115 PRO
    This is pretty cool keep it up
  • EvanReese
    EvanReese Member, Mentor Posts: 3,090 PRO
    This feature is getting so cool!
    Evan Reese
    The Onsherpa | Reach peak Onshape productivity
    www.theonsherpa.com
  • MichaelPascoe
    MichaelPascoe Member Posts: 2,956 PRO
    This one turned out great, I learned a lot from it. Working on a different featurescript project at the moment. I'm excited for this next one.

    RENDERCAD - Photorealistic product rendering.
    CADSharp - Professional CAD + software consulting.

    ▚▞▚▞▚▞▚▞▚