DynamoVisualProgramming.ZeroTouchLibrary by Autodesk

<PackageReference Include="DynamoVisualProgramming.ZeroTouchLibrary" Version="3.0.0-beta6764" />

 Geometry

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

Get the BoundingBox containing the given piece of Geometry

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

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 Geometry[] Approximate()

Convert internal structure of geometry from analytics to splines

Obtain the closest Point on this Geometry to the other

public 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 Geometry[] Explode()

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

public string ExportToSAT(string filePath)

Exports the specified geometry to the given SAT file path

public string ExportToSAT(string filePath, double unitsMM)

Exports the specified geometry to the given SAT file path

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 bool IsAlmostEqualTo(Geometry other)

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

public Geometry Mirror(Plane mirrorPlane)

Mirror the object across the input Plane

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

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

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

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

public Geometry Scale(double amount = 1)

Scale uniformly around the origin

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

Scale non-uniformly around the origin

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

Scale non-uniformly around a given Plane

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

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

public 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 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 byte[] SerializeAsSAB()

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

public Geometry[] Split(Geometry other)

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

public 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

Transforms geometry by the given transform of CoordinateSystem

public Geometry Transform(CoordinateSystem fromCoordinateSystem, CoordinateSystem contextCoordinateSystem)

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

public 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 Geometry Translate(Vector direction)

Translate geometry in the given direction by the vector length

public Geometry Translate(Vector direction, double distance)

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

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

Removes elements of the entity closest to the pick point