SurfaceDefinitionBreaklinesAddStandardBreaklines(ObjectIdCollection, Double, Double, Double, Double) Method |
Adds standard breaklines to the surface fromm a collection of entities.
Namespace: Autodesk.Civil.DatabaseServicesAssembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.8.0.292
Syntaxpublic SurfaceOperationAddBreakline AddStandardBreaklines(
ObjectIdCollection breaklineEntities,
double midOrdinateDistance,
double maximumDistance,
double weedingDistance,
double weedingAngle
)
Public Function AddStandardBreaklines (
breaklineEntities As ObjectIdCollection,
midOrdinateDistance As Double,
maximumDistance As Double,
weedingDistance As Double,
weedingAngle As Double
) As SurfaceOperationAddBreakline
public:
SurfaceOperationAddBreakline^ AddStandardBreaklines(
ObjectIdCollection^ breaklineEntities,
double midOrdinateDistance,
double maximumDistance,
double weedingDistance,
double weedingAngle
)
Parameters
- breaklineEntities ObjectIdCollection
- A collection of ObjectIds for entities used to create breaklines.
- midOrdinateDistance Double
- When the breakline is defined from a polyline with curves, the midOrdinateDistance value is used to tessellate the arcs in the polyline.
- maximumDistance 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 Double
- The distance value for the weeding factor.
- weedingAngle Double
- The angle value for the weeding factor.
Return Value
SurfaceOperationAddBreakline
ExceptionsException | Condition |
---|
ArgumentException |
Thrown when:
- There is an invalid ObjectId in the breaklineEntities collection.
- midOrdinateDistance <= 0.0 , maximumDistance < 0.0 or weedingDistance < 0.0.
|
Remarks- When defining a standard, the X, Y, and Z coordinates of each vertex on the polyline that you select are converted into TIN vertices.
- The weeding factors ignore both vertices that are closer together than the distance factor and vertices that deflect less than the angle factor.
- Set a parameter to 0 to ignore it.
Example 1
2
3
4[CommandMethod("SurfaceBreaklines")]
5public void SurfaceBreaklines()
6{
7 using (Transaction ts = Application.DocumentManager.MdiActiveDocument.Database.TransactionManager.StartTransaction())
8 {
9
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
48 ts.Commit();
49 }
50}
See Also