OPM SDK通风半径接头HVACRadiusTakeOffComponent生成异常

环境:OPM UP7

语言:C#

问题:OPM SDK生成半径接头HVACRadiusTakeOffComponent,生成位置异常,如图所示,SDK生成的模型出现了碰撞,但是MAIN_PORT和BRANCH_PORT位置是正确的

生成接头代码如下:

//Specification
string specification = "mEX-OPM";

//Main Width, Height of HVAC Rectangular/Oval component.
double mainWidth = 450;
double mainHeight = 300;

//Length of HVAC Duct component. This is a property of the HVAC component.
double ductLength = 2000;

DPoint3d origin = new DPoint3d(0, 0, 0);

if (PrepareForHVAC(specification))
{
    //Take off component with Rectangular duct.
    HVACRectangularDuctComponentData duct1Data = new HVACRectangularDuctComponentData(specification, mainWidth, mainHeight);
    duct1Data.SetProperty("LENGTH", ductLength.ToString());
    HVACRectangularDuctComponent duct1 = new HVACRectangularDuctComponent(origin, duct1Data, 0, DrawingView.ViewTop, true);
    duct1.Create();

    origin.X = 1000;

    HVACRadiusTakeOffComponentData takeoff1Data = new HVACRadiusTakeOffComponentData(specification, mainWidth, mainHeight);
    HVACRadiusTakeOffComponent takeoff1 = new HVACRadiusTakeOffComponent(origin, takeoff1Data, 0, DrawingView.ViewTop, true);
    takeoff1.AddComponentToBranch(duct1);
    takeoff1.Create();

}

Parents
  • HVACRadiusTakeOffComponentData takeoff1Data = new HVACRadiusTakeOffComponentData(specification, mainWidth, mainHeight);
    takeoff1Data.Properties["WIDTH_OFFSET"] = "True";

    我这里这样就对了。

    您需要结合具体情况判断这个值什么时候为True,什么时候为False,推测和你将TakeOff添加到Duct的宽面还是高面有关。

    Answer Verified By: Liaoyuan Zhang 

Reply
  • HVACRadiusTakeOffComponentData takeoff1Data = new HVACRadiusTakeOffComponentData(specification, mainWidth, mainHeight);
    takeoff1Data.Properties["WIDTH_OFFSET"] = "True";

    我这里这样就对了。

    您需要结合具体情况判断这个值什么时候为True,什么时候为False,推测和你将TakeOff添加到Duct的宽面还是高面有关。

    Answer Verified By: Liaoyuan Zhang 

Children