TheSwamp
Code Red => .NET => Topic started by: cadplayer on May 29, 2017, 01:25:00 PM
-
Hello!
May somebody have a idea to create enclosed Polyline outside from Points in Drawing.
I have a Drawing with many DbPoints. What I want to do is to create a Polyline which goes over all outer Points.
In Civil3d there is a command with lineworkshrinkwrap, where I can select a block and get a borderline from contours of block.
I would like do the same but not use with command with senttoexecute.
Thank you for inspiration!
-
Hi,
Have a look at the ConvexHull (https://www.theswamp.org/index.php?topic=31865.msg430599#msg430599) route.
-
Nice Gile, thank you for your work and sharing. Let me think about more - in my case is created Polyline not enclose overall.
-
So, did you try the TEST command n the provided link?
-
Sorry for delay Gile, yes I have test your function and it´s really nice your thought. I have to configure out a bit more, because it does not draw Polyline(yellow) overall.
http://www.screencast.com/t/DQPecCuwsB (http://www.screencast.com/t/DQPecCuwsB)
-
Good to see the example cadplayer. Is it possible that elevation is causing the dips in the convex hull/shrinkwrap?
-
My goal to draw outerline or enclosed Polylines is to set Boundary for calculate Triangulation. Giles example show´s to create 2dPolyline enclosed around selected Points, But I need more exactly line:
black line behind red triangle
http://s1356.photobucket.com/user/cadplayer/media/Triangulate_zps5egmsmru.png.html (http://s1356.photobucket.com/user/cadplayer/media/Triangulate_zps5egmsmru.png.html)
Here is my example to get enclosed lines
public static void ObjectsToEnclose(Entity acEnt)
{
Document acDoc = Application.DocumentManager.MdiActiveDocument;
string strHandle = acEnt.Handle.ToString();
acDoc.SendStringToExecute("lineworkshrinkwrap ", true, false, false);
string command = string.Format("(handent \"" + strHandle + "\") ");
acDoc.SendStringToExecute(command, true, false, false);
}
Works only in Civil3d or MAP