Elm-pat: What does one need to construct sewing patterns?



Thank you for the detailed reply! :slight_smile: And also thank you for doing all this work!! I fully understand that doing this research takes a lot of time and energy. And with the history you explained, having these concerns makes completely sense to me.

Right now, I’m running a bit short on time and will be without internet until monday. But next week, I will put references to your work in the readme file. Thanks for pointing this out!

I think so, too. :slight_smile: As written in the previous post, the next steps for me would be to think about the feedback I got here, come up with a more detailed plan and maybe do some more (prototypical) implementations. Then afterwards circle back for feedback. What do you think about this plan?

I have not actually seen this, yet, I will take a look next week!


Thank you @slspencer for the detailed info on the work you’ve done for this project.

I’m now more than sure that this is the pattern design environment for me. The issues you mention are the very same I have been struggling with from the first “measure based individual pattern” I’ve ever made.

I’m certain there’s more than one fundamental error in the pattern drafting systems themselves that need to be addressed by strict, scientific methods and principles.

Best regards Sini


A new comment on this thread made me go back and take a look at it and I have “forked” myself a copy of the elm-pat tool. @kirchner my first thought when I looked at this again is that it would be a great value added to the elm-pat tool if you were able to import patterns from other systems. importing from a .val and .vit file would be really nice.

@MrDoo I recently took a look at your fork of the seamly repository and I did see the changes you made to display wallpaper (sorry it took me a couple of months to get to this). Are willing to make available the code you have already written to import .val and .vit files? If you already have, I was unable to figure out where.

It just seems so logical that elm-pat and seamly.cloud would both be able to read a seamly file and that the desktop based Seamly2D tool would integrate with both. Please feel free to share your thoughts on this and discuss whether this is an obvious (to anyone other than me) connection.


@kmf, the short answer is no. I cannot share the code, there is no code.

(I realised on re-reading the thread, that I’d missed the main question, so please see subsequent post below.)

The slightly longer answer: seamly.cloud is created entirely within the kinodb framework as configuration. I have not written any code (except as below). The kinodb framework allows a database to manifest as a website and includes great support for generating and parsing XML into data tables. This whole endeavour was made possibly because the .val and .vit files are XML. The framework has been configured with database tables holding each type of entity in the .val and .vit files and the rules for those entities. There are many other tables that I’ve configured that manage the sharing aspect and security rules. No code from the Valentina or Seamly2D projects is used by the website.

The exceptions: The kinodb framework is configurable to do most things that a business website needs to be able to do, but it allows Java libraries to be plugged in where necessary, for specialist functionality.

So, I have written some Java code to parse the formulas. This takes a formula as text and returns it as XML, where the structure of the XML represents the structure within the formula, and each XML element is a function. It would be harder and less efficient to try to do this directly in the kinodb framework, sometimes code is best. E.g. (5 + waist)*2 becomes <multiply><add><literal value=“5”><increment name=“waist”></add><literal value=“2”></multiply> This is a tiny .jar file. Its noddy stuff but I could share it.

The other aspect worth mentioning is that the website server has the linux Seamly2D executable installed (headless) so that it can invoke it to validate the .val files that the website generates and to generate the preview images. (Preview images are SVG (more XML) and so the website is capable of parsing these and tweaking them to make them suitable as thumbnails.).

I hope that helps. The reason I could generate the seamly.cloud website so quickly and operate it without seeking any renumeration, is that its built entirely on a standard, though proprietary framework that I use in my day job. I shared this with @slspencer at the outset and I’m happy that at some stage the Seamly endeavour may want to code a website from scratch using open source tools. I made the offer then, that i stand by, that I could share the database schema (except the proprietary kinodb tables) so that such a project could use these as a starting point.


@kmf, yes it would make sense to add javascript capability (e.g. elm-pat) to seamly.cloud. I would be happy to collaborate with such an endeavour.

As per my missive above, it may be that the currently seamly.cloud implementation gets replaced wholesale in the future. Therefore we need a clean interface so that any Javascript can be re-used and isn’t specific to the current seamly.cloud implementation.


@kirchner, I realize it has been a few months since your initial post. @Krolich created a document to answer some questions you asked and you said (in response to the document that @Krolich put together):

Thank you for your feedback! A document with some insights would be very great if you can afford the time. :slight_smile: It does not have to capture the whole thing, if that is too long. We probably want to do some iterations over it anyway, i think.

Several forum members posted ideas and you said THIS:

You are right! As for moving forward: I will be thinking about all your feedback in the next week and will try to come up with some a bit more detailed feature list and some workflow descriptions. (I’ll probably put it on github.) Perhaps further discussion can be done there? I don’t want to spam this forum, since I understand that it is meant for discussion around the Seamly-tools! :slight_smile:

I do not mean to be a nag, and I realize that priorities can change. That said, there is renewed interest in your effort and the time may be right to collaborate. I am writing this message because I am willing to personally write some code if needed and I believe there is very little that would be needed to get you to a point where you could open a Seamly created pattern file and display it. I had forgotten about the already existing ability to use Seamly from a command line and the comments made by @MrDoo in this thread point out what can be done.

Using the “*.val” file as an API MrDoo was able to create a powerful tool with almost no code. He has added one feature that is not available (and probably needs to be added) in Seamly2D. That feature is that instead of crashing if fed an incomplete set of measurements, the seamly.cloud will allow the user to enter missing measurements.

I imagine a simple process that you could do to “load” a pattern and measurement file into the environment that you created at elm-pat and use your existing interface to make minor edits - moving points, etc.

