Exemple #1
0
    //--------------------------------------------------------------------------------------------------

    ModifierBase Execute(Body body, IShapeOperand[] operands)
    {
        InteractiveContext.Current.WorkspaceController.Selection.SelectEntity(null);

        ModifierBase boolOpShape = null;

        switch (Operation)
        {
        case Operations.Cut:
            boolOpShape = BooleanCut.Create(body, operands);
            break;

        case Operations.Common:
            boolOpShape = BooleanCommon.Create(body, operands);
            break;

        case Operations.Fuse:
            boolOpShape = BooleanFuse.Create(body, operands);
            break;
        }

        foreach (var operandBody in operands.OfType <BodyShapeOperand>())
        {
            operandBody.Body.IsVisible = false;
        }

        return(boolOpShape);
    }
Exemple #2
0
        public void Common()
        {
            var shapes = TestGeomGenerator.CreateBooleanBodies(true);

            var boolOp = BooleanCommon.Create(shapes.target, shapes.operands);

            Assert.IsTrue(boolOp.Make(Shape.MakeFlags.None));
            Assert.IsTrue(ModelCompare.CompareShape(boolOp, Path.Combine(_BasePath, "Common")));
        }