size of entities

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
Khyati
Posts: 34
Joined: 08 Feb 2011, 08:55

size of entities

Post by Khyati » 12 Apr 2011, 05:53

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!

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Re: size of entities

Post by support » 12 Apr 2011, 15:16

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.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Khyati
Posts: 34
Joined: 08 Feb 2011, 08:55

Re: size of entities

Post by Khyati » 14 Apr 2011, 06:37

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.

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Re: size of entities

Post by support » 14 Apr 2011, 12:44

Hello.
Point display size specifies size of point representation in drawing coordinates. So, point visualization affected by zooming.

Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply