dxf show problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

dxf show problem

tryagain
Hi Guys,

i have a DXF file that include a spline, in qcad, it were shown as a circle, but in librecad, it shown as  a round rectangle.the dxf file is here:Graphic1.dxf

Reply | Threaded
Open this post in threaded view
|

Re: dxf show problem

tryagain
is there anybody?
Reply | Threaded
Open this post in threaded view
|

Re: dxf show problem

R. van Twisk
Administrator
In reply to this post by tryagain
Hey,

yo are absolutely right. The rendering on our end isn't correct.
I did test it in a other CAD app aswell and the DXF show's also as a circle, not as a round-rect.

I have been looking into the DXF code but I am not 100% sure yet the issue.

CAD DXF splines do consist of different degrees, a quadratic spline or a cubic spline and I think we render one or the other incorrectly.

We will for sure tackle this subject, however please be patient untill we found it the rootcauze and the correct solution.


Reply | Threaded
Open this post in threaded view
|

Re: dxf show problem

dxli
I will troubleshoot this one.

R. van Twisk wrote
Hey,

yo are absolutely right. The rendering on our end isn't correct.
I did test it in a other CAD app aswell and the DXF show's also as a circle, not as a round-rect.

I have been looking into the DXF code but I am not 100% sure yet the issue.

CAD DXF splines do consist of different degrees, a quadratic spline or a cubic spline and I think we render one or the other incorrectly.

We will for sure tackle this subject, however please be patient untill we found it the rootcauze and the correct solution.
Reply | Threaded
Open this post in threaded view
|

Re: dxf show problem

tryagain
In reply to this post by R. van Twisk
thank you, waiting for your good news
Reply | Threaded
Open this post in threaded view
|

Re: dxf show problem

dxli
does this bug happen to all spline files, or only this particular one?

tryagain wrote
thank you, waiting for your good news
Reply | Threaded
Open this post in threaded view
|

Re: dxf show problem

tryagain
only particular file.

I encountered two dxf file show not quite right, this is a spline curve;

the other is a polyline, that is a bit strange, the low version of librecad have no problem to show it, the high version of librecad have problem to show. the arc in polyline shown error.
Reply | Threaded
Open this post in threaded view
|

Re: dxf show problem

dxli
This post was updated on .
I don't see any issue with the Graphic1.dxf itself.

LibreCAD loads the spline as cubic, nothing unusual here.

I will try some unit tests of spline then.

  0
SECTION
  2
ENTITIES
  0
SPLINE
  5
2B
330
1F
100
AcDbEntity
  8
0
370
     5
100
AcDbSpline
210
0.0
220
0.0
230
1.0
 70
     8
 71
     3
 72
    20
 73
    16
 74
     0
 42
0.0000000001
 43
0.0000000001
 40
0.0
 40
0.0
 40
0.0
 40
0.0
 40
0.25
 40
0.25
 40
0.25
 40
0.25
 40
0.5
 40
0.5
 40
0.5
 40
0.5
 40
0.75
 40
0.75
 40
0.75
 40
0.75
 40
1.0
 40
1.0
 40
1.0
 40
1.0
 10
4.038665354330709
 20
0.6099685039370079
 30
0.0
 10
4.038665354330709
 20
2.784314960629922
 30
0.0
 10
2.276007874015748
 20
4.546972440944882
 30
0.0
 10
0.1016614173228347
 20
4.546972440944882
 30
0.0
 10
0.1016614173228347
 20
4.546972440944882
 30
0.0
 10
-2.072685039370079
 20
4.546976377952756
 30
0.0
 10
-3.83534251968504
 20
2.784322834645669
 30
0.0
 10
-3.835346456692914
 20
0.6099763779527559
 30
0.0
 10
-3.835346456692914
 20
0.6099763779527559
 30
0.0
 10
-3.835354330708662
 20
-1.564366141732284
 30
0.0
 10
-2.072708661417323
 20
-3.327027559055118
 30
0.0
 10
0.1016417322834646
 20
-3.327035433070866
 30
0.0
 10
0.1016417322834646
 20
-3.327035433070866
 30
0.0
 10
2.275988188976378
 20
-3.327047244094489
 30
0.0
 10
4.038653543307087
 20
-1.564397637795276
 30
0.0
 10
4.038661417322835
 20
0.6099448818897638
 30
0.0
  0
ENDSEC
tryagain wrote
only particular file.

I encountered two dxf file show not quite right, this is a spline curve;

the other is a polyline, that is a bit strange, the low version of librecad have no problem to show it, the high version of librecad have problem to show. the arc in polyline shown error.
Reply | Threaded
Open this post in threaded view
|

Re: dxf show problem

dxli
Currently, the LC RS_Spline does not accept customized knot vectors from dxf.

1, need to add support of knot vector in dxfrw (DXF group code: 72, 40, 41);

2, need to support custom knot vectors in RS_Spline, currently; the knot vector is hard coded to uniform knots.
Reply | Threaded
Open this post in threaded view
|

Re: dxf show problem

dxli
In reply to this post by tryagain
experimental knot vector support in master and 2.0 branch:

https://github.com/LibreCAD/LibreCAD/commit/765ee0e3cf8d6f690d8695a16bf2bbd6d521130d