New pattern dialog

I’m sure this topic has been discussed in the past before my time, but working on creating a unique name for a new draft block, the New pattern dialog comes into play.

My specific question is, besides the units, and adding an option to choose a prefix for a new block (in this case the 1st block), would it make sense to add an option to select a measurement file to start a pattern with? Seems like it would eliminate more clicks to load a measurement file.

For that matter… anything else that anyone feels should be in the New pattern dialog?

3 Likes

As long as it isn’t a required field, yes, I would be glad of such an option.

Also, since you asked, sometimes I’d like the option to save as in the creation process, but I’d want it to be optional because often I’m just doing a quick experiment that I don’t want to keep around.

:unicorn:

2 Likes

Wouldn’t be required. Would check if the ME file name is not Null, if Not then load the the ME file. Of course the dialog would have a “browse” button for the ME file.

Could provide a "Pattern name:____ (optional) field in the dialog, and again if it’s NOT null, do an automatic Save as. Of course would want to check if the file exists and provide a way to handle that before returning the dialog to the MainWindow. Likewise this could be another time saver.

3 Likes

Mir hat sich bis jetzt die Funktion der einzelnen Schnittteile noch nicht erschlossen. Vielleicht könnt ihr mir mal erklären wie sie im Alltag angewendet werden können, dass es einen Sinn ergibt.

Mein Aufbau sieht folgender Maßen aus: Ich habe ein Gerüst. Mit “speichern unter” erstelle ich einen Grundschnitt. Darin werden alle Teile angelegt. Sollen Veränderungen gemacht werden: mit “speichern unter” werden Änderungen, wie z.B. Armloch tiefer, Ausschnitt, Saum aufdrehen, Kragenbreite usw. festgehalten. Ich habe immer eine Gruppe wo ich diese Änderungspunkte hinterlege.

Dafür hätte ich einen Verbesserungsvorschlag, dass man beispielsweise bei geöffneter Gruppe alle Punkte und Linien markieren und mit rechter Maustaste eine Farbe zuordnen kann.

1 Like

That’s coming. There will be a “current pen” toolbar where you can set the current line type and color, and any new tool will default to that pen. You could over ride that pen attributes to something else. Also you will be able to assign a group to a new tool in it’s dialog. One of the pen options will be to use the assigned group’s pen.

2 Likes

Got the measurements and Save As working in the New Patter Dialog. If no pattern name or measurement file is provided, nothing happens with that option. The measurement path/ file is checked if it exists or the OK button is disabled. Also updated the “file” icons from the (old) Windoze theme.

newpatterndialog

newfileicons

2 Likes

Made a lot of headway with this issue. Besides refactoring a lot of the misnamed “PP” (pattern piece) to draft block in the code as well as refactoring the draft block routines to pass a new DraftBlock struct ( name & prefix) vs just the draft block name… realized I needed to address older patterns without the new (draw) block prefix attribute and the various undo commands, as well as rename a draft block… and the new prefix attribute.

1 Like

Done with updating New Pattern and draft block. Just waiting for my last PR to be merged so I can pull the Develop branch changes into this branch… it’s easier to resolve any conflicts locally.

So, besides the previous addition of being able to name the pattern and add a measurement file when Selecting “New” pattern, you will now be able to a default point name prefix… with a few limitations. One of those limitations is when adding a New Draft Block you can not use a current base point name of an existing draft block. Basically we need to preserve the uniqueness of the basepoint name. Adding a new draft block is actually adding a basepoint tool. When editing a draft block you are free to use or rename the prefix to an existing basepoint.

The draft block toolbar has been updated:

blocktoolbar

An Edit button has been added for the current draft block… followed by the usual draft block drop down box - which I renamed Name:. Next to that is a new Prefix edit box, where you can rename the prefix for the current draft block. Lastly is a “Reset” button, which will reset the prefix to the basepoint name. So you are now free to automatically name points at will and not be tied to the A, B, C, D… etc of the basepoint name convention. You could do something like below naming the “Front” block points FR1, FR2… then switch to something like Notch to add your notch points, then switch to Anchor to add your anchor (pin) points. Or for those that are drafting a front, back, sleeve, and collar all in 1 block… you could change your prefix as you you work on the different parts… such as F, B, S, and C… or whatever.

editblockbig

The New and Edit dialogs handle any errors in the name or prefix - such as an empty field, an existing block name or base name or a prefix that does not fit the reg expression’s allowed or basically what format and chars are allowed.

Gone is the additional message box that pops up saying “That name already exists…”. Like you should be used to see by now in other dialogs the text in the edit box will turn red indicating the current name / prefix is unacceptable. Such as blank fields or illegal prefix name:

new_blockdialog_blankerror

prefixerror

Note the prefix “Reset” button is also in the Edit dialog.

