我使用xaml writer
将Canvas保存为Xamlstring strXaml = System.Windows.Markup.XamlWriter.Save(rootElement);
生成的xaml具有非常大的Path.Data
<Path Data="M178.061103421175,129.580733852605L193.622508536283,129.579677215608 193.622534058222,129.955546337824 178.383889830182,129.956581058991z M193.434586735851,129.767619032979L193.434579752171,129.586744283962 193.810448874973,129.586729771435 193.810455858653,129.767604520452z M193.622513391756,129.39880246616L200.57609615027,129.398768358939 200.576072204466,124.516836247382 203.668339188234,124.516821079852 203.668339188234,129.66079407036 212.06212740336,129.660752898928 212.06212740336,130.829834481415 224.593555084937,130.829773014925 224.593574452587,134.778336158564 241.618815286431,134.778336158564 241.621014560214,129.643614552785 248.726256699727,129.643588552304
请注意小数点后的极大精度。 我需要一种方法来降低这些数字的精确度。
通过使用Cadlib加载.dwg文件生成Canvas,然后在画布上绘制cadlib模型。