'Local' Variables and what they can do (or not ...)

Hi all,

I would like to know if anyone can advise me on some ‘issues’ concerning the use of this facility.

For specific reasons, I would like to keep a track of some of the measurements maintained by SeamlyMe in the ‘Database’ and keep a track of possible mismatches of specific dimensions of pattern-piece lines, arcs and curves (Splines etc) which may occur when I change the path of a curve (for example.)

I have tried to store data from a) the current pattern that I am working with, and also from the loaded SeamlyMe database … all to no avail. This would be of great help to me if one of you Seamly2D / SeamlyMe Titans could advise me on this.

PS. As an alternative, I would like to be able to annotate the pattern file ‘DeskTop’ - the ability to display specific & calculated data in a dynamic fashion would also be awesome!

1 Like

Sorry if I cover anything that you may already know.

“Custom variables” are variables that are stored in the xml pattern file. As such they stay with the pattern file.“Measurements” are variables that are stored in seperate SeamlyMe files. There are 2 types of measurement variables… “known” and “custom”. Known measurments are translatable, custom measurements (like custom variables) are not as there’s no way to do so in the Qt framework. Custom variables are useful where you don’t have to keep defining them in every measurement file. For ex defing pi = 3.14. Custom variables are really when you want to define something that’s a function of the pattern, not the person.

Now… like everything in Seamly, variables and measurements are all based on a sequential timeline. They can’t reference something that hasn’t been defined yet. In fact variables and measurments are very much like #defines in programing. Take for ex the C++ code:

#define A     10
#define B     20
#define C     A + B

Is valid, where C is equal to 30.

Where:

#define C     A + B
#define A     10
#define B     20

Is not valid as A and B have not been defined yet. The complier will throw an error.

Which leads us to this: < variables > are defined after < measurements > in a pattern file so variables can use measurements, but measurements can not use variables.

Thus the reason in the fx editor for Custom variables you can not use the variables from the tool data. You can though use functions because those are defined in the Seamly2D app itself.

And for measurement formulas you can only access existing measurements (in the ME time line) or functions.

image

Which brings us to this…

You can’t use tool variable data in Custom varibles or Measurements as they have not been created yet when a pattern is parsed. Even if you did have access to the data, it makes no sense as the data can’t change the (formula) definition of the variables or measurements. Again it would be analogous to an application dymanically changing the source code to the app.

Hope this sheds some light. :slightly_smiling_face:

2 Likes

Hi @DavidDeb

I normally work the other way around… First I create the spreadsheet/database & then I create the pattern. If I’m drafting for someone in particular, I normally date the measurement file so that I can check the person’s measurements a year or 2 from now & see if they still correspond. If they don’t, I create a new measurements chart & date that so that I know when the person was measured.

Curves are normally attached to points which are determined by the measurement chart +/- ease or from other points that are determined by the same.

Somewhere, we need to trust the process and sew up our test patterns - especially the basic master pattern - to see if it fits in all of the right places. If it doesn’t, first double-check that the measurements are correct and then check that they have been used correctly in the pattern drafting.

If you would like to annotate the drawing board, type up what you want, take a screenshot of it & import it into the pattern as an image, place it where you want it, & lock it down.

Other than the above, I have no suggestions or ideas.

2 Likes

Hi,

up to a point, I do get that, so that is why I wasn’t too surprised that the measurements data (SeamlyMe) would not be used - although it would not be anomalous to assign values from a source file that is external. This is done all the time in such simple applications like Excel, Word etc. and recovery from missing flies is not too difficult. What surprised me was, that even Local-Data, e.g. Pattern dimensions (Line angles and lengths etc.) are not assignable to a local variable. As @Grace mentioned (Hi Grace :smiling_face:) she has a different and much more practised and routinely employed method. I however, am trying to develop a style that suits my own preferences and methods when approaching a new task. For this reason, I chose to try to let the software check on my work as I go - a sort of ‘Trip-Wire’ if you like that will check on my work as I go.

2 Likes

Hi David,

Here’s an example of a ‘trip-wire’ taken from the Zoom lessons. We checked the sleeve cap curve to see if it would fit the armhole curves:

This way, if you hover your cursor over the point, you can immediately see that it is approximately the accepted difference of 1 inch:

image

In this case, if you’re not happy with it, then you could tweak the cap height or width to get it more exact.

2 Likes

HI, thanks for the tip. I still have this issue that sometime the trees hide the woods! I will attempt to re analyse my trip-wire requirements and fine a way that the software permits.

1 Like

Again… Seamly uses a sequential timeline and is not like Excel, Word etc. To compare Seamly to them is pointless. You simply can’t use tool variables such as a line length in a custom variable. Why? Besides the formulas, and timeline, the “local-data” changes everytime a pattern is parsed. Anytime you do something that requires a full parsing the pattern, it clears the data, it clears the history, it clears the pattern pieces, it clears the draft & piece scenes, it basically dlete everything… then re-reads the (in memory) dom document from the start as if you just opened the file, loads the variables, and builds the pattern again one tool at a time. If it’s a lite parse it just clears the data, and rebuilds the pattern. In either case measurements never know any custom variables, custom variables never know about any tool variables, point A1 never knows about point A2, Block A never knows about block B… and so on. You asked what (custom) variables can do or not do… I answered how they fundamentally function. If you’re asking “how” or in what situations they can be used… that’s a different question altogether.

That falls under things like using a custom variable to dynamicaly define ease or number of darts. Such as:

#ease = (bust_circ > 48 ? 4 : 2)
#darts = (waist_circ > 30 ? 2 : 1)

But again something like:

#armhole_length = Spl_A1_A2 + Spl_A2_A3 + Spl_A3_A4

Is not possible, as custom variables can only use existing custom variables or mesasurements.

@Grace is bound by the same laws of the application as anyone else. All she’s doing is applying formulas as allowed by the fx editor as per what I pointed out in the previous response. Not sure how the topic switched to Walking a seam - which has nothing to do with the way variables work. :thinking:

2 Likes

Hi,

things are a little clearer now, I wasn’t aware of (and how?) the steps required, or forced onto the programmer, regarding the internal structures. My thought processes, regarding my attempts to achieve the desired result, were originally not attuned to the existing structures and methods employed. I have managed to do, in effect, some of my projected dimensioning-control - if you like: ‘Walking the Seams’ and other controlling functions, by other methods.

Anyway, thanks for the clarifications, I know that I can be ‘sometimes’ :thinking: resistant to well-meant advice :roll_eyes: This is often down to me being a little too obstinate (inflexible?) Grace did however cause me to re-evaluate my initial resolution, and choose a new path.

brgds,

David D.

2 Likes

I’m glad it’s all a bit clearer. With lots of practise it comes naturally.

1 Like