New tool - Line segment (Chord) from intersection of curve , circle / arc

While doing some tweaking of the Intersect Arc (Circle) Axis tool dialog / Property Editor I noticed the tool only takes the 1st point of intersection and wondered if there is a need to have a tool that provides both points of intersection of the Axis (technically known as a secant) and the line segment between the 2 (or more possible points if a curve) points - technically known as a chord? BTW… if the intersection provides only 1 point of intersection is called a tangent, and if there is no intersection it’s called an exterior line.

So is this something we might want to pursue?

chord

3 Likes

considering that it’s currently impossible to make a point at the intersection of a tangent & arc when the base point of the tangent is on a curve, it does sound like it might be desirable.

1 Like

I was thinking more in terms of getting results from 1 tool vs 3 tools to achieve the same objective… that is 2 points and a line segment - which could then be used in formulas for length and angle. There’s already precedent with the 2 new points with the True Dart tool - this tool would add a line to that. Of course an intersect with a curve could yield more than 2 points.

1 Like

I can’t say that I’ve ever had the need for this tool, however, I can see that it could help others. My only concern is having so many different tools that the program becomes very daunting for new users. Could it not be an option in the one tool to make either the 1st edge or both edges?

1 Like

I’ve not needed to do what is described above.

As a slight segway, when adding the ability to preview Seamly2D patterns directly on my-pattern.cloud (using JavaScript) I created quite a few examples of using more these more exotic tools in order to determine their behaviour at edge cases (obviously I can’t look at the source). Is there documentation that describes their precise behaviour? There are almost certainly still nuances that I’ve not discovered.

1 Like

That is a possibility. I’m sure you probably meant to say the 1st edge, the 2nd edge, or both. I’m thinking in terms of the arc / curve segments produced. Using only the 1st or the 2nd would produce 2 segments, while using both would produce 3 segments.

Of course if one were to use both points you could then draw a “line” between them, but part of what I was thinking was to have the tool produce the chord line too, without the need to use another tool.

2 Likes

As far as I know… no there is no documentation specific to each tool, That being said, with some of tools still having some bugs it’s hard to describe a precise behavior. There’s an expected behavior, but even with a tool that normally works, there can be unexpected behavior when using a different set of measurements. For example, when using the Intersect Arc Axis tool, with one set of measurements the arc may indeed intersect the axis, while switching the measurements may then move the arc or axis where they no longer intersect. If you were relying on that point for another tool and it “disappears” the program crashes. In that case the intersect point will now use the only “known” point - the draft block base point.

If there’s specific tools you’re looking at let me know - I might be able to describe what they are suppose to do and / or do.

2 Likes

The main thing is being able to put a point at the intersection of a curve & multiple parts of a tangent. Because if the base point of a tangent is on the arc that it’s supposed to intersect with, then obviously it’s already intersecting, so it just places a point on the existing point. Which is worthless.

I believe that the dart tool uses the names of the existing points that it’s based off of, just adding a suffix. I’m not clear on how we’d go about naming multiple original points simultaneously produced. Actually, I can’t remember the case where I thought it would be a problem.

So, multiple points of intersection? YES! Chord? It would be handy, sometimes, but I think that adding a line segment in the ordinary way will do a better job at keeping it super simple.

1 Like

Just create 2 consecutive numbers using the existing routine that keeps track of the next new block letter + number. Of course you could rename them if you want.

2 Likes

@Douglas, thanks for the response above. Some time ago I created a bunch of unit tests, at least one per tool, in order to understand the edge cases. Most of the later ones have a background picture showing the Seamly2D behaviour and the javascript version in the foreground. (https://my-pattern.cloud/patternEditor/tests/test.html, see https://my-pattern.cloud/patternEditor/tests/test_pointFromCircleAndTangent.html as an example). The javascript preview is useless if it is not interpreted identically.

The .VAL version of each is also available - PatternEditor/tests/seamly2d/patterns at master · MrDoo71/PatternEditor · GitHub .

I would be very interested in keeping these use cases up to date, and I’d be happy to derive from my interpretation how I think edge cases are currently being interpreted by Seamly2D and to get this documented if that would be useful to anyone.

It would be really useful to have a thread for discussing the technical apsects of tool behaviour.

1 Like

Hi! I think my query is related to the above discussion and here it goes: is there a way(or a tool) to segment a curve/line /arc? I can locate a point on the curve /line/arc using rotation /intersection…but how do I segment (separate the line/curve/arc) at that point where I can select only that segment before or after the point? Or if possible delete the segment after the point? Thank you.

1 Like

Hi Olive.

You can’t and No. You will have access to each segement length for use in formulas, but currently the app can only treat a curve, line or arc as a single tool. Keep in mind that the objects in draft mode are only construction lines, and do not represent an actual pattern piece… in which case when you create a piece, you can select only the segments you want to include in the piece.

2 Likes

Thank you,Douglas. I got that.

2 Likes

Hi @olive, one work-around would be to create each segment of your curve separately so that you can choose the bits that you want. (I sometimes feel that it’s much nicer this way.) I use the curve handle of the previous segment in the 1st handle of the 2nd segment, in the formula, so that they move together. If the one changes, then the other will change accordingly, to keep the curve moving together, so you will only really have to put in a formula for the 2nd handle in each section after the 1st one.

2 Likes

Brilliant!

But, this doesn’t solve the issue that @olive brought up, that if you create a point on a curve… whether by using the Point On Curve or and Intersection tool… you will not be able to display just one of the segments. You could create a curve, intersect it, then draw a new curve over the original on the segment you want, and then hide the orginal curve in a group… but that’s kinda of silly.

2 Likes

Yes, but it’s better than nothing and one can use the original curve handles formulas in the sectional curve formulas to keep them true to the original.

Great brainwave, @Douglas :grin:

1 Like