Class CustomSpinningProfile
Represents a custom spinning profile for a milling cutter. This profile allows for custom geometry to be used as the cutter profile.
public class CustomSpinningProfile : IShaperProfile, IMakeXmlSource, IAbstractNote, IGetZrList, IGenStl, IGetStl, IDuplicate, IClearCache, IPolarResolution2dSourceProperty
- Inheritance
-
CustomSpinningProfile
- Implements
- Inherited Members
- Extension Methods
Constructors
CustomSpinningProfile(IGetStl)
Ctor
public CustomSpinningProfile(IGetStl geom)
Parameters
geom
IGetStl
CustomSpinningProfile(XElement, string, params object[])
Initializes a new instance of the CustomSpinningProfile class.
public CustomSpinningProfile(XElement element, string baseDirectory, params object[] res)
Parameters
element
XElementThe XML element containing profile data.
baseDirectory
stringThe base directory for resolving relative paths.
res
object[]Additional resolution parameters.
Properties
AbstractNote
Gets the abstract note describing the profile.
public string AbstractNote { get; }
Property Value
Geom
Gets or sets the geometry that defines the profile.
public IGetStl Geom { get; set; }
Property Value
PolarResolution2dSource
public Func<IPolarResolution2d> PolarResolution2dSource { get; set; }
Property Value
XName
Name for XML IO.
public static string XName { get; }
Property Value
Methods
ClearCache()
Clears any cached data.
public void ClearCache()
Duplicate(params object[])
Creates a deep copy of the object, excluding any source file references.
public object Duplicate(params object[] res)
Parameters
res
object[]Optional parameters that may be needed during the duplication process
Returns
- object
A new instance that is a deep copy of the original object
GenStl(IPolarResolution2d)
Generate a new Stl.
public Stl GenStl(IPolarResolution2d resolution)
Parameters
resolution
IPolarResolution2d
Returns
- Stl
newly created Stl
GetStl()
Gets the STL mesh representation of the profile.
public Stl GetStl()
Returns
- Stl
The STL mesh
GetZrList()
Gets the ZR contour list for the profile. This method attempts to get the ZR list from various geometry types.
public List<PairZr> GetZrList()
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
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.