Constructors
Finalizer
~Squisher
#~Squisher()
Passively reclaims unmanaged resources when the class user did not explicitly call Dispose().
Methods
public void Dispose()
Actively reclaims unmanaged resources that this instance uses.
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.
Parameters:
| disposing (bool) | true if the call comes from the Dispose() method; false if it comes from the Garbage Collector finalizer. |
public Mesh Get2dMesh()
Get the 2d mesh that results from the squish operation
Returns: Returns the squished 2d mesh
public Mesh Get3dMesh()
Get the 3d mesh that was used for squish operation
Returns: Returns the squished 2d mesh
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.
Returns: An array of mesh faces
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.
Returns: An array of lines representing the length constraints
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.
Returns: An array of lines representing the length constraints
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.
Returns: An array of lines representing the length constraints
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.
Returns: An array of lines representing the length constraints
Returns true if the input geometry was the result of a squish operation
Parameters:
| geometry (GeometryBase) |
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
Parameters:
| squishedGeometry (GeometryBase) | The squished surface or mesh |
| marks (IEnumerable<GeometryBase>) | The input 2D geometry |
Returns: An enumeratd list of squished marks. Individual marks that fail to squish are null in this list. Returns null on complete failure.
Maps a curve on or near a previously squished 3d surface to the resulting 2d surface
Parameters:
| curve (Curve) | The curve to squish |
Returns: The squished curve
public Mesh SquishMesh(SquishParameters sp, Mesh mesh3d, IEnumerable<GeometryBase> marks, List<GeometryBase> squished_marks_out)
Squish the given mesh into a flat mesh
Parameters:
| 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. |
Returns: A flattened mesh
Squish the given mesh into a flat mesh
Parameters:
| sp (SquishParameters) | The parameters for the squish operation |
| mesh3d (Mesh) | The mesh to squish |
Returns: A flattened mesh
Maps a point on or near the previously squished 3d surface to the flattened surface
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)`
Parameters:
| 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. |
Returns: A brep representing the flattened 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])`
Parameters:
| sp (SquishParameters) | The parameters for the squish operation |
| surface (Surface) | The surface to be squished |
Returns: A brep representing the flattened surface