ManualArrangeSwitchCutOrientation


Name


            ManualArrangeSwitchCutOrientation


When to use it


            When the optimization process is NOT running.

            NOT during the OnFinish or OnAfterManualArrange event.

            After all other information has been set.


Prototype


    HRESULT ManualArrangeSwitchCutOrientation(

            IndexCut: long/*[in]*/,

            X: long /*[in]*/,

            Y: long /*[in]*/,

            AllowSwitchOrientation: long/*[out]*/

    );


Explanations


            Switch the orientation of a cut as shown in the picture below.


            Two perpendicular cuttings are required for performing a switch. However, since the user might have difficulties in selecting two perpendicular cuts, the method requires only a cut and a point. The component will search for the nearest cut next to the given point and which is perpendicular to the given cut.


            Switch cut orientation does different things in different situations. It may glue 2 cuts (see top part of the picture) or can prolong an existing cut (see bottom part of the picture).

Switch_orientation

Parameters


            - IndexCut - the index of the cut to be switched.

            - X, Y - the coordinates of the point next which will decide the second cut (if this exists) required for performing the switch cut operation.

            - AllowSwitchOrientation - returns 1 if the cut can be switched and 0 otherwise.


See also


        How to arrange pieces manually, ManualArrangeIsValidSwitchCutOrientation, OnAfterManualArrange.



Links

       back to index

       www.optimalprograms.com