ixmilia / dxf

MIT License
218 stars 67 forks source link

From Spline to Dxf #194

Closed Siro2002 closed 1 year ago

Siro2002 commented 1 year ago

I have a DxfSpline caught from a DxfFile. I want to draw it using its points, but i'm not able because i have 7 control points and degree = 3.

How can i convert it in a Bezier? Control Points: (276.39387957858,2923.26189175548,0) (264.114287850828,3016.95155731114,0) (224.098524561049,3322.26003683501,0) (809.123410874549,3002.26699592903,0) (1399.47089277423,3031.1952716274,0) (1322.79333546794,2624.7986717839,0) (1284.76804685601,2423.26189175548,0)

Fit Points: 276.3938796 | 2923.261892 276.3938796 | 3157.491736 798.171513 | 3070.013493 1284.768047 | 2923.261892 1284.768047 | 2423.261892

Thank You

brettfo commented 1 year ago

Converting splines to Bezier curves is beyond the scope of this library, but I've found a really good guide on understanding Bezier curves and how to construct them here.

Siro2002 commented 1 year ago

Thank You!