Autodesk / civilconnection

CivilConnection enables the exchange of information between Civil 3D, Dynamo and Revit.
94 stars 43 forks source link

Baseline.GetFeaturelinesByCode #42

Closed BartDeMaesschalckAtDIMCO closed 4 years ago

BartDeMaesschalckAtDIMCO commented 4 years ago

Paolo,

What is the reason you changed to old code to getting the data from the xml? Can I re-instate the old code, under another name? I realy do not like all the xml stuff if I can access the data directly. I also want to add getting featurelines from offset-alignments

Regards,

Bart

paoloemilioserra commented 4 years ago

@BartDeMaesschalckAtDIMCO the reason being if you need to access the featurelines multiple times in a session (e.g. creating/updating the location of Revit families, creating walls, etc.) it is more performant than reading directly via COM as it used be in earlier versions. The reason for avoiding the XML at the beginning was to guarantee that the file is read in real time and it is exactly the same, but in reality the users basically never changed the Civil 3D source. And even if they do, at the next session of Dynamo the XML files are exported again and the model will update. The benefit are in the order of 30-40 times faster especially on long, highly tessellated featurelines. PS: Pay attention, the XML is custom and generated via .NET and CivilPython, not the LandXML exported in early versions. There is a very important benefit also: in COM you don't have access to the break points on feature lines, while in .NET you do. This means that in CivilConnection you get the correct representation of the feature lines.

So to your first questions, you are free to do whatever you think is reasonable on your own branch, if would like to add featurelines from offset-alignments (which could be good) please start a pull request and when we get it harmonized with the rest of the code I'll merge it on the main and report your contribution.

Thanks