Class ShiftedWorkingContour
- Namespace
- Hi.Milling.FluteContours
- Assembly
- HiMech.dll
Represents a working contour that has been shifted by a specified angle. This class wraps another working contour and applies an angular transformation to it.
public class ShiftedWorkingContour : IWorkingContour, IExpandToBox3d, IMakeXmlSource, IEquatable<ShiftedWorkingContour>
- Inheritance
-
ShiftedWorkingContour
- Implements
- Inherited Members
- Extension Methods
Constructors
ShiftedWorkingContour()
Initializes a new instance of the ShiftedWorkingContour class
public ShiftedWorkingContour()
ShiftedWorkingContour(double, IWorkingContour)
Initializes a new instance of the ShiftedWorkingContour class with a specified shift angle and baseline contour
public ShiftedWorkingContour(double shiftAngle_rad, IWorkingContour baselineWorkingContour)
Parameters
shiftAngle_rad
doubleThe shift angle in radians
baselineWorkingContour
IWorkingContourThe baseline working contour to be shifted
ShiftedWorkingContour(XElement, string, IWorkingContour)
Initializes a new instance of the ShiftedWorkingContour class from XML data
public ShiftedWorkingContour(XElement src, string baseDirectory, IWorkingContour baselineWorkingContour)
Parameters
src
XElementThe source XML element
baseDirectory
stringThe base directory for resolving relative paths
baselineWorkingContour
IWorkingContourThe baseline working contour to be shifted
Properties
BaselineWorkingContour
Gets or sets the baseline working contour that is being shifted
public IWorkingContour BaselineWorkingContour { get; set; }
Property Value
KeyRange
Gets the key range of the baseline working contour
public Range<double> KeyRange { get; }
Property Value
ShiftAngle_deg
Gets or sets the shift angle in degrees
public double ShiftAngle_deg { get; set; }
Property Value
ShiftAngle_rad
Gets or sets the shift angle in radians
public double ShiftAngle_rad { get; set; }
Property Value
XName
Gets the XML name for serialization
public static string XName { get; }
Property Value
Methods
Duplicate(IGetZrList)
Creates a duplicate of this contour with a new Z-radius list provider.
public IWorkingContour Duplicate(IGetZrList zrList)
Parameters
zrList
IGetZrListThe Z-radius list provider for the duplicate.
Returns
- IWorkingContour
A new instance of ShiftedWorkingContour.
Equals(ShiftedWorkingContour)
Determines whether the specified ShiftedWorkingContour is equal to the current ShiftedWorkingContour
public bool Equals(ShiftedWorkingContour contour)
Parameters
contour
ShiftedWorkingContourThe ShiftedWorkingContour to compare with the current ShiftedWorkingContour
Returns
- bool
true if the specified ShiftedWorkingContour is equal to the current ShiftedWorkingContour; 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 shifted working 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
GetSpanContourPosList()
Gets the list of span contour positions after applying the shift transformation
public List<SpanContourPos4d> GetSpanContourPosList()
Returns
- List<SpanContourPos4d>
A list of transformed span contour positions
MakeXmlSource(string, string)
Creates an XML element representing this shifted working 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 shifted working contour data
Operators
operator ==(ShiftedWorkingContour, ShiftedWorkingContour)
Determines whether two ShiftedWorkingContour instances are equal
public static bool operator ==(ShiftedWorkingContour left, ShiftedWorkingContour right)
Parameters
left
ShiftedWorkingContourThe first ShiftedWorkingContour to compare
right
ShiftedWorkingContourThe second ShiftedWorkingContour to compare
Returns
- bool
true if the specified ShiftedWorkingContour instances are equal; otherwise, false
operator !=(ShiftedWorkingContour, ShiftedWorkingContour)
Determines whether two ShiftedWorkingContour instances are not equal
public static bool operator !=(ShiftedWorkingContour left, ShiftedWorkingContour right)
Parameters
left
ShiftedWorkingContourThe first ShiftedWorkingContour to compare
right
ShiftedWorkingContourThe second ShiftedWorkingContour to compare
Returns
- bool
true if the specified ShiftedWorkingContour instances are not equal; otherwise, false