if(myAISContext.IsNull())
{
di << "use 'vinit' command before " << argv[0] << "\n";
- return 1;
+ return 0;
}
Handle(AIS_InteractiveObject) TheAisIO;
Handle(AIS_TexturedShape) myShape;
Standard_Integer myPreviousMode = 0;
- if (argc<2 || !argv[1])
+ if (!argv[1])
{
di << argv[0] <<" syntax error - Type 'help vtex'"<<"\n";
- return 1;
+ return 0;
}
TCollection_AsciiString name = argv[1];
if (TheAisIO.IsNull())
{
di <<"shape "<<name.ToCString()<<" doesn\'t exist"<<"\n";
- return 1;
+ return 0;
}
if (TheAisIO->IsKind(STANDARD_TYPE(AIS_TexturedShape)) && !TheAisIO.IsNull())
}
else
{
- myAISContext->Clear(TheAisIO,Standard_False);
+ myAISContext->Erase(TheAisIO,Standard_False);
myShape = new AIS_TexturedShape (DBRep::Get(argv[1]));
GetMapOfAIS().UnBind1(TheAisIO);
GetMapOfAIS().UnBind2(name);
if(argc<=1)
{
di << argv[0] <<" syntax error - Type 'help vtex'" << "\n";
- return 1;
+ return 0;
}
- if (argc>2 && argv[2])
+ if (argv[2])
{
if(strcasecmp(argv[2],"?")==0)
{
if(argc<2)
{
di << argv[0] <<" syntax error - Type 'help vtex'" << "\n";
- return 1;
+ return 0;
}
myShape->SetTextureScale (( argv[2] ? Standard_True : Standard_False ),
if(argc<2)
{
di << argv[0] <<" syntax error - Type 'help vtex'" << "\n";
- return 1;
+ return 0;
}
myShape->SetTextureOrigin (( argv[2] ? Standard_True : Standard_False ),
( argv[2] ? atof(argv[2]) : 0.0 ),
if(argc<2)
{
di << argv[0] <<" syntax error - Type 'help vtex'" << "\n";
- return 1;
+ return 0;
}
- if (argc>2 && argv[2])
+ if (argv[2])
{
di <<"Texture repeat enabled"<<"\n";
myShape->SetTextureRepeat(Standard_True, atof(argv[2]), atof(argv[argc-1]) );
if(argc<2)
{
di << argv[0] <<" syntax error - Type 'help vtex'" << "\n";
- return 1;
+ return 0;
}
myShape->SetTextureRepeat(Standard_False);
myShape->SetTextureOrigin(Standard_False);
myAISContext->Display(myShape, Standard_True);
myAISContext->Update(myShape,Standard_True);
}
- return 0;
+ return 1;
}
//==============================================================================
// Function : VAnimation
//==================================================================================
static int VAnimation (Draw_Interpretor& di, Standard_Integer argc, const char** argv) {
- if (argc =! 5) {
+ if (argc != 5) {
di<<"Use: "<<argv[0]<<" CrankArmFile CylinderHeadFile PropellerFile EngineBlockFile"<<"\n";
return 1;
}
Standard_Integer curindex = (TheType == AIS_KOI_None) ? 0 : TheAISContext()->OpenLocalContext();
// step 1: prepare the data
- if(curindex !=0){
+ if(curindex != 0){
Handle(AIS_SignatureFilter) F1 = new AIS_SignatureFilter(TheType,TheSignature);
TheAISContext()->AddFilter(F1);
}
// step 1: prepare the data
- if(curindex !=0){
+ if(curindex != 0){
Handle(AIS_SignatureFilter) F1 = new AIS_SignatureFilter(TheType,TheSignature);
TheAISContext()->AddFilter(F1);
}
IO = TheAISContext()->SelectedInteractive();
}
- if(curindex!=0)
+ if(curindex != 0)
TheAISContext()->CloseLocalContext(curindex);
return IO;
}
static int VEraseType( Draw_Interpretor& , Standard_Integer argc, const char** argv)
{
- if(argc!=2) return 1;
+ if(argc != 2) return 1;
AIS_KindOfInteractive TheType;
Standard_Integer TheSign(-1);