lixiaojun
2024-08-14 eb4679bfe7f2c945f3e03f6927c8fde893f7d33c
Service/HStation.Service.Revit.Core/04-service/01-json/RevitJsonHelper.cs
@@ -687,6 +687,18 @@
                                {
                                    exchanger.Roughness = roughness;
                                }
                                if (exchanger.Length <= 0)
                                {
                                    exchanger.Length = exchanger.StartPosition.Distance(exchanger.EndPosition);
                                }
                                if (exchanger.Diameter < 0.1)
                                {
                                    exchanger.Diameter = 0.1;
                                }
                                if (exchanger.Roughness < 0.1)
                                {
                                    exchanger.Roughness = 0.1;
                                }
                                model.Exchangers.Add(exchanger);
                            }
                            break;
@@ -759,6 +771,18 @@
                                {
                                    pipe.Roughness = roughness;
                                }
                                if (pipe.Length <= 0)
                                {
                                    pipe.Length = pipe.StartPosition.Distance(pipe.EndPosition);
                                }
                                if (pipe.Diameter < 0.1)
                                {
                                    pipe.Diameter = 0.1;
                                }
                                if (pipe.Roughness < 0.1)
                                {
                                    pipe.Roughness = 0.1;
                                }
                                model.Pipes.Add(pipe);
                            }
                            break;
@@ -831,6 +855,18 @@
                                {
                                    translation.Roughness = roughness;
                                }
                                if (translation.Length <= 0)
                                {
                                    translation.Length = translation.StartPosition.Distance(translation.EndPosition);
                                }
                                if (translation.Diameter < 0.1)
                                {
                                    translation.Diameter = 0.1;
                                }
                                if (translation.Roughness < 0.1)
                                {
                                    translation.Roughness = 0.1;
                                }
                                model.Translations.Add(translation);
                            }
                            break;