69 views

Skip to first unread message

Jun 5, 2012, 7:08:22 AM6/5/12

to oce-dev

Hi all,

I used OpenCascade some time ago and recently switched over to use

OCE, just because its much easier installation procedure. I do not

know whether there is a special place to discuss OCE so I will ask my

first question here. Please tell me if this is not the right place.

In my source code I use a macro? PI which worked with last versions of

OCE. Now I installed oce-0.9.1-67 and got a compiler message that PI

was not defined.

Unfortunately I do not understand completely the C++ basics around a

construct like this PI. I remember its a macro that is translated

during compilation into the value 3.14... Could someone be so nice to

explain to me how this works or how I can realize an exact value for

PI allover my program? Is there a special OpenCascade replacement for

this?

Thanks for any hints,

Gernot

I used OpenCascade some time ago and recently switched over to use

OCE, just because its much easier installation procedure. I do not

know whether there is a special place to discuss OCE so I will ask my

first question here. Please tell me if this is not the right place.

In my source code I use a macro? PI which worked with last versions of

OCE. Now I installed oce-0.9.1-67 and got a compiler message that PI

was not defined.

Unfortunately I do not understand completely the C++ basics around a

construct like this PI. I remember its a macro that is translated

during compilation into the value 3.14... Could someone be so nice to

explain to me how this works or how I can realize an exact value for

PI allover my program? Is there a special OpenCascade replacement for

this?

Thanks for any hints,

Gernot

Jun 5, 2012, 9:23:11 AM6/5/12

to oce...@googlegroups.com

On 2012/6/5 Gernot wrote:

> Hi all,

>

> I used OpenCascade some time ago and recently switched over to use

> OCE, just because its much easier installation procedure. I do not

> know whether there is a special place to discuss OCE so I will ask my

> first question here. Please tell me if this is not the right place.

Hello,
> Hi all,

>

> I used OpenCascade some time ago and recently switched over to use

> OCE, just because its much easier installation procedure. I do not

> know whether there is a special place to discuss OCE so I will ask my

> first question here. Please tell me if this is not the right place.

This is the right place.

> In my source code I use a macro? PI which worked with last versions of

> OCE. Now I installed oce-0.9.1-67 and got a compiler message that PI

> was not defined.

to the standardized M_PI macro, defined in math.h.

> Unfortunately I do not understand completely the C++ basics around a

> construct like this PI. I remember its a macro that is translated

> during compilation into the value 3.14... Could someone be so nice to

> explain to me how this works or how I can realize an exact value for

> PI allover my program? Is there a special OpenCascade replacement for

> this?

#include <math.h>), or write something like:

#ifndef PI

# include <math.h>

# define PI M_PI

#endif

Denis

Reply all

Reply to author

Forward

0 new messages

Search

Clear search

Close search

Google apps

Main menu