Message 1 of 9
Bug FeatureLine.BaseCurve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I´m trying this to get a polyline 3d in the drawing from feature line.
public static void prueba(Autodesk.AutoCAD.DatabaseServices.ObjectId id) { Document doc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument; Database db = doc.Database; Editor ed = doc.Editor; using (DocumentLock docLock = doc.LockDocument()) { using (Transaction trans = db.TransactionManager.StartTransaction()) { Autodesk.AutoCAD.DatabaseServices.DBObject obj = trans.GetObject(id, OpenMode.ForWrite); DBObjectCollection entitats = new DBObjectCollection(); FeatureLine FL = obj as FeatureLine; if (FL != null) { System.Type tipo = FL.GetType(); if (tipo.Name != "SurveyFigure") { // get the projected curve from feature line Curve baseCurve = FL.BaseCurve; baseCurve.Layer = FL.Layer; //lo ponemos en la misma capa que la capa de la línea característica. // Now append the curve to db BlockTable table = trans.GetObject(db.BlockTableId, OpenMode.ForRead) as BlockTable; BlockTableRecord model = trans.GetObject(table[BlockTableRecord.ModelSpace], OpenMode.ForWrite) as BlockTableRecord; model.AppendEntity(baseCurve); trans.AddNewlyCreatedDBObject(baseCurve, true); } } trans.Commit(); } //end transaction } //end candado }
However, in some cases, generally if the feature line has arc and lines, the result polyline 3d has some repeated vertex.(3 times).
For exemple, in the attached drawing file, vertex 30,31 and 32 has the same position.
Are there any simply methods to erase repeated(duplicated) vertex of one entity?
Autocad C3D 2019 SP3, 2020 & 2021
Intel I9 9900K with frontal watercooler alphacool eisbaer 360 (original fans mounted in pull)- 3 fans Corsair 120 ML PRO in push.
MOBO Gygabyte Z390 Aorus Master- Corsair RGB Vengeance 64GB RAM (4x16) CL16
Nvidia Quadro RTX 4000
Samsung 970 EVO PLUS 1TB (unit C). Samsung 970 PRO 512GB (for data)
Power Supply: Corsair TX850M PLUS
Descubre mi programa VisorNET para Civil 3D:
https://apps.autodesk.com/CIV3D/es/Detail/Index?id=appstore.exchange.autodesk.com%3avisornet_windows32and64%3aes
Intel I9 9900K with frontal watercooler alphacool eisbaer 360 (original fans mounted in pull)- 3 fans Corsair 120 ML PRO in push.
MOBO Gygabyte Z390 Aorus Master- Corsair RGB Vengeance 64GB RAM (4x16) CL16
Nvidia Quadro RTX 4000
Samsung 970 EVO PLUS 1TB (unit C). Samsung 970 PRO 512GB (for data)
Power Supply: Corsair TX850M PLUS
Descubre mi programa VisorNET para Civil 3D:
https://apps.autodesk.com/CIV3D/es/Detail/Index?id=appstore.exchange.autodesk.com%3avisornet_windows32and64%3aes