Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics
 

Need helps urgently ......

Need helps urgently ......
hero 2013/01/23 22:30
Hello everybody....
I'm new to open cascade and I want to initialize CAD software which enable the user to create a point, line, circle or sphere in general we can say basic Geometry object in a 3D space ...
I have already installed and build open cascade successfully on my system and every thing is working fine,, also I have created a small GUI using MFC on Microsoft Visual studio (VC9),,
but the thing is that How should I start??? and If any one can provide me with a code to create a point using its three coordinates in XYZ plane that will be appreciated

I have gone through the documentation of open cascade and I have gone through the "Reference Documentation/index.html" but the thing is that I could not understand the procedure of using these header files and Class references in my project.

so kindly if any one can provide me with a simple code that can be used in MFC and can create a point (using three coordinates) or a line ( passing by tow point ) in the workspace , that well be great

Regards
Hans 2013/01/24 15:15
//gp_Pnt bilden
gp_Pnt point(X-Coordinate, Y-Coordinate, Z-Coordinate);

//Vertex bilden
TopoDS_Vertex vertex = BRepBuilderAPI_MakeVertex(point);

Handle(AIS_Shape) vertexShape = new AIS_Shape(vertex);

//Display
AIS_InteractiveContext->Display(vertexShape);

hero 2013/01/24 22:51
Dear Hans
Thanks for the reply
truly appreciated

but a small question:
now to make this code run properly I need to include these Header files:
#include <AIS_InteractiveContext.hxx>
#include <gp_Pnt.hxx>
#include <Geom_CartesianPoint.hxx>
#include <AIS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
isn't it so ?????
and the class which I created (let say CCreate_Point) to create that point should be based on which Class ( I mean should the base class be ""Geom_CartesianPoint Class"" or some other classes) ???

Actually it is to confusing for me specially I had not much experience of Visual Programming..

and for these three coordinates (X-Coordinate, Y-Coordinate, Z-Coordinate) I have to get there value from the application controls i.e. Dialog box ????

ThAnX in Advance Dear

Regards
 
 
Latest news
  • Open CASCADE Technology 6.8.0 is available for download!
  • New features to enhance the development process
  • Open CASCADE Technology 6.7.1 is available for download!

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map