Applying mathematical formula in a C++ Objectarx program

Applying mathematical formula in a C++ Objectarx program

nggarnaud
Advocate Advocate
666 Views
3 Replies
Message 1 of 4

Applying mathematical formula in a C++ Objectarx program

nggarnaud
Advocate
Advocate

Dear all

 

I trying to enhance the creative capabilities of my custom entity by using some mathematical formula ( such Hamilton system, and Casteljau algorithm). At this level of development, i trying to applying what i learnt from Gerald Fairn Book's  Curves and Surfaces For Computer Aided Design Geometries.  Does anyone has experience applying mathematical equation in an Objectarx program written with VS 2015?Thank you in advance. Gil

0 Likes
667 Views
3 Replies
Replies (3)
Message 2 of 4

thierry_prince
Advocate
Advocate
Hi,
I'm sorry, but I don't understand what you mean with "applying mathematical equation in an Objectarx program".
Can you give more explanations, or a small sample ?
Bye.
0 Likes
Message 3 of 4

tbrammer
Advisor
Advisor

So you have implemented a custom entity and I suppose it shall display Bezier curves within it's subWorldDraw() method. Right?

What you have to do is to implement the De-Casteljau algorithm to calculate polygon points and then draw the polygon in subWorldDraw().

Your custom entity could also display and the control points as grips by overwriting subGetGripPoints() and you can drag their positions if you implement subMoveGripPoints().


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

Message 4 of 4

nggarnaud
Advocate
Advocate

Hello tbrammer, 

 

Thank you for your feedback. I will give it a try, and let you know how it goes. Cheers

 

 

0 Likes