
Mon, 06/20/2011 - 15:42
Forums:
Hi all,
I am quite new to open cascade and I have installed it in visual studio and tried doing some examples in Draw.
What I want now is to create a new command in Draw which shows a box with the values given as command line arguments. I have used the Draw_Interpretor::Eval("box b 1 1 1")to create a box. How can I change this to accept command line arguments?
I have to do this within c++ implementation.
Mon, 06/20/2011 - 16:18
Hi,
You may use ordinary approach.
Create a new command using Draw_Interpretor& theCommands;
theCommands.Add(...); //see for details GeometryTest_CurveCommands.cxx, for example.
Fourth parameter of Add method is a function name, which will implement your command.
Regards
Tue, 06/21/2011 - 06:45
Thanks for the reply. Where can I find those samples? I have installed Open cascade using the .exe and I can see only the samples, not their source.
Thanks.
Tue, 06/21/2011 - 09:57
Hi,
The mentioned example you can find at the ...\OpenCasCade6.5.1\ros\src sub-directory.
Regards
Tue, 06/21/2011 - 10:28
Ok..Thanks a lot.
Tue, 06/21/2011 - 10:28
Opened the source file 'ros/src/GeometryTest/GeometryTest_CurveCommands.cxx' and add the same and function.
How to re-build the TH appln to reflect this new command ?
- PG
Tue, 06/21/2011 - 10:51
You may find the description of the process at the paragraph
"11. Extending Test Harness with custom commands" of the "Test Harness User's Guide".
Regards
Tue, 06/21/2011 - 11:10
Thanks. I found it.