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.
Wave diffuser feature script
jacek_zagaja
Member Posts: 47 ✭✭
May I ask gentleman here do we have wave surface feature script in Onshape? Usefull for interiors.
Tagged:
0
Comments
Hi @jacek_zagaja, specifically for this wave shape, you will probably need Parametric surface by @mahir. Below is a general list of features that are excellent for interior projects. Let me know if you are creating architectural drawings or cabinets, these would require another whole list of features.
Neat features that could be used for interior projects:
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
Parametric Surface byt @mahircould work for only 1 ripple, but I don't know the tool well enough to know if it can handle multiple ripples and an interference pattern like mine above.
I don't know of a custom feature for this, but one could certainly be made. I think the steps would be something like:
- make a grid of points
- take some user-selected points as ripple centers
- measure the distance from each grid point to each center, using a sine function to get the numbers to ripple like this.
- Add together each resulting value. If you have 3 ripple centers, then you're adding 3 numbers for every grid point to know how much to offset it up or down
- move each point up or down by the resulting value. I'd probably add a scale factor here too so I could adjust the ripple height.
- Make a surface using the points. There are a few ways: (1) Fit Spline through the border points then Fill Surface with the points as guides. (2) Fit Spline through each row or column of points and loft them. (3) use createBSplineSurface() so the points are actually the control cage of the result, which will make a smoother surface, but be harder to control the absolute ripple height.
A lot of the same things I've done with Attractor Pattern apply here, so give that code a look if you're up for it.There are also some custom features from a few years back that could help with this that weren't on Michael's list:
Slicer by @Brad_Goodman - takes a solid body and makes layers out of it like your reference image.
Laser It by @maximilian_schommer - makes laser-cuttable waffle structures from solid bodies.
This is a really good list of some of my favorite FeatureScripts for doing cool stuff.
@mahir
I don't know if there is a good way to tune this or if a different approach is needed, but in my limited testing of the Parametric Surface feature, I've found the surfaces are often not smooth enough for things I would like to do. If I try to increase the number of curves much beyond 21 it just sits and thinks forever or the feature fails in different ways. I made a copy of the custom feature and modified "Parametric Surface 2" from 21 x 21 points to 51 x 51. It takes almost a minute to rebuild the feature, according to Onshape's stats, but my clock time was many minutes and gave weird errors. It still shows surface curvature with a distinct grid pattern to it.
It would be interesting if parametric surface had options for polar sampling in addition to grid based sampling.
@jacek_zagaja
In this particular case, it's probably obvious, but it would be worth tuning the equation and parameters for Parametric Surface so that you get curves for just a 1/4 of the final pattern, and then mirror the bodies.
f(x,y) = .1*sin(sqrt(#x^2+#y^2)*radian*2*PI)
+ .05*cos(sqrt((#x-75)^2+(#y-75)^2)*radian*2*PI)
+ .05*cos(sqrt((#x+75)^2+(#y+75)^2)*radian*2*PI)
https://cad.onshape.com/documents/57acdfaae4b005c413ed9b6f/w/3fd585a46d3af1b3ba413c53/e/5e5afece110babb9f3b69af2
Whew, nice! Also, the new profile pic is legit @mahir.
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
https://cad.onshape.com/documents/7a523ae1b544c12d363dfe6d/w/2c9019ef1d38875da69bd9af/e/b1e5900d7e9a5183cc0aa830
No big talks, just do it, perfect
Thanks Dirk
I appreciate your comment
Sketch 1 is impressive. I'm very fond of using a bunch of segments set to be equal to do things like that, and I've used funky helper "functions" like the curve which drives the progression of the spacing. The big downside is that if a mythical client says "I want a few more/less ripples", editing this is a bit more challenging than tweaking a couple parameters in an equation. It's certainly possible, but it can be painful.
I still can't get over how you manage to do this on the phone interface. I play with Onshape on my iPhone and iPad every so often, but I'm pretty miserable unless I have my 4K monitor and Spacemouse.
@S1mon
I had to resort to this non-math method because even though I went to school for recording engineering about 40 years ago, I don’t remember hardly a thing. So if we went over the formula for a sine, it sure doesn’t come to mind now. LOL
Let alone that this sine has cycles where the length incrementally decreases, and at a rate that is constantly changing.
I have to leave that type of math up to the big brains like yourself Mahir. Because that stuff is way more than I’m capable of even dreaming about.
EDITED — And Simon thanks for pointing out the equal length CHORDS (I’ll call them). Those chords riding on top of that curve (spline) do make for smooth and fluid incremental changes where the ramping varies along the entire length of the curve — again without having to employ any kind of fancy math
Now as to doing it on an iPhone. You’re probably going to be surprised, but on a busy sketch like this one, with TRUCKLOADS of constraints, I found that my five-year-old iPhone is actually better at solving all the constraints than my five-year-old MacBook Pro running on Safari.
Once I had finished setting up all the features in the tree on my iPhone, I thought I’d try using my MacBook Pro to fine-tune everything. But I found it didn’t work. Because things would go RED too easily on the MacBook Pro.
For instance, when I changed the horizontal dimension at the very bottom on my MacBook Pro, it would just freeze, or everything would go red after an extended period of time, even though I was holding down shift. SEE THE POST BELOW ABOUT THE STRIKETHROUGH On the other hand, when I changed the same dimension on my iPhone, it was instantaneous. Which makes me think that the iPhone division of Onshape, did a great job with that solver
I also like the method of suppressing constraints on my iPhone better than on my MacBook on a busy sketch like this. Because I can just leave them off all the time while I’m working on the sketch, which again helps where there are many many constraints
But for doing the VERY FINAL TWEAKING, so that I could get things to look fairly close to the picture, what I ended up doing was I had my MacBook Pro open so I could view the model in PERSPECTIVE from an angled FRONT VIEW, as I made changes to the sketch from TOP VIEW on my iPhone. And although there was a few second delay once I made changes, I found that this worked pretty good for doing that very last part of dialing things in
Now as to any possible tediousness of trying to do it this way — in a sketch — as opposed to using some fancy math, well I had to employ some of the techniques that I used when I was a framer building houses.
And that is that you lay down everything of one type, at one time, and then you move on to laying down everything of another type. So once I have my main spline, then you jump to laying out all the chords, then I do all the long vertical construction lines, so on and so forth And that type of technique can definitely speed things up.
Now is it going to be as fast as doing it with math? Well it may depend on the shape of the spline that I would be trying to mimic. Because I can change that shape so that the ramping is very different at various parts of the curve. So people like yourself Simon and Mahir will have to tell me what type of math it would take to do that. And how long that type of math would take to do with regards to making many changes when it comes to dialing in the final shape
Oops oops oops
I found out why everything was going red on the desktop version of Onshape.
COMPLETELY MY FAULT
Under My account / Preferences /Units / Length default unit — well I have this set to INCH
Now when I’m in edit mode for Sketch 1, that long horizontal dimension down at the bottom is displaying in inches.
But when I double click on it to edit it, it’s showing 9 feet. I obviously entered that particular dimension in feet.
For some reason, I thought I would be able to change this to 11 feet by simply typing in 11 and then hitting return — thinking it would adopt the unit currently showing (ft.) and highlighted in blue.
Well that was as wrong as all get out. Because it was trying to enter 11 inches — as the INCH was my default under prefs.
Trying to reduce that length down to 11 inches was going to send that sketch into overconstrained no matter what type of computer or mobile device I was using. A dumb mistake on my part.
So now that I finally realized what I was doing wrong, well the desktop version is working as good as my iPhone
I don’t know if it’s an age thing or not — but sometimes I miss the most obvious of things
Your post cleared up everything.
I really appreciate your help !
https://cad.onshape.com/documents/57a62df8e4b03de4c9fcf154/w/f6d71f3d862b522902efcd68/e/80a61feafb79991a92090fba
BTW: do we have free nesting tool with part marking for cuting those?
https://www.onshape.com/en/resource-center/what-is-new/whats-new-in-onshape-may-18-2017
I click each face and export to dxf but after second face the third wasn't exported - nothing happens.
Auto Layout will nest your parts. It is not true shape, but it will do standard nesting. I hear that Onshape will have built in nesting for CAM studio in the future, but not yet.
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
When you export the dxf, remember to change the options to "download" instead of "store in new tab":
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
19mm PVC is quite expensive like 150$ per board so we need 9 boards. Alternative is 16mm chipboard (5pcs).
Twitter: @BryanLAGdesign
https://cad.onshape.com/documents/ea06e3c23298e781f2aa1536/w/e7f0d1603dd193d03b2b50fc/e/33ba2b3ab1bc897a176a77e3
I used transform to scale it down to 3600 mm long.
In the ORIGINAL ASPECT RATIO part studio, I did not try to alter the aspect ratio because that would make the wave out of round. So, when I scaled, I used one factor to change both along the X and the Y. And in doing so, you end up with a height of just under 2161 mm
I could change the height by increasing the number of full rings that you see. Though doing this will change the way it looks as compared to the picture
EDIT — I did increase the height in one part studio to where there is now a 4th almost full ring. And the size is 360 x 245 in that part studio
Now as far as the space between the parts, I end up with 34.379 mm. In other words about 34-1/3 mm.
If I were to change the space between parts to 40 mm, that means I would end up with the thickness of each part being roughly around 10 mm as compared to the almost 15 mm they are right now.
Is that what you’re hoping for with regards to the thickness ?
In other words, are you looking for parts that are about 10 mm thick ?
To me, in trying to keep all parts at right angle to the flat surface they may be affixed to, it seems that a 15 mm thickness would be easier to work with, as compared to the 10 mm thickness
But if you want 10 mm, let me know — and I could modify it
I added a IN ROOM part studio. To see what it looks like — turn on perspective view, and then zoom in enough to where you’ll be on the inside of the room. And of course, you’re going to want to view it at an angle and not straight on to get the most effect