Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Help with OpenCascade

teppeiteppei Member Posts: 11
Hi everyone, I am a student doing my final yr project. My project involves me to come up with a GUI for this CAD program Opencascade. Currently we can draw using OCC thru TCL command, however this is too user unfriendly thatz y my prof wants me to come up with a GUI to make the control easy. Right now I have the object libraries for all the commands. However I have totally no idea how to go about doing it. Can somebody please guide me on how to go about doing this.
Thanks

Comments

  • SephirothSephiroth Fayetteville, NC, USAMember Posts: 1,035
    : Hi everyone, I am a student doing my final yr project. My project involves me to come up with a GUI for this CAD program Opencascade. Currently we can draw using OCC thru TCL command, however this is too user unfriendly thatz y my prof wants me to come up with a GUI to make the control easy. Right now I have the object libraries for all the commands. However I have totally no idea how to go about doing it. Can somebody please guide me on how to go about doing this.
    : Thanks
    :
    Never heard of OCC or OpenCascade, and I never wasted my time learning TCL. I do straight C/C++. Now, having the library files is nice, but do you have any documentation on them to know what functions are in them, how to call them, and what they return? If not, I'd first start by finding out WHAT those things do and how to use them. You will also need headers with the exported/imported functions those library files use.

    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]

  • teppeiteppei Member Posts: 11
    Hi, Thanz for replying. I managed to find an example which is similar to my project. I am now able to display certain objects, however, in this example, all the dimensions and positions are fixed. It looks like this...

    void CSampleTopologyPrimitivesDoc::OnBox()
    {
    CBoxDialog aCD;
    aCD.DoModal();

    TopoDS_Shape B1 = BRepPrimAPI_MakeBox (200.,150.,100.);
    Handle(AIS_Shape) aBox1 = new AIS_Shape(B1);
    myAISContext->SetMaterial(aBox1,Graphic3d_NOM_PLASTIC,Standard_False);
    myAISContext->SetColor(aBox1,Quantity_NOC_RED,Standard_False);
    myAISContext->Display(aBox1);

    .......

    I decided to change the variables(dimension) thru dialog box.
    Now I have this problem, how do I link my values from from the dialog box which is in CBoxDialog.

    Plz advice
  • SephirothSephiroth Fayetteville, NC, USAMember Posts: 1,035
    If you want to use your own variables, I would simply create pointers instead of variables and point them to the actual vars that the program uses. This would save resources and be faster than using your own vars and then setting the program vars to your var's values. Plus (assuming the 3D window is refreshed frequently) since you're using pointers, you would see the changes as they happen, and not just the end-result in the case of using more vars. As for the functions, I have no clue what to tell you because those aren't Win functions, so they mustbe OC functions?

    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]

  • teppeiteppei Member Posts: 11
    sorry to trouble u again. Just 1 more question. I would like to display my toolbars vertically instead of horizontally, how do I do that, I can't seem to find any tutorials on that part. Plz advice
  • SephirothSephiroth Fayetteville, NC, USAMember Posts: 1,035
    : sorry to trouble u again. Just 1 more question. I would like to display my toolbars vertically instead of horizontally, how do I do that, I can't seem to find any tutorials on that part. Plz advice
    :
    I'm not quite sure on that one. That would be part of the Windoze API, so I suggest trying the Windoze coding board. They've always helped me there. Also, I am a game programmer so I don't use toolbars. I think I used one once, a long time ago when learning the WinAPI, but I forget what I did :P.

    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]

Sign In or Register to comment.