When adding new blocks the default prefix name will still follow the A, B, C, D… (in the label language) that currently exists.

There is now also a “Delete Draft Block” item in the Tools menu, which will correctly delete the current draft block. Since I changed the whole naming scheme to use the prefix, there is no mix up in syncing new point names to the basepoint name - which may have been deleted.

deleteblock

For those interested in the nuts and bolts… the < draw > block now has a prefix attribute, but also maintains the basepoint name. No conversion for older patterns is required… I simply used the basepoint name as a default name for the prefix attribute if it’s missing (which in previous pattern versions it will be) when parsing the file. So now you will see something like this in the XML:

draw

About the only thing I can think of to add to this would be to improve the Prefix as far as illegal chars are entered - currently it just reverts back to the existing prefix. Also I thought of maybe changing the prefix line edit box to an editable dropdown, where you could add your own custom prefix names, and then you could just select a prefix from the drop down.

3 Likes

:star_struck: :star_struck: :star_struck:

Oh, wow! @Douglas. This is amazing and will help me hugely in my drafting. Just this past weekend, I was drafting something really complicated where I had to remember my chosen prefixes to the pattern :grinning:

And already, my mind is spinning with ideas as to how this can simplify so many things, like grouping.

Thank you very, very much :grinning: I can’t wait for Monday.

One small question… After the prefix, can we choose between alpha & numberic?

1 Like

Hmmm… gives me another idea for improving groups… automatically add onjects to a group by a prefix, or matching some text. For example… in your blouse pattern there’s a lot of “Pins”… one or 2 clicks and you could add ALL the Pins to a group. Or maybe create a group by line type or color?

But yes… I’ve been using your blouse pattern to test with lately, and I thought of this pattern and how you could more or less use the prefix to simulate multiple blocks. To be honest, this almost makes multiple blocks a moot point… no pun intended. :slight_smile:

Yes… the same point naming rules apply as it does currently, just that now you’re not stuck with the next new point name always automatically starting with the base point letter name… in alphabetical order. If you don’t edit the prefix names, it operates just as it does now. I just applied the same point name validation in the new & edit dialogs, as well as the prefix edit box in the tool bar.

Well… that will depend when Susan merges my pending “Export” PR… which I already know I need to resolve conflicts. That happens a lot when you make changes from different branches to common files like MainWindow. I will need to pull those changes into this feature branch… I found it’s easier to fix it on my end after syncing with the updated develop branch before making a PR.

1 Like

LOL, ok. I’ll wait (im)patiently :star_struck:

I’m still waiting for my previous PR to be merged - Susan wanted to know about a typo and a “valentin.exe” (artifact) reference in some comments.

In the mean time, I figured I’d play around by sub classing a “prefix” combox that I can use in place of the prefix lineedit in the toolbar. By sub classing and moving the function of the box into the box itself, it makes it easy to handle the validation of the entered text. Also by using a combobox now I can expand it later to present a list of prefixes to choose from - thus eliminating more typing. I’m thinking of having it so you can add a prefix to the list, and a save button to save an updated list so it can be used in another session. Also since the combobox is subclassed I can add a context menu and grab keyboard events to save the list or delete an item… besides handling what happens when the box looses focus.

Here’s the question… what would make more sense - to have 1 gobal list that is used for all draft blocks OR a separate list for each draftblock? The former being way easier to implement.

I just thought too… there’s the option of being able to load a preset of prefix’s? For example you could have one for pants, one for jackets, dresses, skirts, etc…

2 Likes

Since it isn’t always garment patterns being created and that one can always change the labels to the desired prefix, I’d say one global list should be fine.

2 Likes

Ich sehe es genauso wie Grace.

3 Likes

Since I’ve already got it working with a combobox and a single prefix, I might as well finish making it work with a whole list. :slight_smile:

1 Like

Got it working reading a pattern file and populating the prefix combo box… it will read the basepoint names and prefixes (if new pattern ver) of all draftblocks. Just have to implement a way to save / load an existing list. Here I loaded a older pattern with blocks A - G, and added PIN and Notch. prefix_combo

So you could select PIN, and then each new point will be named PIN1, PIN2, etc, until the prefix is changed.

I’m thinking of having a preference checkbox that if selected will automatically save any new prefixes added, plus a “Save” button or context menu item to use if the auto option is turned off and you decide you indeed want to save the new items.

Along with a Save list item in a context menu I will provide a Delete item to remove a prefix from the combo box.

There’s one caveat I’ve discovered… which would only apply to loading older pattern versions, where the name of the basepoint was changed (which in 99% of cases no one does ) - instead of the A,B,C, etc… - to something like BigLongBasePointName. Any new point names would be like BigLongBasePointName10, BigLongBasePointName11, etc. Not a big deal, as you could just add an A, B, or C as the prefix. Save the pattern, and next time the A, B, or C will also be available.

3 Likes