GSharker / G-Shark

G-Shark is a free and open-source geometry library designed for computational designers and software developers in the Architecture, Engineering, and Construction (AEC) industry.
https://gsharker.github.io/G-Shark/
MIT License
215 stars 37 forks source link

Add a Public Constructor for NURBS with KnotVector #424

Open skfcz opened 4 months ago

skfcz commented 4 months ago

The GShark.Geometry.NurbsCurve does not offer a constructor for NURBS with KnotVector.

This is often necessary when reading NURBS from other sources (e.g. STEP or OCX files).

Please add a publically available constructor, which allows instantiating NURBS with KnotVector.

Currently, I fix that visibility problem with a simple wrapper class

public class OCXNurbsCurve : GShark.Geometry.NurbsBase  {
     public OCXNurbsCurve(int degree, GShark.Core.KnotVector knots, List<Point4> controlPoints) : base(degree, knots,
        controlPoints)
    {
    }
}
skfcz commented 4 months ago

See my fork including the changes and a test case