B-Spline Constraints: Fully Funded! Thanks everybody!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: B-Spline Constraints: Fully Funded! Thanks everybody!
A spline on the other side worked well with two point on object constraints:
- Attachments
-
- pointOnBSpline2.FCStd
- (15.47 KiB) Downloaded 515 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: B-Spline Constraints: Fully Funded! Thanks everybody!
Best to make an issue on Github. This thread has already gobbled up a lot of issues.
This issue may be caused by the weights being free. There's nothing stopping the weights from approaching zero.
As such, don't count on these point-on-curve to carry the shape of the B-spline. It may be better to just add a knot there. Note that even the longest B-spline only has finite degrees of freedom, so multiple points on the curve with their own separate constraints can quickly exhaust them.
[EDIT: Additional informtion] I think (in the long run) we should be using point-on-object with B-splines that are already well-constrained themselves. For more "the curve should pass through these particular points of importance", we should be using them as knots. This I believe will require control on the knot values in order to work smoothly.
Re: B-Spline Constraints: Fully Funded! Thanks everybody!
Strange: I wanted to simplify the file, but after reloading it all works. So no Github issue yet.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: B-Spline Constraints: Fully Funded! Thanks everybody!
And here I am back again. I moved the B-spline to the left of the point , and the issue showed again.
After moving again to the right and back to the left, the issue disappeared.
I don't create an issue yet. I will wait for other users to double check.
After moving again to the right and back to the left, the issue disappeared.
I don't create an issue yet. I will wait for other users to double check.
- Attachments
-
- pointOnBSplineLeft.FCStd
- (10.1 KiB) Downloaded 452 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: B-Spline Constraints: Fully Funded! Thanks everybody!
Very cool as always. When I grow up it would be great to be youppemawm wrote: ↑Tue Jan 24, 2023 5:54 pm If you notice, in the video there is some LCS flipping in certain quadrants so apparently this attachment mode is not the best choice. I also tried the Z tangent to edge mode with the same disappointing results. This is a weakness in Sketcher that could use some development priority.
I have only basic incomplete knowledge of how Assembly 4 works. Though seeing that you use it, I start to be more motivated to learn.
I know that LCS are maps to parts, to then put parts on them. I understand from your explanation that the LCS flips (which for my untrained eye, I do not appreciate it in the video). This you attribute to the mapping type (which is a part feature, not a sketcher feature). Then, I am unsure if you say that the Sketcher has a weakness because the Part attachment code is not working as expected, or if you see something the sketcher does wrong that makes Part attachment code work as unintended.
Re: B-Spline Constraints: Fully Funded! Thanks everybody!
Yes. It appears to happen because the weight is made zero. The constraints set a ratio of weight to weight. The BSpline is adapting almost imperceptibly with different values. Yet, when one is made zero, the proportion cannot be maintained and the artifact happens. I do not quite see a way to prevent it... will think about it.
Re: B-Spline Constraints: Fully Funded! Thanks everybody!
Thank you for your kind comments. And, when I grow up maybe I'll learn Python so I can actually contribute to FreeCAD as you do impeccably.
Assembly4 can use Sketcher as a sophisticated solver for complex (or simple) mechanism assemblies so having a robust master sketch and LCS attachment is critical for machine design if it has moving bodies. During design it is important to be able to check for collisions or to verify correct operation in all possible positions. Assembly4 provides a simple animator for this purpose. When combined with Expressions, Variables, and conditional statements, I dare say that virtually any machine can be accurately simulated.
I was guessing that it has something to do with Sketcher. For some reason the LCS axis orientation flips 180 deg in different quadrants. I have had situations when the edge or vertex numbering changes with position which affects the LCS location. In this particular example it does not appear that any numbering in the sketch actually changes. So, perhaps it is some other culprit.
Assembly4 can use Sketcher as a sophisticated solver for complex (or simple) mechanism assemblies so having a robust master sketch and LCS attachment is critical for machine design if it has moving bodies. During design it is important to be able to check for collisions or to verify correct operation in all possible positions. Assembly4 provides a simple animator for this purpose. When combined with Expressions, Variables, and conditional statements, I dare say that virtually any machine can be accurately simulated.
Sorry, I should have made the LCS's visible for the video to make it more obvious. If you pay close attention to the links in the video you may see that they flip 90 deg around their long axis in various quadrants. Or, open the sketch in the file and exercise it with the animator (open the animator first then the sketch) or directly change the angle value in the Variables property.
"It is a poor workman who blames his tools..."
Re: B-Spline Constraints: Fully Funded! Thanks everybody!
And I could have seen the file attached at the endppemawm wrote: ↑Thu Jan 26, 2023 1:56 am Sorry, I should have made the LCS's visible for the video to make it more obvious. If you pay close attention to the links in the video you may see that they flip 90 deg around their long axis in various quadrants. Or, open the sketch in the file and exercise it with the animator (open the animator first then the sketch) or directly change the angle value in the Variables property.
Yes, I see the LCS is flipping...
I will try to look into it with more detail next week.
@Zolko
Is it possible for you to take a look to this file (if you can, you need a very recent master FreeCAD for the BSpline Point on object support)?
I have looked at the edges' orientation (both inside edit mode and in the shape) and I do not see it changing. I am obviously not looking at the right place. You might already have suffered it. Maybe you already have an idea of what might be happening?
Re: B-Spline Constraints: Fully Funded! Thanks everybody!
@ppemawm @abdullah
The attachment of the LCS doesn't have enough references to be fully constrained and uses one of the global axis instead (a guess). Add the sketch center point as reference in the attachment editor and select OZY. Then Y axis will always point to the center.
Edit: I don't know how the guessing of the second axis in origin-axis-axis mode works.
The attachment of the LCS doesn't have enough references to be fully constrained and uses one of the global axis instead (a guess). Add the sketch center point as reference in the attachment editor and select OZY. Then Y axis will always point to the center.
Edit: I don't know how the guessing of the second axis in origin-axis-axis mode works.
Re: B-Spline Constraints: Fully Funded! Thanks everybody!
Jolbas, you may be on to something. It probably does not behave properly because the LCS is not attached properly. So, I will do my homework and research attachment modes more thoroughly. If I still have a question I will raise it in a separate post in Open Discussion so as to not distract from JNXD's valuable B-spline achievements .
EDIT: Please be advised I have made this change to my file and it appears to be working as expected !! I will now try to extend this approach to a complete roller chain. See also viewtopic.php?p=656706#p656706
Last edited by ppemawm on Fri Feb 03, 2023 2:54 pm, edited 2 times in total.
"It is a poor workman who blames his tools..."