Surface between 2 different shapes

Hello, I am trying to generate a surface between a circle and a rectangle.

Please note the both elements are above each other in Z direction.

What would be the best way/ways to do it?

Parents
  • Hi 
    There are a few ways to achieve this, one suggestion below from Robert is a good one. Another would be to use the LoftCurves method.

    you would get something like this.

    here is the script in text format so you can give it a try

    transaction 1 stateChange 'Add baseCS'
    {
        gcModel
        {
            node User.Objects.baseCS Bentley.GC.NodeTypes.CoordinateSystem
            {
                Technique                 = 'AtDGNModelOrigin';
                DGNModelName              = 'Design Model';
                SymbolSize                = 1;
                GraphLocation             = <auto> {40.0, 40.0, 0.0, 116.37};
            }
        }
    }
    
    transaction 2 stateChange 'Add point1, point2'
    {
        gcModel
        {
            node User.Objects.point1 Bentley.GC.NodeTypes.Point
            {
                Technique                 = 'ByCartesianCoordinates';
                CoordinateSystem          = baseCS;
                XTranslation              = 1000;
                YTranslation              = 1000;
                ZTranslation              = <free> 0.0;
                GraphLocation             = <auto> {314.0, 40.0, 0.0, 155.43};
            }
            node User.Objects.point2 Bentley.GC.NodeTypes.Point
            {
                Technique                 = 'ByCartesianCoordinates';
                CoordinateSystem          = baseCS;
                XTranslation              = 1000;
                YTranslation              = 1000;
                ZTranslation              = 5000;
                GraphLocation             = {322.667, 213.0, 174.0, 155.43};
            }
        }
    }
    
    transaction 3 stateChange 'Add circle1'
    {
        gcModel
        {
            node User.Objects.circle1 Bentley.GC.NodeTypes.Circle
            {
                Technique                 = 'ByCenterRadius';
                CenterPoint               = point1;
                Radius                    = 500;
                Support                   = baseCS.XYPlane;
                Fill                      = false;
                GraphLocation             = {1229.4, 125.8, 0.0, 142.41};
            }
        }
    }
    
    transaction 4 stateChange 'Add point3, point4'
    {
        gcModel
        {
            node User.Objects.point3 Bentley.GC.NodeTypes.Point
            {
                Technique                 = 'ByDirectionAndDistanceFromOrigin';
                Origin                    = point2;
                Direction                 = baseCS.XDirection;
                DistanceFromOrigin        = {-1000,1000};
                Visibility                = NodeVisibility.Hidden;
                GraphLocation             = {528.324, 458.971, 174.0, 155.43};
            }
            node User.Objects.point4 Bentley.GC.NodeTypes.Point
            {
                Technique                 = 'ByDirectionAndDistanceFromOrigin';
                Origin                    = point3;
                Direction                 = baseCS.YDirection;
                DistanceFromOrigin        = {-1000,1000};
                Replication               = ReplicationOption.AllCombinations;
                GraphLocation             = {834.053, 453.544, 0.0, 155.43};
            }
        }
    }
    
    transaction 5 stateChange 'Add polygon1, polygon2'
    {
        gcModel
        {
            node User.Objects.polygon1 Bentley.GC.NodeTypes.Polygon
            {
                Technique                 = 'ByVertices';
                VertexPoints              = {point4[0][0], point4[0][1], point4[1][1], point4[1][0]};
                PlaneIndex                = 1;
                Key                       = '';
                GraphLocation             = {1162.733, 372.866, 0.0, 116.37};
            }
            node User.Objects.polygon2 Bentley.GC.NodeTypes.Polygon
            {
                Technique                 = 'ReversePolygon';
                PolygonToReverse          = polygon1;
                AutoHideInputs            = true;
                GraphLocation             = {1412.653, 414.344, 0.0, 116.37};
            }
        }
    }
    
    transaction 6 stateChange 'Add bsplineSurface1'
    {
        gcModel
        {
            node User.Objects.bsplineSurface1 Bentley.GC.NodeTypes.BSplineSurface
            {
                Technique                 = 'LoftCurves';
                Curves                    = {circle1, polygon2};
                Order                     = 2;
                UCurveDisplay             = 4;
                VCurveDisplay             = 4;
                GraphLocation             = {1647.853, 279.944, 0.0, 116.37};
            }
        }
    }
    

    To use the text file just start a new GC file and open the transactions pane and click on the blue square to edit the transaction list.

    With the editor open > File > Insert Text from Text file.

    Hope that helps

    Wayne

  • I will give it a try, and some tweaks before I give a feedback.

    But I need to ask you, is there a way where I can replace the line between circle and rectangular to a Curve?

    Thank you anyways!

  • For that requirement you would then use Robert's suggestion.

    here is the txt

    transaction 1 stateChange 'Add baseCS'
    {
        gcModel
        {
            node User.Objects.baseCS Bentley.GC.NodeTypes.CoordinateSystem
            {
                Technique                 = 'AtDGNModelOrigin';
                DGNModelName              = 'Design Model';
                SymbolSize                = 1;
                GraphLocation             = <auto> {40.0, 40.0, 0.0, 116.37};
            }
        }
    }
    
    transaction 2 stateChange 'Add point1, point2'
    {
        gcModel
        {
            node User.Objects.point1 Bentley.GC.NodeTypes.Point
            {
                Technique                 = 'ByCartesianCoordinates';
                CoordinateSystem          = baseCS;
                XTranslation              = 1000;
                YTranslation              = 1000;
                ZTranslation              = <free> 0.0;
                GraphLocation             = <auto> {314.0, 40.0, 0.0, 155.43};
            }
            node User.Objects.point2 Bentley.GC.NodeTypes.Point
            {
                Technique                 = 'ByCartesianCoordinates';
                CoordinateSystem          = baseCS;
                XTranslation              = 1000;
                YTranslation              = 1000;
                ZTranslation              = 5000;
                GraphLocation             = {322.667, 213.0, 0.0, 155.43};
            }
        }
    }
    
    transaction 3 stateChange 'Add circle1'
    {
        gcModel
        {
            node User.Objects.circle1 Bentley.GC.NodeTypes.Circle
            {
                Technique                 = 'ByCenterRadius';
                CenterPoint               = point1;
                Radius                    = 500;
                Support                   = baseCS.XYPlane;
                Fill                      = false;
                GraphLocation             = {1229.4, 125.8, 0.0, 142.41};
            }
        }
    }
    
    transaction 4 stateChange 'Add point3, point4'
    {
        gcModel
        {
            node User.Objects.point3 Bentley.GC.NodeTypes.Point
            {
                Technique                 = 'ByDirectionAndDistanceFromOrigin';
                Origin                    = point2;
                Direction                 = baseCS.XDirection;
                DistanceFromOrigin        = {-1000,1000};
                Visibility                = NodeVisibility.Hidden;
                GraphLocation             = {528.324, 458.971, 0.0, 155.43};
            }
            node User.Objects.point4 Bentley.GC.NodeTypes.Point
            {
                Technique                 = 'ByDirectionAndDistanceFromOrigin';
                Origin                    = point3;
                Direction                 = baseCS.YDirection;
                DistanceFromOrigin        = {-1000,1000};
                Replication               = ReplicationOption.AllCombinations;
                GraphLocation             = {834.053, 453.544, 0.0, 155.43};
            }
        }
    }
    
    transaction 5 stateChange 'Add polygon1, polygon2'
    {
        gcModel
        {
            node User.Objects.polygon1 Bentley.GC.NodeTypes.Polygon
            {
                Technique                 = 'ByVertices';
                VertexPoints              = {point4[0][0], point4[0][1], point4[1][1], point4[1][0]};
                PlaneIndex                = 1;
                Key                       = '';
                GraphLocation             = {1162.733, 372.866};
            }
            node User.Objects.polygon2 Bentley.GC.NodeTypes.Polygon
            {
                Technique                 = 'ReversePolygon';
                PolygonToReverse          = polygon1;
                AutoHideInputs            = true;
                GraphLocation             = {1412.653, 414.344};
            }
        }
    }
    
    transaction 6 stateChange 'Add point5, point6'
    {
        gcModel
        {
            node User.Objects.point5 Bentley.GC.NodeTypes.Point
            {
                Technique                 = 'ByCartesianCoordinates';
                CoordinateSystem          = baseCS;
                XTranslation              = <free> -551.02432737029;
                YTranslation              = <free> 0.0;
                ZTranslation              = <free> 1436.82071285095;
                GraphLocation             = <auto> {862.0, 40.0, 0.0, 155.43};
            }
            node User.Objects.point6 Bentley.GC.NodeTypes.Point
            {
                Technique                 = 'ByCartesianCoordinates';
                CoordinateSystem          = baseCS;
                XTranslation              = <free> 2949.43572655715;
                YTranslation              = <free> 0.0;
                ZTranslation              = <free> 3419.84125797782;
                GraphLocation             = <auto> {862.0, 235.43, 0.0, 155.43};
            }
        }
    }
    
    transaction 7 stateChange 'Add bsplineCurve1'
    {
        gcModel
        {
            node User.Objects.bsplineCurve1 Bentley.GC.NodeTypes.BSplineCurve
            {
                Technique                 = 'ByPoints';
                Points                    = {point1, point5, point6, point2};
                GraphLocation             = {1570.801, 144.658};
            }
        }
    }
    
    transaction 8 stateChange 'Add bsplineSurface1'
    {
        gcModel
        {
            node User.Objects.bsplineSurface1 Bentley.GC.NodeTypes.BSplineSurface
            {
                Technique                 = 'FromRailsAndSweptSections';
                Rail0                     = bsplineCurve1;
                Section0                  = circle1;
                Section1                  = polygon2;
                SkinDirection             = DirectionOption.U;
                KeepSweptSectionsParallelToOrginalSections = true;
                IfNoRail1RotationAxisFromRail0 = true;
                IfRail1PresentScaleSectionsByInterRailDistance = true;
                UniformlyScaleSectionsByInterRailDistance = true;
                UCurveDisplay             = 4;
                VCurveDisplay             = 4;
                GraphLocation             = {1647.853, 279.944};
            }
        }
    }
    

    Thanks

    Wayne

Reply Children
No Data