There are still many issues that will arise because of the different approach: elm-pat does not seem to require any sort of hierchy. It appears to me that a user can create points independent of each other. Seamly2d starts with ONE base point and every subsequent point is drawn relative to that through a sequence of formulas.

I believe it is a worthwhile exercise to load a pattern file into “elm-pat” and tinker with it, and I am willing to assist. It is possible that @MrDoo would be available to answer questions about how he did what he did. What about it, @kirchner, would you like to proceed or has the time for this collaboration passed?

Regarding the concern about “spamming” the forum, I believe that in the past users have been asked to keep comments to the original thread or to start a new thread. The good thing about a “threaded” discussion is that folks who are uninterested in a topic can simply avoid reading it. This thread started to discuss elm-pat, and I believe I am proposing that you can (if you have time and inclination) add a capability to elm-pat that would help you clarify what you want to build while at the same time providing a useful tool for some who have asked for some Seamly2D enhancements


I’m happy to share my experiences about creating something that is compatible with .VAL files.


I think it makes sense to add a possibility to import pattern/measurement files of Seamly2D into the tool I’m working on. Also an export may be possible, but I think it will not be easily possible to have the import and export behave such that you get the same *.val file out when importing it and exporting it, since the data structures are a bit different. Also the integration into some kind of community platform where you can share your patterns with others, seems like a very good thing to have.

Is there some kind of specification for the *.val and *.vit files somewhere? Having this would make it relatively straight forward to write an import, I think. And maybe it makes sense at this point to have this import, so I can test my tool with more complex patterns.

PS: I have moved the development of my tool to kirchner/sewing-pattern-editor also with a recent demo. (If you get an error opening the demo, a simple page reload should fix it.)


Thanks @kirchner. I will take a look at your newest tool. please see the xml schema at Seamly2D/src/libs/ifc/schema/pattern/ v0.6.0.xsd The link should take you to the correct folder in the github repository and you will have to open the “pattern” folder to see the v.0.6.0.xsd file. That is the best documentation that currently exists on the structure of the .val file. Please see also the folders labeled “standard-measurements” and “individual-measurements” as those are where you will find information about the .vit files. If you have questions about running Seamly2D in command line mode (which is part of what @MrDoo did to parse the pattern file) you may find some insight after reading this https://wiki.valentinaproject.org/wiki/Command_Line


@kirchner, I tried to duplicate the process I used in creating a simple sleeve block as documented in the wiki at https://wiki.valentinaproject.org/wiki/Sleeve_Block,_McCunn_System. Here is the file I was creating as I tested the tutorial McCunn-basic-sleeve-kim-a.val (7.8 KB) and the associated measurement file McCunn_sample.vit.vit (3.3 KB)

Here is the file I started on your demo site. I got as far as creating the drafting skeleton but I did not even attempt the curves for the sleevehead because they are not circular. sleeve_a.json (1.7 KB)


Thank you, those files definitely help. What I cannot deduce from these specs is, what kind of type's are valid for the point element. And in particular, which of the attributes for the point element are used for which type. Is there maybe some place in the source code where one can see a complete list of these point types?

Also, I was wondering what the meaning of the mx and my fields in the point elements are. Do you have an idea?


Cool! For adding all the connecting lines/curves you can use the Detail tool. (It’s the one on the bottom) There you can at least also do cubic splines. (The idea is of course to add more possible curve types)

What would be very interesting for me to know, is what felt good/convenient and what felt not so good/convenient when creating this pattern. But if you don’t have time to write this up, that’s totally fine!


@kirschner - The agreement is that if you ask for help here, you will provide the code/logic/database structure/import processing/export processing. Because the term ‘open source’ was coined before there were web apps, there is an additional discussion for explaining what you are building. The results cannot be opaque.

@MrDoo has agreed to share the database relationships/triggers/scripts/import_processing/pattern checking rules/and all-the-things-his-database-does-to-a-pattern with us (albeit he’s behind schedule in providing database relationships, logic diagrams, triggers, datafield formulas, etc.) He agreed that he would share the processing steps, even though there isn’t any “code” per se.

We require that the developers who ask for our hard-to-find expertise shall show respect for their agreements to share. We’ve been ripped off before by people asking for our time and considerable hard-to-find expertise, and we don’t want it to happen again to this lovely, friendly community. In return, the developers can ask questions here.


@slspencer, I am puzzled. Did you take a look at the repository? You will see that I have put all my code under the AGPL. Also, I thought it would be clear (and perhaps I was wrong), that when I am asking a question like “Is there some kind of specification?”, I’m not telling or ordering anyone that they should search for this information and give it to me. It is more of a “Do you happen to know this? If yes, cool! If no, don’t worry, I try to figure it out by myself.” I am totally aware that folks are spending their free time on this, which they could otherwise keep spending with their families or doing a hobby etc.

What perhaps frustrates me most with your post, is that I feel like I am indirectly being blamed for actions of other people in the past which I don’t know and which I don’t have any connection to, because I’m being framed as a “developer”. Neither are my “results […] opaque” nor am I “ripping off” anyone. I’m sorry, but this makes me angry, and that’s not a place I want to be in.


Hi @kirschner, Sorry it seemed to be aimed at you specifically. Yeah, all questions here are casual, so we understand that even casual questions require lots of time and consideration to lay bare the patternmaking processes and expertise whether its in a casual friendly way or in a professional documented way. So all we ask is that your expertise be laid bare in a reciprocal fashion. Not angry with you at all. We’re trying to develop a way to communicate this expertise reciprocity agreement, it will take several iterations to get it right. Thanks for your understanding.