void ReconstructDirectShapeByPoint ( DB.Document doc, ref DB.Element element, Rhino.Geometry.Point3d point ) { if (!ThrowIfNotValid(nameof(point), point)) { return; } if (element is DB.DirectShape ds) { } else { ds = DB.DirectShape.CreateElement(doc, new DB.ElementId(DB.BuiltInCategory.OST_GenericModel)); } using (var ctx = GeometryEncoder.Context.Push(ds)) { ctx.RuntimeMessage = (severity, message, invalidGeometry) => AddGeometryConversionError((GH_RuntimeMessageLevel)severity, message, invalidGeometry); var shape = new DB.Point[] { DB.Point.Create(point.ToXYZ()) }; ds.SetShape(shape); } ReplaceElement(ref element, ds); }
public static DB.Point[] ToPoints(this PointCloud value, double factor) { var array = new DB.Point[value.Count]; int index = 0; if (factor == 1.0) { foreach (var point in value) { var location = point.Location; array[index++] = DB.Point.Create(new DB::XYZ(location.X, location.Y, location.Z)); } } else { foreach (var point in value) { var location = point.Location; array[index++] = DB.Point.Create(new DB::XYZ(location.X * factor, location.Y * factor, location.Z * factor)); } } return(array); }
void ReconstructDirectShapeByPoint ( DB.Document doc, ref DB.Element element, Rhino.Geometry.Point3d point ) { ThrowIfNotValid(nameof(point), point); if (element is DB.DirectShape ds) { } else { ds = DB.DirectShape.CreateElement(doc, new DB.ElementId(DB.BuiltInCategory.OST_GenericModel)); } var shape = new DB.Point[] { DB.Point.Create(point.ToXYZ()) }; ds.SetShape(shape); ReplaceElement(ref element, ds); }
public static Autodesk.DesignScript.Geometry.Point ToProtoType(this Autodesk.Revit.DB.Point point, bool convertUnits = true) { return(point.Coord.ToPoint(convertUnits)); }
public static Autodesk.DesignScript.Geometry.Point ToProtoType(this Autodesk.Revit.DB.Point point) { return(point.Coord.ToPoint()); }
private static Autodesk.DesignScript.Geometry.Point InternalConvert(Autodesk.Revit.DB.Point geom) { return(geom.ToProtoType()); }
public static Point ToRhino(DB.Point point) { return(new Point(AsPoint3d(point.Coord))); }
public static Point ToPoint(this DB.Point value) { var rhino = RawDecoder.ToRhino(value); UnitConverter.Scale(rhino, UnitConverter.ToRhinoUnits); return(rhino); }
public static Point ToRhino(this DB.Point point) { return(new Point(point.Coord.ToRhino())); }
public static Point ToRhino(this DB.Point point) => RawDecoder.ToRhino(point);