.NET
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
does working SelectWind owPolygon just with 4 points ?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
inside this area i have a circle..
lpt.Add(new Point3d(5.0, 5.0, 0.0));
lpt.Add(new Point3d(13.0, 15.0, 0.0));
lpt.Add(new Point3d(12.0, 9.0, 0.0));
lpt.Add(new Point3d(5.0, 12.0, 0.0));
lpt.Add(new Point3d(5.0, 5.0, 0.0));
// if I add the red row SelectWindowPolygon return Error. without this its return the objects.
PromptSelectionOptions Opts = new PromptSelectionOptions();
Editor ed = Autodesk.AutoCAD.ApplicationServices.Application.D
Point3dCollection Polygon = new Point3dCollection(lpt.ToArray());
PromptSelectionResult res = ed.SelectWindowPolygon(Polygon);
maybe I'm a stupid...but I guess that a polygon could be have more then 4 vertex..
Re: does working SelectWind owPolygon just with 4 points ?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
SelectWindowPolygon()'s argument Point3dCollection can contains 3 or more Point3ds (To make a polygon, you need at least 3 points, right?).
Here "Window" does not mean a rectangle with 4 corners (while in SelectWindow(), "Window" means a rectangle, but only 2 points representing 2 opposite corners required). It means "window" selection, as opposed to "crossing" selection. That is only entities completely contained inside the polygon will be selected.
Re: does working SelectWind owPolygon just with 4 points ?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
if I try to use with lisp (ssget "_wp".... (pointlist))
I can use 4 ,5 ,n points. isn't it ?
of course i want to retrieve the object inside my polygon (6 vertex) fully included! (window)
Re: does working SelectWind owPolygon just with 4 points ?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Does that polygon cross itself or have to closed regions
Re: does working SelectWind owPolygon just with 4 points ?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Never mind that was answered here
http://www.theswamp.org/index.php?topic=35384.0
Re: does working SelectWind owPolygon just with 4 points ?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
it's very simple... I have 4 points (not a simple square) (sometime 5 points) and I want to check all entities fully inside.
The dbobjects could be any kind (solid3d, circles, ecc...)
Re: does working SelectWind owPolygon just with 4 points ?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Jeffrey_H (and Jeff_M at the swamp) are correct. The points you provided will generate a boundary that crosses itself, which is not allowed. (oops. my eyes are playing tricks and I skipped right over the first point in your list, which made what I wrote before in these parenthesis invalid)
I don't know how you are coming up with the points you need to define your polygon, but in your example, if you swap the second and third points, it will work.
Coincidently, there is a recent thread on this discussion group about how to programmatically determine if a polyline intersects itself. I just tried to find it, but I am having some trouble locating it at the moment
Re: does working SelectWind owPolygon just with 4 points ?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
ok , sorry but with this points i haven't intersections
that's a real situation.
lpt.Add(new Point3d(2526.11913296339, 4761.82097707599, 0));
lpt.Add(new Point3d(2250.71913296339, 4761.82097707599, 0));
lpt.Add(new Point3d(2299.01913296339, 4713.52097707599, 0));
lpt.Add(new Point3d(2526.11913296339, 4713.52097707599, 0));
lpt.Add(new Point3d(2526.11913296339, 4761.82097707599, 0));
the shape (black color) is regular, without intersections (i moved out from others lines in order to show it)
under this points we have some entities but the selection fails!
Re: does working SelectWind owPolygon just with 4 points ?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
ok discovered....i must to make a little offset ..else nothing is really fully inside !
Re: does working SelectWind owPolygon just with 4 points ?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
After Looking at your image, I was going to suggest that circle might be touching the boundary.
And FYI, I was going to say that there is no need to provide the final closing coordinate, as AutoCAD will automatically treat the polygon as closed.


