Personal tools
You are here: Home Forum Use NumberOfSegments error

NumberOfSegments error

Up to Use

NumberOfSegments error

Posted by Nigirim at November 02. 2012

Hi all,

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?

Greets

Nigirim

Re: NumberOfSegments error

Posted by Nigirim at November 02. 2012

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.

 

Re: NumberOfSegments error

Posted by Nigirim at November 02. 2012

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

Powered by Ploneboard
Document Actions