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.
Using a data file to pick and place components?
david_duncan238
Member Posts: 6 ✭
I am a retired engineer / amateur artist and I have a project that I wondered if I could use onshape for. Basically I want to make a grid (about 30 x 23) of 6 different types of cubes, these would be selected depending upon the data in a file which would be read in sequence. The file (yet to be made) would be derived from a small pixelated black and white photo. I have not found anyone else who has done this, and I was wondering if it was at all possible. I fear it is not and that I will have to write some software to do this for me. Hopefully someone has some great ideas.
Just to clarify, the goal of the project is to take a simple image and convert the pixels to one of six (may change) different cubes. The cubes will have different slopes on their fronts, catching the light to represent different levels of grey. For small pictures I will be able to do this by hand, but I would like to automate the process so that I can go bigger and 3D print. Hope that makes sense
Just to clarify, the goal of the project is to take a simple image and convert the pixels to one of six (may change) different cubes. The cubes will have different slopes on their fronts, catching the light to represent different levels of grey. For small pictures I will be able to do this by hand, but I would like to automate the process so that I can go bigger and 3D print. Hope that makes sense
0
Answers
https://forum.onshape.com/discussion/18579/just-for-fun-pixel-cuboids#latest
It was only ever half-baked, and only ever just-for-the-fun-of-it. But hopefully it'd be a decent starting point.
made this Polaroid custom feature which might be worth a look too. https://cad.onshape.com/documents/de0dbdee5fd3fd6810179f54/v/279829d6a0503ecd86a33c2d/e/fb5f3d22261e41f0dcca0ecb
Firstly I this part of the code in SlopedTriangle...
I am not able to change the "5" for the variable tHeight.
And secondly I am having problems integrating the triangles into the Greyscale code.
Here is a link to my code...
https://cad.onshape.com/documents/fb0ed495e5d632ce2327435c/w/9e9dc44a0a8ae3e252105af2/e/7b1ac23f74f7656795ca7dbc
I have commented out the bits that don't work in "Greyscale".
I found that I could make the wedge shapes I wanted manually using rotate in MoveFace, but I could not make the Rotate feature work in Feature Script.
I'm not that familiar with Feature Script, but I have done a fair amount of C and HTML. I'm sure there is probably a better way of approaching this, I would appreciate a little help.
David