Class MachiningEquipmentCollisionIndexPairsSource
- Namespace
- Hi.Machining.MachiningEquipmentUtils
- Assembly
- HiMech.dll
Source of CollisionIndexPair. The adjacent solids will not be added to the CollisionIndexPairs.
public class MachiningEquipmentCollisionIndexPairsSource : ICollisionIndexPairsSource, IGetCollisionIndexPairs, IMakeXmlSource
- Inheritance
-
MachiningEquipmentCollisionIndexPairsSource
- Implements
- Inherited Members
- Extension Methods
Constructors
MachiningEquipmentCollisionIndexPairsSource(IMachiningChain, HashSet<CollisionIndexPair>)
Initializes a new instance of the MachiningEquipmentCollisionIndexPairsSource class with a specified machining chain and excluded pairs.
public MachiningEquipmentCollisionIndexPairsSource(IMachiningChain src, HashSet<CollisionIndexPair> excludedPairs)
Parameters
src
IMachiningChainThe solid machining chain to build collision pairs from.
excludedPairs
HashSet<CollisionIndexPair>The set of collision pairs to exclude from collision detection.
Remarks
This constructor builds the default collision index pairs from the provided machining chain and removes the specified excluded pairs from consideration.
MachiningEquipmentCollisionIndexPairsSource(IMachiningChain, string)
Initializes a new instance of the MachiningEquipmentCollisionIndexPairsSource class with a specified machining chain and excluded pairs string.
public MachiningEquipmentCollisionIndexPairsSource(IMachiningChain src, string excludedPairsString = "")
Parameters
src
IMachiningChainThe solid machining chain to build collision pairs from.
excludedPairsString
stringA string representation of collision pairs to exclude, in the format "[Key1][Key2];[Key3][Key4]".
Remarks
This constructor builds the default collision index pairs from the provided machining chain and removes the pairs specified in the excludedPairsString from consideration.
MachiningEquipmentCollisionIndexPairsSource(XElement, IGetMachiningChain)
Initializes a new instance of the MachiningEquipmentCollisionIndexPairsSource class from XML data.
public MachiningEquipmentCollisionIndexPairsSource(XElement src, IGetMachiningChain res)
Parameters
src
XElementThe XML element containing the collision index pairs configuration.
res
IGetMachiningChainThe solid machining chain reference used to build default index pairs.
Fields
XName
Gets the XML element name used for serialization.
public static string XName
Field Value
Methods
GetCollisionIndexPairs()
Gets a collection of collision index pairs for collision detection.
public IEnumerable<CollisionIndexPair> GetCollisionIndexPairs()
Returns
- IEnumerable<CollisionIndexPair>
A collection of CollisionIndexPair objects.
MakeXmlSource(string, string, bool)
Creates an XML representation of the object. This method may also generate additional resources such as related files.
public XElement MakeXmlSource(string baseDirectory, string relFile, bool exhibitionOnly)
Parameters
baseDirectory
stringThe base directory for resolving relative paths
relFile
stringThe relative file path for the XML source
exhibitionOnly
boolif true, the extended file creation is suppressed.
Returns
- XElement
An XML element representing the object's state
Remarks
For the demand of easy moving source folder (especially project folder) without configuration file path corruption, the relative file path is applied.
The baseDirectory
is typically the folder at the nearest configuration file folder.
Since the folder can be moving with the configuration file.