1. Hey guyz. Welcome to the All New Phlatforum!



    Sign Up and take a look around. There are so many awesome new features.

    The Phlatforum is a place we can all hang out and

    have fun sharing our RC adventures!

  2. Dismiss Notice

Gcode Problem?

Discussion in 'Mach3' started by xtremeRCpilot, Nov 7, 2009.

  1. xtremeRCpilot

    xtremeRCpilot Member

    Offline
    Messages:
    736
    Trophy Points:
    16
    Location:
    Cleveland, Ohio
    Hi Guyz,
    :D

    Ok, here is my issue. I brought a plane from version .918 into a new Sketchup window .921 and wanted to add different drag holes(larger triangles) to my control surfaces. I have done this before with other planes and when you go to make the new code it says" it appears this was written in an older code .918, would you like to change it" followed by ungrouping them and allowing you to regroup for the new code path...
    So the only parts I upgraded were the cabanes, elevator and rudder, I added my drag triangles and re grouped the parts in the order I would like them cut.
    Now, here is the problem, after it generated the code in sketchup I used that cool pluging ( Gcode plotter) to find everything was in order as I drew it!!

    I then opened up Mach and loaded the new file, it appeared to be right and so I started my cut to 3mm depron as everything was going great until it started cutting some weird looking drag holes. See pics, they look nothing like the triangles and were some obscure oval...

    WHAT THE H**K IS GOING ON.... I must be the only one having issues and need some advice before I run out of foam... When I took a closer look in Mach the cut file also shows these obscure ovals.


    Thanks for any input
    John Attached files [​IMG] [​IMG] [​IMG] [​IMG] [​IMG] [​IMG] [​IMG] [​IMG]
     
  2. gasmasher

    gasmasher New Member

    Offline
    Messages:
    402
    Trophy Points:
    0
    Location:
    Atlanta, GA
    Sorry you are having problems John. Can you be post the SU file and gcode that was generated? If you would like to keep it private go ahead and PM it to me.

    The triangles appear to be using the arc gcodes. I can tell because the screen shot of the gplot plugin shows them in turquoise, the same as that semi-circle on the opposite side of the same part. Gplot is extremely basic and draws arcs the same way SU does, with line segments. That is why they appear OK in the plugin but are rounded out in Mach.

    Can you detail how you drew the triangles (which SU tool and any transformations)?
     
  3. gasmasher

    gasmasher New Member

    Offline
    Messages:
    402
    Trophy Points:
    0
    Location:
    Atlanta, GA
    I just did a quick test and recreated your problem. SU apparently returns an arc for items drawn with the polygon tool, not just the circle tool.

    Steps to recreate:
    1. Select polygon tool
    2. Hit 3 for 3 sides
    3. Draw the triangle
    4. Mark it as an inside cut
    5. Export gcode and it uses G3 (counter clockwise circular interpolation)

    The problem is the line "G17 G3 X 37.175421 Y 5.354835 Z -0.350000 R 4.357213"

    [pre]
    %
    (Generated by PhlatscripT {trunk})
    (Bit diameter: 0.125)
    (Feed rate: 100)
    (Material Thickness: 0.25)
    (Material length: 22.0 X width: 42.0)
    (www.PhlatBoyz.com)
    G90 G20 G49
    M3 S8000
    G0 Z 0.050
    X 29.736760 Y 5.354835
    G1 Z -0.350 F 100
    G17 G3 X 37.175421 Y 5.354835 Z -0.350000 R 4.357213
    X 33.456090 Y 11.796905 Z -0.350000 R 4.357213
    X 29.736760 Y 5.354835 Z -0.350000 R 4.357213
    G0 Z 0.050
    G0 X0 Y0
    M05
    G0 Z0
    M30
    %


    A relative simple fix for now would be to explode the polygons (your triangles). SU will no longer claim they are an arc and G1 codes will be generated. Select the triangles before doing the inside cut and select Explode. I am not sure if this is something that the PS is going to be able to detect. It seems silly that any sided polygon in SU is returned to the script as an arc.

    Here is the same file after exploding the triangle and remarking the inside cut

    %
    (Generated by PhlatscripT {trunk})
    (Bit diameter: 0.125)
    (Feed rate: 100)
    (Material Thickness: 0.25)
    (Material length: 22.0 X width: 42.0)
    (www.PhlatBoyz.com)
    G90 G20 G49
    M3 S8000
    G0 Z 0.050
    X 29.736760 Y 5.354835
    G1 Z -0.350 F 100
    X 37.175421
    X 33.456090 Y 11.796905
    X 29.736760 Y 5.354835
    G0 Z 0.050
    G0 X0 Y0
    M05
    G0 Z0
    M30
    %[/pre]
     
  4. xtremeRCpilot

    xtremeRCpilot Member

    Offline
    Messages:
    736
    Trophy Points:
    16
    Location:
    Cleveland, Ohio
    Thanks Tim,
    I wish I had more understanding of how this all works so I could try to help figure this out. So here it goes!!
    I started by using the triangle tool, which was a polygon that I had to turn to 3 sides. I made my Triangles 1/2" in size and copied them x10 to get my pattern. I then brought them into the control surface ungrouped. I applied the outside cuts and then the inside cuts followed by the tabs. I grouped my parts and then made the code. I checked it in the plotter and looks great!! Hope this makes sense!!

    Thanks for your help!!
    John
     
  5. xtremeRCpilot

    xtremeRCpilot Member

    Offline
    Messages:
    736
    Trophy Points:
    16
    Location:
    Cleveland, Ohio
    So do you mean to explode the control surface as a whole(with the triangles) because they are grouped with the part and not by them selves? :)
     
  6. gasmasher

    gasmasher New Member

    Offline
    Messages:
    402
    Trophy Points:
    0
    Location:
    Atlanta, GA
    It does make sense and your steps are pretty much the same as the ones I used to recreate the problem.

    What I am trying to say is right after you drew your first triangle and were happy with it you have to right click on one of the edges and then use the 'Explode' menu item. This will break the triangle into three line segments instead of being a polygon. It will look exactly the same in SU.

    This is where you would explode it. As soon as you had one 1/2" triangle explode and then copy as needed. When the gcode is generated on the exploded triangle SU will no longer claim it is an arc but properly report it as a trio of line segments.

    Let me know if that doesn't make sense and I'll put together a step by step with pictures.
     
  7. xtremeRCpilot

    xtremeRCpilot Member

    Offline
    Messages:
    736
    Trophy Points:
    16
    Location:
    Cleveland, Ohio
    Thanks Tim, No , That makes perfect sense but is this an issue with the new script because I made triangles in .918 and didnt have this issue!! When I brought yet another plane from .918 to .921 the triangles cut, but they are slightly off. This was a whole new experience :)

    John
     
  8. gasmasher

    gasmasher New Member

    Offline
    Messages:
    402
    Trophy Points:
    0
    Location:
    Atlanta, GA
    The old script didn't use the arc codes at all so that is why we didn't see the problem before. It just cut straight lines from point to point. If there were no arc codes in the new PS this wouldn't have been an issue.

    I am going to try and detect if a part is made with the polygon tool vs the circle tool but I don't know how successful that will be. It will be written up as a ticket and until it is fixed you will either need to go back to the old version or just explode those polygons you want cut with straight lines.
     
  9. xtremeRCpilot

    xtremeRCpilot Member

    Offline
    Messages:
    736
    Trophy Points:
    16
    Location:
    Cleveland, Ohio
    That is no problem!! Now that I know to do this, I had to make this adjustment for my arcs/circles so that I can get smaller tab sizes so this is just another adjustment!!

    Tim, I have another question for you relevant to the compatibility of the scripts!This would make my day if you have an answer :D
    I notice that if I bring a plane from .918 to the new version, I will start with an uncoded copy)I have been having some issues with slots mis-aligning, in other words, when I would cut the first version fuse all the slots would follow a straight line. But when I code the same fuse in the new script( in this particular case ) the last slot that follows the outside cut at the tail of the fuse has dropped over 1/16" and all other slots stay aligned!! I am referencing this from the plane we are looking at and the slots that would connect to the horizontal fuse components!!! Thanks again!!

    John
     
  10. gasmasher

    gasmasher New Member

    Offline
    Messages:
    402
    Trophy Points:
    0
    Location:
    Atlanta, GA
    I'm not sure I understand the question. I'm looking at the fuse in the file you sent. I see 5 total slots. One with a square attached and then three rectangles and the final is open ended. Are saying that the open ended slot is still level (horizontal) with the others but the entire slot is shifted slightly south?
     
  11. xtremeRCpilot

    xtremeRCpilot Member

    Offline
    Messages:
    736
    Trophy Points:
    16
    Location:
    Cleveland, Ohio
    The open ended slot is offset down about 1/16" from the others, all the other slots are perfectly aligned as drawn!! Its noticeable because there should be 1/8" bridge between the slot and the large triangular lightning holes, when the open ended slot cuts,it rips the foam where it segments between the two !!Hope this makes sense!!
     
  12. xtremeRCpilot

    xtremeRCpilot Member

    Offline
    Messages:
    736
    Trophy Points:
    16
    Location:
    Cleveland, Ohio
    Tim, BTW your suggestion worked perfect, now the drag holes are showing triangles in MACH WOOOHOO!! Your a blessing my Friend!!!

    John
     
  13. gasmasher

    gasmasher New Member

    Offline
    Messages:
    402
    Trophy Points:
    0
    Location:
    Atlanta, GA
    It does make sense, I think we are saying the same thing. I'm going to cut it and see what my results are. The only problem is it will probably have to wait until tomorrow since my machine is directly under the kid's rooms.

    When the outside edge of the fuse is cut does the start and end point line up? I just want to be sure it isn't a missed step or skewing of the foam. I only have blue FFF on hand so that is what I will make the test cut with.
     
  14. xtremeRCpilot

    xtremeRCpilot Member

    Offline
    Messages:
    736
    Trophy Points:
    16
    Location:
    Cleveland, Ohio
    Here is a few pics for reference!! :)

    Attached files [​IMG] [​IMG] [​IMG]
     
  15. gasmasher

    gasmasher New Member

    Offline
    Messages:
    402
    Trophy Points:
    0
    Location:
    Atlanta, GA
    Awesome. I really didn't take into account all the places the arc codes could actually cause problems when I implemented them. Hopefully I can get those parts cutting correctly without having to explode them as that is one more step that everyone has to think about and the idea is to make it as easy as possible for the users.
     
  16. xtremeRCpilot

    xtremeRCpilot Member

    Offline
    Messages:
    736
    Trophy Points:
    16
    Location:
    Cleveland, Ohio
    [quote="gasmasher")

    When the outside edge of the fuse is cut does the start and end point line up? I just want to be sure it isn't a missed step or skewing of the foam. I only have blue FFF on hand so that is what I will make the test cut with.
    Perfectly !!!!
     
  17. xtremeRCpilot

    xtremeRCpilot Member

    Offline
    Messages:
    736
    Trophy Points:
    16
    Location:
    Cleveland, Ohio
    Also, I cut three of these and they were all identical, This has happened before on another plane and I had to cut several to see if the results differed!! They were all exact in displacement HMMMM!!
     
  18. gasmasher

    gasmasher New Member

    Offline
    Messages:
    402
    Trophy Points:
    0
    Location:
    Atlanta, GA
    Can you PM the gcode file you have just so that I have the exact same thing you are using? I don't want my development version of the script to have an impact on the gcode I am using. From what you are saying it does sound like the gcode output has a problem and I want to see all the coordinates you have.
     
  19. xtremeRCpilot

    xtremeRCpilot Member

    Offline
    Messages:
    736
    Trophy Points:
    16
    Location:
    Cleveland, Ohio
    No prob Tim, sending it now!!
     
  20. kyyu

    kyyu Active Member

    Offline
    Messages:
    1,183
    Trophy Points:
    36
    Location:
    Maryland
    Sketchup probably see no difference between the polygon tool and the circle. Maybe they are actually the same thing? If you pick the circle tool and type "3 & enter", it turns into a triangle. I did notice that if you explode a triangle, you can use the weld plugin to reform it, then it's ok. And also another method, if you right click and click "convert to"/"polyline", then it's ok, too. There seems to be other stuff to convert it to, that I don't know the difference. And after you have a polyline, it seems you can convert it to a bunch of other stuff, too. Not sure if this "convert to" feature is stock or it could be part of the "bezierspline.rb" plugin?

    [addition] Actually, I just confirmed it was the "BezierSpline 1.21" plugin that provides the "convert to" feature. The install is more than that one .rb file I mentioned. I've uploaded it here: viewtopic.php?f=103&t=1272

    -Kwok
     
  21. xtremeRCpilot

    xtremeRCpilot Member

    Offline
    Messages:
    736
    Trophy Points:
    16
    Location:
    Cleveland, Ohio
    Awesome, thanks Kwok, this is good to know!!! Just a little extra work, knowing to do this saves some extra aggravation!! :)

    John
     

Share This Page