//Draws three balls instead of an octagon, can not earn in NanoCAD 8.X public void DrawThreeBalls(Point3d _pntB) { CircArc3d circarcRed = new CircArc3d(_pntB.Subtract(new Vector3d(30, 100, 0)), Vector3d.ZAxis, 15); DbCircArc dbCircarcRed = circarcRed;//implicit dbCircarcRed.DbEntity.AddToCurrentDocument(); Hatch hatchCirkRed = new Hatch(circarcRed, 0, 1, false); hatchCirkRed.PattType = PatternType.PreDefined; hatchCirkRed.PatternName = "SOLID"; DbGeometry dbhatchCirkRed = new DbGeometry(); dbhatchCirkRed.Geometry = new EntityGeometry(hatchCirkRed); dbhatchCirkRed.DbEntity.Color = Color.Red; dbhatchCirkRed.DbEntity.AddToCurrentDocument(); CircArc3d circarcGreen = new CircArc3d(_pntB.Subtract(new Vector3d(-40, 200, 0)), Vector3d.ZAxis, 15); DbCircArc dbCircarcGreen = circarcGreen;//implicit dbCircarcGreen.DbEntity.AddToCurrentDocument(); Hatch hatchCirkGreen = new Hatch(circarcGreen, 0, 1, false); hatchCirkGreen.PattType = PatternType.PreDefined; hatchCirkGreen.PatternName = "SOLID"; DbGeometry dbhatchCirkGreen = new DbGeometry(); dbhatchCirkGreen.Geometry = new EntityGeometry(hatchCirkGreen); dbhatchCirkGreen.DbEntity.Color = Color.LightSeaGreen; dbhatchCirkGreen.DbEntity.AddToCurrentDocument(); CircArc3d circarcBlue = new CircArc3d(_pntB.Subtract(new Vector3d(-12, 350, 0)), Vector3d.ZAxis, 15); DbCircArc dbCircarcBlue = circarcBlue;//implicit dbCircarcBlue.DbEntity.AddToCurrentDocument(); Hatch hatchCirkBlue = new Hatch(circarcBlue, 0, 1, false); hatchCirkBlue.PattType = PatternType.PreDefined; hatchCirkBlue.PatternName = "SOLID"; DbGeometry dbhatchCirkBlue = new DbGeometry(); dbhatchCirkBlue.Geometry = new EntityGeometry(hatchCirkBlue); dbhatchCirkBlue.DbEntity.Color = Color.Blue; dbhatchCirkBlue.DbEntity.AddToCurrentDocument(); }
/// <summary> /// Create an Advance Steel Unfolded Beam between two points from an arc /// </summary> /// <param name="arc"></param> /// <param name="orientation"> Input reference vector of arc</param> /// <param name="startPoint"> Input Start Point of Unfolded Beam</param> /// <param name="endPoint"> Input End Point of Unfolded Beam</param> /// <param name="thickness"> Input thickness of Unfolded Beam</param> /// <param name="additionalBeamParameters"> Optional Input Beam Build Properties </param> /// <returns name="unFoldedBeam"> beam</returns> public static UnFoldedBeam ByArc(Autodesk.DesignScript.Geometry.Arc arc, Autodesk.DesignScript.Geometry.Vector orientation, Autodesk.DesignScript.Geometry.Point startPoint, Autodesk.DesignScript.Geometry.Point endPoint, double thickness, [DefaultArgument("null")] List <Property> additionalBeamParameters) { additionalBeamParameters = PreSetDefaults(additionalBeamParameters, Utils.ToInternalDistanceUnits(thickness, true)); CircArc3d cc = new CircArc3d(Utils.ToAstPoint(arc.StartPoint, true), Utils.ToAstPoint(arc.PointAtSegmentLength(arc.Length / 2), true), Utils.ToAstPoint(arc.EndPoint, true)); Polyline3d poly = new Polyline3d(); poly = cc.GetPolyline3d(); if (poly == null) { throw new System.Exception("No Valid Poly"); } return(new UnFoldedBeam(poly, startPoint, endPoint, orientation, additionalBeamParameters)); }