Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tangents or normals to a path
#2
I continue with the package of four plugins (see post #1):
  1. Bounding box
  2. Parallel tangents or normals
  3. Tangents or normals from a point
  4. Tangents or normals from a stroke end of another path
I explain now numbers 2 and 4. They are rather similar to number 3. I talk only about tangents here. You can try normals yourself.

Parallel tangents or normals: Just as in number 3, you input a path and a tentative tangent (a line segment, a path with two anchors).

   

The plugin draws tangents which are parallel to the tentative tangent. (Number 3 made tangents drawn from one point.) With Actions="Draw only the closest" (default) and "Draw all" you get:

   

Note that the tangents are copies of the inputted tentative tangent (with the middle anchor added). If you need longer tangents, use a longer tentative tangent. There is no "Extend" option here.

Tangents or normals from a stroke end of another path: The idea here is that you have a path and you need to draw to it a tangent which should extend some stroke of another path. (Plugin number 3 drew tangents from one point but here you can make them extend some stroke). You input three paths:
  1. The path whose tangent you want to draw (this is the right-clicked path)
  2. Another path whose stroke you would like to extend
  3. Tentative tangent
   

You make the tentative tangent close to where you would like the tangent to be:

   

Then you call the plugin and get:

   

Both ends of the tentative tangent are "snapped" to the proper places. Note that this is no real snapping: the plugin makes a new copy of the whole path with the one stroke extended.

(It would be nice to achieve this without having to build a new copy of the path. But I don't know how that could be accomplished in a plugin, since for example we don't know if the extension should be made to the head or to the tail end of the stroke. And the pdb does not contain all functions one would wish.)

As in number 3, this plugin offers three other inputs: "Tangents or normals?", "Action", and "Extend". They work as before. Please try these yourself.

I hope that somebody will find these plugins useful. If there are any problems, please tell me. Any suggestions are welcome.
Reply


Messages In This Thread
Tangents or normals to a path - by Ottia Tuota - 12-19-2020, 04:57 PM
RE: Tangents or normals to a path - by Ottia Tuota - 12-19-2020, 07:18 PM
RE: Tangents or normals to a path - by Ofnuts - 12-19-2020, 08:40 PM
RE: Tangents or normals to a path - by denzjos - 12-26-2020, 07:59 AM
RE: Tangents or normals to a path - by denzjos - 01-10-2021, 04:24 PM

Forum Jump: