For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

2D - just drawing

Robert's picture

I'm trying to find any solution for simple drawing in 2D. I'm wondering e.g. how to draw line or polyline just by clicking mouse on the screen. I can find click point coordinates (Convert() method), but i don't if (and how) add dynamicly points to polyline - is it possible? Or is it possible create simple line - just click to start line and then move mouse with second end moving follow mouse on the view? Maybe parameters for created 2D objects could be changed dynamicly? Any solutions for that? Or only option is creating and destroying object each time (each mouse move?), however it sounds like a nonsense for me.

Marek's picture

For drawing you probably should use V2d_view class. It has mathod Convert. It takes mouse position and converts it to view position. Dynamic drawing in my application is made by destroying old object and creating new one.

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.