Class design help
-
Hello, I'm building a base class to hold information taken from a robot movement file. This means I have several lines, each with a set of points, and sometimes commands, between the points. Each point has some data (coordinates, orientation, zone, speed, work object, and a few more). I'm using Eran Kampf's Sharp3D math library. I would like a sugestion on how to implement the base class. So far, I've done the following: using Sharp3D.Math.Core using Sharp3D.Math.Geometry3D namespace ModelClass { #region Class constants public enum Linetypes { undefined = -1, laser = 0, water = 1, glue = 2, primer = 3, rough = 4 } public enum Polysides { undefined = -5, none = -1, right = 0, left = 1 } #endregion public class Point7D { // Represents a point in 3D space Vector3F point; // Represents the quaternion of vector associated with point QuaternionD quaternion; // Point name descriptor string name; } (...) public class RobotPoint : Point7D { #region Constants public enum zones { undefined, fine, z0, z1, z5 } public enum speeds { undefined, v5, v10, v100, v1000 } const string ActiveTool = "ActiveTool"; const string AuxPointData = "[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]]"; #endregion #region Internal fields // Workplace definition string workplace; // Tool defined for the point string tool; // Zone definition zones zone; // Speed definition speeds speed; #endregion } public class PolyLine7D { #region Internal Fields List pointList; string name; Linetypes type; int width; int npasses; int npts; int power; Polysides polyside; #endregion } public class Model { #region Internal Fields double front_tolerance; double back_tolerance; double inside_x_sep; double outside_x_sep; double plan_overlap; List _ModelPolylines; string _ModelFileName; #endregion } } Should the cla
-
Hello, I'm building a base class to hold information taken from a robot movement file. This means I have several lines, each with a set of points, and sometimes commands, between the points. Each point has some data (coordinates, orientation, zone, speed, work object, and a few more). I'm using Eran Kampf's Sharp3D math library. I would like a sugestion on how to implement the base class. So far, I've done the following: using Sharp3D.Math.Core using Sharp3D.Math.Geometry3D namespace ModelClass { #region Class constants public enum Linetypes { undefined = -1, laser = 0, water = 1, glue = 2, primer = 3, rough = 4 } public enum Polysides { undefined = -5, none = -1, right = 0, left = 1 } #endregion public class Point7D { // Represents a point in 3D space Vector3F point; // Represents the quaternion of vector associated with point QuaternionD quaternion; // Point name descriptor string name; } (...) public class RobotPoint : Point7D { #region Constants public enum zones { undefined, fine, z0, z1, z5 } public enum speeds { undefined, v5, v10, v100, v1000 } const string ActiveTool = "ActiveTool"; const string AuxPointData = "[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]]"; #endregion #region Internal fields // Workplace definition string workplace; // Tool defined for the point string tool; // Zone definition zones zone; // Speed definition speeds speed; #endregion } public class PolyLine7D { #region Internal Fields List pointList; string name; Linetypes type; int width; int npasses; int npts; int power; Polysides polyside; #endregion } public class Model { #region Internal Fields double front_tolerance; double back_tolerance; double inside_x_sep; double outside_x_sep; double plan_overlap; List _ModelPolylines; string _ModelFileName; #endregion } } Should the cla
Have you come up with any good ideas?
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon