tutorials for my NURBS macros

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: tutorials for my NURBS macros

Post by triplus »

emills2 wrote:...i have a special non-bezier grid and surface just for that task.
I like the sound of that.
emills2
Posts: 884
Joined: Tue Apr 28, 2015 11:23 pm

Re: tutorials for my NURBS macros

Post by emills2 »

triplus wrote:Yes this is similar to the version i used. If you will try the latest one (Version: 0.17.10101):

https://github.com/FreeCAD/FreeCAD/releases

You will likely observe the same issue as mentioned earlier. Note that i didn't check the code and i don't know if anything changed in FreeCAD. If it's tolerance related something like this should fix it (in pseudocode):
i just tried it out, you are correct
i can open my files in 0.17.10101
NURBSlib_EVM model in 0.17 10101- 01 open ok.png
NURBSlib_EVM model in 0.17 10101- 01 open ok.png (373.55 KiB) Viewed 1802 times
but any edit that recomputes the grid fails in the 'orient_a_to_b' routine (as Microelly correctly determined)
NURBSlib_EVM model in 0.17 10101- 02 edit breaks vertex equality.png
NURBSlib_EVM model in 0.17 10101- 02 edit breaks vertex equality.png (226.67 KiB) Viewed 1802 times
i'm fine with adding tolerance checks in principle, but i don't know if i can keep up with the release schedule. And the icons would look different all the time, the tutorial pictures would never match...this is a big deal.

So i can't write for 0.17, but the system is basically useless without sketch attchment in 0.16 :(

I wish an official .17 would get released so i could write my tools against that :mrgreen: i might have to host a particular binary that works with my tools. But even that is extra work, and it will turn people away. I'm really big on the principle that 'it has to actually work'.
Last edited by emills2 on Fri Feb 17, 2017 10:09 pm, edited 1 time in total.
emills2
Posts: 884
Joined: Tue Apr 28, 2015 11:23 pm

Re: tutorials for my NURBS macros

Post by emills2 »

triplus wrote:
emills2 wrote: You will likely observe the same issue as mentioned earlier. Note that i didn't check the code and i don't know if anything changed in FreeCAD. If it's tolerance related something like this should fix it (in pseudocode):

Code: Select all

if abs(p1 - p2) < 1e-07:
    points equal
else:
    points not equal
you are right, and i do use a similar mechanism in many spots. However, it was really nice to not need it in cases where the points are identically equal.
emills2
Posts: 884
Joined: Tue Apr 28, 2015 11:23 pm

Re: tutorials for my NURBS macros

Post by emills2 »

emills2 wrote:I wish an official .17 would get released so i could write my tools against that :mrgreen: i might have to host a particular binary that works with my tools. But even that is extra work, and it will turn people away. I'm really big on the principle that 'it has to actually work'.
I need to apologize for all the whining :lol: sorry!

I know the solution, and no one owes it to me! i just need to learn to compile FreeCAD, then i can maintain my own version exactly how i like it.

Until then, i am thankful for whichever binaries others prepare for me.
emills2
Posts: 884
Joined: Tue Apr 28, 2015 11:23 pm

Re: tutorials for my NURBS macros

Post by emills2 »

i have fixed the issue that affects this tutorial on 0.17.10133, so it should be functional. The other issues i mentioned don't come up as far as the tutorial 0.01 and 0.02 are concerned.
emills2
Posts: 884
Joined: Tue Apr 28, 2015 11:23 pm

Re: tutorials for my NURBS macros

Post by emills2 »

turns out it was just the tolerance...over...and over...and over. With different error messages each time, and sometime no error messages, just a subtly broken model, that appears to work. But it's fixed! :)
Bezier primary Surface Volume 67 - in 0.174.10133 - 02 fully recovered.png
Bezier primary Surface Volume 67 - in 0.174.10133 - 02 fully recovered.png (230.96 KiB) Viewed 1757 times
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: tutorials for my NURBS macros

Post by triplus »

There you have it. Being tolerant is not always easy but it can prove to be useful! ;)
emills2
Posts: 884
Joined: Tue Apr 28, 2015 11:23 pm

Re: tutorials for my NURBS macros

Post by emills2 »

As i was committing new stuff today, i realized today that i had not uploaded the fix i did 9 days ago to the problems reported by Triplus and Microelly2 :roll: sorry!

Everything is tested up to 0.17.10291 (and 0.17.10131)

Tutorial 0.03 Point_onCurve ControlPoly4_Segment ControlPoly6 and CubicCurve6 on the way. model and images ready. I hope to have it ready this weekend.

shown below: G2 blend of a line segment to a true circular arc. Shown as generated by default. There are many degrees of freedom remaining that are available for design purposes or for manual tuning towards G3
ControlPoly6 Auto G2.gif
ControlPoly6 Auto G2.gif (607.96 KiB) Viewed 1689 times
Once again, if anyone tries this and finds it broken, please let me know!
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: tutorials for my NURBS macros

Post by triplus »

Was the last post in this thread edited?

As i don't remember:
emills2 wrote:Tutorial 0.03 Point_onCurve ControlPoly4_Segment ControlPoly6 and CubicCurve6 on the way. model and images ready. I hope to have it ready this weekend.
Reading this. And i was waiting for the thread to be bumped again. But as it didn't happen i decided to ask today on the current status of things. And as for the Tutorial 0.03 itself it wasn't published yet?
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: tutorials for my NURBS macros

Post by chrisb »

triplus wrote:Was the last post in this thread edited?
If a post is edited after someone has read it, it shows the time and number of edits at the bottom. I know this because I had to correct at least typos in my posts more than once, although I always preview them. (Example: https://forum.freecadweb.org/viewtopic. ... 69#p171527)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply