CamBam
News:
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 19, 2019, 13:38:24 pm


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: [V1-20] heavy bug DXF handling with V1 alpha16  (Read 1134 times)
pixelmaker
CNC Jedi
*****
Offline Offline

Posts: 1701


View Profile WWW
« on: September 27, 2018, 11:44:58 am »

Cambam V1alpha 16
Bug with DXF handling.

If I export a DXF with circles and arcs from CamBam I can easily open this DXF in Autocad and Illustrator.
If the arcs and circles are polylines or splines, the exported DXF only has straight lines between the nodes. It is no longer possible to transfer a drawing from version 1 (alpha16) to another program.

If I do the same tests with version 0.9.8 there are no problems.

Very badly, I often use Cambam to clean up files that I then use in Illustrator. This is no longer possible.

ralf
« Last Edit: September 27, 2018, 18:38:10 pm by dh42 » Logged
dave benson
CNC Jedi
*****
Offline Offline

Posts: 1121


View Profile
« Reply #1 on: September 27, 2018, 13:32:21 pm »

Hi Ralf
Seeing that you were in a bit of a bind I did some tests.

I did these tests ---> export a square,circle and a spline with (export selection to dxf) and opened it with Freecad (latest bleeding edge binaries).
 
It opened in Freecad OK, but when I went back to CB the spline had disappeared ?

I then tried an export of the square,circle and a new spline (using the Export to dxf)  this opened Ok too but thankfully the spline did not disappear when I went back to CB.

I then loaded up the file into Draftsight an it was OK.

I then saved it from Draftsight to .dxf again,but it still would load up with Inkscape !

I then loaded up the file with Freecad and exported this to dxf and it did then load up into Inkscape.

So Although a bit of a work around you could load up the file with Freecad and re-export it to dxf to get it into Illustrator.
I think it has something to do with the file format R12,R13 ect and whether it is Binary or ASCII.

Dave


* Export test of a square and a circle and a spline.PNG (27.65 KB, 1185x492 - viewed 95 times.)

* Export test of a square and a circle and a spline but the spline vanished.png (91.57 KB, 1030x491 - viewed 84 times.)

* NO Go in Inkscape.PNG (93.72 KB, 917x683 - viewed 86 times.)

* Saved from freecad to dxf and it loaded up fine with Inscape.PNG (88.23 KB, 835x693 - viewed 87 times.)
Logged
pixelmaker
CNC Jedi
*****
Offline Offline

Posts: 1701


View Profile WWW
« Reply #2 on: September 27, 2018, 16:18:48 pm »

hello Dave

I only have the problems if I have drawn or converted the objects into polylines. It doesn't matter if I create curves and circles in CamBam or if I have imported objects.
In the attached CamBam file I created circles and arcs. The two lower objects are converted to polylines. I exported the file as DXF from CamBam. When I open this file in Draftsight, Autocad, Inventor or Illustrator I see the polyline objects only as straight lines.
When I open the file in Freecad, I see the polylines as circles and arcs. However, I can only export one drawing object from Freecad, not an entire drawing. So it doesn't help...
There are no import options available in Autocad or Draftsight. The scale for me is Autocad because DXF is an Autodesk format.

I just did a test in CamBam version 1 alpha 13. There I can export polylines as DXF and can also open them in Draftsight and Illustrator.
So the bug comes later but I have only alpha 13 and alpha 16 installed.

ralf


* draftsight.png (22.83 KB, 726x588 - viewed 106 times.)

* illu.png (19.67 KB, 497x454 - viewed 92 times.)
* cambam test.zip (1.58 KB - downloaded 55 times.)
« Last Edit: September 27, 2018, 16:25:36 pm by pixelmaker » Logged
dh42
Administrator
CNC Jedi
*****
Offline Offline

Posts: 5550



View Profile WWW
« Reply #3 on: September 27, 2018, 18:04:06 pm »

Hello

If I export myself your .cb file in attachment from CB R16, the result is OK in both Illustrator and Solidworks, but if I use the DXF that you provide I get the same result as you on both soft.

Note that splines are always converted to arcs before exporting ..

