Function Request - Draw line from equation inside Sketcher
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Re: Function Request - Draw line from equation inside Sketcher
@lordsansui OK I see why discrete lines would suffice for your case. And it seems the different lengths of each of the segment is also intended?
-
- Posts: 45
- Joined: Thu Sep 15, 2022 8:54 pm
Re: Function Request - Draw line from equation inside Sketcher
@jnxd
Yes, the length of each segment will change according to the total length dimension defined by the user inside the sketch but the number segments will be fixed in this case. The equation will adjust the profile. So for each individual design I will need to evaluate how many segments is enough. Other people that want to implement similar functionality needs to do the same.
@abdullah
Considering the fact that I was able to achieve good result for my case, thanks for all contribution, I would still suggest to to think about a Sketcher built-in function, but not as initially suggested, but more in line with the final results achieved here using discrete line (maybe Bspline) so maybe it can reduce the amount of work to be implemented.
The advantages of having a similar function might be:
Yes, the length of each segment will change according to the total length dimension defined by the user inside the sketch but the number segments will be fixed in this case. The equation will adjust the profile. So for each individual design I will need to evaluate how many segments is enough. Other people that want to implement similar functionality needs to do the same.
@abdullah
Considering the fact that I was able to achieve good result for my case, thanks for all contribution, I would still suggest to to think about a Sketcher built-in function, but not as initially suggested, but more in line with the final results achieved here using discrete line (maybe Bspline) so maybe it can reduce the amount of work to be implemented.
The advantages of having a similar function might be:
- Reduce the amount of constrains needs to define the profile compared to the manual implementation.
- Reduce time for the user to implement similar cases. If someone need more segments it will take proportionally more time.
- Improve sketch cleanness due to less constrain showing in the screen.
- Fast way to increase or decrease the total number of segments. (reducing segment size and increase segment quantity leads to a "continuous curve" as request previously, so maybe a CAP could be defined here, X max points - limited smoothness).
-
- Posts: 45
- Joined: Thu Sep 15, 2022 8:54 pm
Re: Function Request - Draw line from equation inside Sketcher
Hello jndx, I was reading again your questions and looks like I didn't understand well the the first time I reply. English isn't my main language.
To make it easier I implement all segments with the same length, I used equality constrain. Different lengths could be used but it would required to add equations in the horizontal lines to to proper define the length and keep them fully constrained. It would also require more tweak in the vertical lines equations too.
The only case I see people using different lengths for each segment would be when they need more smoothness at specific place, where you could concentrate more points. I personally would prefer to have the ability to increase or decrease the total number of points and control overall smooths then having the ability to control segments length.