Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I have a Problem.
I have a Region and i want to get a polyline from all the Region
The Red Line is the Region and the Green Line is the polyline that i have...
This isn't what a want.
I make this
// Regionen vereinigen und äußere Kontur als Polyline erzeugen
using (var reg = MergeRegions(regions, AcDataService.BooleanOperationType.BoolUnite))
{
if (reg != null)
{
var brep = new AcBounds.Brep(reg);
var points = new List<Point2d>();
var face = brep.Faces.First();
foreach (var loop in face.Loops)
{
if (loop.LoopType == AcBounds.LoopType.LoopExterior)
{
foreach (var vertex in loop.Vertices)
{
points.Add(new Point2d(vertex.Point.X, vertex.Point.Y));
}
break;
}
}
// Polyline aus Punkten erzeugen
myRegionPolyline = CreatePolyline(points);
}
}
myRegionPolyline.ColorIndex = 3; // Set color index for the polyline
curSpace.AppendEntity(myRegionPolyline);
tr.AddNewlyCreatedDBObject(myRegionPolyline, true);I make a Merge von Region with Unite and that i use the Brep, but something isn't correct.
What is my mystake ?
Thanks Fabrice
Solved! Go to Solution.