THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 27/08/2012 at 11:07, xxxxxxxx wrote:
Hello,
I would like to triangulate a spline. I use LineObject.Triangulate() for that and it's work well if I have only one segment.
If tey are more than one there is no function SetSegment to set the segments. How can I do ? (I don't want to use CallCommand or use an ExtrusionObject or other, I want realy triangulate into a PolygonObject)
Script example when a spline is active :
import c4d
def main() :
lo = c4d.LineObject(op.GetPointCount(),op.GetSegmentCount())
for i,p in enumerate(op.GetAllPoints()) :
lo.SetPoint(i,p)
poly = lo.Triangulate(0.0)
doc.InsertObject(poly)
c4d.EventAdd()
if __name__=='__main__':
main()
Thx