For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

How to display in different windows

Duflot's picture
Forums: 

HI everyone below you can find the code of the the small application that i have develloped. My problem is each time i generate a new compound I would like to display it in a new 3D viewer window but with this code I succeed to pop up a new 3d viewer but the all the coumpoud still appeared in the same first window
void CBottleDoc::OnDatabaseGenerateaconcept()
{
// TODO: Add your command handler code here

ComponentChoices DLG4;
Gear_Motor_2 DLG2;
Gear_Motor_1 DLG1;
Pulley DLG3;
Gear_Motor_12 DLG5;
Gear_Motor_22 DLG6;

// TODO: Add your command handler code here

if ( DLG4 . DoModal() == IDOK );

{
if ((DLG4.m_Gear_Motor_A == _T("20425012C")) && (DLG4.m_Gear_Motor_B ==_T("20425012C")))
{( DLG1 . DoModal() == IDOK );
if ((DLG1.m_Shape == 0) && (DLG1.m_Ratio == 0))
{
TopoDS_Shape Composant=MakeMotor1Ci(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();
CBottleDoc::Fitviewer();
}
else if ((DLG1.m_Shape == 0) && (DLG1.m_Ratio == 1))
{
TopoDS_Shape Composant=MakeMotor1Ci(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG1.m_Shape == 0) && (DLG1.m_Ratio == 2))
{
TopoDS_Shape Composant=MakeMotor1Ci(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG1.m_Shape == 0) && (DLG1.m_Ratio == 3))
{
TopoDS_Shape Composant=MakeMotor1Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG1.m_Shape == 1) && (DLG1.m_Ratio == 0))
{
TopoDS_Shape Composant=MakeMotor1Ci(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG1.m_Shape == 1) && (DLG1.m_Ratio == 1))
{
TopoDS_Shape Composant=MakeMotor1Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG1.m_Shape == 1) && (DLG1.m_Ratio == 2))
{
TopoDS_Shape Composant=MakeMotor1Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG1.m_Shape == 1) && (DLG1.m_Ratio == 3))
{
TopoDS_Shape Composant=MakeMotor1Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}

( DLG5 . DoModal() == IDOK );
if ((DLG5.m_Shape == 0) && (DLG5.m_Ratio == 0))
{
TopoDS_Shape Composant=MakeMotor1Ci(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG5.m_Shape == 0) && (DLG5.m_Ratio == 1))
{
TopoDS_Shape Composant=MakeMotor1Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG5.m_Shape == 0) && (DLG5.m_Ratio == 2))
{
TopoDS_Shape Composant=MakeMotor1Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG5.m_Shape == 0) && (DLG5.m_Ratio == 3))
{
TopoDS_Shape Composant=MakeMotor1Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG5.m_Shape == 1) && (DLG5.m_Ratio == 0))
{
TopoDS_Shape Composant=MakeMotor1Ci(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG5.m_Shape == 1) && (DLG5.m_Ratio == 1))
{
TopoDS_Shape Composant=MakeMotor1Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG5.m_Shape == 1) && (DLG5.m_Ratio == 2))
{
TopoDS_Shape Composant=MakeMotor1Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG5.m_Shape == 1) && (DLG5.m_Ratio == 3))
{
TopoDS_Shape Composant=MakeMotor1Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}

( DLG3 . DoModal() == IDOK );
if (DLG3.m_Neck_Width == 0)
{
TopoDS_Shape Composant=MakePulleyT1 (20,50,25,30,20);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();}
else if (DLG3.m_Neck_Width == 1)
{
TopoDS_Shape Composant=MakePulleyT1 (40,50,25,30,20);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();}

}

