
Something like this (not tested, and not especially efficient): from shapely.ops import nearest_pointsįor x, y in g1. It shouldn't be too difficult to write one using _points though. Shapely doesn't provide an algorithm for snapping vertices to edges. On the right the red vertex is outside the snapping tolerance (despite being closer to the edge!). On the left, the red vertex is within the snapping tolerance to the blue vertex, so it will snap. The function snaps to the vertices of geometries only.
#Eazydraw snap to vertices not working how to
If I increase the tolerance I get a wrong output, something like this (after defining 20 as the tolerance of the snapping, the green line is the result):Īny ideas on why the snapping is not working properly?Īny suggestions on how to solve this problem? Point-click-drag any vertex or any of the. Rotate an existing curve with a simple click and drag of the Rotate Tool. Double or Halve vertices with a menu click. Then go into orthographic mode ( numpad 5 ), align view to the 'x' axis ( numpad 3) Type G (to move the vertices) and X to constrain to.
#Eazydraw snap to vertices not working upgrade
Update2: Noticed lt 2017 was out, after a semi confusing chat on how to upgrade 16 to it, got it installed, and snapping is back to working as it should. Use the Knife Tool to cut a Bezier into 2 or more segments - an exact math operation. First, modify snapping behavior to Snap to Face like so : (toolbar on the top of the viewport screen) In edit mode, select all the vertices you want to snap to the faces. Update: Just gave the 30 day trial of maya 2016 (not lt) a whirl and the snapping issue is non existent. Although the original lines are pretty close and within the 14 feets Easily insert vertices with the Insert Tool, or remove them with the Knife Tool. Only a part is snapped to the black line (the south side). In this case the lines are correctly snappedĪnother example where it didn't work as expected: (before the snapping)Īnd here's the result after the snapping. The blue lines are the result of the snapping Res.to_file('result.shp', driver="ESRI Shapefile")Īfter the snapping(with 14 as a tolerance) : Res.geometry = (lambda x: snap(x, lines2_union, 14)) The first vertex you click is sensitive to object snap vertex.



Start with a closed shape made with line and the problem is not there. I'm trying to snap two lines to each other using Shapely/Geopandas but the result of the snapping is very odd. The problem may be related to the fact the the line you start with is open and converting it to an editable mesh makes it invisible.
