Problem with SplineHelp
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 11/12/2011 at 15:11, xxxxxxxx wrote:
In the documentation, the GetOffSetFromUnit and GetOffsetFromReal have their discription swapped.
And I just can't get any usable value from the GetTangent function. If the spline is a flat spline, it always returns Vector(0,1,0). -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/12/2011 at 00:57, xxxxxxxx wrote:
Hi,
Originally posted by xxxxxxxx
In the documentation, the GetOffSetFromUnit and GetOffsetFromReal have their discription swapped.
Thank you for the error report in the docs. I fixed it.
Originally posted by xxxxxxxx
And I just can't get any usable value from the GetTangent function. If the spline is a flat spline, it always returns Vector(0,1,0).
About SplineHelp.GetTangent(), you should try to use SplineObject.GetTangent() :
import c4d from c4d import utils def MakeEditable(op) : if (not op) | op.CheckType(c4d.Ospline) : return op op = [op.GetClone()] doc = c4d.documents.BaseDocument() doc.InsertObject(op[0], None, None) op = c4d.utils.SendModelingCommand(command = c4d.MCOMMAND_MAKEEDITABLE, list = op, mode = c4d.MODELINGCOMMANDMODE_EDGESELECTION, doc = doc) return op[0] def main() : spline = MakeEditable(op) if (not spline) | (not spline.CheckType(c4d.Ospline)) : return for i in range(0, spline.GetTangentCount()) : tangent = spline.GetTangent(i) print tangent if __name__=='__main__': main()
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 30/12/2011 at 14:56, xxxxxxxx wrote:
I'd like to align my clone to the spline
As I have the percentage along spline and the mograph clone matrix for each cloneusing
spltanvec = c4d.utils.SplineHelp.GetTangent( pospercent, smooth=True, realoffset=True)
gives me an error - expecting spline help object?out of the blue I added a spline help object
used earlier in my code
shelp = SplineHelp()
shelp.InitSpline(spl,use_deformed_points=True)spltanvec = c4d.utils.SplineHelp.GetTangent(shelp, pospercent, smooth=True, realoffset=True)
but this just gives me an unchanging vector - no matter what position percentage I use
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 31/12/2011 at 02:36, xxxxxxxx wrote:
I've posted the whole c4d file on CGSociety Maxon thread - coding. Any help appreciated.