Prod.: Engine, ver.: 6020, ID: 60001206, Wish : I would like to light the center Osnap of a circle when the cursor is close to the center of the circle

Wish : I would like to light the center Osnap of a circle when the cursor is close to the center of the circle

Article60001206
TypeWish
ProductEngine
Version6020
Date Added8/20/2010
FixedYes [6/27/2011]
Submitted byFrancois Peens
Keywords

Subject

I would like to light the center Osnap of a circle when the cursor is close to the center of the circle

Summary

I would like to light the center Osnap of a circle when the cursor is close to the center of the circle

Solution

From version 6021 Vectordraw added a new feature for the following osnaps
Cen , Ins , inters , Per

When the cursor for example passes over a circle and ther cen osnaps is on then a small cross is drawn to the center of the circle. Then the user can go to that small cross and the osnap will light again and would be selectable. The same occurs with inserts and also with perpedicular osnaps and intersection.
The color of this small cross is the same as the Document.Osnapcolor , and its size depends on the Osnapsize property.

Also an enumerator and a property has been added as static to the BaseAction object. This property will give you the ability to set a value to select which of the above 4 Osnaps to add the extra Osnap help point.

The enumerator is the following
public enum OsnapCrossPointsAddenum
{

/// None.
NONE = 0,
/// The center Osnap cross point is added.
CENTER = OsnapMode.CEN,
/// The perpedicular Osnap cross point is added.
PERPEDICULAR = OsnapMode.PER,
/// The insert Osnap cross point is added.
INSERT = OsnapMode.INS,
/// The intersection Osnap cross point is added.
INTERSECTION = OsnapMode.INTERS,
/// Default value contains all the above value and all help osnap points are being added.
DEFAULT_ALL = (OsnapCrossPointsAddenum.CENTER | OsnapCrossPointsAddenum.INSERT | OsnapCrossPointsAddenum.INTERSECTION | OsnapCrossPointsAddenum.PERPEDICULAR),
}

And the property can be used as following
VectorDraw.Actions.BaseAction.OsnapCrossPointsAddvalue = VectorDraw.Actions.BaseAction.OsnapCrossPointsAddenum.CENTER | VectorDraw.Actions.BaseAction.OsnapCrossPointsAddenum.INSERT;
For this example we have enabled only the center and the insertion Osnaps to add this extra cross help point. For the other 2 ( Perpedicular and Intersection) this extra point will not be added.

Note that this property is not serialisable(saved) and has to be initialised to the application.