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, IDuplicate, IClearCache
- Inheritance
-
CustomSpinningProfile
- Implements
- Inherited Members
- Extension Methods
Constructors
CustomSpinningProfile(IGetStl)
Initializes a new instance of the CustomSpinningProfile class.
public CustomSpinningProfile(IGetStl geom)
Parameters
geomIGetStlThe geometry that defines the profile.
CustomSpinningProfile(XElement, string, IProgress<IMessage>, object[])
Initializes a new instance of the CustomSpinningProfile class.
public CustomSpinningProfile(XElement element, string baseDirectory, IProgress<IMessage> progress, object[] res)
Parameters
elementXElementThe XML element containing profile data.
baseDirectorystringThe base directory for resolving relative paths.
progressIProgress<IMessage>Progress reporter for diagnostic messages emitted during construction.
resobject[]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
XName
Name for XML IO.
public static string XName { get; }
Property Value
Methods
ClearCache()
Drops the mesh fallback's cached contour (GetZrList()); a geometry's own contour is never cached here.
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
resobject[]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)
Generates a new STL.
public Stl GenStl(IPolarResolution2d resolution)
Parameters
resolutionIPolarResolution2dPolar resolution
Returns
- Stl
A newly created STL.
GetZrList()
Gets the ZR contour list for the profile: the geometry's own when it states one (an IGetZrList or IGetZrContour geometry, directly or inside a TransformationGeom with no transformer or the identity), read live; otherwise the radial envelope of its mesh (GetZrList(IEnumerable<tri3d_t>)) – a step level at its height, a bore inside the body invisible – read once per geometry and kept until ClearCache(). A geometry edited in place owes the cutter a ClearCache(), as every edit does; a geometry swapped through Geom is read afresh by itself.
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
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.
Reg(XFactory)
Registers this type's deserializer with the given XFactory
(or Default when factory is
null). Idempotent.
public static void Reg(XFactory factory = null)
Parameters
factoryXFactory