else if ((DLG4.m_Gear_Motor_A == _T("20425012C")) && (DLG4.m_Gear_Motor_B ==_T("3557K012C")))
{( DLG1 . DoModal() == IDOK );
if ((DLG1.m_Shape == 0) && (DLG1.m_Ratio == 0))
{
TopoDS_Shape Composant=MakeMotor1Ci(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG1.m_Shape == 0) && (DLG1.m_Ratio == 1))
{
TopoDS_Shape Composant=MakeMotor1Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG1.m_Shape == 0) && (DLG1.m_Ratio == 2))
{
TopoDS_Shape Composant=MakeMotor1Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG1.m_Shape == 0) && (DLG1.m_Ratio == 3))
{
TopoDS_Shape Composant=MakeMotor1Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG1.m_Shape == 1) && (DLG1.m_Ratio == 0))
{
TopoDS_Shape Composant=MakeMotor1Ci(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG1.m_Shape == 1) && (DLG1.m_Ratio == 1))
{
TopoDS_Shape Composant=MakeMotor1Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG1.m_Shape == 1) && (DLG1.m_Ratio == 2))
{
TopoDS_Shape Composant=MakeMotor1Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG1.m_Shape == 1) && (DLG1.m_Ratio == 3))
{
TopoDS_Shape Composant=MakeMotor1Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}

( DLG2 . DoModal() == IDOK );
if ((DLG2.m_Shape == 0) && (DLG2.m_Ratio == 0))
{
TopoDS_Shape Composant=MakeMotor2Ci(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG2.m_Shape == 0) && (DLG2.m_Ratio == 1))
{
TopoDS_Shape Composant=MakeMotor2Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG2.m_Shape == 0) && (DLG2.m_Ratio == 2))
{
TopoDS_Shape Composant=MakeMotor2Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG2.m_Shape == 0) && (DLG2.m_Ratio == 3))
{
TopoDS_Shape Composant=MakeMotor2Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG2.m_Shape == 1) && (DLG2.m_Ratio == 0))
{
TopoDS_Shape Composant=MakeMotor2Ci(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG2.m_Shape == 1) && (DLG2.m_Ratio == 1))
{
TopoDS_Shape Composant=MakeMotor2Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG2.m_Shape == 1) && (DLG2.m_Ratio == 2))
{
TopoDS_Shape Composant=MakeMotor1Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG2.m_Shape == 1) && (DLG2.m_Ratio == 3))
{
TopoDS_Shape Composant=MakeMotor2Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
( DLG3 . DoModal() == IDOK );
if (DLG3.m_Neck_Width == 0)
{
TopoDS_Shape Composant=MakePulleyT1 (20,50,25,30,20);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();}
else if (DLG3.m_Neck_Width == 1)
{
TopoDS_Shape Composant=MakePulleyT1 (40,50,25,30,20);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();}
}

else if ((DLG4.m_Gear_Motor_A == _T("3557K012C")) && (DLG4.m_Gear_Motor_B ==_T("3557K012C")))
{( DLG2 . DoModal() == IDOK );
if ((DLG2.m_Shape == 0) && (DLG2.m_Ratio == 0))
{
TopoDS_Shape Composant=MakeMotor2Ci(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG2.m_Shape == 0) && (DLG2.m_Ratio == 1))
{
TopoDS_Shape Composant=MakeMotor2Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG2.m_Shape == 0) && (DLG2.m_Ratio == 2))
{
TopoDS_Shape Composant=MakeMotor2Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG2.m_Shape == 0) && (DLG2.m_Ratio == 3))
{
TopoDS_Shape Composant=MakeMotor2Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG2.m_Shape == 1) && (DLG2.m_Ratio == 0))
{
TopoDS_Shape Composant=MakeMotor2Ci(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG2.m_Shape == 1) && (DLG2.m_Ratio == 1))
{
TopoDS_Shape Composant=MakeMotor2Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG2.m_Shape == 1) && (DLG2.m_Ratio == 2))
{
TopoDS_Shape Composant=MakeMotor1Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG2.m_Shape == 1) && (DLG2.m_Ratio == 3))
{
TopoDS_Shape Composant=MakeMotor2Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}

( DLG6 . DoModal() == IDOK );

