Do we need trigonometric functions?


Do you use functions cos, sin and etc.? And how?

See issue

I don’t, mostly because I don’t know how to :blush: but I was just wondering how I’m going to make a full circle skirt on a dress, using the length of the bodice at waist divided by pi to get the diameter of the skirt waist and how I’m going to draw that in 4 panels.

@Grace, here is a post about creating a circle skirt. Click on “Circle Skirt pattern” to go to the post.

1 Like

Thank you very, very much, @slpencer :grin:

1 Like

@Stinde, what do you think about these functions?

Personally I use the trigonometric functions to calculate distances. However the need has decreased, because of the new Valentina operations.

I know that the standard a-functions return radians, so I’m just multiplying the result by 180/3,14 to get degrees. These functions are standard one, so I don’t see a need to change them.

If there is a real need to have functions in degrees, I would like to have the ability to have custom functions similar to increment values in Table of Variables. There could be ‘standard functions’ included. I would put all my dart calculation functions in to that table. By rewriting complex functions over and over again creates difficult to find mistakes.

1 Like

As always good idea. But can you provide an example of such calculation? I want to look what formula do you have and how do you see a custom function in this case.

This is very typical calculation for the dart width


1 Like

Okay. But how do you see a custom function? What will be inside? I mean which part of formula?

The pseudo code could be something like this

DartWidth = (CurrentWidth, WantendWidth, MaxDartWidth) The function will return value between 0 … MaxDartWidth

For this purpose (custom function) better to use some script engine. I see two options right now: lua and javascript.

I agree. The scripting would be even better and it opens also new ways to control the pattern.

For example I have a need to script the pattern configuration. In my patterns I have many configurable values. With a script it would be easy to ask and configure the values.

I use them a lot to design tents and similar stuff. There are lots of triangles. Some sort of scripting engine would be awesome.

This is not the first time we start discussion about scripting language inside Valentina. Right now some sort of scripting do for us QMuParser library (our fork of muParser library). It bring almost all we need:

  • Formula should be one line equation with result.
  • Parse expression for tokens that help when we translate formulas.

I don’t think that there is need for more advanced scripting language in such cases. But also it would be nice to have #317 and #318.

There are problems that stopping me to switching to more advanced solution:

  • How to disable features we don’t need? As i said it is a bad idea to allow user write what he want.
  • Formula translation feature. We will lose it because don’t have access to tokens anymore.
  • I don’t like idea to have several parsers for different tasks. One evaluate formula and another parse and help translate.

But this is all quite achievable.

hi Grace, ive tried to use the arc tool with radius derived from the waistline as circumference. for the outer hem , i used the simple curve tool in clockwise direction. the arc is counterclockwise direction and cannot be traced by the detail. ive also tried the simple curve tool for the waistline but it became tedious to plot the pleats points in each segment. using the arc tool looks better for me, though the pleats point should come ahead of the cut arc point to be able to appear in the detail. hope this helps.

@kuya_jos Can you create a new thread and post images of how you are trying to work with pleats?

1 Like

Hi Susan, thanks for reading. i will try.

1 Like

Thanks, @slpencer, I read this last night and decided to leave it till morning to try and figure out :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.