export files

That was my first thought. Although I’d probably rearrange the File menu items. I’d break out the File->Layout menu items into File->Print and File->Export items.

I also gave this a little more thought too… Would definitely require a naming convention. For example… let’s say we have sack_suit.val, donny.vit, bret.vit, and rusty-smith.vit. Batch exporting would result in something like sack_suit_donny.pdf, sack_suit_bret.pdf, and sack_suit_rusty-smith.pdf. Maybe with an option to use the pattern ver as a suffix… like sack_suit_donny_061.pdf. And like I alluded to before, an option to select the export types. For ex: using sack_suit.val and bret.vit exported to sack_suit_bret.pdf, sack_suit_bret.eps, and sack_suit_bret.dxf.

Yes… if we were talking about a “nesting” feature. I was talking about a (simple) way to batch process exports to multiple files. Thing is to implement nesting will take a lot of reworking the code. Had it been structured with nesting and layers in mind from the start it would be a lot easier.

3 Likes

Ah! ok. Sorry about that. Anyway, perhaps something to think about for the future :grin: :grin: :grin:

2 Likes

I’ve thought about it…some. It may be easier to create a separate nesting module where you would load a pattern file and either a multi or a set of individual measurement files to create a nested / layered workspace. But yes … things like color coding the different sizes would make sense. Also like you mentioned - would need to somehow label each cut line with the size or some kind of identification. Each cutline would require a different line type. Basically I picture being able to produce what you would get in a commercial pattern… albeit you could be nesting custom sized patterns vs standard off the rack sizes. Of course each size would represent a different layer so you could export say to an svg and use it another app like Inkscape - maintaining the layers.

Yup… lots to think about. :slight_smile:

3 Likes

Yes, either that or some sort of legend where the line colour/type is referenced to the size. :slight_smile:

2 Likes

OK, visualize this… The SeamlyBatch app should be run outside of Seamly2D instead of from a menu. It can be selected from a Seamly 2D menu, but it should be a standalone app, like SeamlyMe.

SeamlyBatch runs a script which calls the Seamly2D command line (without GUI) for each pattern listed. Depending on the number of patterns in the list, and the CPU of your PC or laptop, this script may run fast or it could run rather slowly.

Users have pattern/measurement options. Below is organized by Tabs to keep the discussion simple for now: The SeamlyBatch app is a dialog box with three fields in the top header area, two icons down the left, a Tab area, an empty two-column expandable Job List below the Tab area, and “Add”, “Run”, “Cancel”, and “Exit” buttons underneath the job list. Top fields: * Select a directory * Select a file format * Select a naming scheme (patternfilename+"-"+measurementfilename+"-"+datetime+"."+fileextension could be the default)

Left-hand icons:

  1. Patterns Icon

    • Patterns Tab: (select pattern files first)
      • Select a pattern file
      • Select all measurement files to run on the pattern file
      • Click the ‘Add’ button to append pattern/measurement pairs to the job list
      • Repeat to select more patterns and their measurements (up to a max number)
      • If ready, click ‘Run’, otherwise click another icon
  2. Measurements Icon (select measurement files first)

    • Measurements Tab:
      • Select a measurement file
      • Select all patterns for that measurement file
      • Click “Add” to append pattern/measurement pairs to the job list.
      • Repeat to select more measurement files and their patterns (up to a max number)
      • If ready, click “Run” otherwise select another icon
  3. Semantic Colors

    • Semantic Colors Tab By default all colors are black * Cutting line: select color from pick list * Seam line: select color from pick list * Interior line: select color from pick list * If ready, click “Run” or click another icon
3 Likes

Thought about it some more, here are draft examples of the Pattern tab: These are to help guide the discussion, all feedback is welcome :sunny: SeamlyBatch-1

SeamlyBatch-2

2 Likes

For that example, SeamlyBatch would generate a script containing the following commands, and would then execute the script in the operating system. We’re using these options (See the wiki Command Line page)

