Class FreeformSideContour
- Namespace
- Hi.Milling.FluteContours
- Assembly
- HiMech.dll
Represents a freeform side contour for milling tools, allowing arbitrary contour shapes.
public class FreeformSideContour : ISideContour, IWorkingContour, IExpandToBox3d, IMakeXmlSource, IUpdateByContent, IClearCache, IEquatable<FreeformSideContour>
- Inheritance
-
FreeformSideContour
- Implements
- Inherited Members
- Extension Methods
Remarks
This class provides a flexible way to define side contours with custom shapes:
- Implements ISideContour for basic side contour functionality
- Supports XML serialization for data persistence
- Maintains a list of contour positions ordered by Z-coordinate
Constructors
FreeformSideContour()
Initializes a new instance of the FreeformSideContour class
public FreeformSideContour()
FreeformSideContour(XElement, string)
Initializes a new instance of the FreeformSideContour class from XML data
public FreeformSideContour(XElement src, string baseDirectory)
Parameters
src
XElementThe source XML element containing the contour data
baseDirectory
stringThe base directory for resolving relative paths
Properties
KeyRange
Gets the Z-value range (height range) of the contour
public Range<double> KeyRange { get; }
Property Value
Remarks
The range is calculated from the first and last points in the SpanContourPosList, which are ordered by Z-coordinate
SpanContourPosList
Gets or sets the list of contour positions ordered by Z-coordinate
public List<SpanContourPos4d> SpanContourPosList { get; set; }
Property Value
Remarks
Each position in the list represents a point on the contour with its associated geometric and angular properties
XName
Gets the XML name for serialization
public static string XName { get; }
Property Value
Methods
ClearCache()
Clears the cached key range value
public void ClearCache()
Duplicate(IGetZrList)
Creates a duplicate of this freeform side contour
public IWorkingContour Duplicate(IGetZrList zrListHost)
Parameters
zrListHost
IGetZrListThe host containing Z-R list information
Returns
- IWorkingContour
A new instance of FreeformSideContour with the same properties
Equals(FreeformSideContour)
Determines whether the specified FreeformSideContour is equal to the current FreeformSideContour
public bool Equals(FreeformSideContour other)
Parameters
other
FreeformSideContourThe FreeformSideContour to compare with the current FreeformSideContour
Returns
- bool
true if the specified FreeformSideContour is equal to the current FreeformSideContour; otherwise, false
Equals(object)
Determines whether the specified object is equal to the current object
public override bool Equals(object obj)
Parameters
obj
objectThe object to compare with the current object
Returns
- bool
true if the specified object is equal to the current object; otherwise, false
ExpandToBox3d(Box3d)
Expands the given bounding box to include this contour
public void ExpandToBox3d(Box3d dst)
Parameters
dst
Box3dThe bounding box to expand
GetHashCode()
Returns a hash code for this instance
public override int GetHashCode()
Returns
- int
A hash code value based on the contour positions
GetSpanContourPosList()
Gets the list of span contour positions that define the contour geometry
public List<SpanContourPos4d> GetSpanContourPosList()
Returns
- List<SpanContourPos4d>
The list of contour positions ordered by Z-coordinate
MakeXmlSource(string, string)
Creates an XML element representing this freeform side contour
public XElement MakeXmlSource(string baseDirectory, string relFile)
Parameters
baseDirectory
stringThe base directory for resolving relative paths
relFile
stringThe relative file path
Returns
- XElement
An XML element containing the contour data
UpdateByContent()
Updates the contour's internal state based on its current content
public void UpdateByContent()