C# Class Canguro.Commands.Model.JoinCmd

Model Command to Join the Model. Deletes repeated Joints and Lines and isolated Joints.
Inheritance: Canguro.Commands.ModelCommand
Show file Open project: rforsbach/Treu-Structure Class Usage Examples

Public Methods

Method Description
Intersect ( Canguro model, LineElement l1, LineElement l2 ) : Joint
Intersect ( Canguro model, IList joints, IList lines ) : void
Join ( Canguro model, IList joints, IList lines, IList areas ) : void

Finds repeated Joints and Line Elements and deletes them. Deletes only Items in the parameters and keeps the Item with the smallest ID.

RepairJoints ( Canguro model ) : void

Detects inconsistencies in the model and repairs them. If a line is connected to a joint outside the model, it's added (if ID is free) or changed (if a joint with same ID exists).

Run ( Canguro services ) : void

Executes the command. Executes Join with all the Items and asks to renumber the JointList and LineList objects.

Private Methods

Method Description
equals ( AreaElement j, AreaElement i ) : bool
equals ( Joint j, Joint i ) : bool
equals ( LineElement j, LineElement i ) : bool

Method Details

Intersect() public static method

public static Intersect ( Canguro model, LineElement l1, LineElement l2 ) : Joint
model Canguro
l1 Canguro.Model.LineElement
l2 Canguro.Model.LineElement
return Joint

Intersect() public static method

public static Intersect ( Canguro model, IList joints, IList lines ) : void
model Canguro
joints IList
lines IList
return void

Join() public static method

Finds repeated Joints and Line Elements and deletes them. Deletes only Items in the parameters and keeps the Item with the smallest ID.
public static Join ( Canguro model, IList joints, IList lines, IList areas ) : void
model Canguro The Model object
joints IList List of Joints to check
lines IList List of Line Elements to check
areas IList List of Area Elements to check
return void

RepairJoints() public static method

Detects inconsistencies in the model and repairs them. If a line is connected to a joint outside the model, it's added (if ID is free) or changed (if a joint with same ID exists).
public static RepairJoints ( Canguro model ) : void
model Canguro
return void

Run() public method

Executes the command. Executes Join with all the Items and asks to renumber the JointList and LineList objects.
public Run ( Canguro services ) : void
services Canguro CommandServices object to interact with the system
return void