Page 1 of 1

Solid 3D View

Posted: 25 Oct 2013, 16:59
by Luis
Hello,

I used CADImport.NET in my C# application. I have a drawing in a CADPictureBox.

I want to visualize the drawing in a 3D View. In the CAD file there are polylines with nonzero thickness.

I set graphicsMode as OpenGL and RenderMode as Solid and then I imposed SEIsometric View but my application visualizes a 3D View as if the RenderMode had Wireframe.

Am I forgetting any step?

Regards,

Luis

Re: Solid 3D View

Posted: 25 Oct 2013, 17:26
by support
Hello!

If the drawing contains only POLYLINE entities, it should be visualized correctly in the Solid mode. Does the Viewer demo visualizes the drawing the same way? If so, could you send the drawing to our e-mail: support@cadsofttools.com for the purpose of testing?


Mikhail.

Re: Solid 3D View

Posted: 25 Oct 2013, 17:40
by Luis
Hello,

in Demo Viewer the visualization is corrected and I tried to do the same.

This is the involved part of my code:

"
DrawGraphicsMode graphicsMode;
CadPictureBox cadPictureBox;
RenderMode renderMode;
CadImage cadImage;

graphicsMode = DrawGraphicsMode.OpenGL;
cadPictureBox.Set3DStyle();
renderMode = RenderMode.Solid;
cadImage = CADImage.CreateImageByExtension(filename);
cadImage.GraphicsOutMode = graphicsMode;
cadImage.ChangeDrawMode(graphicsMode, cadPictureBox);
cadImage.ChangeGraphicsMode(graphicsMode, renderMode);

cadImage.RotToView(CADViewDirection.SEIsometric);
cadImage.Rotate(....);
cadPictureBox.Invalidate();

"

Re: Solid 3D View

Posted: 12 Nov 2013, 15:00
by Luis
Hello,

I still have the same problem.

I set in my code the Graphic Mode as OpenGL and the RenderMode as Solid, but the view is Wireframe.

I have followed all the steps of DemoViewer's code.

Can you help me?

Thanks,

Luis

Re: Solid 3D View

Posted: 02 Dec 2013, 13:06
by support
Hello Luis,

The code snippet below visualizes the drawing using OpenGL in the Solid mode:

Code: Select all

CADImage cadImage;
...

cadPictureBox1.Set3DStyle();
cadImage = null;
cadImage = CADImage.CreateImageByExtension(fileName);
cadImage.LoadFromFile(fileName);
cadImage.ChangeDrawMode(DrawGraphicsMode.OpenGL, cadPictureBox1);
cadImage.ChangeGraphicsMode(DrawGraphicsMode.OpenGL, RenderMode.Solid);
cadImage.DefaultColor = Color.Gray;
cadImage.BackgroundColor = Color.Black;
cadImage.Draw(cadPictureBox1.CreateGraphics(), new RectangleF(0, 0, 8000, 8000), cadPictureBox1);
Mikhail.

Re: Solid 3D View

Posted: 02 Dec 2013, 16:53
by Luis
Hello Mikhail,

thanks for your reply.

When I try to rotate the view in SEIsometric Direction, cadImage doesn't rotate.

This is my code:

Code: Select all

cadImage.RotToView(CADViewDirection.SEIsometric);
this.Orb3D.OnRotate();
cadPictureBox1.Invalidate();
The same code is good when drawgraphicmode is GDIPlus.

Luis

Re: Solid 3D View

Posted: 02 Dec 2013, 17:25
by support
Hello Luis,

You should call RotToView() method before the image will be drawn to CADPictureBox:

Code: Select all

...
cadImage.RotToView(CADViewDirection.SEIsometric);
...
cadImage.Draw(cadPictureBox1.CreateGraphics(), new RectangleF(0, 0, 8000, 8000), cadPictureBox1);
Mikhail.