Class Substraction
Represents the result of a volume subtraction operation.
public class Substraction : IWriteBin, IDisplayee, IExpandToBox3d
- Inheritance
-
Substraction
- Implements
- Inherited Members
- Extension Methods
Constructors
Substraction()
Ctor. for Entity Framework.
public Substraction()
Substraction(UnmanagedSubstraction)
Initializes a new instance of the Substraction class from an unmanaged substraction.
public Substraction(UnmanagedSubstraction unmanagedSubstraction)
Parameters
unmanagedSubstractionUnmanagedSubstractionThe unmanaged substraction to copy data from.
Substraction(bool, double, List<List<vec3d_t>>)
Internal Use Only. The object the geometry step's shell builds for a cut that did not touch
(play-core migration P13, GeomStepUtil.BuildSubstraction): the flag, the area the call
answered and the contour list – an empty list for no contours, never null, as the object built
from an UnmanagedSubstraction holds the parsed buffer of zero contours (the replay
goldens count it). StepIndex is the caller's to set.
public Substraction(bool isTouched, double contactContoursArea, List<List<vec3d_t>> contactContours)
Parameters
isTouchedboolcontactContoursAreadoublecontactContoursList<List<vec3d_t>>ContactContours; an empty list for none.
Substraction(BinaryReader)
Initializes a new instance of the Substraction class from a binary reader.
public Substraction(BinaryReader reader)
Parameters
readerBinaryReaderThe binary reader to read data from.
Properties
ContactContours
Gets or sets the contact contours on workpiece coordinate.
public List<List<vec3d_t>> ContactContours { get; }
Property Value
ContactContoursArea
Gets the area of the contact contours.
public double ContactContoursArea { get; init; }
Property Value
ContactContoursByteArray
Gets or sets the byte array representation of the contact contours.
public byte[] ContactContoursByteArray { get; set; }
Property Value
- byte[]
IsTouched
Gets a value indicating whether the cutter and workpiece touched.
public bool IsTouched { get; init; }
Property Value
StepIndex
Step index. For database saving.
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public int StepIndex { get; set; }
Property Value
Methods
ContactContoursReadBin(BinaryReader)
Reads contact contours from a binary reader.
public static List<List<vec3d_t>> ContactContoursReadBin(BinaryReader reader)
Parameters
readerBinaryReaderThe binary reader to read from.
Returns
ContactContoursWriteBin(List<List<vec3d_t>>, BinaryWriter)
Writes contact contours to a binary writer.
public static void ContactContoursWriteBin(List<List<vec3d_t>> contactContours, BinaryWriter writer)
Parameters
contactContoursList<List<vec3d_t>>The contact contours to write.
writerBinaryWriterThe binary writer to write to.
Display(Bind)
Display function called in DispEngine rendering loop.
public void Display(Bind bind)
Parameters
bindBindBind with DispEngine. See Bind.
ExpandToBox3d(ref box3d_t)
Expands the destination box.
This function is usually used to compute the bounding box of elements.
box3d_t is a value type, so the destination is passed by reference
(the C++ expand_to_box3d(box3&) shape); an implementation writes
dst = dst.Expanded(...) or forwards ref dst to its parts.
public void ExpandToBox3d(ref box3d_t dst)
Parameters
dstbox3d_tDestination box, expanded in place
WriteBin(BinaryWriter)
Writes the object's data to a binary stream.
public void WriteBin(BinaryWriter writer)
Parameters
writerBinaryWriterThe binary writer to write to