Skip to content

Commit

Permalink
Merge pull request #201 from FriendsOfCADability/FixCS0169
Browse files Browse the repository at this point in the history
Fix CS0169 The private field 'class member' is never used
  • Loading branch information
dsn27 authored Dec 18, 2024
2 parents 75ca066 + d1aa6cc commit 60baaf2
Show file tree
Hide file tree
Showing 40 changed files with 3 additions and 74 deletions.
1 change: 0 additions & 1 deletion CADability.Forms/CadCanvas.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ private static CADability.Substitutes.PaintEventArgs Subst(System.Windows.Forms.
private IView view;
private IPaintTo3D paintTo3D;
private Rectangle lastClientRect;
private System.Drawing.Point lastMousePosition;
private ToolTip toolTip;
private string currenToolTip;
private string currentCursor;
Expand Down
2 changes: 0 additions & 2 deletions CADability.Forms/PaintToOpenGL.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,9 @@ public class PaintToOpenGL : IPaintTo3D
bool useLineWidth;
double precision;
double pixelToWorld;
double[] linePattern;
const int selectBufSize = 1000; // const ist immer auch static
int[] selectBuf;
int clientwidth, clientheight;
Dictionary<System.Drawing.Bitmap, byte[]> iconCache;
struct state
{ // der state wird in einem Stack gehalten und wieder restauriert
// da können noch mehr Dinge dazukommen
Expand Down
1 change: 0 additions & 1 deletion CADability.Forms/PropertiesExplorer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ private void ListBox_DrawItem(object sender, DrawItemEventArgs e)

#region textBox
TextBox textBox; // there is only one TextBox for editing labels or values. It is normally hidden and moved, filled and activated when needed
bool endEidtCalled;
public void ShowTextBox(Rectangle screenLocation, string initialText, IPropertyEntry sender, Point screenClickPos)
{
if (EntryWithTextBox != null) EntryWithTextBox.EndEdit(true, textBox.Modified, textBox.Text);
Expand Down
1 change: 0 additions & 1 deletion CADability/AnimatedView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ public class AnimatedView : IShowPropertyImpl, IView, ICommandHandler, ISerializ
// Animation läuft
private bool isRunning;
private bool isPaused;
private int startTickCount;
ISchedule schedule;
double timeBase; // basis für die Zeitbestimmung, so dass time = (tc - timeBase) / 1000.0 * speed;
double startTime;
Expand Down
8 changes: 1 addition & 7 deletions CADability/BRepIntersection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ struct IntersectionPoint
public List<Face> onFaces;
public GeoPoint position;
}
Dictionary<Edge, Dictionary<double, GeoPoint>> edgesIntersectionPoints;

public BRepIntersection(Shell s1, Shell s2)
{
Expand Down Expand Up @@ -192,9 +191,6 @@ private void CheckIntersection(Face fc, Edge edge)
}
class CollectIntersectionCurve
{
Face f1;
Face f2;

public CollectIntersectionCurve(Face f1, Face f2, GeoPoint p1, GeoPoint p2)
{
}
Expand Down Expand Up @@ -1393,9 +1389,7 @@ public class BRepOperation : OctTree<BRepItem>
private PlaneSurface splittingOnplane; // when splitting a Shell with a plane, this is the surface
private bool allowOpenEdges;
private bool shellsAreUnchanged;
#if DEBUG
Edge debugEdge;
#endif

Dictionary<DoubleFaceKey, ModOp2D> overlappingFaces; // Faces von verschiedenen Shells, die auf der gleichen Surface beruhen und sich überlappen
Dictionary<DoubleFaceKey, Set<Edge>> overlappingEdges; // relevante Kanten auf den overlappingFaces
Dictionary<DoubleFaceKey, ModOp2D> oppositeFaces; // Faces von verschiedenen Shells, die auf der gleichen Surface beruhen und sich überlappen aber verschieden orientiert sind
Expand Down
1 change: 0 additions & 1 deletion CADability/BSpline2D.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ public class BSpline2D : GeneralCurve2D, ISerializable, IDeserializationCallback
//private GeoVector2D[] interdir; // Richtungen an den Stützpunkten
//private double[] interparam; // Parameterwerte an den Stützpunkten
//private GeoPoint2D[] tringulation; // Dreiecks-Zwischenpunkte (einer weniger als interpol)
private BoundingRect extend; // Umgebendes Rechteck nur einmal berechnen
private bool extendIsValid; // schon berechnet?
private double parameterEpsilon; // ein epsilon, welches sich auf den Parameter bezieht. Abbruch für Iterationen
private double distanceEpsilon; // ein epsilon, welches sich auf die Ausdehnung bezieht. Abbruch für Iterationen
Expand Down
1 change: 0 additions & 1 deletion CADability/Constr3DFaceExtrude.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ internal class Constr3DFaceExtrude : ConstructAction
static private Double height;
static private Double heightOffset;
private Boolean selectedMode;
private int insertModeValue;
private Path pipePath;
private GeoObjectList selectedObjectsList; // die Liste der selektierten Objekte
// die folgenden Listen werden dazu synchron gefüllt mit Werten oder "null", bei OnDone zum Einfügen bzw Löschen ausgewertet.
Expand Down
2 changes: 0 additions & 2 deletions CADability/Constr3DRuledSolid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ internal class Constr3DRuledSolid : ConstructAction
private GeoObjectInput geoObjectInput1;
private GeoObjectInput geoObjectInput2;
// private GeoPoint objectPoint;
private IGeoObject iGeoObjectSel1;
private IGeoObject iGeoObjectSel2;
private IGeoObject iGeoObjectOrg1;
private IGeoObject iGeoObjectOrg2;
private IGeoObject attrObject;
Expand Down
2 changes: 0 additions & 2 deletions CADability/Constr3DScrewPath.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ internal class Constr3DScrewPath : ConstructAction
{
private CurveInput pathInput;
private CurveInput rotateLineInput;
private GeoVectorInput axisVectorInput;
private GeoPointInput axisPointInput;
private MultipleChoiceInput orientation;
private DoubleInput numTurns;
private bool handed; // true: righthanded, false: lefthanded
Expand Down
2 changes: 0 additions & 2 deletions CADability/ConstrPicturePoint2Directions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,12 @@ internal class ConstrPicturePoint2Directions : ConstructAction
{
StringInput fileNameInput; // input field for the filename of the bitmap
GeoPointInput positionInput; // input field for the position of the bitmap
DoubleInput scalingFactorInput; // optional input field for a scaling factor for the bitmap
LengthInput width; // optional input field for a width factor for the bitmap
LengthInput height; // optional input field for a height factor for the bitmap
GeoVectorInput dirHeight;
GeoVectorInput dirWidth;
Picture picture; // the picture object beeing placed
string fileName; // the filename for the bitmap
double scalingFactor; // the scaling factor
double widthValue; // the width value
double heightValue; // the height value
GeoPoint location; // the location of the picture object
Expand Down
2 changes: 0 additions & 2 deletions CADability/ConstrPicturePointWidthHeight.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@ internal class ConstrPicturePointWidthHeight : ConstructAction
{
StringInput fileNameInput; // input field for the filename of the bitmap
GeoPointInput positionInput; // input field for the position of the bitmap
DoubleInput scalingFactorInput; // optional input field for a scaling factor for the bitmap
LengthInput width; // optional input field for a width factor for the bitmap
LengthInput height; // optional input field for a height factor for the bitmap
Picture picture; // the picture object beeing placed
string fileName; // the filename for the bitmap
double scalingFactor; // the scaling factor
double widthValue; // the width value
double heightValue; // the height value
GeoPoint location; // the location of the picture object
Expand Down
1 change: 0 additions & 1 deletion CADability/ConstructDirectionOfSurface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ public class ConstructDirectionOfSurface : ConstructAction, IIntermediateConstru
private GeoVector cancelVector;
private GeoVector actualVector;
private GeoVector faceVector;
private int dirPointSelect;
private int dirOffsetSelect;
private bool measure;
private bool succeeded;
Expand Down
2 changes: 0 additions & 2 deletions CADability/ConstructPolarPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,11 @@ public class ConstructPolarPoint : ConstructAction, IIntermediateConstruction
{

private GeoPointProperty geoPointProperty;
private GeoVectorInput vec;
private GeoPointInput startPointInput;
private AngleInput ang;
private LengthInput len;
private GeoPoint startPoint;
private Angle angPolar;
private GeoPoint endPoint;
private GeoPoint currentPoint;
private double lengthPolar;
private GeoPoint actualPoint;
Expand Down
2 changes: 0 additions & 2 deletions CADability/Drive.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1455,7 +1455,6 @@ internal bool MayChangeName(IDrive drive, string newName)
internal class CurveDriveCurveProperty : PropertyEntryImpl, ICommandHandler
{
CurveDrive curveDrive;
bool isDragging;
public CurveDriveCurveProperty(CurveDrive curveDrive)
{
this.curveDrive = curveDrive;
Expand Down Expand Up @@ -1548,7 +1547,6 @@ void ICommandHandler.OnSelected(MenuWithHandler selectedMenuItem, bool selected)
internal class AxisDriveCurveProperty : PropertyEntryImpl, ICommandHandler
{
AxisDrive AxisDrive;
bool isDragging;
public AxisDriveCurveProperty(AxisDrive AxisDrive)
{
this.AxisDrive = AxisDrive;
Expand Down
3 changes: 0 additions & 3 deletions CADability/EditTextAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@ namespace CADability.Actions
/// </summary>
internal class EditTextAction
{
private StringProperty strProp;
internal EditTextAction()
{
}


}
}
4 changes: 1 addition & 3 deletions CADability/Ellipse2D.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ public class Ellipse2D : GeneralCurve2D, ISerializable
internal ModOp2D fromUnitCircle; // diese Abbildung bildet den Einheitskreis auf die Ellipse ab
internal GeoPoint2D left, right, bottom, top; // die Extrempunkte
internal double majrad, minrad, majaxsin, majaxcos;
// im folgenden Daten für IVisibleSegments (z_Position)
private Plane zPosition; // die Raum-Ebene, in deren Mittelpunkt der Kreis bezüglich seine 2d Darstellung liegt


internal void RecalcUnitCircle()
{
// berechnen der beiden ModOps fromUnitCircle und toUnitCircle
Expand Down
1 change: 0 additions & 1 deletion CADability/ExportToWebGl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,6 @@ private int findTransparency(IGeoObject go)
return 255;
}
}
private SortedDictionary<Color, SortedDictionary<string, List<chunk>>> data;
List<chunk> allChunks;
HashSet<int> allColors;
HashSet<string> allLayers;
Expand Down
1 change: 0 additions & 1 deletion CADability/Face.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5875,7 +5875,6 @@ public GeoPoint2D[][] GetUVOutline(double precision)
return polylines.ToArray();
}

private OctTree<TraingleOctTree> triangleOctTree;
private void Triangulate(double precision)
{
SimpleShape ss = Area; // damit es sicher bestimmt ist
Expand Down
1 change: 0 additions & 1 deletion CADability/GeoObjectListProperty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ namespace CADability.UserInterface
internal class GeoObjectListProperty : IShowPropertyImpl, ICommandHandler
{
ListWithEvents<IGeoObject> list;
bool isDragging;
string contextMenuId;
ICommandHandler contextHandler;
public GeoObjectListProperty(ListWithEvents<IGeoObject> list, string resourceId)
Expand Down
4 changes: 0 additions & 4 deletions CADability/HiddenLineProjection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ object IQuadTreeInsertable.ReferencedObject

class ProjectedEdge : IQuadTreeInsertable
{
ICurve2D curve2d;
ICurve curve3d;
Edge edge;

public ProjectedEdge(Edge edge, Projection projection)
{
}
Expand Down
1 change: 0 additions & 1 deletion CADability/Line.cs
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,6 @@ int IExportStep.Export(ExportStep export, bool topLevel)
internal class QuadTreeLine : IQuadTreeInsertableZ
{
GeoPoint2D sp, ep;
double fx, fy, c; // beschreibt die Ebene für den Z-Wert
IGeoObject go;
Plane plane;
double zmax;
Expand Down
1 change: 0 additions & 1 deletion CADability/ModelView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,6 @@ public enum BackgroungTaskHandled

private ProjectedModel projectedModel;
private Project project;
private string name; // der Name für die Darstellung im ControlCenter
private bool zAxisUp;
internal bool projectedModelNeedsRecalc; // Ansicht wurde mit der Maus gedreht, Quadtree muss berechnet werden
private static bool UseOpenGl = Settings.GlobalSettings.GetBoolValue("UseOpenGl", true);
Expand Down
1 change: 0 additions & 1 deletion CADability/NonPeriodicSurface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ public class NonPeriodicSurface : ISurfaceImpl, ISerializable, IDeserializationC
BoundingRect periodicBounds;
bool hasPole, fullPeriod;
ModOp2D toNonPeriodicBounds, toPeriodicBounds;
GeoPoint extendedPole; // when there is no pole, the definition area is a annulus (circular ring). extendedPole is the point at (0,0)
/// <summary>
/// </summary>
/// <param name="periodicSurface"></param>
Expand Down
1 change: 0 additions & 1 deletion CADability/NurbsSurface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public class NurbsSurface : ISurfaceImpl, ISerializable, IDeserializationCallbac
private bool vPeriodic;
private int upoles, vpoles;
private double uMinRestrict = 0.0, uMaxRestrict = 0.0, vMinRestrict = 0.0, vMaxRestrict = 0.0; // restriction for periodic surfaces
private ImplicitPSurface[,] implicitSurface;
// nur einer von beiden NURBS Helfern ist besetzt
private Nurbs<GeoPoint, GeoPointPole> nubs;
private Nurbs<GeoPointH, GeoPointHPole> nurbs;
Expand Down
12 changes: 1 addition & 11 deletions CADability/PaintBuffer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@ public enum DrawingAspect { Background, Drawing, Select, Active, All }
//public event Repaint RepaintDrawingEvent;
//public event Repaint RepaintSelectEvent;
//public event Repaint RepaintActiveEvent;

private System.Drawing.Bitmap Background;
private System.Drawing.Bitmap MainDrawing;
private System.Drawing.Bitmap ActiveObjects;
private System.Drawing.Bitmap Select;

// private Region DrawingInvalid;
// private Region SelectInvalid;
// private Region ActiveInvalid;
Expand All @@ -52,11 +46,7 @@ public enum DrawingAspect { Background, Drawing, Select, Active, All }
private Rectangle DrawingInvalid;
private Rectangle SelectInvalid;
private Rectangle ActiveInvalid;

private System.Drawing.TextureBrush brSelectBrush;
private System.Drawing.Pen penSelectPen;
private System.Drawing.Size CurrentSize; // so groß sind die Buffer gerade


/// <summary>
/// liefert einRechteck, welches die beiden im Parameter gegeben Rechtecke umfasst
/// </summary>
Expand Down
2 changes: 0 additions & 2 deletions CADability/ParametricsDistanceActionOld.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ internal class ParametricsDistanceActionOld : ConstructAction
private object distanceFromHere, distanceToHere; // the two objects which define the distance (may be vertices, edges or faces)
private GeoVector originalOffset; // the offset vector between the facesToMove and facesToKeep
private GeoVector currentOffset; // the additional offset vector between the facesToMove and facesToKeep
private GeoPoint point1; // the first point of the line defining the distance
private GeoPoint point2; // the second point of the line defining the distance. these points are not changed but together with distance they define how facesToMove and facesToKeep have to be moved
private Shell shell; // the shell containing the edge
private List<Face> facesToMove; // list of the faces, which have to be moved
private List<Face> facesToKeep; // list of the faces, which should stay in place (ore been moved in opposite direction when symmetric or backward is chosen)
Expand Down
2 changes: 0 additions & 2 deletions CADability/Path2D.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ public class Path2D : GeneralCurve2D, ISerializable
private ICurve2D[] subCurves;
// private double[] length; // die Längen der einzelnen Teilstücke wird nirgends verwendet, kostet Zeit
private enum State { yes, no, unknown }
private State closed;
private State selfIntersecting;
private bool displayClosed;
public Path2D(ICurve2D[] subCurves)
{
Expand Down
1 change: 0 additions & 1 deletion CADability/PrintToGDI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1462,7 +1462,6 @@ public class PrintToGDI : IPaintTo3D, QuadTree<IPrintItemImpl>.IIterateQuadTreeL
List<IPrintItemImpl> currentCollectionList;
QuadTree<IPrintItemImpl> currentCollectionQuad;
double currentPrecision;
PrintPageEventArgs currentPage;
Graphics currentGraphics;
Projection currentProjection;
GraphicsPath graphicsPath; // wenn!=null wird darauf gezeichnet
Expand Down
1 change: 0 additions & 1 deletion CADability/Project.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ public string ResourceId
}
internal class ProjectOldVersionException : ApplicationException
{
private string resourceId; // resourceId für die MessageBox
public ProjectOldVersionException(string message, Exception innerEx)
: base(message, innerEx)
{
Expand Down
1 change: 0 additions & 1 deletion CADability/ProjectedModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public enum Kind { HardEdge, SoftEdge, ContourEdge }
public Kind kind;
public Edge edge;
public ICurve2D edge2d;
double[] visibleParts; // Paare von Intervallgrenzen für die sichtbaren Teilstücke, leer: unsichtbar
}


Expand Down
1 change: 0 additions & 1 deletion CADability/Projection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public class PickArea
bool isPerspective;
Plane[] bounds;
GeoPoint frontCenter;
GeoPoint center;
GeoVector direction;
Projection projection;
internal PickArea(Projection projection, RectangleF viewRect)
Expand Down
1 change: 0 additions & 1 deletion CADability/SeperatorProperty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

public class SeperatorProperty : IShowPropertyImpl
{
private string labelText;
public SeperatorProperty(string resourceId)
{
base.resourceId = resourceId;
Expand Down
1 change: 0 additions & 1 deletion CADability/ShapeMiddelLine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ public Position(double pos1, double pos2, double dist)
CompoundShape shape;
SimpleShape currentSimpleShape;
QuadTree<ICurve2D> quadtree;
double width, height;
BoundingRect extent;
double maxWidth;
double strokeWidth; // die typische "Strichbreite" der Zeichen, wird von außen gesetzt, kann auch 0.0, also ungesetzt sein.
Expand Down
1 change: 0 additions & 1 deletion CADability/ShowPropertyPolyline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public class ShowPropertyPolyline : PropertyEntryImpl, IDisplayHotSpots, IComman
private GeoPointProperty locationProperty; // wg. hotspot merken
private GeoPointProperty locationParallelProperty; // wg. hotspot merken
private ShowPropertyHotSpot widthHotSpot;
private ShowPropertyHotSpot widthParallelHotSpot;
private ShowPropertyHotSpot heightHotSpot;
private GeoVectorHotSpot directionHotSpot;
private GeoVectorHotSpot directionXParallelHotSpot;
Expand Down
1 change: 0 additions & 1 deletion CADability/SplitShellWithCurves.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ internal class SplitShellWithCurves
OctTree<Face> faceOcttree;
double precision;
Face[] vertexToFace;
List<ICurve2D> all2DCurvesxxx;
Dictionary<Face, List<ICurve2D>> all2DCurves;
Dictionary<Edge, List<double>> splitedEdges;
Set<Vertex> outsideVertices;
Expand Down
2 changes: 0 additions & 2 deletions CADability/Surface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7560,7 +7560,6 @@ internal void RemovePatch(UVPatch uVPatch)
}
BoxedSurface boxedSurface;
ISurfaceImpl toIntersectWith;
double umin, umax, vmin, vmax; // bezogen auf boxedSurface
BoundingRect uvSize;
Dictionary<double, List<IntersectionPoint>> uIntersections; // Schnittpunkte zu festem u bereits bestimmt
Dictionary<double, List<IntersectionPoint>> vIntersections;
Expand Down Expand Up @@ -10565,7 +10564,6 @@ internal void RemovePatch(UVPatch uVPatch)
}
BoxedSurfaceEx BoxedSurfaceEx;
ISurfaceImpl toIntersectWith;
double umin, umax, vmin, vmax; // bezogen auf BoxedSurfaceEx
BoundingRect uvSize;
Dictionary<double, List<IntersectionPoint>> uIntersections; // Schnittpunkte zu festem u bereits bestimmt
Dictionary<double, List<IntersectionPoint>> vIntersections;
Expand Down
1 change: 0 additions & 1 deletion CADability/ToolsRoundIn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ internal class ToolsRoundIn : ConstructAction
private GeoPoint objectPoint; // der (evtl. mittlere) Pickpunkt zum Runden
private GeoPoint objectPoint1; // der Pickpunkt der ersten Curve
private GeoPoint objectPointSav; // der Pickpunkt zum Runden als Merker für onDone
private GeoPoint radiusPoint; // der Pickpunkt der Aufteil-Curve
private ICurve iCurve1; // lokales Element
private ICurve iCurve2; // lokales Element
private ICurve iCurveComposedSplit; // lokales Element
Expand Down
1 change: 0 additions & 1 deletion CADability/ToolsRoundMultiple.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ namespace CADability.Actions
internal class ToolsRoundMultiple : ConstructAction
{
private GeoPoint objectPoint; // der (evtl. mittlere) Pickpunkt zum Runden
private GeoPoint radiusPoint; // der Pickpunkt der Aufteil-Curve
private ICurve iCurve1; // zwei Kurven, zum Rundungsbogenberechnen
private ICurve iCurve2; //
private ICurve iCurveOrg; // OrginalKurve, merken zum evtl. Löschen
Expand Down
Loading

0 comments on commit 60baaf2

Please sign in to comment.