Create a Box with the Command line Arguments in Draw Test Harness

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.

Forum supervisor's picture

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

gishara's picture

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.

Forum supervisor's picture

Hi,
The mentioned example you can find at the ...\OpenCasCade6.5.1\ros\src sub-directory.
Regards

gishara's picture

Ok..Thanks a lot.

PG's picture

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

Forum supervisor's picture

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

gishara's picture

Thanks. I found it.