So far i understand that each
Tool
should be mounted into
ToolBlock
, then into
Station
. The list of stations has common name:
Turret
.
Seems, you've got 2 set of data: one - unmounted tools (
Tool
class) and the second - mounted tools which create stations (
Station
class).
Mounted tools:
Turret
|_Station
|_ToolBlock
Unmounted tools:
Warehouse
|_Tool
Since a
ToolBlock
has several properties of
Tool
, than
ToolBlock
should inherits from that object.
If you would like to know that
Tool
has been mounted into
ToolBlock
, you can add some marker into
Tool
class. It may be
IsMounted
property or even better
StationID
, which can be used to identify
Station
where the
Tool
has been mounted. By default, the
StationID
property of
Tool
object should be equal to 0 (zero) and any value greater than zero after mounting.
As to me your model is unclear... Every CNC machine have to know the order (sequence) and the localization of each element. I have no idea how your machine will be able to recognize
Station
. I'll try to expain it on simple diagram (below).
-----------------------------TURRET-----------------------------------------
_STATION_ _________ _________ _________
| _ _ || _ _ || _ _ || _ _ |
| |_| |_| || |_| |_| || |_| |_| || |_| |_|-----Tools (ToolBlock)
| _ _ || _ _ || _ _ || _ _ | |
| |_| |_| || |_| |_| || |_| |_| || |_| |_|------|
| _______ || ________|| ________|| _______ |
------------------------------------------------------------------------
Imagine that Turret object is like a tape (or any other object, such as a piece of wood, a sheet of plastic or a tinware). In simplified model only one station after another may be mounted. But - in real - there might be several stations with set of tools in specifc order and localization.
-----------------------------TURRET-----------------------------------------
_STATION_ _________ _________ _________
| _ _ || _ _ || _ _ || _ _ |
| |_| |_| || |_| |_| || |_| |_| || |_| |_|-----Tools (ToolBlock) >--
| _ _ || _ _ || _ _ || _ _ | | |
| |_| |_| || |_| |_| || |_| |_| || |_| |_|------| |
| _______ || _______ || _______ || _______ | ˅
_STATION_ _________ _________ _________ the direction of laying
| _ _ || _ _ || _ _ || _ _ | ˅
| |_| |_| || |_| |_| || |_| |_| || |_| |_| | |
| _ _ || _ _ || _ _ || _ _ |<-----------<------------|
| |_| |_| || |_| |_| || |_| |_| || |_| |_| |
| _______ || _______ || _______ || _______ |
------------------------------------------------------------------------
I'd suggest to get a sheet of paper and a pencil, than draw a model of
Turret
on it. When you finish, you'll be able to define classes.