if ((DLG6.m_Shape == 0) && (DLG6.m_Ratio == 0))
{
TopoDS_Shape Composant=MakeMotor2Ci(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG6.m_Shape == 0) && (DLG6.m_Ratio == 1))
{
TopoDS_Shape Composant=MakeMotor2Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG6.m_Shape == 0) && (DLG6.m_Ratio == 2))
{
TopoDS_Shape Composant=MakeMotor2Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG6.m_Shape == 0) && (DLG6.m_Ratio == 3))
{
TopoDS_Shape Composant=MakeMotor2Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG6.m_Shape == 1) && (DLG6.m_Ratio == 0))
{
TopoDS_Shape Composant=MakeMotor2Ci(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG6.m_Shape == 1) && (DLG6.m_Ratio == 1))
{
TopoDS_Shape Composant=MakeMotor2Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG6.m_Shape == 1) && (DLG6.m_Ratio == 2))
{
TopoDS_Shape Composant=MakeMotor1Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG6.m_Shape == 1) && (DLG6.m_Ratio == 3))
{
TopoDS_Shape Composant=MakeMotor2Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
( DLG3 . DoModal() == IDOK );
if (DLG3.m_Neck_Width == 0)
{
TopoDS_Shape Composant=MakePulleyT1 (20,50,25,30,20);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();}
else if (DLG3.m_Neck_Width == 1)
{
TopoDS_Shape Composant=MakePulleyT1 (40,50,25,30,20);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();}

}

else if ((DLG4.m_Gear_Motor_A == _T("3557K012C")) && (DLG4.m_Gear_Motor_B ==_T("20425012C")))
{
( DLG2 . DoModal() == IDOK );

if ((DLG2.m_Shape == 0) && (DLG2.m_Ratio == 0))
{
TopoDS_Shape Composant=MakeMotor2Ci(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG2.m_Shape == 0) && (DLG2.m_Ratio == 1))
{
TopoDS_Shape Composant=MakeMotor2Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG2.m_Shape == 0) && (DLG2.m_Ratio == 2))
{
TopoDS_Shape Composant=MakeMotor2Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG2.m_Shape == 0) && (DLG2.m_Ratio == 3))
{
TopoDS_Shape Composant=MakeMotor2Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG2.m_Shape == 1) && (DLG2.m_Ratio == 0))
{
TopoDS_Shape Composant=MakeMotor2Ci(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG2.m_Shape == 1) && (DLG2.m_Ratio == 1))
{
TopoDS_Shape Composant=MakeMotor2Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG2.m_Shape == 1) && (DLG2.m_Ratio == 2))
{
TopoDS_Shape Composant=MakeMotor1Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG2.m_Shape == 1) && (DLG2.m_Ratio == 3))
{
TopoDS_Shape Composant=MakeMotor2Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
( DLG1 . DoModal() == IDOK );

if ((DLG1.m_Shape == 0) && (DLG1.m_Ratio == 0))
{
TopoDS_Shape Composant=MakeMotor1Ci(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG1.m_Shape == 0) && (DLG1.m_Ratio == 1))
{
TopoDS_Shape Composant=MakeMotor1Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG1.m_Shape == 0) && (DLG1.m_Ratio == 2))
{
TopoDS_Shape Composant=MakeMotor1Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG1.m_Shape == 0) && (DLG1.m_Ratio == 3))
{
TopoDS_Shape Composant=MakeMotor1Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG1.m_Shape == 1) && (DLG1.m_Ratio == 0))
{
TopoDS_Shape Composant=MakeMotor1Ci(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG1.m_Shape == 1) && (DLG1.m_Ratio == 1))
{
TopoDS_Shape Composant=MakeMotor1Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG1.m_Shape == 1) && (DLG1.m_Ratio == 2))
{
TopoDS_Shape Composant=MakeMotor1Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}
else if ((DLG1.m_Shape == 1) && (DLG1.m_Ratio == 3))
{
TopoDS_Shape Composant=MakeMotor1Re(100,100,50,20,13);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();
((CBottleApp*)AfxGetApp())->CreateNewFile();}

( DLG3 . DoModal() == IDOK );
if (DLG3.m_Neck_Width == 0)
{
TopoDS_Shape Composant=MakePulleyT1 (20,50,25,30,20);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();}
else if (DLG3.m_Neck_Width == 1)
{
TopoDS_Shape Composant=MakePulleyT1 (40,50,25,30,20);
Handle(AIS_Shape) myAISComposant = new AIS_Shape(Composant);
myAISContext->SetMaterial(myAISComposant,Graphic3d_NOM_CHROME);
myAISContext->SetDisplayMode(AIS_Shaded);
myAISComposant->SetTransparency(0.5);
myAISContext->Display(myAISComposant);
CBottleDoc::Fitviewer();}
}

}

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.