NumberOfSegments errorPosted by Nigirim at November 02. 2012
I ve got a question relation the NumberOfSegments command.
I want to get a consistent mesh with calculated! values for different wires.
The calculation works fine but NumberOfSegments seems to accept only numbers.
For example my calculated value is p=3, I get an error if a put in the "p" at NumberOfSegments() if I put 3 into it works.
The problem is that I dont want to do this for every of my meshes so is there anything I can do about this
or do I have to accept the fact that it doesnt work with variables?
Made some extra tests:
If I use a variable which I define outside of my calculation loop it works fine.
But if the variable, even if it is a fixed value, is inside my calculation loop it doesnt work.
Solved my problem.
My calculationoutput was 3.0 instead of 3. NumberOfSegments seems to need integer even if it is the same as 3.0.
so int(math.ceil(p)) made the deal