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.

Pattern with individually configurable parts?

jokajoka Member Posts: 9 PRO
Dear forum

Is there a way to configure the individual parts of a pattern individually?

I want to create a LED matrix with different signs as a configuration. Unfortunately it looks like I need to insert each of the 512 LEDS as a individual part to be able to change some of the colours with the configurations.

Any ideas?

Answers

  • MichaelPascoeMichaelPascoe Member Posts: 1,993 PRO
    edited September 2021
    Here is one way you could do this, it will require some custom features:
    • Create a part studio with your LED
    • Add a configurable variable that is an Integer
    • Color the part with Part Color by @Evan_Reese, set the color to HSL, type your configurable variable here (Note: do not change the color of the part before you use this feature, it will not let the feature work)
    • Create another studio with your screen
    • Use the custom feature Texture to apply the LED pattern to the part
    • While inside the Texture feature, choose custom texture, then select your LED
    • Click the configuration button > other > custom parameter
    • Type the name of your custom parameter exactly
    • Change the unites to "unitless" and type the color value you want
    • Texture allows you to change the configuration scope meaning, you can select whichever part or row of parts you want to configure

    https://cad.onshape.com/documents/e483a00c302adb070cb6e9c2/w/6c0e73d6e9071e9b9fc36b97/e/eb0d2054bc4ccc59335a5d4b?configuration=color%3D100.0






    How to add a custom feature to your tool bar

    • Go to the document that has the custom feature you want
    • Click the +Custom features button at the top left of your screen




    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   Learn How to FeatureScript Here 🔴
  • EvanReeseEvanReese Member, Mentor Posts: 2,148 ✭✭✭✭✭
    @dus

    Are you trying to do it in an assembly or part studio (or do you not care)? Either way, Michael's solution is awesome. If you don't mind it being more manual to pick the ones you want to change, you could do it with multiple Part Color features that you just suppress as needed. I also made the whole array into a composite part so I could insert it into an assembly without it being too cumbersome.

    https://cad.onshape.com/documents/ab2fd925857cea22dac90764/w/091bc45d1236c3446a753911/e/bed83281ca6b28fe4ee1b960
    Evan Reese
  • shawn_crockershawn_crocker Member, OS Professional Posts: 866 PRO
    @dus any of these working for you? I have another concept that may work but don't want to type it if your already on your way
  • jokajoka Member Posts: 9 PRO

    Thank you very much, @MichaelPascoe and @Evan_Reese.

    While I am impressed by your know-how and the elegance of your solutions, I do need something that makes it easier / faster to input a sign configuration with different colours from the drawing paper into the model.

    In the end I ended up assembling manually a 16 x 16 array of LEDs and configured the output of an excel file to match Onshape's configuration table. The Excel-file can be configured by typing the colours letters into the grid.

    The Excel-File. With an additional part in it the code for the programming of the displays is created in one go:


    And the displays in the model. Yes, the smiley are a placeholder for the different client logos to come:


  • MichaelPascoeMichaelPascoe Member Posts: 1,993 PRO
    Legit!

    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   Learn How to FeatureScript Here 🔴
  • EvanReeseEvanReese Member, Mentor Posts: 2,148 ✭✭✭✭✭
    wow! cool solution
    Evan Reese
  • fer_fer_fer_fer_ Member Posts: 6 ✭✭
    dus said:

    Thank you very much, @MichaelPascoe and @Evan_Reese.

    While I am impressed by your know-how and the elegance of your solutions, I do need something that makes it easier / faster to input a sign configuration with different colours from the drawing paper into the model.

    In the end I ended up assembling manually a 16 x 16 array of LEDs and configured the output of an excel file to match Onshape's configuration table. The Excel-file can be configured by typing the colours letters into the grid.

    The Excel-File. With an additional part in it the code for the programming of the displays is created in one go:


    And the displays in the model. Yes, the smiley are a placeholder for the different client logos to come:



    Could it be used to make QR codes ???
    Example:


    @MichaelPascoe


  • MichaelPascoeMichaelPascoe Member Posts: 1,993 PRO
    @fer_fer_ This feature would need some tweaking before it could handle that. However, it looks like you could combine the two features to make a nice qr generator with some effort.

    @alnis, is it possible to have a feature get the url of the tab that it is used in? That way the user wouldn't have to manually paste the address in.

    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   Learn How to FeatureScript Here 🔴
  • alnisalnis Member, Developers Posts: 452 EDU
    @MichaelPascoe apologies for the late reply! I don't believe it's possible since the URL changes depending on the version/microversion/workspace, so that would mean feature regeneration would change on versioning, looking back in history, and branching.
    Get in touch: contact@alnis.dev | My personal site: https://alnis.dev
    @alnis is my personal account. @alnis_ptc is my official PTC account.
  • eric_pestyeric_pesty Member Posts: 1,893 PRO
    Looking at doing something like this, and it looks like using replicate starting from a configured part and dissolving the replicate creates the entries in the table.

    It also looks like the order in the instances in the replicate follows the order of the features creating it's based on so it should be fairly simple to get a predictable order in the config table!

    I'll see if my plan works out!
Sign In or Register to comment.