In this Post I was suggesting to extend the "Map Parameter" attachment (that only allows single curves right now) to also allow Wires (I have shown an animation in that post to show why).
I now implemented this and did some testing. It works.
Kind of.
If just BRepAdaptor_CompCurve::D1() would return parameter values that are evenly distributed along the wire. Which it doesn't:
Anybody knows if this is a feature or am I doing something wrong. Or should I consider this a bug?
BRepAdaptor_CompCurve::D1() parameter distribution??
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
BRepAdaptor_CompCurve::D1() parameter distribution??
Cheers,
Markus
Markus
Re: BRepAdaptor_CompCurve::D1() parameter distribution??
IMHO you must not assume any specific parametrisation.
This is not a bug. It is up to you to compute the right sequence of parameters to get your "constant speed" samples.
EDIT : GCPnts_UniformAbscissa may be useful
This is not a bug. It is up to you to compute the right sequence of parameters to get your "constant speed" samples.
EDIT : GCPnts_UniformAbscissa may be useful
- tanderson69
- Veteran
- Posts: 1626
- Joined: Thu Feb 18, 2010 1:07 am
Re: BRepAdaptor_CompCurve::D1() parameter distribution??
It might. There are several constructors for BRepAdaptor_CompCurve. I searched freecads code base and the only BRepAdaptor_CompCurve constructor I found, was the constructor using the single parameter wire. So I can only guess that using another constructor and passing true for 'KnotByCurvilinearAbcissa' parameter would give you what you want. You can also specify the parametric range.
Re: BRepAdaptor_CompCurve::D1() parameter distribution??
Good guess, hit the spot, many thanks!tanderson69 wrote: ↑Wed Sep 30, 2020 1:37 pm... So I can only guess that using another constructor and passing true for 'KnotByCurvilinearAbcissa' parameter would give you what you want...
Cheers,
Markus
Markus
Re: BRepAdaptor_CompCurve::D1() parameter distribution??
Thanks to tanderson69, the roller chain can now be properly animated using plain Assembly 4 functionality and a little expression trickery (that probably needs revisiting to improve performance), no extra code needed.
Could anybody offhand give some guidance on the FreeCAD pull/enhancement request process, please?
I don't want to collide with anything with my very first contribution...
Could anybody offhand give some guidance on the FreeCAD pull/enhancement request process, please?
I don't want to collide with anything with my very first contribution...
Cheers,
Markus
Markus
Re: BRepAdaptor_CompCurve::D1() parameter distribution??
Checkout our wiki page called Source code management
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs