Class FreeformHolder
Represents a freeform tool holder with customizable geometry.
public class FreeformHolder : IHolder, ITopo, IGetAsmb, IGetAnchoredDisplayeeList, IAnchoredDisplayee, IDisplayee, IExpandToBox3d, IMakeXmlSource, IAbstractNote, IGetFletchBuckle, IDuplicate, INameNote, IAnchoredCollidabled, IGetCollidable, IGetAnchor, IGetTopoIndex, IGetSolid, IDisposable, IAnchoredCollidableLeaf, IAnchoredCollidableNode, IAnchoredCollidableBased, ICollidable, IClearCache
- Inheritance
-
FreeformHolder
- Implements
- Inherited Members
- Extension Methods
Constructors
FreeformHolder()
Ctor.
public FreeformHolder()
FreeformHolder(IStlSource)
Initializes a new instance of the FreeformHolder class from STL geometry.
public FreeformHolder(IStlSource geom)
Parameters
geom
IStlSourceThe STL geometry provider.
FreeformHolder(XElement, string, string)
Initializes a new instance of the FreeformHolder class from XML data.
public FreeformHolder(XElement src, string baseDirectory, string relFile)
Parameters
src
XElementThe XML element containing holder data
baseDirectory
stringBase directory path for resolving relative paths
relFile
stringRelative file path
Fields
XName
XML Name.
public static string XName
Field Value
Properties
AbstractNote
Gets a descriptive note or abstract about the object.
public string AbstractNote { get; }
Property Value
CollidableName
Gets the name of the collidable object.
public string CollidableName { get; }
Property Value
CollisionFlag
Gets or sets the collision flag.
public CollisionFlag CollisionFlag { get; set; }
Property Value
CutterBuckle
Gets the tail buckle (tool buckle) anchor point
public Anchor CutterBuckle { get; }
Property Value
Geom
Gets the transformation geometry. Internal Use Only.
public IStlSource Geom { get; set; }
Property Value
Remarks
Call UpdateByGeom() to keep state of Hi.NcMech.Holders.FreeformHolder.Solid if content modified.
GeomAnchor
Gets the geometry anchor point
public Anchor GeomAnchor { get; }
Property Value
GeomAnchorToSpindleBuckleBranch
Gets the branch from GeomAnchor to SpindleBuckle.
public Branch GeomAnchorToSpindleBuckleBranch { get; }
Property Value
GeomToCutterBranch
Gets the branch from GeomAnchor to CutterBuckle.
public Branch GeomToCutterBranch { get; }
Property Value
GeomToCutterTransformer
Gets or sets the transformer from geometry to tail (Cutter).
public ITransformer GeomToCutterTransformer { get; set; }
Property Value
GeomToSpindleTransformer
Gets or sets the transformer from geometry to base (Spindle)
public ITransformer GeomToSpindleTransformer { get; set; }
Property Value
Name
Gets or sets the name of the object.
public string Name { get; set; }
Property Value
Note
Gets or sets the descriptive note for the object.
public string Note { get; set; }
Property Value
PolarResolution2d
Gets or sets the polar resolution 2D settings.
public PolarResolution2d PolarResolution2d { get; set; }
Property Value
SpindleBuckle
Gets the base buckle (spindle buckle) anchor point
public Anchor SpindleBuckle { get; }
Property Value
Methods
ClearCache()
Clears any cached data held by the implementing object.
public void ClearCache()
Display(Bind)
Display function called in DispEngine rendering loop.
public void Display(Bind bind)
Parameters
bind
BindBind with DispEngine. See Bind.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Dispose(bool)
protected virtual void Dispose(bool disposing)
Parameters
disposing
bool
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
ExpandToBox3d(Box3d)
Expands the destination box. This function is usually used to compute the bounding box of elements.
public void ExpandToBox3d(Box3d dst)
Parameters
dst
Box3dDestination box
GetAnchor()
Get key anchor. (i.e. root anchor)
public Anchor GetAnchor()
Returns
- Anchor
key anchor
GetAnchoredCollidableNode()
Gets the anchored collidable node associated with this object.
public IAnchoredCollidableNode GetAnchoredCollidableNode()
Returns
- IAnchoredCollidableNode
The anchored collidable node.
GetAnchoredDisplayeeList()
Gets a list of anchored displayable objects.
public List<IAnchoredDisplayee> GetAnchoredDisplayeeList()
Returns
- List<IAnchoredDisplayee>
A list of IAnchoredDisplayee objects
GetAsmb()
Gets the key asmb.
public Asmb GetAsmb()
Returns
- Asmb
The key asmb.
GetCollidable()
Get ICollidable.
public ICollidable GetCollidable()
Returns
- ICollidable
The collidable object.
GetCollidableAnchor()
public Anchor GetCollidableAnchor()
Returns
GetCollidee()
Get ICollidee.
public ICollidee GetCollidee()
Returns
GetFletchBuckle()
Get fletch buckle anchor. the anchor that generally connect to fixed part such as ground and triggering(motor)-side.
public Anchor GetFletchBuckle()
Returns
- Anchor
buckle anchor
GetSolid()
Gets the solid geometry object.
public Solid GetSolid()
Returns
- Solid
The solid geometry object.
GetTailBuckle()
Cutter Buckle. Generally locate on free-end-side.
public Anchor GetTailBuckle()
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.
UpdateByGeom()
Call the function if the Geom content changed.
public void UpdateByGeom()