8000 Discretization using "CSMath.Geometry.CurveExtensions" regression · Issue #669 · DomCR/ACadSharp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Discretization using "CSMath.Geometry.CurveExtensions" regression #669

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

Open
Vilo176 opened this issue May 12, 2025 · 0 comments
Open

Discretization using "CSMath.Geometry.CurveExtensions" regression #669

Vilo176 opened this issue May 12, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@Vilo176
Copy link
Vilo176 commented May 12, 2025

Hi friends,

Arc (and others) curved geometry discretization seams to have been screwed up recently.
Many entities use "CSMath.Geometry.CurveExtensions" to perform this task, and there is something weird in the code :

=> https://github.com/DomCR/CSUtilities/blob/644156d87b14d9f60916dd45a87a86cc36f6b07f/CSMath/Geometry/CurveExtensions.cs

Calculation of points is made in entity coordinates system :
startPoint is local X axis
prep is local Y axis

But the start angle is kept equal to Arc.StartAngle, leading to an angular offset in the result.

Solution :
Either keep Arc.StartAngle & Arc.StartAngle and calculate inside CSMath.XYZ.AxisX / CSMath.XYZ.AxisY coordinates.
Or set endAngle -= startAngle & startAngle = 0

@Vilo176 Vilo176 added the bug Something isn't working label May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant
0