"Temporal" dependency among objects. By design?



I’m new to Valentina (and to pattern-making too) and I have come, more than I would like, to the barrier of needing a line measurement in one part of a pattern to use in another part that I created previously and not being able to use it.

Browsing through this forum, I understand that the developers know of this limitation, but nowhere I find the explanation to why this is so. It makes me wonder if such ability is really undesirable or this happens only because of the way the software was implemented.

So, this post is really the way I found to ask the developers about the reasons why they implemented this strict constraint, and I do this here because I don’t know if the issues page is the right place. Moreover, I didn’t find this answer anywhere (maybe because I don’t know how to search for it).

To summarize, I would like to know the arguments you used to justify the refusal to refer to an object created “in the future”.


I forgot to add that I have a CS degree, so you can get as technical as you’d need. I’m even planning on helping to develop when I get the time.


I am not one of the developers, but I have become reasonably familiar with valentina in the last few months. I worked in computer science for many years and was well educated in computer science concepts. I also, had been making patterns and sewing for many years, and using intuition, modifying existing paper patterns, and tracing clothes to reverse engineer patterns. I am only recently studying patternmaking using several books and methods.

I would suggest that you pick a patternmaking system and learn it and make at least a few paper patterns. Once you have done this it should be more clear to you why it makes sense to use Valentina the way it is.

I understand your issue with a “forward reference” to a value to be defined in the future, but I believe that to have that issue means you are thinking like a programmer and that thinking like a patternmaker is different. Just my 2 cents.

Curves with Formulas

Hi, @araruna

I have none of the experience and qualifications mentioned above, so I won’t ‘argue’ the subject. However, I will suggest a solution to the situation.

When you find that you need to create something in the ‘past’ because you find you need it now (in the future), open the History (Ctrl/h), click where you’d like the line and, with the History panel still open, create the line. Close the History panel by clicking on OK.

You will find that it places that line ‘back in time’ and makes it usable.

I hope this will help you.


Hi @araruna,

Goal of this project is creating parametric patterns. Also in our pattern each object has strong dependency. In each pattern piece there is only one “free” object - base point of pattern piece. All other require parent (parents) data to be calculated. Objects do not flow on they own like in traditional CAD systems. Plus, even if you see object “in future” you cannot create a dependency.

Image it as drawing pattern each time from scratch. Valentina do it every time you need recalculation.

As to this, yes, but for example C++ support forward declaration only because linker stage. And because each module builds independently you can use this trick. But inside of module all should be declared before build.

Our common recommendation in this case adopt pattern instruction to Valentina. Yes, there are many authors who keep in mind only paper way where no such a problem.

But if you see how we can improve this i will be pleased to hear. I don’t think that my way is absolutely right.


Well, It was not exactly like a “forward reference”, in the sense that I’m using a pointer to something to be defined. It was more like I already defined a point P from which I want to place another point Q at the same distance as the distance from S and T. Sometimes, S and T do not have any line joining them yet, but if I join them after placing P, I cannot refer to this desired distance because of the “temporal precedence”…

I completely understand what you are trying to say, but the situation I explained above would be completely possible to do in the paper. Maybe I wasn’t specific about what I was thinking, but that was a simple example.

I get this concept, but sometimes it prevents the “forward thinking” people to make their magic. First of all, let me emphasize that I’m not asking for a way to say “hey, place here the measurement of something I’m yet to draw”.

Let me come up with an hypothetical example (remember it is hypothetical). Let’s say that I’m drawing a long sleeve blouse and I already sketched the blouse and opened a new pattern piece for the sleeve. Let’s pretend I’ll need to use the straight distance from the shoulder end point A to the armscye bottom point B in the sleeve, and it will be needed at a point P halfway down from the top of my sleeve to define the point Q.

Then I draw the base rectangle and think: “I’ll just place P here right now”. When I finish the rest of the sleeve and am finally able to place Q, I remember that I forgot to put a line between A and B. Now I can’t use AB in P because I drew AB after P… What should I do? Delete P to put it back again? But what if it is the dependency of half of the other objects in the piece?

This kind of situation happened to me a lot… It is really painful when you have to delete half of your pattern just because you put a reference point before you should have. History trick helps me avoid this, but you have to agree with me that it is beyond the capacity of the users to imagine that such is possible.

Do you agree that the problem I stumbled upon would be entirely possible in the paper and completely possible to overcome? Just measure AB an place Q from P! But in Valentina it is a challenge.

Having no knowledge whatsoever of the design and implementation of Valentina, I can be mistaken to think that this “temporal dependency” can be supressed, but I imagine that it is only a matter of allowing the parent to be any object already placed. The rest (figuring out if can delete an object, provided it has no other depending on it) should remain the same, I believe.

This is why I asked also about the technical details.

Thank you all for your replies. I know I tend to write a lot, sorry…


Oh my God, it sure will come handy, thank you! :laughing:


To avoid such a problem we could propose a “forward declaration” agreement. In your case, to get correct position you need recalculate pattern twice. First time you gather information and ignore missed parents data, next time you have all you need to correctly position pieces.


Could you brief me into how the placement algorithm works as it is now, data structures and all? I think I’m starting to see where some trouble sets…

Just a blind shot: if you have a dependency graph and you use some kind of queue to enforce the allowed dependency order, you could ease this using just a topological sort instead of the queue, even it was just at the placing stage, just to avoid calculating things twice.

PS: If the forum is not a good place to discuss this, please point me to where we can continue. :sweat_smile:


I don’t know your experience level in developing. But i recommend you think twice before taking this task. The task is hard.

I will describe what Valentina does when you open a file:

  1. Parsing tag.
  2. Saving data about operation (tool) to pattern DB. Nothing serious, just a bunch of QHash objects.
  3. Creating QGraphicaItem object on scene.

So, this is really queue. And we don’t have dependency graph.


If you decide to add code to valentina, or even if you don’t, there are a few features existing you may find REALLY useful in developing a pattern. Check out the variables table (Measurements on the top menu, variables table in the drop down menu). Also in any of the tool menus where you see f(x), click on the formula icon and know that you can use any of the existing measurements or line lengths or many other useful “internal” variables. I certainly haven’t found all the tricks yet, but there is a lot there.

Another useful tool is the line tool. With this one, you can create a line between ANY TWO EXISTING points. That might help with your previous dilemma about needing a measurement. Once you have created the line, the measurement of that line will be available in the line_length table and can be used for any future calculations.


In theory, because right now, with my patterns finished, I cannot use any of the lenghts to create an increment, as you can see here:

This is another thing, and I’m not even questioning this, but thank you for the info.

Well… In practice, none for “user” usage, only for myself and for research purposes. But I’m a quick learner. You are just making me curiouser! :grin:

But don’t think I’m just a naïve adventurer, diving heads first into a dark pit. I teach algorithms and data structures at a Federal University here where I live, so I know one or two tricks to get by. :blush:

I’ll have a look at the code, then. Where can I ask questions about it if i have any, to better understand what is done?

Best regards, folks!


You can do it here.:slight_smile:

I made my warning because people usually don’t like simple routine task they can really do. They dream about big and hard. You feel great when you done such a task. But in practise you claim that you will develop, try and found yourself unable to finish your task. And what is the worst because of this you decide to not return to community because of such a failure.

Maybe the reason for this because you don’t need?:face_with_raised_eyebrow: Show us the real case where in pattern you need such behavior and we will talk. I know you want to make things better, but restrictions also useful if not proven opposite.

Can someone with real experience say us how reasonable this discussion is?


This is why I said I’m not questioning this behavior in particular. I don’t even get what “increments” is (I don’t know the equivalent word in Portuguese, and maybe if I did, I wouldn’t probably know what its usage was. I’m using them as local measurements to a pattern.) That was just an observation.

Don’t get me wrong, I’m just trying to understand why everything is as is. I’m not saying you are doing it wrong, but I had no information about why it couldn’t be made different. I’m a little questioner by nature :sweat_smile:

Best regards!


We intend to provide some means in the future to allow for rearranging the objects if possible, but similar to all CAD programs, order will always be important.

Learning to make patterns is like learning to create mathematical proofs – you know where you need to go before you begin. Similar to proofs, when you make a mistake you must sometimes start over, but this will happen less and less as you build patternmaking skills, just like building math skills, and very much like learning how to apply engineering knowledge to create a CAD drawing - knowing the engineering is half the problem, understanding how the CAD program works is the other half. To sum up, all the information contained in a pattern is related, and order is important, so there will always be a temporal constraint.

And thanks for your questions! They’re very good :sunny:


I mentioned to @kmf that, until the Seamly2D application grows this feature, you can use the pattern cloud to re-order drawing objects within a pattern piece and promised that I’d write up instructions. I’ve finally gotten around to writing up the instructions and they’re available as a PDF download ‘Editing drawing object order’ from the seamly.cloud landing page. If you run into difficulties (e.g. a pattern doesn’t load) then please contact me, or start a new thread here.


good job @MrDoo. I also had not scrutinized the seamly cloud page enough to notice before today that you have also made available an excellent tutorial on patternmaking systems. I will start a separate thread for that (here on the forum).


Not only does the editing or the order of objects present some useful functionality, but I followed the “Editing drawing object order” tutorial up to the bubble that said “double click to access this version” and made a discovery. At that point you see a much more detailed and in my opinion readable version of the history used in creating the pattern.

This makes me want to rethink and possibly withdraw my comments under this thread


@MrDoo, I really like the functionality of found when “editing” a pattern in the seamly cloud, however I have not been able to find the “button” described in step 4 of your tutorial. I see no box with the text “reorder drawing objects”.


It might be that the pattern doesn’t have a green dot (which signifies that it was loaded perfectly). Which pattern are you trying this with? I can see that you’ve uploaded quite a few patterns, but many of them don’t have the green dot. This might be because there were uploaded some time ago (and I’ve fixed the issue since), or it might be because I still have issues to fix. Would it be okay for me to retry some of your pattern uploads?

In the mean time, if you choose one of your patterns that do have a green dot, create an editable version, and then ensure you navigate to the editable version then hopefully you will see the button. Let me know how it goes.