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.

Options

How do I get smooth slots from splines?

mat_haymat_hay Member Posts: 3
Hello, when I sketch a spline and use the slot or offset tool, the slot or offset lines becomes rather jagged and they don't follow the curves as you would expect.

I've read that this could just be Onshape simplifying the sketch for a better performance and is just visual, selecting the slot will automatically smooth the lines so that confirmed it for me. However, if I export this slot as a DXF and prepare to cut the slot in sheet metal, it exports the jagged lines and creates a rough edge like this:

How can I create smooth lines like they should be?

Answers

  • Options
    michał_1michał_1 Member, Developers Posts: 214 ✭✭✭
    Hi Mat, it's Onshape faults. Splines in Onshape are good, what is missing is a proper export to dxf. Since it looks like you are free user, there is a free solution. You need to instal DesignSpark Mechanical it's a free trimmed version of Spaceclaim.
    In Onshape you need to export STEP with your model, then open this STEP with DesignSpark and then save it as dxf.
    What is important, is that DesignSpark when do save as dxf it actually saves the current view from the view port. In your case you need to get view perpendicular to the face you need in dxf. For other users who looks for software to make illustrations for instruction (@3dcad), this is the way.
  • Options
    philip_thomasphilip_thomas Member, Moderator, Onshape Employees, Developers Posts: 1,381
    @mat_hay - Mat, thank you for your post!

    We are very interested in learning why the manufactured sheet metal parts looks the way it does. To understand whether this is on us, we would very much like to see the document! Additionally, the dxf file supplied to your manufacturer would also be helpful. If you would upload the dxf you sent to the document and share it with us (support), we would love to look at it! I hope you take advantage of this offer :)


    Philip Thomas - Onshape
  • Options
    Jason_SJason_S Moderator, Onshape Employees, Developers Posts: 210
    And can you let us know who your manufacturer is in the support ticket? Knowing which software reads the file is just as important as the software that generated the file.
    Support & QA
  • Options
    michał_1michał_1 Member, Developers Posts: 214 ✭✭✭
    I'm surprised that you guys ( @Jason_S, @philip_thomas) are surprised. Any spline Onshape do writes to DXF as a polyline. I was opening Onshape dxf with Corel, Rhino, VCrave, CamBam and with Onshape itself. All of those fail to see spline in dxf. Same programs have no problems to read splines in dxf from DesignSpark, Rhino or Corel (Corel actually write spline as bezier, but still not a polyline). I've created a special document:
    https://cad.onshape.com/documents/1d084eff273f2172e34828f2/w/7732e0373a516a4742828be5/e/5201ee15818ef6e20ca15d0e it is shared with support.
    Even CamBam do see differences:



  • Options
    michał_1michał_1 Member, Developers Posts: 214 ✭✭✭
    One more thing... I was looking at the images I've posted, especially the first one from CamBam and there is a clue... why Onshape dxf contains so many layers? It looks not like direct export form Sketch (which it is) but if that would be blank drawing with a single entity. Dose Onshape utilize drawing app to export dxf from a sketch? If yes then drawing app must be responsible for turning splines into a polyline.
  • Options
    owen_sparksowen_sparks Member, Developers Posts: 2,660 PRO
    edited September 2017
    Yup - I use V-carve too and:-

    (a) All those extra layers are mildly annoying. 
    (b) It also winges about all the lines being open vectors in for example rectangles. 

    Both are easy enough to fix so I've not raised them as a problems in the past but if dxf export is being focused on then thought it worth mentioning.

    Cheers, Owen S.
    Business Systems and Configuration Controller
    HWM-Water Ltd
  • Options
    michał_1michał_1 Member, Developers Posts: 214 ✭✭✭
    I almost can bet, that export dxf from sketch go through drawing without us knowing that.
  • Options
    mat_haymat_hay Member Posts: 3
    I can replicate the issue every time I draw a slot from a spline.
    In the image below is a view of the slot next to a true circle on the right and a filleted edge on the left, all appear jagged.
    The slot sketch is selected, highlighting its actual curve.


    This same part, exported via Onshape into a DXF format and opened in QCAD shows the fillet and circle are correct but the slot is still jagged.

    Here's the slot from above: https://cad.onshape.com/documents/7fc6dfa67e4677f6d8d50f09/w/adfce6db37bb69c3ef626463/e/208f9f45f4ef09c25ddd7cde

  • Options
    michał_1michał_1 Member, Developers Posts: 214 ✭✭✭
    @mat_hay don't get confused by tessellation on Onshapes viewport (your first image), but indeed splines are eventually translated into polylines (only for dxf/dwg).
  • Options
    mat_haymat_hay Member Posts: 3
    michał_1 said:
    @mat_hay don't get confused by tessellation on Onshapes viewport (your first image), but indeed splines are eventually translated into polylines (only for dxf/dwg).
    Yes, I'm really rather used to working with poor graphics and large meshes. So Onshapes visualisation seemed normal to me, with the exported files measuring up as designed. It's just the slots which have been sketched using a spline don't seem to export correctly and instead look like they do on-screen.
    I'm currently downloading Designspark Mechanical, so I will test that out.
  • Options
    philip_thomasphilip_thomas Member, Moderator, Onshape Employees, Developers Posts: 1,381
    @may_hay - HEY! :)
    Please dont forget about us, we want to fix it - please share the doc (and the DXF and the name of your manufacturer!)
    Philip Thomas - Onshape
  • Options
    michał_1michał_1 Member, Developers Posts: 214 ✭✭✭
    Hi guys, I would like to share with you few of mine observations. I've created another file with simple test: https://cad.onshape.com/documents/e6b2918c3155870e4363575d/w/4a868e2f2e2d6d766718eb78/e/b7fd971f65f2f09f3bdb4f17
    again it's shared with support. 
    This time I've decided to create enough specific cv points layout so I could find it in dxf without knowing the exact meaning of each line of dxf (yes we can open dxf with a text editor).
    It's a simple spline with cvs at:
    x:0     y:0
    x:0.3  y:0.3456789
    x:0.6  y:0.56789
    x:0.9  y:0

    For any program to be able to recreate spline it must know cvs position and curve degree. Now if you search for just a row 3456789 you will find nothing in Onshapes dxf. You can also search for word spline and you will find only two lines with only object class denotation.
    For comparison, I've created exactly same spline in DesignSpark and export it in dxf. This time you can find both values 3456789 and 56789. Also you have same class denotation lines about spline but also data about spline itself.
    Original file from DesigSpark and dxf are attached to my document from the link above.

    It can't be that manufacturer might have a problem to read Onshapes dxf properly, Onshape didn't write data about spline to dxf.
  • Options
    lanalana Onshape Employees Posts: 696
    Thank you for bringing up this issue. We'll need to improve precision of our DXF output. 
  • Options
    Jason_SJason_S Moderator, Onshape Employees, Developers Posts: 210
    edited September 2017
    Thanks everyone. I was looking to make sure that this was not the same case as https://forum.onshape.com/discussion/6689/is-there-a-problem-with-export. There are a lot of things going on with DXF and DWF files and their usage. We like to narrow down the issue as far as possible before move forward for a fix.

    Michal and @owen_sparks, what are your output settings on your DXF/DWGs? Not all file types are the same or will yield identical results. There is a decent sized matrix of options here.
    Support & QA
  • Options
    owen_sparksowen_sparks Member, Developers Posts: 2,660 PRO
    Jason_S said:
    Michal and @owen_sparks, what are your output settings on your DXF/DWGs? Not all file types are the same or will yield identical results. There is a decent sized matrix of options here.
     Hi @jason_s Good point, I've only ever accepted the default settings.  Any suggestion on what might be more appropriate?

    Cheers, Owen S
    Business Systems and Configuration Controller
    HWM-Water Ltd
  • Options
    michał_1michał_1 Member, Developers Posts: 214 ✭✭✭
    I'm in the middle of checking all possible formats of export (from sketches, from faces, from drawings, as all dxf and dwg types), but after my test with just text editor I doubt it will come any different.
  • Options
    michał_1michał_1 Member, Developers Posts: 214 ✭✭✭
    Ok, I went through all possible cases and I must admit that we don't need any external programs to get spline in dxf.
    Because of my experience with multiple CAD applications, I tend not to use drawing exports, I use them only for documentation, not for CNC.
    That was my mistake, I was wrong. I also must review my initial advice here: https://forum.onshape.com/discussion/7156/onshape-vs-rhino#latest maybe best is to export from drawings, I will look at that.
    To get spline in dxf you must use drawings (for example adjust drawing format and use 1:1 scale) all should work except DXF Release 11-12.
    We won't get spline if exported from Sketch of by picking a face and then exporting it as DXF, these will not work, they don't contain any data about spline.
    I wish exports from Sketches and faces will be fixed, but since now I don't consider it urgent.

  • Options
    michał_1michał_1 Member, Developers Posts: 214 ✭✭✭
    One more thing, just to be on the same page with everyone. Non-perpendicular views will come as a polyline, but for machining purposes, it doesn't matter (maybe for illustrations).
  • Options
    owen_sparksowen_sparks Member, Developers Posts: 2,660 PRO
    Appreciate your work @michał_1

    Cheers, Owen S.
    Business Systems and Configuration Controller
    HWM-Water Ltd
  • Options
    michał_1michał_1 Member, Developers Posts: 214 ✭✭✭
  • Options
    billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,014 PRO
    This is one the dxf's largest problem and has caused huge issues in the engineering community. I'd stay with IGES or step. I'm not a fan of dxf for this reason and wish it never existed.

    The solid image will show tessellation which is visual and not the geometry's true curvature. This was pointed out in a previous post.

    Splines are mathematically continuous and accurate. G-code can't handle them so CAM packages have issues when engineers use them. I wish after all these years we had a better method for handling splines in CAM.

    CAM systems can either linear interpret or circular interpret splines. Most will linear interpret the spline causing huge CNC files. I don't care how far done the "tolerance" goes, you'll always see facets. More advanced interpolation will map arcs onto splines reducing the CNC file size. Arcs are planar so for 3D splines you'll need 5 axis. All interpolated tool paths don't look that good. I hate when they circle interpolate my splines, but there's no other way. It effects the way light reflects off of your part and makes it appear dull & bland. This really needs to be addressed.

    The solution will be to send the spline's coefficients to the motor controller and have it resolve down to the motor step. I haven't heard of any one trying to do this, but it's time.

    Ask the CAM BAM people to figure out splines without interpolation. This would be new and exciting. Stay away from dxf and all the bad it's brought into the world.

    This is my opinion,



     
  • Options
    michał_1michał_1 Member, Developers Posts: 214 ✭✭✭
    Hi @billy2 I'm afraid you're confused with two different things. Mat's part didn't come out jagged because of CAMs interpolation but because Onshape turned spline into a polyline. To be more specific, turning spline into polyline it's not an inherent property of dxf or Onshapes, it's just flaws of current Onshapes implementation. This has nothing to do with linear interpolation of splines in CAM.
    Next thing I would like to address your concerns with G-code not supporting splines.
    Do you know G06.2 command?
    CAM developers were working on that like two decades ago. Here's a Fanuc manual form 1999:
    http://www.kfilipowicz.zut.edu.pl/Programowanie/FANUC/0010__GE_FANUC_User_Manual.pdf
    go to page 105 on that pdf doc, or on page 79 if you read from the paper, it's chapter 4.13 NURBS INTERPOLATION (G06.2)
    This command (G06.2) is doing what you're asking it sends NURBS data directly to the motor controller.
    Of course, even then it's just an approximation with a tolerance equal to machine resolution. I wish you know what I mean by machine resolution. Stepper motors are working by moving a fraction of full rotation (step) and that translates into an incremental linear move, usually, something like 0.001mm and this is your machine resolution.
    We can speculate about (dream about), not using stepper motors and build an analog device. I can imagine linear and circular motions being implied, maybe NURBS also? Eventually, you are the engineer here.
     
Sign In or Register to comment.