note that on SW, the circle that as been converted to polyline by cambam is still a true circle in SW (and same for arcs)

Ah !!!

All woks OK if Export 3D polylines is set to False in the options, and I get the same defects as you if it is set to True

also, if set to True, the splines are not converted to arcs but are done with straight lines.

++
David

« Last Edit: September 27, 2018, 18:07:43 pm by dh42 » Logged
lloydsp
CNC Jedi
*****
Offline Offline

Posts: 7987



View Profile
« Reply #4 on: September 27, 2018, 18:28:28 pm »

BINGO!  Thanks, David, for the research.

Lloyd
Logged

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

Posts: 4007



View Profile
« Reply #5 on: September 27, 2018, 21:03:47 pm »

I exported my own cb file to dxf, it included circles, polyline circles, arcs, polyline arcs, splines.
All open as it should in Rhino 3D.

Following David's excellent advice I checked my settings in Tools->Options, it said, 'Export 3D Polylines' = False

I think 'False' might be the default setting because I can't recall changing it.



« Last Edit: September 27, 2018, 21:16:05 pm by EddyCurrent » Logged

Made in England
dave benson
CNC Jedi
*****
Offline Offline

Posts: 1121


View Profile
« Reply #6 on: September 27, 2018, 23:38:57 pm »

Quote
I think 'False' might be the default setting because I can't recall changing it.
Yes I think you are right Eddy  as I checked mine as well and it was false.

I went back and fiddled with the file again to see what effect this setting actually had on the file, and it turns out that with Ralf's file the sketch in Freecad wasn't validated and there were seemingly spurious points in the sketch, but if you joined the dots they turned out to be the control points used in making the spline.

Ralf with Freecad you can export all of the drawing entities if you Box select them Shift B (I've changed mine just B) or just click on the body associated with the entities not the Part.

With Freecad you must set up your drawing (with a Part and at least one or more bodies) else you can't use a lot of the slick features in the workbenches) and you often get no errors to indicate that this is the case, just nothing happens.

Dave


* CB ver 1 Test from David OK sketch is validated.PNG (48.24 KB, 1357x604 - viewed 95 times.)

* Importing All the Drawing Entities as a dxf into cb from Freecad.PNG (331.88 KB, 1263x702 - viewed 88 times.)
Logged
pixelmaker
CNC Jedi
*****
Offline Offline

Posts: 1701


View Profile WWW
« Reply #7 on: September 28, 2018, 10:28:22 am »

Hello David and thanks for the workaround.
With this setting polylines come as arcs in the DXF

3D polylines have additional height information for the points. We know that this is not possible in CamBam and the lines have to be converted into straight lines. I thought that was fixed.

thanks again
ralf
Logged
dh42
Administrator
CNC Jedi
*****
Offline Offline

Posts: 5550



View Profile WWW
« Reply #8 on: August 21, 2019, 16:01:43 pm »

Hello

A reply from Andy about this behavior.

Quote
When DXF configuration property 'Export 3D Polylines' is set True, all polylines are output as 3D polylines.  That is, the DXF entity FLAG property 8 (3D Polyline) is set, elevation is set to 0 and all vertices have X,Y and Z coordinates output.  The vertex Bulge value is also output.

It appears some CAD programs do not handle 3D Polylines containing arcs.  The bulge is ignored and a straight line segment is used.  The DXF documentation is unclear whether or not 3D polylines with arcs are allowed.

To avoid unexpected results, it is advised to keep 'Export 3D Polylines' is set False (the default) unless you are sure the target CAD system supports 3D polylines with arcs.

CamBam is able to read 3D DXF polylines with arcs.  Even when 'Export 3D Polylines' is set False, CamBam may still output 3D polylines if the polylines contain differing Z values.  An example is a toolpath with a spiral lead in.  This is true of all CamBam versions.

A proposal is to add two new configuration settings '3D Polyline Remove Arcs' and 'Arc to line tolerance', similar to the settings in the post processor.  This would force all arcs in 3D polylines to be written as a sequence of straight line segments.

++
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.136 seconds with 19 queries.

Copyright © 2018 HexRay Ltd. | Sitemap