public void ByArc_ValidArgs() { var arc = Arc.ByCenterPointRadiusAngle(Point.ByCoordinates(0, 0, 0), 1000, 0, 90, Vector.ByCoordinates(0, 0, 1)); var grid = Grid.ByArc(arc); Assert.NotNull(grid); Assert.NotNull(grid.Curve); Assert.NotNull(grid.ElementCurveReference); }
/// <summary> /// SpeckleArc to DS Arc /// </summary> /// <param name="a"></param> /// <returns></returns> public static Arc ToNative(this SpeckleArc a) { Arc arc = Arc.ByCenterPointRadiusAngle( a.Plane.Origin.ToNative(), a.Radius.Value, a.StartAngle.Value.ToDegrees(), a.EndAngle.Value.ToDegrees(), a.Plane.Normal.ToNative() ); return(arc); }
public void StructuralFraming_Beam_ValidArgs() { var start = Point.ByCoordinates(1, 2, 3); var end = Point.ByCoordinates(5, 8, 3); var line = Line.ByStartPointEndPoint(start, end); var level = Level.ByElevation(3); var famTyp = FamilyType.ByName("W12X26"); var lineBeam = StructuralFraming.BeamByCurve(line, level, famTyp); Assert.NotNull(lineBeam); Assert.NotNull(lineBeam.InternalElement); Assert.IsTrue(DocumentManager.Instance.ElementExistsInDocument( new ElementUUID(lineBeam.InternalElement.UniqueId))); var curve = Arc.ByCenterPointRadiusAngle(Point.Origin(), 20, 0, 90, Vector.ZAxis()); var arcBeam = StructuralFraming.BeamByCurve(curve, level, famTyp); Assert.NotNull(arcBeam); Assert.NotNull(arcBeam.InternalElement); Assert.IsTrue(DocumentManager.Instance.ElementExistsInDocument( new ElementUUID(lineBeam.InternalElement.UniqueId))); }