Table of Contents

Class Substraction

Namespace
Hi.Cbtr
Assembly
HiCbtr.dll

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

unmanagedSubstraction UnmanagedSubstraction

The 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

isTouched bool

IsTouched.

contactContoursArea double

ContactContoursArea.

contactContours List<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

reader BinaryReader

The 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

List<List<vec3d_t>>

ContactContoursArea

Gets the area of the contact contours.

public double ContactContoursArea { get; init; }

Property Value

double

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

bool

StepIndex

Step index. For database saving.

[Key]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public int StepIndex { get; set; }

Property Value

int

Methods

ContactContoursReadBin(BinaryReader)

Reads contact contours from a binary reader.

public static List<List<vec3d_t>> ContactContoursReadBin(BinaryReader reader)

Parameters

reader BinaryReader

The binary reader to read from.

Returns

List<List<vec3d_t>>

A list of contact contour lists.

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

contactContours List<List<vec3d_t>>

The contact contours to write.

writer BinaryWriter

The binary writer to write to.

Display(Bind)

Display function called in DispEngine rendering loop.

public void Display(Bind bind)

Parameters

bind Bind

Bind 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

dst box3d_t

Destination box, expanded in place

WriteBin(BinaryWriter)

Writes the object's data to a binary stream.

public void WriteBin(BinaryWriter writer)

Parameters

writer BinaryWriter

The binary writer to write to