Squisher

public class Squisher : IDisposable
class used to wrap Squish functions

Constructors

Squisher

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

Finalizer

~Squisher

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

Methods

Dispose

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

Dispose

#
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.

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

Get2dMesh

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

Get3dMesh

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

GetAreaConstrainedTrianglesIndices

#Since v8.0
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.
public MeshFace[] GetAreaConstrainedTrianglesIndices()
An array of mesh faces

GetLengthConstrained2dLines

#Since v8.0
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.
public Line[] GetLengthConstrained2dLines()
An array of lines representing the length constraints

GetLengthConstrained3dLines

#Since v8.0
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.
public Line[] GetLengthConstrained3dLines()
An array of lines representing the length constraints

GetMesh2dEdges

#Since v7.9 Obsolete v8.0
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.
public Line[] GetMesh2dEdges()
Remarks: Renamed to GetLengthConstrained2dLines.
An array of lines representing the length constraints

GetMesh3dEdges

#Since v7.9 Obsolete v8.0
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.
public Line[] GetMesh3dEdges()
Remarks: Renamed to GetLengthConstrained3dLines.
An array of lines representing the length constraints

Is2dPatternSquished

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

SquishBack2dMarks

#Since v7.9
Maps 2D geometry from the squished surface or mesh back to the original 3D surface or mesh
public static IEnumerable<GeometryBase> SquishBack2dMarks(
squishedGeometry,
The squished surface or mesh
marks
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
Maps a curve on or near a previously squished 3d surface to the resulting 2d surface
public PolylineCurve SquishCurve(
curve
The curve to squish
)
The squished curve

SquishMesh

#Since v7.9
Squish the given mesh into a flat mesh
public Mesh SquishMesh(
sp,
The parameters for the squish operation
Mesh
mesh3d,
The mesh to squish
marks,
Points, Curves, PoiuntClouds, and TextDots to squish. Can be null.
squished_marks_out
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
Squish the given mesh into a flat mesh
public Mesh SquishMesh(
sp,
The parameters for the squish operation
Mesh
mesh3d
The mesh to squish
)
A flattened mesh

SquishPoint

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

SquishSurface

#Since v7.9
Squish the surface into a flat brep
public Brep SquishSurface(
sp,
The parameters for the squish operation
surface,
The surface to be squished
marks,
Point, PountCloud, TextDot, and Curve objects to squish. Can be null.
squished_marks_out
A list of the squished marks, with null entries for marks that fail to squish. Can be null.
)
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)
A brep representing the flattened surface

SquishSurface

#Since v7.9
Squish the surface into a flat brep
public Brep SquishSurface(
sp,
The parameters for the squish operation
surface
The surface to be squished
)
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])
A brep representing the flattened surface

SquishTextDot

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