*           -m measurementfilename  
*           -b destination filename  
*           -d destination directory  
*           -f destination file format,1 is PDF  
*           -p Pageformat, 11 is Roll paper 44" wide  
*           -c autocrop the length  
*           -r rotation angle, 45 (try to fit each piece at 0 degrees, then at successive 45-degree steps)  
*           -tiledPageformat (take the initial 44"-wide cropped-length image and slice it up into Letter-sized pieces)  

The Script would look something like this. This isn’t correct and untested, this indicates how this works:

Start /WAIT /B "Seamly2d.exe D:\MyDocs\seamly2d\patterns\MyPatterns\Knowles\Knowles\MensUpperBodyBlock\MyKnowlesMensUpperBodyBlock.val -m D:\MyDocs\seamly2d\measurements\individual\AldrichMensSizeMedium.vit -b MyKnowlesMensUpperBodyBlock-AldrichMensSizeMedium-Client_1-%1 < yymmdd:hhmm  -d D:\MyDocseamly2d\patterns\MyPatterns\Knowles\MensUpperBodyBlock\PDFs  -f 1 -p 11 -c -r 45  -tiledPageformat"

Start /WAIT /B "Seamly2d.exe D:\MyDocs\seamly2d\patterns\MyPatterns\Knowles\Knowles\MensUpperBodyBlock\MyKnowlesMensUpperBodyBlock.val -m D:\MyDocs\seamly2d\measurements\individual\ArmstrongSize16.vit -b MyKnowlesMensUpperBodyBlock-ArmstrongSize16-Client_1-%1 < yymmdd:hhmm  -d D:\MyDocseamly2d\patterns\MyPatterns\Knowles\MensUpperBodyBlock\PDFs  -f 1 -p 11 -c -r 45  -tiledPageformat"

Start /WAIT /B "Seamly2d.exe D:\MyDocs\seamly2d\patterns\MyPatterns\Knowles\Knowles\MensUpperBodyBlock\MyKnowlesMensUpperBodyBlock.val -m D:\MyDocs\seamly2d\measurements\individual\KnowlesMensSize38.vit -b MyKnowlesMensUpperBodyBlock-KnowlesMensSize38-Client_1-%1 < yymmdd:hhmm  -d D:\MyDocseamly2d\patterns\MyPatterns\Knowles\MensUpperBodyBlock\PDFs  -f 1 -p 11 -c -r 45  -tiledPageformat"

Start /WAIT /B "Seamly2d.exe D:\MyDocs\seamly2d\patterns\MyPatterns\Knowles\Knowles\MensUpperBodyBlock\MyKnowlesMensUpperBodyBlock.val -m D:\MyDocs\seamly2d\measurements\individual\Mueller_Mens_Regular_Size50_Chest100.vit -b MyKnowlesMensUpperBodyBlock-Mueller_Mens_Regular_Size50_Chest100-Client_1-%1 < yymmdd:hhmm  -d D:\MyDocseamly2d\patterns\MyPatterns\Knowles\MensUpperBodyBlock\PDFs  -f 1 -p 11 -c -r 45  -tiledPageformat"
1 Like

I wonder how this fits in with the SeamlyMarker idea which @Douglas has proposed? On the one hand, this seems to be going down a different exporting pathway, but on the other hand, it is still an exporting pathway.

My thought is that though there would be some overlap, a very different user would be using SeamlyBatch than would be using SeamlyMarker, so it’s probably best to have the option of not installing the unneeded module.

:unicorn:

1 Like

This would be for users like @Douglas who could save a lot of time with a batch feature. We’re not at a place yet where Seamly has modules that can be selected to be installed or not installed. However I’m thinking this feature can be provided with a batch file script at first, so that we can work out exactly what it should do and how it should work based on user feedback. The above info is to allow anyone who’d like to work on this feature to begin working it out.

Also, the semantic colors feature will probably make its way into everything we add from now on. It’s a good idea that adds a lot of value and usefulness.

3 Likes

Most definitely. I’m a firm believer in color coding as the brain can process color much faster than text, and you once you know the “color code” you can identify an item from a quick glance. I color code my pattern hangers so I can find a particular size quicker. Same with all my mic cables where I can immediately identify a particular cable and it’s length.

Where color in the program will really be useful is when implemented in the layouts and export where elements that need to be cut or drilled can be identified.

2 Likes

Absolutely! ---------

2 Likes

I was just wondering, if the awesome changes made last year by @Douglas would have any effect on making the “nested” export more feasible?

1 Like

Actually what would make for nesting patterns more feasible is the fact I have a better grasp of the code structure for the pieces in Piece and Layout modes. :slight_smile:

As well as understanding where the color and line weight are applicable to the pieces. Off the top of my head I see a nesting option as being a 4th mode or screen if you will, where there is some pref setting for a color for each size, a list of sizes to nest, and basically looping through the size list to produce a nested Piece mode sort of view… which could be translated to a nested print layout. The finer point would probably be figuring how to group the pieces of each size as if it where one object, so when rendering a layout the routine would know where the bounding box of each set of pieces is.

4 Likes

Obviously I have no idea how this should/could be technically done , but maybe in the Details options there could be a place to choose the nesting point?

2 Likes

Nest pieces:

Make a list of the piece names
Generate the pieces for all sizes
For each name in the list:
     Create an SVG group with the name
     For each size:
          Select the piece with that name 
          Add the piece to the group
     Select all pieces in the group
     Center the pieces vertically
     Center the pieces horizontally

However I’m not sure if there’s a group class in Qt. Here’s an old implementation suggested by the developers of Qt, hopefully this won’t be needed: https://doc.qt.io/archives/qq/qq05-canvasitemgrouping.html

2 Likes

Yes. There would need to be some way to choose what point is the origin or base point.

1 Like

No there is not. But that’s besides the point. Everything you see on any of the screens are some form of a QGraphicsItem… where every item has a parent, and items can have children. What you see is just one big chain of items strung together, starting with the MainWindow as the parent.

So… to create a nest you need to create a pattern piece QGraphicsItemt for each size, then add those items to the scene - be it the Piece mode scene or the Layout scene. Again… it’s basically creating a pattern piece for each size you want, then adding it to the scene.

1 Like

You don’t actually have to create then select a center point.
There is a Qt group class: QGraphicsItemGroup Class | Qt Widgets 5.15.12
Plus there’s an Alignment flag: Qt Namespace | Qt Core 5.15.12.
It may be that adding a QtGraphicsItem to a group will automatically center the item relative to the parent.

For an example we can use Squares and Ellipses as pieces, with Red, Blue, and Green as sizes. I’m using a screenshot of the Align UI from Inkscape to illustrate the alignment actions.

Step1:
Select the Squares then Align vertically; select the Ellipses then Align vertically image + image = image

Step2: Select the Squares then Align horizontally; Select the Ellipses then Align horizontally
image + image = image

Nested Layout would require:

  • Each piece has a Letter in Details Options.
  • Each size in MultiSize files has a short Size name or number.

When a Layout is generated:

  1. For each size:
    • Generate Pattern pieces as QtGraphicsItem
    • Assign each piece an Id=Letter+Size
  2. Create a LetterList & IdList
  3. For each Letter in LetterList:
    • Create LetterGroup
    • For each Id in IdList that begins with Letter:
      • Add the pattern piece that has this Id to the Lettergroup
      • Align pattern piece horizontally & vertically to the LetterGroup (if this doesn’t happen automatically when adding it to the LetterGroup)
  4. Arrange LetterGroups in a Layout according to user’s selections in the Layout dialog
1 Like