Page 1 of 1

size of entities

Posted: 12 Apr 2011, 05:53
by Khyati
Hello,

Please look into following with programmatic concern:

1) how a circle's size can be made unchangeable? i mean, user can't change its radius. yes, user can move it, but not can't change its area. Which methods / property is useful for this?

2) How to draw a point? How can we change its size? Are there any draw style for points, like circle, circle with plus, circle with cross etc? (this is very basic CAD requirement. please dont say, 'not available'!!)

Thanks!

Re: size of entities

Posted: 12 Apr 2011, 15:16
by support
Hello.
There is no provided methods or properties for such functionality. It require some coding in application. For example Editor demo project:

Code: Select all

public bool ChangeEntityOnMouseMove(Point pt)
{
	#region Professional
#if Professional
	if (this.cadImage.SelectedEntities.Count != 0)
	{
		if (this.CreateNewEntity) return true;
		if (cadImage.CurrentMarker != null)
		{
			if (cadImage.CurrentMarker.Entity.EntType != EntityType.Circle)
			{
				ChangeMarkerPosition(pt.X, pt.Y);
				return true;
			}
			else if (cadImage.CurrentMarker.Index == 0)
			{
				ChangeEntityPositionExt(pt.X, pt.Y);
				return true;
			}
		}
		else
		{
			ChangeEntityPositionExt(pt.X, pt.Y);
			return true;
		}				
	}		
#endif		
	#endregion
	return false;
}
The snippet to add point:

Code: Select all

	CADPoint pt = new CADPoint();
	pt.Point = new DPoint(100, 100, 0);
	pt.Loaded(cadImage.Converter);
	cadImage.Converter.OnCreate(pt);
	cadImage.CurrentLayout.AddEntity(pt);
	cadPictBox.Invalidate();
CAD Import .NET allows set draw style for points. Please set CADImage.Converter.HeadStruct.PointDisplayMode and CADImage.Converter.HeadStruct.PointDisplaySize fields.

Alexander.

Re: size of entities

Posted: 14 Apr 2011, 06:37
by Khyati
thanks!

Pointmode and pointsize are working.
My pointsize is increasing with zoom-in. I want to keep point size same for all time, whether zoom-in or zoom-out.

Re: size of entities

Posted: 14 Apr 2011, 12:44
by support
Hello.
Point display size specifies size of point representation in drawing coordinates. So, point visualization affected by zooming.

Alexander.