Hi folks.
As I work on some putting some patterns in Seamly2D for the current job I’m working, I was reminded of one tool I wanted to update - the Point of Intersection tool. I use this a lot to locate a point to create lines that I can use in the control point of curves… such as armholes. It’s a tedious process to create the point, then add two lines so you then have the line lengths towork with, as well as the visual. Well… I updated the tool so it automatically adds the lines.
As you can see the tool now displays the 2 lines - without having to use the line tool twice - and you now can change the color of the line, and thus the point name color. Also you may note you also have control of the line weight - more on that. Here’s the updated tool dialog:
A couple notes here. Note the change of tool name - it will now be Intersect XY, which will go along with Intersect Lines, Intersect Arcs, Intersect Circles. Also note that - yes - you can have a line width of Zero. Qt simply treats a width of zero as being a cosmetic pen, or a 1 pixel wide pen… which you might have figured out that zero at any scale is always zero. In other words it’s always 1 pixel wide regardless of the zoom factor.
So… you now would have access to the line lengths:
which are also displayed in the tooltip:
Also the Property Editor is semi updated… it lacks the line weight combo box, which will take a deeper dive to update that, as the line weight is a custom combo box of mine that needs to be implemented across all the tools.
In checking out the updates - in particular is it de-referencing properly? - I noticed an undesirable behavior and went uh oh. That is, if you create a new Intersect XY point, and then use one of the line lengths in a formula of another tool, then delete the Intersect XY tool you get the proverbially broken fx dialog:
So what does this mean? I went over an over the code, and then found out - THIS HAPPENS WITH ALL THE TOOLS!. Only the points or curves you use in another tools formula are referenced / dereferenced. In other words using a tool’s length or angle in an FX does not disable the Delete for that tool. This needs further investigation, and while not exactly a bug (as the exception is caught and handled), it’s no doubt lead to many a broken patterns. I would say if this pops up, best to Undo… save a backup, and then proceed from there. if you just cancel you have no doubt left the pattern broken, and it won’t open. You can fix the formula, but that also in some way has probably left the pattern broken in a sense. The best thing to do is backtrack and dereference the offending variable, until you can safely delete what you were trying to delete.
Ok… so what about the line weight? Well, since I needed to avoid the above issue of opening a new pattern with the updated tool in an previous version of the app I created a new xml schema 0.6.4 file - which other than the name is the same of 0.6.3. The updated tool does not add anything new to the xml so I figured the app would just go through the normal conversion process from 0.6.3 to 0.6.4 - which really doesn’t change anything. Nope. There’s a feature of the conversion process that if nothing new / different from the new schema is used in a pattern, when trying to open it in a previous ver, it’s happy to do so, IE. When trying to open a test of a 0.6.4 pattern in a 0.6.3 ver of the app, it opens the pattern as “down graded” as if it were an 0.6.3 pattern, and for all intents and purposes it is an 0.6.3 pattern. So it throws the broken fx dialog. That’s where the line weight comes in. I NEEDED to actually make a change in the schema to force the app to validate the pattern file as 0.6.4 - which will fail with an 0.6.3 build of the app. So I added the line weight - which I’ve wanted to do anyway. So now, since some of the basic code for the lineweight is in place, as I (re)update the rest of the tool dialogs I can add the line weight to them. Which to be honest I’m finding it easier to see wider lines on the screen without needing my glasses on.