ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Two Surface in a Chart
Posted by Baris E on Mar-29-2019 14:16
Attachments:
Hello,

I am trying to show two surface in a chart. I am using surfacechartrotation demo and C++. I can show two surface in a chart but I have a problem with it. When I look at the chart from below, normally I should see bottom surface but ı see upper surface. I added a photo from chart. How can I fix the problem?

Thanks.
11.png
22.png

  Re: Two Surface in a Chart
Posted by Peter Kwan on Mar-29-2019 18:22
Hi Baris,

I believe the chart is created by merging two charts:

(a) A chart for the blue surface with walls.

(b) A chart for the red surface without walls.

(c) merge (b) onto (a)

If the elevation angle is between 180 to 360 degrees, the blue and red surfaces has to reverse, like:

(a) A chart for the red surface with walls.

(b) A chart for the blue surface without walls.

(c) merge (b) onto (a)


Because the elevation angle is modulo 360 (that is, 370 degrees is the same as 10 degrees, and -10 degrees is equivalent to 350 degrees), to test the elevation angle, you can use:

// fmod twice to take care of negative angles
if (fmod(fmod(m_elevationAngle, 360) + 360, 360) >= 180)
{
    ...reverse order
}
else
{
    ...normal order
}


Hope this can help.

Regards
Peter Kwan

  Re: Two Surface in a Chart
Posted by Baris E on Apr-01-2019 22:06
Hi Peter,

Thank you for your answer. It works! :)

Regards.