Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. c# class design help

c# class design help

Scheduled Pinned Locked Moved C#
questioncsharpasp-netgraphicsdesign
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rsaint27
    wrote on last edited by
    #1

    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 vector; // 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; Polysides polyside; #endregion } public class Model { #region Internal Fields List _ModelPolylines; string _ModelFileName; #endregion } } Should the class PolyLine implement itself a static method for creating a list, instead of having the Model class do it? Same question for the Model class if I want to have more than one file opened at the same time? In such case, I would crea

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups