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.

Why do people fear splines?

billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,014 PRO
«1

Comments

  • 3dcad3dcad Member, OS Professional, Mentor Posts: 2,470 PRO
    I have to admit that I have used splines only for testing but I'm not even sure where I would use them since lines&rounds have been enough for my needs.. If I needed one, I might be afraid of creating exact dimension to spline.
    //rami
  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,014 PRO
    3dcad did you start your cad career by learning acad?
  • _Ðave__Ðave_ Member, Developers Posts: 712 ✭✭✭✭
    I don't fear splines, I hate them. My issue is that they Generate enormous amounts of CNC code. Many older machines just don't have the memory capabilities to handle it.
  • shashank_aaryashashank_aarya Member Posts: 265 ✭✭✭
    edited December 2015
    I think that spline is basically used where free form profile is required which do not require exact dimension to be maintained. Suppose I need to create a surface of an automobile body, initially I will import the image, and create approximate spline profiles. I can adjust them at certain accuracy level just by dragging the points. But if I create such surface by combination of line, arc, circle it will difficult to adjust. However in some other CAD tools it also allows you to modify the 3D surfaces by freely dragging. They are known as free form surfaces.
  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,014 PRO
    edited December 2015
    _dave_

    You're one of the guys I'm looking for. Linear spline interpolation creates a ton of g-code and in the early days, machinist would complain because the code couldn't fit onto a floppy disk and they couldn't carry it to their machine's controller.  Now days most machines are hooked up to a computer and the g-code can trickle to it's controller. I haven't heard this complaint for a while.

    Linear interpolation created horrible looking parts. We ended up hand sanding & polishing each part to remove the chatter marks.

    Linear spline interpolation:


    More modern solutions use circle interpolation:


    This is a better solution, but isn't perfect because it's an approximation. SpaceClaim does a good job at circle interpolation and my water jet guy's controller uses SpaceClaim. The parts I get from him are nice. 



    Getting on top and machining these surfaces, the left one is an extruded arc and the right one is an extruded spline, requires $10,000 grand worth of 3 axis simultaneous cutting. Both are done the same way so splines don't matter here. 

    Surface machining:



    _dave_ is right, if you have a bunch of old machines, you may want to stay away from splines. I don't have this problem, my machinist haven't complain for years, maybe they're more modern.

    I figured a machinist would pipe up about hating splines, but this doesn't account for the majority. There's another group of people that I believe are responsible for giving splines a bad reputation.


  • michael3424michael3424 Member Posts: 674 ✭✭✭✭
    I've only *very* rarely needed them for my work.  I think that the last time was about 10 years ago when I was modeling the handle for a vertical mill.  I never liked them, though, because it was difficult (for me) to figure out the proper number and location of the control points.  Eventually I'd get the curve so screwed up that it would have to be deleted and started over.  That leaves a bad taste in your mouth, but frequent need would probably straighten me out.

    I do CNC in a home shop and my machines are run from a customized version of LinuxCNC so the usable size of a program is limited by disk capacity.  The largest program I've ever run was about 4 GB.
  • 3dcad3dcad Member, OS Professional, Mentor Posts: 2,470 PRO
    billy said:
    3dcad did you start your cad career by learning acad?
    I'm not sure if I have 'cad career' since it's only a fraction of my work. I have never used or liked acad (or other similar 2D cads), my first touch to cad was some built-in cad in cnc when I was ~12 years old at early '90's. It could manage circles and lines (no arcs) and after placing them, one needed to pick elements of those for router path.
    After few years new machines had something called EGA which could produce roundings between two lines so that line points remain parametric, that was awesome. From around '95 I haven't needed separate cad for creating cnc programs just built-in editors which do the job very fast and parametric design with variables is very easy. In my opinion, not that much good things have been added to woodworking cnc after millenium when they all got pc with windows to remove the storage space problem.

    My first actual course for cad was solid edge in engineering school around millennium. So basically I have jumped straight to 3D with my 'cad career'.
    //rami
  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,014 PRO
    7 years of Pro/E, 25 years of SolidWorks, 1 year of Onshape and people still don't use'm.

    https://youtu.be/tICv1-XoPLY
  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,014 PRO
    edited December 2015
    3dcad, you don't like acad!, we'll be good friends I never liked it either. Sounds like you do a lot of programming. I was going to say that depending on what you make might influence whether you use splines. But I stopped, I use'm all the time. Look at the saddle (blue part) on my mill design. 



    It could have been blocked it out, but why not make it look good. I guess I'm into good looking L-brackets.

    michael3424 it sounds like you may be using too many nodes. Common mistake. 4G tool path, what were you milling?




  • batista_hardybatista_hardy Member Posts: 3
    This should get it back close to how it was originally setup. With used gears it is somewhat of a gamble, may run smooth, may not. If it is too loose to get a good backlash measurement, just shoot for ~.008-.010", even more of a gamble, but most times works. If they were run that loose for long, likely have a new wear pattern in the gears, so bigger chance of being noisy.
  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,014 PRO
    edited December 2015
    batista-

    Mapping a gear's involute to a spline, you're a brave man. I wouldn't do that. How many nodes did you compute and use? I'd think you could get closer than .25mm.

    Do you have any pictures/images?

    Bull gear (the big one) required a crane to install.


    These are just pretty teeth and we let the gear maker cut the proper tooth profile. In the end, if you attached a post'm note to a gear tooth face, the drive train would bind. We were holding .05mm max.

    batista- absolutely, don't use a spline for a gear involute


    You could update Brett's parametric gear model and add a spline definition (5 nodes) for the the involute.


    Nice parametric model Brett.


    Check this out, Bradley already did it, An involute made with an 8 node spline. 


    At least I think it's a spline. I wish OS would tell me the entity type selected.

    batista sounds like you know gear hobbing. What noise would this profile make if you cut this? Would this gear break in or would it whine for it's whole life?


  • michael3424michael3424 Member Posts: 674 ✭✭✭✭
    billy - it was a 3D engraving of my sister's dog, prepared from an add-on for the control software I was using at the time (Mach 3).  Thanks for the tip on not using excessive notes.  That sounds typical of my past work and I'll keep in mind for the future.
  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,014 PRO
    edited December 2015
    michael- is mach3 open source? do you like it?

    Using splines tip#1

    Below I map a spline on a lamborghini by using 5 nodes. This is a horrible use of splines.
    -this is totally uncontrollable
    -requires a massive amount of math & cpu resources
    -will destroy any downstream surfacing 


    Use those spline handles. This is so much better.
    -this is totally controllable
    -requires far less cpu resources
    -is the gateway to surfacing



    99% of my splines are 2 node splines. Hopefully people will grasp this concept because this is the beginning step for learning splines and surfacing.


    https://youtu.be/4QRY8ZsQsBY

  • michael3424michael3424 Member Posts: 674 ✭✭✭✭
    @billy - Mach 3 is "commercial" software used to control CNC machines, mostly for the hobbyist market.  It runs under Windows so it has to play tricks of some sort to work and it works pretty well for $150 software.  It's old in the tooth with several "issues" and the product is being upgraded to Mach 4, which has been in beta (some would say alpha) quite a while now.  I used Mach 3 for about 7 years with not too many problems but have recently switched to a PathPilot, variant of LinuxCNC.  PathPilot is marketed by Tormach for their CNC mills and lathe and is essentially a custom front end on an older version of LinuxCNC with customized settings for the CNC hardware that they use.  It looks like a much better product to me and I think that I will be happy with it.  Tormach sells the DVD and a MESA programmable I/O control card for ~$100, about the same as the cost for the card alone.  Tormach only provides PathPilot tech support for their machines.  

    I'm surprised at how well that 2 node spline worked and will have to try that somewhere.  Thanks for the example - it has a lot more impact in a graphic!
  • 3dcad3dcad Member, OS Professional, Mentor Posts: 2,470 PRO
    @billy About tip #1

    Thanks for this lesson. I have never thought about simple (like your 5 node example) splines requiring a lot from cpu. 

    Actually, I haven't ever really thought about what spline is. I suppose in that Lambo example you changed the angle of first point tangent to make it go up faster and spline calculates tangentual curves to fill the requirements of each points 'control line'? (Sorry my english doesn't support terminology that good)  
    //rami
  • brucebartlettbrucebartlett Member, OS Professional, Mentor, User Group Leader Posts: 2,137 PRO
    @3dcadI used some splines on the side view in community motorbike project. I have learnt by trail and error over time to keep splines as simple as possible but some times extra nodes are need to get the required shape. @billy how would you do the shape here for the fuel tank to seat? I could not crack it with a 2 node spline. I had to add the extra 2 extra nodes to pull it up and down.






    Engineer ı Product Designer ı Onshape Consulting Partner
    Twitter: @onshapetricks  & @babart1977   
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,310
    @brucebartlett - you would probably get the best result using two, two node splines instead of one, making them tangent to each other - then you can control the strength of the tangency at the middle point to get your shape.
    Senior Director, Technical Services, EMEAI
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,310
    Also, everyone, don't forget that you can also add dimensions and constraints to the spline handles.  For example, you can make the spline end point and it's handle horizontal to each other, which is a good way to ensure vertical symmetry in a sketch (and also means you don't have to sketch a horizontal line to make the spline tangent to). If you add a dimension between the end point of the spline and the spline handle, you can parametrically control the strength of the tangency - nice!
    Senior Director, Technical Services, EMEAI
  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,014 PRO
    Bruce-

    The gas tank is one, the seat is another spline? Not sure I'd combine the 2.


  • brucebartlettbrucebartlett Member, OS Professional, Mentor, User Group Leader Posts: 2,137 PRO
    Had a bit more of a play with splines on the community motorbike. This KTM has some very nice lines to follow. billy @NeilCookeI got rid of the multi point spline and replaced with some 2 node splines much better solution. I started locking down some of the splines with dimensions but that will take a bit more time. My idea was to create a general layout which others could derive into build parts around however very much a work in progress. If anyone else wants access (maybe even build upon my general layout or other sketches) just PM @3dcad your Onshape accounts email as he has kindly sponsored the project. If nothing else a great place to test idea's with in a collaborative space.


    Engineer ı Product Designer ı Onshape Consulting Partner
    Twitter: @onshapetricks  & @babart1977   
  • 3dcad3dcad Member, OS Professional, Mentor Posts: 2,470 PRO
    @brucebartlett
    Exactly!
    //rami
  • chrisjh777chrisjh777 Member Posts: 207 ✭✭✭✭
    I used to be afraid of splines until I actually had a practical use.  Most of my work is simple and non critical, so I use an "eyeball it" approach.  I keep spline points to a minimum, and drag the spline points to the desired shape until it looks like what I am trying to achieve.

    Recently I needed to replace the corroded cast aluminium housing on my cutoff saw coolant pump.  I reverse engineered the housing with Solidworks and changed the material to PVC.  This discharge shute needed to be an involute shape, so I created it with a simple spline.

    As a training exercise today, I recreated the same impeller housing in Onshape to test whether I could achieve the same result.  Worked fine.

    Here is my effort:  https://cad.onshape.com/documents/aa6005371ec542819270e154/w/d65d77f45ade4873a6981d48/e/72afd249c670409694363410

    For those interested a YouTube video of how I made the replacement housing can be found here: https://www.youtube.com/watch?v=BZV0OO0_7cU


  • john_wolterjohn_wolter Member Posts: 14 EDU
    I won't like splines until OnShape can duplicate them using the pattern tools. :-)
  • DriesVDriesV Member, Developers Posts: 43 ✭✭
    billy said:
    michael- is mach3 open source? do you like it?

    Using splines tip#1

    Below I map a spline on a lamborghini by using 5 nodes. This is a horrible use of splines.
    -this is totally uncontrollable
    -requires a massive amount of math & cpu resources
    -will destroy any downstream surfacing 


    Use those spline handles. This is so much better.
    -this is totally controllable
    -requires far less cpu resources
    -is the gateway to surfacing



    99% of my splines are 2 node splines. Hopefully people will grasp this concept because this is the beginning step for learning splines and surfacing.


    https://youtu.be/4QRY8ZsQsBY

    This is why Onshape needs single span Bézier curves. ;-)
    B-Splines --> very easy to abuse and create crap surfaces
    Bézier curves --> promote good curve and surfacing practices.

    Since the introduction of the 'Style Spline' (Bézier) in SOLIDWORKS, I hardly ever use the classic B-Spline anymore. I still used it for non critical stuff like cosmetic swoopy cables etc.


    Dries
    Product Specialist at Luxion (makers of KeyShot)
    www.keyshot.com
  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,014 PRO
    Bezier splines would be a nice addition. Dries how many nodes do you typically use with the Bezier splines? 
  • DriesVDriesV Member, Developers Posts: 43 ✭✭
    billy said:
    Bezier splines would be a nice addition. Dries how many nodes do you typically use with the Bezier splines? 
    Rarely more than 6 CVs (degree 5).

    Dries
    Product Specialist at Luxion (makers of KeyShot)
    www.keyshot.com
  • jlieberjlieber Onshape Employees Posts: 4
    edited January 2016
    Great thread guys... I have known @billyfor a long time and was confused, at first, as to why he was so excited when SW introduced the ability to create a two node spline.  Then he explained it to me and now I too am a strong supporter.. :)
    Johnathen Lieber
    Team Member
    Onshape, Inc.
  • DriesVDriesV Member, Developers Posts: 43 ✭✭
    billy said:
    Bezier splines would be a nice addition. Dries how many nodes do you typically use with the Bezier splines? 
    I also believe that in AD Fusion splines are degree 5.

    Dries
    Product Specialist at Luxion (makers of KeyShot)
    www.keyshot.com
  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,014 PRO
    edited January 2016
    That was a long time ago jlieber, in the early days of SW, you had to have a 3 noded spline, maddening.

    Dries, do you notice any slow down in regens when building with higher order curves? I can't say I notice any difference, but I haven't been looking for performance, I tend to keep things simple just as a rule of thumb. 5 degrees = 6 inflections. When you're trying to map a spline do you count the inflections to determine spline order? When do you use 2 splines vs. a higher order? Not sure a have a set pattern, I don't think that's a fair question.

    Bruce, when I do organic shapes, I'll use the intersection of 2 surfaces to create a curve for the actual surface that I want. This is why I prefer a parametric system when surface modeling, this allows you to manipulate foundation curves that update to the final curve driving a surface. To me keeping things clean & simple allows for robust designs that compound in complexity as the model grows. 1 bad spline definition in the beginning propagates these errors all the way through the project.

    I had a customer who used scanned data and created a spline with 150 nodes. 6 months later and hundreds of features later, SW would crash constantly. I had to explain to him that 1 curve turned into a surface which turned into a solid and in the end the project was garbage. I spent an hour trying to re-route the crappy spline into a cleaner spline, but I couldn't get it to take without rebuilding his whole project. 2 days worth of work easily, I showed him how and let him do it. Watch out for scanned data and producing splines.

    I wish SW would show this crap, most surface modelers base the uv surface representation based on nodes vs. a percentage. The uv curve creation in SW is useless for determine how tightly wound a surface is defined. You have to look at the curves to see how poorly the surface was constructed in SW. It'd be nice to have a button that would show how crappy surfaces were defined without having go through every sketch.

    My intent with this thread wasn't to discuss surfacing, but I guess splines are a natural lead-in to surfacing. I will say this, if you don't know splines, you'll never get surfacing. A quick tally of the responses on this thread are 50/50 with one who totally detests splines. I guess I'm trying get people to accept splines as a legitimate sketch tool.

    This weekend I'll create the geometry that I saw that prompted me to create this thread. I still don't believe people are comfortable with splines (except for Dries who's a master).



  • matthew_menardmatthew_menard Member Posts: 96 ✭✭✭
    Thanks @billy for the information about splines, especially two node splines, I never knew those existed.  Before your post I would have been in the don't like splines camp.  Mainly because I don't have much use for them in my day to day work.  However, your example shows how powerful the two point spline and its handles can be.  I also never knew the handles of a spline were able to have relations and dimensions applied to them.  Thanks for making me mess around with something I didn't know much about.  Unfortunately, I still will have very little use for any spline at work, but I will certainly be on the lookout for uses in any side projects I muddle around with.
Sign In or Register to comment.