Squisher

public class Squisher : IDisposable
class used to wrap Squish functions

Constructors

Squisher

#Since v7.9
public Squisher()
constructs a squisher with default parameters

Finalizer

~Squisher

#
~Squisher()
Passively reclaims unmanaged resources when the class user did not explicitly call Dispose().

Methods

Dispose

#Since v7.9
public void Dispose()
Actively reclaims unmanaged resources that this instance uses.

Dispose

#
protected virtual void Dispose(bool disposing)
For derived class implementers.

This method is called with argument true when class user calls Dispose(), while with argument false when the Garbage Collector invokes the finalizer, or Finalize() method.

You must reclaim all used unmanaged resources in both cases, and can use this chance to call Dispose on disposable fields if the argument is true.

Also, you must call the base virtual method within your overriding method.

disposing (bool)true if the call comes from the Dispose() method; false if it comes from the Garbage Collector finalizer.

Get2dMesh

#Since v7.9
public Mesh Get2dMesh()
Get the 2d mesh that results from the squish operation
Returns the squished 2d mesh

Get3dMesh

#Since v7.9
public Mesh Get3dMesh()
Get the 3d mesh that was used for squish operation
Returns the squished 2d mesh

GetAreaConstrainedTrianglesIndices

#Since v8.0
public MeshFace[] GetAreaConstrainedTrianglesIndices()
Gets mesh vertex indices for the triangular faces that were constrained during the squish. Indices can be used in both the 2d and 3d mesh vertices arrays.
An array of mesh faces

GetLengthConstrained2dLines

#Since v8.0
public Line[] GetLengthConstrained2dLines()
Gets lines at the position of the mesh edges and diagonals that were constrained during the squish, in the 2d mesh. The line at any index here corresponds to the same line in GetLengthConstrained3dLines.
An array of lines representing the length constraints

GetLengthConstrained3dLines

#Since v8.0
public Line[] GetLengthConstrained3dLines()
Gets lines at the position of the mesh edges and diagonals that were constrained during the squish, in the 3d mesh. The line at any index here corresponds to the same line in GetLengthConstrained2dLines.
An array of lines representing the length constraints

GetMesh2dEdges

#Since v7.9 Obsolete v8.0
public Line[] GetMesh2dEdges()
Gets lines at the position of the mesh edges and diagonals that were constrained during the squish, in the 2d mesh. The line at any index here corresponds to the same line in GetLengthConstrained3dLines.
Remarks: Renamed to GetLengthConstrained2dLines.
An array of lines representing the length constraints

GetMesh3dEdges

#Since v7.9 Obsolete v8.0
public Line[] GetMesh3dEdges()
Gets lines at the position of the mesh edges and diagonals that were constrained during the squish, in the 3d mesh. The line at any index here corresponds to the same line in GetLengthConstrained2dLines.
Remarks: Renamed to GetLengthConstrained3dLines.
An array of lines representing the length constraints

Is2dPatternSquished

#Since v7.9
public static bool Is2dPatternSquished(GeometryBase geometry)
Returns true if the input geometry was the result of a squish operation
geometry (GeometryBase)

SquishBack2dMarks

#Since v7.9
public static IEnumerable<GeometryBase> SquishBack2dMarks(GeometryBase squishedGeometry, IEnumerable<GeometryBase> marks)
Maps 2D geometry from the squished surface or mesh back to the original 3D surface or mesh
squishedGeometry (GeometryBase)The squished surface or mesh
marks (IEnumerable<GeometryBase>)The input 2D geometry
An enumeratd list of squished marks. Individual marks that fail to squish are null in this list. Returns null on complete failure.

SquishCurve

#Since v7.9
public PolylineCurve SquishCurve(Curve curve)
Maps a curve on or near a previously squished 3d surface to the resulting 2d surface
curve (Curve)The curve to squish
The squished curve

SquishMesh

#Since v7.9
public Mesh SquishMesh(SquishParameters sp, Mesh mesh3d, IEnumerable<GeometryBase> marks, List<GeometryBase> squished_marks_out)
Squish the given mesh into a flat mesh
sp (SquishParameters)The parameters for the squish operation
mesh3d (Mesh)The mesh to squish
marks (IEnumerable<GeometryBase>)Points, Curves, PoiuntClouds, and TextDots to squish. Can be null.
squished_marks_out (List<GeometryBase>)The squished marks. If a mark fails to squish, it will have a null entry in the list.
A flattened mesh

SquishMesh

#Since v7.9
public Mesh SquishMesh(SquishParameters sp, Mesh mesh3d)
Squish the given mesh into a flat mesh
sp (SquishParameters)The parameters for the squish operation
mesh3d (Mesh)The mesh to squish
A flattened mesh

SquishPoint

#Since v7.9
public bool SquishPoint(Point3d point, out Point3d squishedPoint)
Maps a point on or near the previously squished 3d surface to the flattened surface
point (Point3d)The point to squish
squishedPoint (out Point3d)The squished point
true if successful

SquishSurface

#Since v7.9
public Brep SquishSurface(SquishParameters sp, Surface surface, IEnumerable<GeometryBase> marks, List<GeometryBase> squished_marks_out)
Squish the surface into a flat brep
Remarks: NB: If you are using this function from Grasshopper, which does not have a type that can hold a trimmed surface, you will need to pass a Brep to your component and get the face of interest from this Brep into this function. Otherwise you will lose all trimming information. Example: `brep_out = SquishSurface(sp, brep.Faces[0], marks_in, marks_out)`
sp (SquishParameters)The parameters for the squish operation
surface (Surface)The surface to be squished
marks (IEnumerable<GeometryBase>)Point, PountCloud, TextDot, and Curve objects to squish. Can be null.
squished_marks_out (List<GeometryBase>)A list of the squished marks, with null entries for marks that fail to squish. Can be null.
A brep representing the flattened surface

SquishSurface

#Since v7.9
public Brep SquishSurface(SquishParameters sp, Surface surface)
Squish the surface into a flat brep
Remarks: NB: If you are using this function from Grasshopper, which does not have a type that can hold a trimmed surface, you will need to pass a Brep to your component and get the face of interest from this Brep into this function. Otherwise you will lose all trimming information. Example: `brep_out = SquishSurface(sp, brep.Faces[0])`
sp (SquishParameters)The parameters for the squish operation
surface (Surface)The surface to be squished
A brep representing the flattened surface

SquishTextDot

#Since v7.9
public TextDot SquishTextDot(TextDot textDot)
Maps a TextDot on or near a previously squished 3d surface to the resulting 2d surface
textDot (TextDot)The text dot to squish
The resulting textDot