1- using CADability . Attribute ;
1+ using CADability . Attribute ;
22using CADability . Curve2D ;
33using CADability . UserInterface ;
44using System ;
@@ -61,7 +61,7 @@ public class BSpline : IGeoObjectImpl, IColorDef, ILineWidth, ILinePattern, ISer
6161 private Plane ? plane ; // liegt in dieser Ebene, wenn spezifiziert
6262#if NET_45
6363 private WeakReference < ExplicitPCurve3D > explicitPCurve3D ;
64- #else
64+ #else
6565 private WeakReference explicitPCurve3D ;
6666#endif
6767 // NurbsHelper Daten
@@ -197,20 +197,20 @@ private void MakeNurbsHelper()
197197 {
198198 double dknot = knots [ knots . Length - 1 ] - knots [ 0 ] ;
199199 // letztlich ist es komisch, dass zwei knoten vornedran müssen
200- //for (int i = 0; i < 1; ++i) //
200+ //for (int i = 0; i < 1; ++i) //
201201 //{
202202 // knotslist.Insert(0, knotslist[knotslist.Count - degree - i] - dknot);
203203 //}
204204 //for (int i = 0; i < 2 * degree - 2; ++i)
205205 //{
206206 // knotslist.Add(knotslist[2 * (degree - 1) + i] + dknot);
207207 //}
208- // neue Idee:
208+ // neue Idee:
209209 // 1. es werden immer "degree" poles hinten angehängt
210210 // 2. der 1. Knoten muss immer degree+1 mal vorkommen ( siehe STEP/piece0: dort sind alle Knoten 4-fach
211211 // bei degree=5 und FindSpan muss immer eine Stelle finden, an der es gerade wechselt
212212 // 3. es werden soviele Knoten hinten angehängt, dass "knotslist.Length-degree-1 == poles.length" gilt
213- //for (int i = 0; i < 1; ++i) //
213+ //for (int i = 0; i < 1; ++i) //
214214 //{
215215 // knotslist.Insert(0, knotslist[knotslist.Count - degree - i] - dknot);
216216 //}
@@ -458,7 +458,7 @@ private void InsertInterpol(double sp, double ep, List<GeoPoint> pointList, List
458458 //bool ok = false;
459459 //if (sa >= 0 && sm >= 0) ok = sm <= sa;
460460 //if (sa < 0 && sm < 0) ok = sm >= sa;
461- // Die Frage ist, wie groß ist der Fehler. Man kann nicht einfach in der Mitte testen,
461+ // Die Frage ist, wie groß ist der Fehler. Man kann nicht einfach in der Mitte testen,
462462 // da der Verlauf der Kurve nicht bekannt ist, insbesondere ein Wendepunkt kann zu Fehlern
463463 // führen. So testen wir hier jeweils noch die 1/4 und 3/4 Punkte um einigerm´ßen sicher
464464 // zu gehen
@@ -708,7 +708,7 @@ public bool ThroughPoints(GeoPoint[] points, int maxDegree, bool closed, double[
708708 // SetOcasBuddy(edg.GetGeneralEdge());
709709 // FireDidChange(ce);
710710 // return true;
711- // }
711+ // }
712712 // catch (OpenCascade.Exception)
713713 // {
714714 // return false;
@@ -921,7 +921,7 @@ public bool SetData(int degree, GeoPoint[] poles, double[] weights, double[] kno
921921 //- the Poles and Weights arrays have the same dimension and this dimension is greater than or equal to 2,
922922 //- the Knots and Multiplicities arrays have the same dimension and this dimension is greater than or equal to 2,
923923 //- the knots sequence is in ascending order, i.e. Knots(i) is less than Knots(i+1),
924- //- the multiplicity coefficients are in the range 1 to Degree. However, on a non-periodic curve, the first and last multiplicities
924+ //- the multiplicity coefficients are in the range 1 to Degree. However, on a non-periodic curve, the first and last multiplicities
925925 // may be Degree + 1 (this is recommended if you want the curve to start and finish on the first and last poles),
926926 //- on a periodic curve the first and last multiplicities must be the same,
927927 //- on a non-periodic curve, the number of poles is equal to the sum of the multiplicity coefficients, minus Degree, minus 1,
@@ -1089,7 +1089,7 @@ public void SetThroughPoint(int Index, GeoPoint NewValue)
10891089 // throughPoints3d[Index] = NewValue;
10901090 // RecalcFromEdge(edg);
10911091 // }
1092- // }
1092+ // }
10931093 // catch (OpenCascade.Exception)
10941094 // {
10951095 // }
@@ -1235,17 +1235,17 @@ public bool IsClosed
12351235 if ( ! done )
12361236 {
12371237 if ( multiplicities . Length > 1 )
1238- { // ob das so ganz allgemein gilt, muss noch überprüft werden,
1238+ { // ob das so ganz allgemein gilt, muss noch überprüft werden,
12391239 // die Bedinungen sind so:
1240- // 1. the multiplicity coefficients are in the range 1 to Degree.
1241- // However, on a non-periodic curve, the first and last multiplicities may be
1242- // Degree + 1 (this is recommended if you want the curve to start
1240+ // 1. the multiplicity coefficients are in the range 1 to Degree.
1241+ // However, on a non-periodic curve, the first and last multiplicities may be
1242+ // Degree + 1 (this is recommended if you want the curve to start
12431243 // and finish on the first and last poles),
12441244 // 2. on a periodic curve the first and last multiplicities must be the same,
1245- // 3. on a non-periodic curve, the number of poles is equal to the sum of the
1245+ // 3. on a non-periodic curve, the number of poles is equal to the sum of the
12461246 // multiplicity coefficients, minus Degree, minus 1,
1247- // 4. on a periodic curve, the number of poles is equal to the sum of knot
1248- // multiplicities, excluding the last knot.
1247+ // 4. on a periodic curve, the number of poles is equal to the sum of knot
1248+ // multiplicities, excluding the last knot.
12491249 if ( value )
12501250 { // es wird geschlossen
12511251 // 1. Bedingung
@@ -1294,7 +1294,7 @@ public bool IsClosed
12941294 // die 3. Bedingung muss erfüllt werden
12951295 int sum = 0 ;
12961296 for ( int i = 0 ; i < multiplicities . Length ; ++ i ) sum += multiplicities [ i ] ;
1297- // 3. on a non-periodic curve, the number of poles is equal to the sum of the
1297+ // 3. on a non-periodic curve, the number of poles is equal to the sum of the
12981298 // multiplicity coefficients, minus Degree, minus 1,
12991299 int dif = poles . Length - ( sum - degree - 1 ) ;
13001300 int j = 0 ; // zuerst die beiden äußeren erhöhen
@@ -3549,13 +3549,10 @@ bool ICurve.TryPointDeriv2At(double position, out GeoPoint point, out GeoVector
35493549 private ColorDef colorDef ;
35503550 public ColorDef ColorDef
35513551 {
3552- get
3553- {
3554- return colorDef ;
3555- }
3552+ get => colorDef ;
35563553 set
35573554 {
3558- using ( new ChangingAttribute ( this , "ColorDef" , colorDef ) )
3555+ using ( ChangingAttribute . Create ( this , colorDef ) )
35593556 {
35603557 colorDef = value ;
35613558 }
@@ -3574,13 +3571,10 @@ void IColorDef.SetTopLevel(ColorDef newValue, bool overwriteChildNullColor)
35743571 private LineWidth lineWidth ;
35753572 public LineWidth LineWidth
35763573 {
3577- get
3578- {
3579- return lineWidth ;
3580- }
3574+ get => lineWidth ;
35813575 set
35823576 {
3583- using ( new ChangingAttribute ( this , "LineWidth" , lineWidth ) )
3577+ using ( ChangingAttribute . Create ( this , lineWidth ) )
35843578 {
35853579 lineWidth = value ;
35863580 }
@@ -3591,13 +3585,10 @@ public LineWidth LineWidth
35913585 private LinePattern linePattern ;
35923586 public LinePattern LinePattern
35933587 {
3594- get
3595- {
3596- return linePattern ;
3597- }
3588+ get => linePattern ;
35983589 set
35993590 {
3600- using ( new ChangingAttribute ( this , "LinePattern" , linePattern ) )
3591+ using ( ChangingAttribute . Create ( this , linePattern ) )
36013592 {
36023593 linePattern = value ;
36033594 }
0 commit comments