Class FreeContourTray
- Namespace
- Hi.Milling.FluteContours
- Assembly
- HiMech.dll
Represents a container for multiple flute contours with free arrangement.
public class FreeContourTray : IContourTray, IMakeXmlSource, IExpandToBox3d, IUpdateByContent, IClearCache, IGetFluteNum
- Inheritance
-
FreeContourTray
- Implements
- Inherited Members
- Extension Methods
Remarks
This class provides a flexible way to manage multiple flute contours:
- Supports XML serialization for data persistence
- Allows arbitrary arrangement of flute contours
- Implements IContourTray for standard contour tray functionality
Constructors
FreeContourTray()
Initializes a new instance of the FreeContourTray class
public FreeContourTray()
FreeContourTray(XElement, string, params object[])
Initializes a new instance of the FreeContourTray class from XML data
public FreeContourTray(XElement src, string baseDirectory, params object[] res)
Parameters
srcXElementThe source XML element containing the contour tray data
baseDirectorystringThe base directory for resolving relative paths
resobject[]Additional resources for initialization
Properties
ContourList
Gets or sets the list of flute contours in this tray
public List<FluteContour> ContourList { get; set; }
Property Value
XName
Gets the XML name for serialization
public static string XName { get; }
Property Value
XmlSourceFile
public string XmlSourceFile { get; set; }
Property Value
Methods
ClearCache()
Clears any cached data held by the implementing object.
public void ClearCache()
Duplicate(IGetZrList)
Creates a duplicate of this contour tray
public IContourTray Duplicate(IGetZrList zrListHost)
Parameters
zrListHostIGetZrListThe host containing Z-R list information
Returns
- IContourTray
A new instance of FreeContourTray with the same properties
ExpandToBox3d(Box3d)
Expands the destination box. This function is usually used to compute the bounding box of elements.
public void ExpandToBox3d(Box3d dst)
Parameters
dstBox3dDestination box
GetFluteContourList()
Gets the list of flute contours contained in this tray.
public List<FluteContour> GetFluteContourList()
Returns
- List<FluteContour>
A list of flute contours.
GetFluteNum()
Gets the number of flutes in the contour tray.
public int GetFluteNum()
Returns
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
baseDirectorystringThe base directory for resolving relative paths
relFilestringThe relative file path for the XML source
exhibitionOnlyboolif 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.
UpdateByContent()
Updates the object based on its current content.
public void UpdateByContent()