The M_Mesh class is a container for the actual vector shapes in a vector layer. It contains points, curves, and fill and outline shapes.
Completely empties a mesh of all points and curves.
Return value: noneReturns the number of points in the mesh.
Return value (int): number of pointsReturns the number of curves in the mesh.
Return value (int): number of curvesReturns the number of shapes in the mesh.
Return value (int): number of shapesReturns the number of point groups in the mesh.
Return value (int): number of point groupsAccess a point in the mesh.
Return value (M_Point): a point object id (int): point identifierAccess a curve in the mesh.
Return value (M_Curve): a curve object id (int): curve identifierAccess a shape in the mesh.
Return value (M_Shape): a shape object id (int): shape identifierAccess a point group in the mesh.
Return value (M_PointGroup): a point group object id (int): point group identifierAdd a new point to the mesh.
Return value: none pos (LM_Vector2): location of the new point attachID (int): if -1, then start a new curve, otherwise attach the new point to this point id frame (int): frame numberAdd a new point to the middle of a curve.
Return value: none pos (LM_Vector2): location of the new point attachCurve (int): curve identifier to attach to attachSeg (int): which segment of the curve frame (int): frame numberAdds a lone, unconnected point to the mesh. Lone points are not normally allowed in Moho, so this function must be followed by one or more calls to the AppendPoint function.
Return value: none pos (LM_Vector2): location of the new point frame (int): frame numberAdds a new point, connecting it with a curve to either the AddLonePoint point, or the last call to AppendPoint.
Return value: none pos (LM_Vector2): location of the new point frame (int): frame numberDeletes a point from the mesh.
Return value: none id (int): point identifierWelds two points together. The point identified by movingID will move if necessary to line up with solidID. Not all welding operations are allowed, so this function will return the status of the weld.
Return value (bool): true if successful, otherwise false movingID (int): point identifier solidID (int): point identifier frame (int): frame numberTests whether two points are adjacent on a curve.
Return value (bool): true if adjacent, otherwise false p1 (int): point identifier p2 (int): point identifierReturns the closest point to the given location.
Return value (int): point identifier pos (LM_Vector2): a 2D location in the layer ignoreID (int): point identifier - ignore this point when testing for the closest point maxPointID (int): point identifier - ignore points with identifiers higher than this idReturns the location of the center point of the current group of selected points.
Return value (LM_Vector2): center locationReturns the boundaries of the current selection.
Return value: none min (LM_Vector2): minimum X and Y coordinates max (LM_Vector2): maximum X and Y coordinatesCall this before moving a group of points around.
Return value: noneTranslate the currently selected points.
Return value: none offset (LM_Vector2): the distance to translate themScale the currently selected points.
Return value: none sx (float): x scale sy (float): y scale centerVec (LM_Vector2): the center point of the scaling operationRotate the currently selected points.
Return value: none angle (float): angle in radians centerVec (LM_Vector2): the center point of the rotation operationDeselect all points.
Return value: noneSelect all points.
Return value: noneInvert the current selection.
Return value: noneSelect all points that are connected by curves to any currently selected points.
Return value: noneDelete an edge of a curve.
Return value: none curveID (int): curve identifier segID (int): which segment on the curve to delete frame (int): frame numberDelete a fill or outline shape.
Return value: none id (int): shape identifierLower a shape in the stacking order.
Return value: none id (int): shape identifier toBottom (bool): true to lower it to the bottom, false to lower it one stepRaise a shape in the stacking order.
Return value: none id (int): shape identifier toTop (bool): true to raise it to the top, false to raise it one stepAdd a new point group, made up of the currently selected points.
Return value: none name (string): name for the new groupSelect all the points in a given group.
Return value: none name (string): name of the group to selectDelete a point group from the mesh.
Return value: none name (string): name of the group to delete