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

Stange circles in dxf line work #64

Open
katSchmid opened this issue Aug 5, 2021 · 6 comments
Open

Stange circles in dxf line work #64

katSchmid opened this issue Aug 5, 2021 · 6 comments
Labels

Comments

@katSchmid
Copy link

hi,
Unfortunately i cannot share the file but we have some linework showing strange circles instead of buldges (left: ours, right three-dxf)
image
and qgis for comparison
image

@Serthys
Copy link
Contributor

Serthys commented Aug 5, 2021

Can you copy a small portion of that file containing one of those buldges into a new file and share that?

@katSchmid
Copy link
Author

i will try, has three-dxf an easy way to split out curves?

@Serthys
Copy link
Contributor

Serthys commented Aug 6, 2021

I did a quick test with Splines and there are some strange things, I'm not sure if it's related to your problems.
Sample file: spline test.zip
This is how it should look like:
image
This is how it looks:
image

The odd curves are not drawn correctly and where the spline has an odd number or points it joins the last one with 0,0,0.

@katSchmid
Copy link
Author

katSchmid commented Aug 9, 2021

I dont have a real dxf editor, can i just dm you the file?

@bzuillsmith
Copy link
Member

bzuillsmith commented Aug 10, 2021

@Serthys yeah, I didn't really know what I was doing when I implemented splines and I didn't have a good program to test things with at the time. It looks like you created a nice test for those. Would love a PR, even if it's just to add a failing test.

The issues here definitely look like issues with bulges. Also all the bulges seem to be originating from the end of a line so perhaps we aren't handling some edge condition for bulges? We'll definitely need at least a portion of the file to diagnose. Are you able to open the file and remove most of it but leave part of what is broken? Then you would just be posting a very tiny piece. Otherwise I suppose a DM will do.

@bzuillsmith
Copy link
Member

@Serthys I just pushed a partial fix for splines. It will now draw simple ones, but can't handle more that 4 control points. Three.js doesn't have an algorithm for more than that. I understand the fundamentals of splines much better now, but not well enough to write code that can handle any number of control points. From what I understand, it becomes a recursive computation as you add more points.

I plan to take a look at the bulge problem soon. Sorry, been getting reoriented with everything. It's been a while!

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

No branches or pull requests

3 participants