Adds standard breaklines to the surface fromm a collection of entities.

Namespace: Autodesk.Civil.DatabaseServices
Assembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.4.2516.0

Syntax

C#
public SurfaceOperationAddBreakline AddStandardBreaklines(
	ObjectIdCollection breaklineEntities,
	double midOrdinateDistance,
	double maximumDistance,
	double weedingDistance,
	double weedingAngle
)
Visual Basic
Public Function AddStandardBreaklines ( _
	breaklineEntities As ObjectIdCollection, _
	midOrdinateDistance As Double, _
	maximumDistance As Double, _
	weedingDistance As Double, _
	weedingAngle As Double _
) As SurfaceOperationAddBreakline
Visual C++
public:
SurfaceOperationAddBreakline^ AddStandardBreaklines(
	ObjectIdCollection^ breaklineEntities, 
	double midOrdinateDistance, 
	double maximumDistance, 
	double weedingDistance, 
	double weedingAngle
)

Parameters

breaklineEntities
Type: ObjectIdCollection
A collection of ObjectIds for entities used to create breaklines.
midOrdinateDistance
Type: System..::..Double
When the breakline is defined from a polyline with curves, the midOrdinateDistance value is used to tessellate the arcs in the polyline.
maximumDistance
Type: System..::..Double
Specifies the maximum distance between vertices. If the distance between vertices on a breakline is greater than the maximumDistance, then points are added along the breakline at equal intervals that are less than or equal to the maximumDistance.
weedingDistance
Type: System..::..Double
The distance value for the weeding factor.
weedingAngle
Type: System..::..Double
The angle value for the weeding factor.

Remarks

  1. When defining a standard, the X, Y, and Z coordinates of each vertex on the polyline that you select are converted into TIN vertices.
  2. The weeding factors ignore both vertices that are closer together than the distance factor and vertices that deflect less than the angle factor.
  3. Set a parameter to 0 to ignore it.

Examples

CopyC#
 1/// <summary>
 2/// Illustrates creating breaklines
 3/// </summary>
 4[CommandMethod("SurfaceBreaklines")]
 5public void SurfaceBreaklines()
 6{
 7    using (Transaction ts = Application.DocumentManager.MdiActiveDocument.Database.TransactionManager.StartTransaction())
 8    {
 9        // Prompt the user to select a TIN surface and a polyline, and create a breakline from the polyline
10
11        ObjectId surfaceId = promptForEntity("Select a TIN surface to add a breakline to", typeof(TinSurface));
12        ObjectId lineId = promptForEntity("Select a 3D polyline to use as the breakline", typeof(Polyline3d));
13        TinSurface oSurface = surfaceId.GetObject(OpenMode.ForWrite) as TinSurface;
14        ObjectId[] lines = { lineId };
15
16        PromptKeywordOptions pKeyOpts = new PromptKeywordOptions("");
17        pKeyOpts.Message = "\nEnter the type of breakline to create: ";
18        pKeyOpts.Keywords.Add("Standard");
19        pKeyOpts.Keywords.Add("Non-Destructive");
20        pKeyOpts.Keywords.Add("Proximity");
21        pKeyOpts.Keywords.Default = "Standard";
22        pKeyOpts.AllowNone = true;
23        PromptResult pKeyRes = editor.GetKeywords(pKeyOpts);
24
25        try
26        {
27            switch (pKeyRes.StringResult)
28            {
29                case "Non-Destructive":
30                    oSurface.BreaklinesDefinition.AddNonDestructiveBreaklines(new ObjectIdCollection(lines), 1);
31                    break;
32                case "Proximity":
33                    oSurface.BreaklinesDefinition.AddProximityBreaklines(new ObjectIdCollection(lines), 1);
34                    break;
35                case "Standard":
36                default:
37                    oSurface.BreaklinesDefinition.AddStandardBreaklines(new ObjectIdCollection(lines), 10, 5, 5, 0);
38                    break;
39            }
40        }
41
42        catch (System.Exception e)
43        {
44            editor.WriteMessage("Operation failed: {0}", e.Message);
45        }
46
47        // commit the transaction
48        ts.Commit();
49    }
50}

Exceptions

ExceptionCondition
System..::..ArgumentException Thrown when:
  1. There is an invalid ObjectId in the breaklineEntities collection.
  2. midOrdinateDistance <= 0.0 , maximumDistance < 0.0 or weedingDistance < 0.0.

See Also