Adding entity into another entity
Moderators: SDS, support, admin
Adding entity into another entity
Hello,
how can I do the following:
There' a drawing with a closed polyline and I schould add a rectangle inside this polygone.
- Is it possibile to add an entity inside another entity, e.g. entity.AddEntity(). - If I use AddEntity i can't see the rectangle.
- Is there a method / class which can tell me if an entity fits inside another one / if two lines are crossing.
Thank you
Roman
how can I do the following:
There' a drawing with a closed polyline and I schould add a rectangle inside this polygone.
- Is it possibile to add an entity inside another entity, e.g. entity.AddEntity(). - If I use AddEntity i can't see the rectangle.
- Is there a method / class which can tell me if an entity fits inside another one / if two lines are crossing.
Thank you
Roman
Re: Adding entity into another entity
Hello Roman.
Entity placement on drawing defined by coordinates. Rectangle inside closed polyline doesn't belong to polyline's child entities but the separate entity. Just create new CADPolyLine or CADLWPolyLine object with correspond coordinates:
There isn't any provided method to check entities placement/crossing. Such functionality can be realized using entities properties.
Alexander.
Entity placement on drawing defined by coordinates. Rectangle inside closed polyline doesn't belong to polyline's child entities but the separate entity. Just create new CADPolyLine or CADLWPolyLine object with correspond coordinates:
Code: Select all
if (this.cadImage == null)
{
this.cadImage = new CADImage();
this.cadImage.InitialNewImage();
}
this.cadImage.UseDoubleBuffering = false;
CADLWPolyLine Poly = new CADLWPolyLine();
Poly.Closed = true;
Poly.Color = Color.Red;
CADVertex Vert = new CADVertex();
Vert.Point = new DPoint(0, 0, 0);
Poly.AddEntity(Vert);
Vert = new CADVertex();
Vert.Point = new DPoint(100, 0, 0);
Poly.AddEntity(Vert);
Vert = new CADVertex();
Vert.Point = new DPoint(100, 100, 0);
Poly.AddEntity(Vert);
Vert = new CADVertex();
Vert.Point = new DPoint(0, 100, 0);
Poly.AddEntity(Vert);
Poly.Loaded(this.cadImage.Converter);
this.cadImage.Converter.OnCreate(Poly);
this.cadImage.CurrentLayout.AddEntity(Poly);
this.cadPictBox.Invalidate();
Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support