/// <summary> /// Проверка на пересечения с другими закладными элементами. /// TRUE - если проверка пройдена /// </summary> private bool checkForIntersects(PenetrVueTask task, PenetrInfo penInfo) { task.scanInfo(); BCOM.Element penElement = PenetrHelper.getPenElementWithoutFlanges(task, penInfo); IEnumerable <BCOM.Element> intersects = ElementHelper.scanIntersectsInElementRange(penElement, App.ActiveModelReference); foreach (BCOM.Element intersection in intersects) { if (intersection.IsPenetrationCell()) { var body = getBodyWithOutFlanges(intersection.AsCellElement()); var contrIntersects = ElementHelper.scanIntersectsInElementRange(body, App.ActiveModelReference); BCOM.Range3d res = App.Range3dInit(); if (App.Range3dIntersect2(ref res, body.Range, penElement.Range)) { return(false); } } else if (intersection.IsCompundCell()) { return(false); } } return(true); }
public void DataPoint(ref BCOM.Point3d Point, BCOM.View View) { PenetrUserTask userTask; if (!processInput(out userTask, ref Point, View)) { return; } PenetrInfo penInfo = PenetrDataSource.Instance.getPenInfo( userTask.FlangesType, userTask.DiameterType.Number); ElementHelper.RunByRecovertingSettings(() => { PenetrHelper.addToModel(userTask, penInfo); }); }
public void Dynamics(ref BCOM.Point3d Point, BCOM.View View, BCOM.MsdDrawingMode DrawMode) { PenetrUserTask userTask; if (!processInput(out userTask, ref Point, View)) { return; } PenetrInfo penInfo = PenetrDataSource.Instance.getPenInfo( userTask.FlangesType, userTask.DiameterType.Number); var frameList = PenetrHelper.createFrameList( userTask, penInfo, PenetrTaskBase.LevelMain); var el = frameList.AsTFFrame.Get3DElement(); el.Redraw(DrawMode); }