CamBam
News:
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 13, 2018, 12:50:38 pm


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Decrease Number of Segments Arc in Polyline without change its Shape  (Read 779 times)
Mdhee29
CNC Ewok
*
Offline Offline

Posts: 9


View Profile
« on: June 22, 2018, 13:31:04 pm »

Hi!
I've learn CamBam for about 2 months. I used this software to convert some DXF files into GCode files. I've eliminate comas for the GCode, so its precision is 1 mm. At the first, it works well by convert a full circle into 4 segments or 4 quadrant or divided to 4 parts which every parts is 90 deg.

Then, after some weeks, I tried it again, but it divided the circle into 2 parts which each parts is 180 deg. I still tolerant it. But now, when I convert the circle, it always give me the different number angle, while what I really want is that circle can be divided into 4 parts which each part is 90 deg.

I have try to decrease the number of segments by the "Arc Fit". But it still give me the different angle. I really appreciate your help. Thank you..
Logged
EddyCurrent
CNC Jedi
*****
Offline Offline

Posts: 3694



View Profile
« Reply #1 on: June 22, 2018, 20:20:30 pm »

Can you attach an example cb and dxf file ?
Logged
Mdhee29
CNC Ewok
*
Offline Offline

Posts: 9


View Profile
« Reply #2 on: June 23, 2018, 08:56:58 am »

Yeah of course..

Thank you for your reply..

* Pameunteu.cb (2.49 KB - downloaded 30 times.)
* Pameunteu.dxf (15.5 KB - downloaded 26 times.)
Logged
pixelmaker
CNC Jedi
*****
Offline Offline

Posts: 1653


View Profile WWW
« Reply #3 on: June 23, 2018, 13:24:09 pm »

The circle in the Cartesian coordinate system always needs at least two segments to create a toolpath. The starting and end points of the segments must not have the same coordinates, because a minus or plus sign would only reverse the direction of the toolpath.
To avoid that there are two equal coordinates Cambam creates circles with three segments. You can reduce them to two segments ( arc fit), but they can never be offset 180° or 90°. If a circle would consist of 4 points offset by 90°, the coordinates 0° and 180° would be identical and also the coordinates 90° and 270°. Both would only differ by changed signs.

This is my explanation why there are no circles with 4 segments.

ralf
Logged
Mdhee29
CNC Ewok
*
Offline Offline

Posts: 9


View Profile
« Reply #4 on: June 23, 2018, 14:22:42 pm »

Ahh, thank you..

But can you explain this? I've convert it into 4 segments before..

* Lingkaran_60_2.nc (0.3 KB - downloaded 20 times.)
Logged
lloydsp
CNC Jedi
*****
Offline Offline

Posts: 7677



View Profile
« Reply #5 on: June 23, 2018, 14:27:02 pm »

As he said, four segments WILL work, so long as the segments do not begin/end on the major axes.

It's 'possible'... just not 'recommended'.

For instance, you might draw a circle, then describe two perpendicular lines intersecting at the center, and 'breaking at intersections'.  After deleting the 'wasted' segments of the perpendiculars, this will leave four 90-degree arcs that might be machined individually, but still resulting in a complete circle.

Lloyd
Logged

"Pyro for Fun and Profit for More Than Fifty Years"
Dragonfly
CNC Jedi
*****
Offline Offline

Posts: 2044



View Profile
« Reply #6 on: June 23, 2018, 14:52:28 pm »

I am still using extensively CorelDraw for making drawings and it depends how I control the export to DXF. If I export directly its native circle (called ellipse in CDraw and which always has 4 quadrant points) and then convert the spline which is read into CamBam to polyline I get a circular shape consisting of numerous tiny straight segments. But if before exporting I do a conversion of all internal to CDraw shapes to curves, then in CamBam circles translate into polylines with four equal arcs.
And it is quite useful to me because the Snappy plugin snaps to the four points which are exactly 90 degrees from each other relative to the center. So, having a circular polyline with 4 equal arcs is useful.
Logged

Before asking a question do some effort and walk through all menus and options in CamBam.  Maybe the answer is there. Please.
Mdhee29
CNC Ewok
*
Offline Offline

Posts: 9


View Profile
« Reply #7 on: June 23, 2018, 17:15:03 pm »

Dear lloydsp, thanks for your reply..
But in my case, my friend made the controller, and the controller still can't process if the angle is not 90 deg or multiples of 90 deg. In this system, I can't add some more lines or make the same form with Circle in CamBam then convert it to polyline. I have to really convert the DXF file.

Dear Dragonfly,
Yes, I'm using CorelDraw. For my first time, I'm using CD X7, but now I'm using CD X3, could it be the matter? And yeah, did you mean Ctrl+Q over the Ellipse? I've done that from the beginning, but I still didn't get my goal.

Thank you for your reply..
Logged
lloydsp
CNC Jedi
*****
Offline Offline

Posts: 7677



View Profile
« Reply #8 on: June 23, 2018, 19:03:52 pm »

You'd have to amplify that quite a bit for me to believe there is a CNC control out there that cannot cut arcs less than 90-degrees!  What if you were to have 'arc-chamfered' cuts around a hexagon... only arcs at the corners.

Are you telling me that's impossible on your control?  If so, have the 'maker' correct that horrible defect!

Lloyd
Logged

"Pyro for Fun and Profit for More Than Fifty Years"
Mdhee29
CNC Ewok
*
Offline Offline

Posts: 9


View Profile
« Reply #9 on: June 23, 2018, 19:57:10 pm »

Dear LLyod, thank you very much for your response.. And all of you that have responsed my question..

Hhaha, yeah I know that this is horrible, but this is my coursework, so however I have to solve that.. Thank you, really..
Logged
Dragonfly
CNC Jedi
*****
Offline Offline

Posts: 2044



View Profile
« Reply #10 on: June 23, 2018, 20:17:48 pm »

CorelDraw X3 is what I am using.
And I think conversion to curves before exporting and then exporting to Autocat R13 are the things which affect the way the circles are treated.
Logged

Before asking a question do some effort and walk through all menus and options in CamBam.  Maybe the answer is there. Please.
dh42
Administrator
CNC Jedi
*****
Offline Offline

Posts: 5234



View Profile WWW
« Reply #11 on: June 23, 2018, 20:33:51 pm »

Hello

Another way is to do no change in the drawing itself and use "convert to lines" in the "Arcs output" property of your post processor, so all arcs will be converted to a bunch of small straight lines, and in this case you can cut any arcs even if they are smaller than 90°.

Quote
Options - Arc Output

Controls how arcs are output to gcode.
If Convert To Lines, small line moves are used rather than arc commands.
Helix Convert To Lines is similar to Convert To Lines, but only for helical arcs (i.e. arcs with varying Z).

http://www.cambam.info/doc/dw/1.0.0/cam/PostProcessor.htm

++
David
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.14 seconds with 20 queries.

Copyright © 2018 HexRay Ltd. | Sitemap