Skip to content

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

Open
@Vilo176

Description

@Vilo176

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions