Author Topic: Enclose Points with Polyline  (Read 2467 times)

0 Members and 1 Guest are viewing this topic.

cadplayer

  • Bull Frog
  • Posts: 390
  • Autocad Civil3d, OpenDCL.Runtime, LISP, .NET (C#)
Enclose Points with Polyline
« 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!

gile

  • Gator
  • Posts: 2507
  • Marseille, France
Re: Enclose Points with Polyline
« Reply #1 on: May 29, 2017, 01:40:57 PM »
Hi,

Have a look at the ConvexHull route.
Speaking English as a French Frog

cadplayer

  • Bull Frog
  • Posts: 390
  • Autocad Civil3d, OpenDCL.Runtime, LISP, .NET (C#)
Re: Enclose Points with Polyline
« Reply #2 on: May 30, 2017, 01:19:57 PM »
Nice Gile, thank you for your work and sharing. Let me think about more - in my case is created Polyline not enclose overall.

gile

  • Gator
  • Posts: 2507
  • Marseille, France
Re: Enclose Points with Polyline
« Reply #3 on: May 30, 2017, 02:32:52 PM »
So, did you try the TEST command n the provided link?
Speaking English as a French Frog

cadplayer

  • Bull Frog
  • Posts: 390
  • Autocad Civil3d, OpenDCL.Runtime, LISP, .NET (C#)
Re: Enclose Points with Polyline
« Reply #4 on: June 01, 2017, 01:15:32 PM »
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

Atook

  • Swamp Rat
  • Posts: 1029
  • AKA Tim
Re: Enclose Points with Polyline
« Reply #5 on: June 01, 2017, 01:23:08 PM »
Good to see the example cadplayer. Is it possible that elevation is causing the dips in the convex hull/shrinkwrap?

cadplayer

  • Bull Frog
  • Posts: 390
  • Autocad Civil3d, OpenDCL.Runtime, LISP, .NET (C#)
Re: Enclose Points with Polyline
« Reply #6 on: June 02, 2017, 07:41:27 AM »
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

Here is my example to get enclosed lines
Code: [Select]

        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

« Last Edit: June 02, 2017, 07:47:40 AM by cadplayer »