Ejemplo n.º 1
0
 public int GetMultiplycityOfNodes(string nodesString)
 {
     ArrayString aString = new ArrayString(nodesString);
     return aString.MaxCount;
 }
Ejemplo n.º 2
0
 public void DrawNURBSCurve(string curveName, string degree, string cutList, string weightList)
 {
     BaseDataPointList pointList = this.basePoints;
     ArrayString aString = new ArrayString(cutList);
     List<DoubleExtension> cutPoints = null, weightValues = null;
     if (!aString.TryParseDoubleExtension(out cutPoints))
     {
         throw new ArgumentException("The cutList contains unrecognised string: " + cutList, "cutList");
     }
     aString = new ArrayString(weightList);
     if (!aString.TryParseDoubleExtension(out weightValues))
     {
         throw new ArgumentException("The weightList contains unrecognised string: " + weightList, "weightList");
     }
     int degreeInt = 0;
     if (!Int32.TryParse(degree, out degreeInt))
     {
         throw new ArgumentException("The degree is not a integer string: " + degree, "degree");
     }
     if (degreeInt < 1)
     {
         throw new ArgumentException("The degree is invalid: " + degree, "degree");
     }
     NurbsCurveParam curveParam = new NurbsCurveParam(pointList.Points, degreeInt, cutPoints, weightValues);
     NurbsCurve curve = new NurbsCurve(curveParam);
     DrawLines(curveName, curve.sampleCurvePoints());
 }