Table of Contents

Class ClStrip

Namespace
Hi.CutterLocations.ClStrips
Assembly
HiMech.dll

Represents a CL (Cutter Location) strip for 3D display. This class manages the display and interaction of cutter location points and lines.

public class ClStrip : IDisplayee, IExpandToBox3d, IDisposable
Inheritance
ClStrip
Implements
Inherited Members
Extension Methods

Constructors

ClStrip(int)

Initializes a new instance of the ClStrip class.

public ClStrip(int cap = 2048)

Parameters

cap int

The initial capacity of the strip

Fields

slice_distance

The distance between slices for efficient rendering.

public const int slice_distance = 8192

Field Value

int

Properties

AbsDispEnd

Gets the absolute display end position. If the display end is set to -1, returns the total number of positions.

public int AbsDispEnd { get; }

Property Value

int

CallRefreshDrawing

internal use

public bool CallRefreshDrawing { get; }

Property Value

bool

IsShowDot

Gets or sets whether to display dots at each position.

public bool IsShowDot { get; set; }

Property Value

bool

StripPoses

Gets the list of strip positions. Do not add or remove elements directly.

public SynList<ClStripPos> StripPoses { get; }

Property Value

SynList<ClStripPos>

StripPosesClearLock

Gets the lock for thread-safe operations on strip positions.

public ReaderWriterLockSlim StripPosesClearLock { get; }

Property Value

ReaderWriterLockSlim

StripPosesCount

Gets the thread-safe count of strip positions.

public int StripPosesCount { get; }

Property Value

int

Methods

Add(object, DVec3d)

Adds a new position to the strip.

public ClStripPos Add(object state, DVec3d programCl)

Parameters

state object

The state object associated with the position

programCl DVec3d

The cutter location

Returns

ClStripPos

The newly created strip position

Clear(object)

Clears all strip positions and resets the display state.

public void Clear(object sender)

Parameters

sender object

The object that initiated this clear operation

Display(Bind)

Displays the strip.

public void Display(Bind bind)

Parameters

bind Bind

The binding context for display

Dispose()

Disposes of the resources used by this strip.

public void Dispose()

Dispose(bool)

Disposes of the resources used by this strip.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

Whether this is being called from Dispose

ExpandToBox3d(Box3d)

Expands the given box to include all strip positions.

public void ExpandToBox3d(Box3d dst)

Parameters

dst Box3d

The box to expand

GetDispBegin()

Gets the current display begin position.

public int GetDispBegin()

Returns

int

The display begin position

GetDispEnd()

Gets the current display end position. A value of -1 indicates that the display should follow the end of the strip.

public int GetDispEnd()

Returns

int

The display end position

GetEnteredPos()

Gets the currently entered position.

public ClStripPos GetEnteredPos()

Returns

ClStripPos

The entered position

GetScaledFittingViewByStripDispRange(Mat4d, Mat4d)

Gets a scaled fitting view based on the strip display range.

public Mat4d GetScaledFittingViewByStripDispRange(Mat4d sketchView, Mat4d clStripZeroToRoot = null)

Parameters

sketchView Mat4d

The sketch view matrix

clStripZeroToRoot Mat4d

The transformation from strip zero to root

Returns

Mat4d

The scaled fitting view matrix

GetSelectedPos()

Gets the currently selected position.

public ClStripPos GetSelectedPos()

Returns

ClStripPos

The selected position

GetStripPos(int, bool)

Gets a strip position by index.

public ClStripPos GetStripPos(int index, bool isLocked = false)

Parameters

index int

The index of the position

isLocked bool

Whether the strip positions are already locked

Returns

ClStripPos

The strip position at the specified index

RefreshDrawing()

Marks the drawing for refresh.

public void RefreshDrawing()

RefreshDrawingInRendering(bool)

internal use

public void RefreshDrawingInRendering(bool isLocked)

Parameters

isLocked bool

SetDispBegin(int, object)

Sets the display begin position.

public void SetDispBegin(int value, object caller)

Parameters

value int

The new display begin position

caller object

The object that initiated this change

SetDispEnd(int, object)

Sets the display end position. A value of -1 indicates that the display should follow the end of the strip.

public void SetDispEnd(int value, object caller)

Parameters

value int

The new display end position

caller object

The object that initiated this change

SetEnteredPos(ClStripPos, object)

Sets the currently entered position.

public void SetEnteredPos(ClStripPos value, object sender)

Parameters

value ClStripPos

The new entered position

sender object

The object that initiated this change

SetSelectedPos(ClStripPos, object)

Sets the currently selected position.

public void SetSelectedPos(ClStripPos value, object sender)

Parameters

value ClStripPos

The new selected position

sender object

The object that initiated this change

ShrinkAttachmentMemory()

Shrinks the attachment memory for all positions.

public void ShrinkAttachmentMemory()

StripPosesThreadSafeSelect<T>(Func<ClStripPos, T>)

Thread-safe selection of strip positions.

public List<T> StripPosesThreadSafeSelect<T>(Func<ClStripPos, T> func)

Parameters

func Func<ClStripPos, T>

The function to transform each strip position

Returns

List<T>

A list of transformed strip positions

Type Parameters

T

The type of the selected data

Events

AbsDispEndChanged

Event raised when the absolute display end position changes.

public event EventHandler AbsDispEndChanged

Event Type

EventHandler

DispBeginChanged

Event raised when the display begin position changes.

public event EventHandler DispBeginChanged

Event Type

EventHandler

DispEndChanged

Event raised when the display end position changes.

public event EventHandler DispEndChanged

Event Type

EventHandler

DrawingRefreshing

Event raised when the drawing is being refreshed.

public event EventHandler DrawingRefreshing

Event Type

EventHandler

PosAdded

Event raised when a new position is added to the strip.

public event Action<ClStripPos> PosAdded

Event Type

Action<ClStripPos>

PosEntered

Event raised when the mouse enters a position.

public event EventHandler<ClStripPos> PosEntered

Event Type

EventHandler<ClStripPos>

PosSelected

Event raised when a position is selected.

public event EventHandler<ClStripPos> PosSelected

Event Type

EventHandler<ClStripPos>

StaticPosSelected

Static event raised when any position is selected.

public static event EventHandler<ClStripPos> StaticPosSelected

Event Type

EventHandler<ClStripPos>