DynamoVisualProgramming.ZeroTouchLibrary by Autodesk

<PackageReference Include="DynamoVisualProgramming.ZeroTouchLibrary" Version="4.1.0-beta3200" />

 Geometry

public abstract class Geometry : DesignScriptEntity
public virtual BoundingBox BoundingBox { get; }

Get the BoundingBox containing the given piece of Geometry

public virtual CoordinateSystem ContextCoordinateSystem { get; }

Get the context/reference coordinate system that was used to create this geometry.

public virtual BoundingBox OrientedBoundingBox { get; }

Gets the minimum-volume, oriented bounding box containing the given geometry.

public static Geometry[] DeserializeFromSAB(byte[] buffer)

Deserializes the specified Standard ACIS Binary(SAB) format data and returns a list of geometry

public static Geometry[] DeserializeFromSAB(byte[] buffer, double mmPerUnit)

Takes a SAB file as input, and deserializes the ASM geometry into a LibG object

public static string ExportToSAT(IEnumerable<Geometry> geometry, string filePath)

Exports a list of specified geometry to the given SAT file path

public static string ExportToSAT(IEnumerable<Geometry> geometry, string filePath, double unitsMM)

Exports a list of specified geometry to the given SAT file path.

public static Geometry FromJson(string json)

Parse the incoming JSON string formatted with autodesk.geometry:geometry-1.0.0 schemata.

public static Geometry[] FromNativePointer(IntPtr nativePointer)

This method is meant for internal use only.

public static Geometry FromObject(long ptr)

public static Geometry[] FromSolidDef(string solidDefJson)

Imports a JSON string and returns an array of imported geometries

public static Geometry[] ImportFromSAT(FileInfo file)

Imports a SAT file and returns an array of imported geometries

public static Geometry[] ImportFromSAT(string filePath)

Imports a SAT file and returns an array of imported geometries

public static Geometry[] ImportFromSAT(FileInfo file, double mmPerUnit)

Imports a SAT file and returns an array of imported geometries.

public static Geometry[] ImportFromSAT(string filePath, double mmPerUnit)

Imports a SAT file and returns an array of imported geometries.

public static byte[] SerializeAsSAB(IEnumerable<Geometry> geometry)

Serializes a list of specified geometry into Standard ACIS Binary(SAB) format and returns serialized binary stream data

public static IntPtr[] ToNativePointer(IEnumerable<Geometry> geometry)

This method is meant for internal use only.

public static void UpdateDisplay()

public virtual Geometry[] Approximate()

Convert internal structure of geometry from analytics to splines

public virtual Point ClosestPointTo(Geometry other)

Obtain the closest Point on this Geometry to the other

public virtual double DistanceTo(Geometry other)

Obtain the distance from this Geometry to another

public bool DoesIntersect(Geometry other)

Determine if another Geometry object intersects with this one

public virtual Geometry[] Explode()

Separates compound or non-separated elements into their component parts.

public Geometry[] Intersect(Geometry other)

Get the intersection Geometry for this object and another

Get the intersection of Geometry for this object and a collection of other Geometries. Finds common geometry of all participants.

public virtual bool IsAlmostEqualTo(Geometry other)

Check if the two objects have the same representational geometry or numerical values

public virtual Geometry Mirror(Plane mirrorPlane)

Mirror the object across the input Plane

public virtual Geometry Rotate(Point origin, Vector axis, double degrees = 0)

Rotates an object around an origin and an axis by a specified degree

public virtual Geometry Rotate(Plane basePlane, double degrees = 0)

Rotates an object around the Plane origin and normal by a specified degree

public virtual Geometry Scale(double amount = 1)

Scale uniformly around the origin

public virtual Geometry Scale(double xamount = 1, double yamount = 1, double zamount = 1)

Scale non-uniformly around the origin

public virtual Geometry Scale(Plane plane, double xamount = 1, double yamount = 1, double zamount = 1)

Scale non-uniformly around a given Plane

public virtual Geometry Scale(Point basePoint, Point from, Point to)

Scale uniformly around a given point, using two pick points as scalars

public virtual Geometry Scale1D(Point basePoint, Point from, Point to)

Scale in one dimension by base and 2 pick points. The scaling axis is defined by the line between base and from point.

public virtual Geometry Scale2D(Plane basePlane, Point from, Point to)

Scale in two dimension by base and 2 pick points The two pick points are projected onto the base plane in order to determine the 2d scale factors

public virtual Geometry[] Split(Geometry other)

Split this Geometry using another Geometry as a cutting "tool"

public virtual string ToJson()

Convert the Geometry into a JSON object formatted with autodesk.geometry:geometry-1.0.0 schemata.

public string ToSolidDef()

Convert geometry to Solid Def json

public virtual Geometry Transform(CoordinateSystem cs)

Transforms geometry by the given transform of CoordinateSystem

public virtual Geometry Transform(CoordinateSystem fromCoordinateSystem, CoordinateSystem contextCoordinateSystem)

Transforms this geometry from source CoordinateSystem to a new context CoordinateSystem.

public virtual Geometry Translate(double xTranslation = 0, double yTranslation = 0, double zTranslation = 0)

Translates any given geometry by the given displacements in the x, y, and z directions defined in WCS respectively.

public virtual Geometry Translate(Vector direction)

Translate geometry in the given direction by the vector length

public virtual Geometry Translate(Vector direction, double distance)

Translates any geometry type by the given distance in the given direction.

public virtual Geometry[] Trim(Geometry other, Point pick)

Removes elements of the entity closest to the pick point