Class GeomStepUtil
Internal Use Only. One machining_geom_step__run call over the gated tree (play-core migration P13):
the subtraction worker's body – the quota gate, the cut by the operand the sweep produced, the strip
position's attachment and its node-map shrink, the contour products, the engagement and the byte
products – in one crossing where the worker crossed fifteen times per step. This class resolves what only
the managed side knows – the tree's handle under its gate, the attachment's, the operand's kind and
handle – and keeps today's exceptions on today's conditions (D11); the physics gating, the frame and the
scalars are the caller's (GeomStepRequest).
public static class GeomStepUtil
- Inheritance
-
GeomStepUtil
- Inherited Members
Methods
BuildSubstraction(GeomStepProducts, in GeomStepAnswer, int)
Internal Use Only. The managed Substraction of one geometry step, built from the native
bytes and today's object field for field (D3): null when the call made no subtraction (mode 0); a
touched step through Substraction(BinaryReader) over the kind-0 bytes (the
Substraction.WriteBin layout); an untouched step through the object constructor with the area the
call answered and an empty contour list (never null: today's object holds the parsed buffer of zero
contours), or – should the cut ever answer untouched with contours – the contours read from the
kind-2 buffer. StepIndex is stepIndex on every path.
public static Substraction BuildSubstraction(GeomStepProducts products, in GeomStepAnswer answer, int stepIndex)
Parameters
productsGeomStepProductsThe products Run(CubeTree, CbtrPickable, GeomBoolCache, ref GeomStepRequest, double[], double[], double[], out GeomStepAnswer) answered; may be null when
answersays no subtraction.answerGeomStepAnswerWhat the call answered.
stepIndexintThe strip position's index: the object's StepIndex.
Returns
- Substraction
The substraction object, or null for no subtraction.
Exceptions
- InvalidOperationException
The answer says a subtraction was made but
productsis null: core.dll and HiCbtr disagree.
ForceStatus(int)
Internal Use Only. A test seam (D19): while the returned scope is open on this thread, every
Run(CubeTree, CbtrPickable, GeomBoolCache, ref GeomStepRequest, double[], double[], double[], out GeomStepAnswer) on it takes the tree's gate and fills the handles as it does for a call, then
answers status with a zero GeomStepAnswer and makes no native call –
so the shell's reading of a status (1 throws UnauthorizedAccessException, an unknown one
InvalidOperationException) is pinned without a core that answers it. Dispose puts back
the value the scope found, on the same thread: xUnit reuses its pool threads between classes.
public static IDisposable ForceStatus(int status)
Parameters
statusintThe status the next Run(CubeTree, CbtrPickable, GeomBoolCache, ref GeomStepRequest, double[], double[], double[], out GeomStepAnswer) calls on this thread answer.
Returns
- IDisposable
The scope; dispose it on the thread that opened it.
Run(CubeTree, CbtrPickable, GeomBoolCache, ref GeomStepRequest, double[], double[], double[], out GeomStepAnswer)
Internal Use Only. One machining_geom_step__run call over tree (play-core
migration P13). Under the tree's read gate (CubeTree.EnterTree, taken once around the call;
a disposed tree answers null with a zero answer and makes no call – the “no tree”
path, as CubeTree.Substract answers null) the handles are read into request:
the tree's, the attachment's (0 for none) and the operand's – a null operand is
mode 0 (no cut, the attach alone), CachedTris mode 1 with the cached
triangles' handle (0 for the empty cut), StickConvex mode 2 with the
share's handle and ConvexTransformation. The other fields of
request are the caller's and are passed as they are. The export runs the quota gate,
the cut, the attach and the node-map shrink, the products and the byte products in one crossing
(GeomStepRequest, GeomStepAnswer); the caller fetches the bytes through the
returned products (BuildSubstraction(GeomStepProducts, in GeomStepAnswer, int), GetBytes(int, int)) and
disposes them – or hands them to the force step when answer says
has_engagement. The operand's resources (the cached triangles, the convex share) are the
caller's to dispose after the call; the attachment and the operand are kept reachable across it.
public static GeomStepProducts Run(CubeTree tree, CbtrPickable attachment, GeomBoolCache operand, ref GeomStepRequest request, double[] zKeys, double[] zDzs, double[] zrZ, out GeomStepAnswer answer)
Parameters
treeCubeTreeThe workpiece's cube tree; never null.
attachmentCbtrPickableThe step's strip position, whose attachment the cut's nodes take and whose node map the call shrinks; null for no attach.
operandGeomBoolCacheThe removal operand the sweep produced; null for no cutter (mode 0).
requestGeomStepRequestThe caller's fields filled; the handles, the mode and the convex matrix are written here under the gate.
zKeysdouble[]The step's flute list keys at the workpiece resolution; null or empty for none.
zDzsdouble[]The step's flute list values, one per key.
zrZdouble[]The cutter's ZR z list ascending from the tip; null or empty for none.
answerGeomStepAnswerWhat the call answered; zero for a disposed tree and for a forced status.
Returns
- GeomStepProducts
The products to fetch the bytes from and to dispose, or null when there is nothing to fetch (mode 0, a disposed tree).
Exceptions
- UnauthorizedAccessException
Status 1: the cube-tree quota reads 0 remaining steps (
CubeTree.Substract's refusal, R1); nothing was cut.- ObjectDisposedException
The operand's stick-convex share was already given back (its pointer reads Zero): nothing is handed to the native side.
- NotImplementedException
The operand's GeomBoolCacheEnum is unknown.
- InvalidOperationException
The export answered a status other than 0 and 1: core.dll and HiCbtr disagree, and
answeris not read.- ArgumentException
zKeysandzDzsdiffer in length, oroperand's PreferredCubeWidth is notrequest.resolution (the operand's width is the cut's).