Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with parsing/showing ARC entity #92

Open
mirh1 opened this issue Apr 3, 2023 · 0 comments
Open

Problem with parsing/showing ARC entity #92

mirh1 opened this issue Apr 3, 2023 · 0 comments

Comments

@mirh1
Copy link

mirh1 commented Apr 3, 2023

Hi,

I posted this problem in dxf parser project before, but for I am not sure if this might rather be a viewer problem, I would like to open an issue here as well.

We have problems with showing some dxf files in dxf-viewer. A (simplified) example opend with three dxf sample viewer looks like this:

grafik

{ "type": "ARC", "handle": "26", "ownerHandle": "1C", "inPaperSpace": false, "layer": "Cutting", "colorIndex": 7, "color": 16777215, "lineType": "Continuous", "lineweight": 0, "lineTypeScale": 1, "visible": true, "center": { "x": 33.9061329504177, "y": -33.9061329504178, "z": 0 }, "radius": 1.5, "startAngle": 1.5707963267948966, "endAngle": 3.141592653589793, "angleLength": 1.5707963267948966 },
...
{ "type": "ARC", "handle": "28", "ownerHandle": "1C", "inPaperSpace": false, "layer": "Cutting", "colorIndex": 1, "color": 16711680, "lineType": "Continuous", "lineweight": 0, "lineTypeScale": 1, "visible": true, "center": { "x": -30.9061329504177, "y": -35.9061329504178, "z": 0 }, "radius": 1.5, "startAngle": 3.141592653589793, "endAngle": 4.71238898038469, "angleLength": 1.5707963267948966 },

You can see that in some cases an entity of Type ARC is not shown in its right position.
While other viewers that I used show the file correctly:

grafik

By debugging the parsing process until reaching parseEntity(scanner, curr) in arc.js we noticed that the extrusion vector of the specific ARC entity (Group 210-230) is like (0, 0, -1) and also the x value of the arc.center has a reversed sign.

grafik

For reproducing the problem see this example dxf below:
example.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant