Existing SVG file as a background

I have some patterns that I drew by hand in a vector graphics package. I can export them to SVG.

I would like to make a parameterised version of these patterns in Valentina. I know the body measurements and ease that it was drawn for.

So, my feature suggestion is the ability to display an SVG file as wallpaper/background.

It would be an entirely static image. The only requirement is that it is display in the same scale as the Valentina drawing objects that I would create on top of it. That is, it would need to redraw as you zoomed and panned. It would be nice to be able to set an opacity so that it appears grey rather than black, but this could easily be done prior to making the SVG.

With this as a background, I envisage it would be easier to turn it into a parameter driven pattern.

Does this sound useful to anyone else? Is there a better way of doing it?

1 Like

Hi @MrDoo, Here is that issue on bitbucket. Please add your thoughts to this issue.

https://bitbucket.org/valentinateam/valentina/issues/258/new-feature-tracing-mode

Thanks. Yes thats exactly what I’m after. Albeit at the simplest end of what is discussed there.

If anyone can provide me some hints as to how to start to implement this that would be welcomed!

1 Like

There was quite a discussion on this a few months back when someone suggested using Ghost-It software which will put a translucent image over the screen and allow you to ‘trace’ the image through it. Perhaps it would help you.

The issue #258 refers to using a PDF or bitmap (JPG)… makes sense to be able to trace over a bitmap, but it would make more sense to me to be able to directly Import-> SVG as a new pattern piece - seeing as how an SVG is already in vector format.

1 Like

Directly importing an SVG, converting it to a parameterized engineering document, as discussed in issue #258 as ‘reverse engineering’ will need computer vision/AI to implement. But it’s a good idea. :smiley:

1 Like

@Grace, that looks like that would be good. Unfortunately it looks like it is Windows only, but could work for other people. The one issue I can imagine with that approach is you’d have to avoid panning and zooming in the Valentina workspace. Nethertheless, it would be better than eyeballing two windows side by side which is my current approach :slight_smile:

1 Like

I missed the old discussion about ghost it but I looked around yesterday for a tool I might use to see transparent overlay windows on my KUbuntu system and found nothing. I could write code by if I start writing code again, that will probably not be my first priority

@MrDoo

I have taken a break from active participation in the forum from October 2017 to about now (October 2018) but I expect to be far more active over the weeks between now and the end of the year.

I expect to spend some time revamping the issues list on github and creating small, self contained issue descriptions that could be worked on by fairly new contributors in an independent environment. The key to this is a good desription of the desired function and its interfaces. The use of SVG file as background is a good example of such a small project. I intend to write it up in what I hope will be a way some potential contributor will find manageable.

Thanks again for your suggestion and please check by occasionally. I hope to also correspond with you further about what you have already done with the seamly cloud and related tools

regards, Kim

1 Like

Even a basic image (like a .jpg, .png) would be useful. You could scan patterns you’ve drafted by hand (or from your favorite book). Import the resulting image as a background, and trace over the top of it with Seamly.

2 Likes

I kind of got this working in my local code. I can share these changes if that would be useful to someone as a starting point.

I’m a Java developer and have no knowledge of Qt, so my changes were a bit of a stab in the dark. But they are effective, in that I could take an image and display it behind my pattern. And, it is really useful! I was using existing SVG patterns, but the same approach would work (albeit in a more pixellated fashion) with bitmaps.

However, I made no attempt to work out how to do file selection in Qt and so currently I put the image file name in the code and recompile :slight_smile:

1 Like

I remember that you shared the code before but I haven’t been able to find where to include it :frowning: my programming abilities are minuscule at best :frowning: so if you can give very detailed description of what to do, I’d appreciate it :slight_smile:

@MrDoo If you are willing to share the code, I would love to look at it. The easiest way is for you to push it to the repository. I am about to go close the old issue about cloud interface and write a new issue. Then I will create a branch in the github repository with the appropriate name. Then I will work with you to make sure you know how and are able to push code to that branch.

1 Like

@Grace, I found the code Jason posted here on the forum months ago. It was hidden in this discussion.

So @MrDoo , ignore what I said about pushing THAT code to the repository. It would still be great if you could access github and upload any code snippets that you are willing to share. For example I would love to create an offline utility which reuses some of your code where you allow users to add missing measurements instead of throwing up if a pattern is loaded with an incomplete measurement file.

2 Likes

@mrdoo Yes community is what open source projects are all anout.

1 Like

:slight_smile: I’m really dumb. I made all the changes but can’t get the program to work :frowning:

I could give 100 examples just from this forum to prove the @Grace is NOT dumb. If you have gotten far enough to decide where to put those changes, you are ahead of me. I can build and run the software on my computer. What source file did you think the changes go in? I will try it.

1 Like

I’ll dig out the VM I’d made those changes in and check I didn’t miss anything in the other post. The line numbers referenced in the Jan post may not be correct any longer.

2 Likes

LOL, thanks for the compliment :slight_smile: :blush:

You see… You know the one bit & I know the other bit, together we’d make the perfect whole. I’ve changed the source code but have no idea how to build and run the software :frowning: :frowning: :frowning:

1 Like

Oh, @MrDoo, I don’t think that will help. I need to build the source code and I’ve downloaded so much !@!?#@! to try to learn how to try and help fixing bugs or ANYTHING, that I have no idea where to find how to build and execute the program once I’m done.

I double checked the changes that I did way back in time when you originally posted this in the link @kmf posted above and then ran into the same problem I had before.