mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0025284: Problems with standard MFC samples
- OCAF sample Save Document option: corrected conversion from LPCTSTR to Standard_CString - HLR sample: corrected mouse move event handling for HLR 2D view; Corrected CSelectionDialog view displaying and updating - Geometry sample: CGeometryDoc correction to avoid code duplication - OCC_3dBaseDoc: corrected DragEvent() handler for proper emulation of rectangle selection. - Viewer3d sample: moved resource files (resource.h; resource.hm; AISToolbar.bmp) from /src to /res Code style changes Fixed "About" dialog error in release. Corrected dimension dialogs Workaround for dimensions sample: AIS_LocalContext::SelectedShape() doesn't take into account TopoDS shape local transformation, and operates with selected interactive transformation.
This commit is contained in:
parent
679d38788d
commit
4716247158
@ -29,9 +29,9 @@ static char THIS_FILE[] = __FILE__;
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// CGeometryDoc
|
// CGeometryDoc
|
||||||
|
|
||||||
IMPLEMENT_DYNCREATE(CGeometryDoc, CDocument)
|
IMPLEMENT_DYNCREATE(CGeometryDoc, OCC_3dBaseDoc)
|
||||||
|
|
||||||
BEGIN_MESSAGE_MAP(CGeometryDoc, CDocument)
|
BEGIN_MESSAGE_MAP(CGeometryDoc, OCC_3dBaseDoc)
|
||||||
//{{AFX_MSG_MAP(CGeometryDoc)
|
//{{AFX_MSG_MAP(CGeometryDoc)
|
||||||
ON_COMMAND(ID_WINDOW_NEW2D, OnWindowNew2d)
|
ON_COMMAND(ID_WINDOW_NEW2D, OnWindowNew2d)
|
||||||
ON_COMMAND(ID_BUTTON_Test_1, OnBUTTONTest1)
|
ON_COMMAND(ID_BUTTON_Test_1, OnBUTTONTest1)
|
||||||
@ -143,28 +143,21 @@ END_MESSAGE_MAP()
|
|||||||
// CGeometryDoc construction/destruction
|
// CGeometryDoc construction/destruction
|
||||||
|
|
||||||
CGeometryDoc::CGeometryDoc()
|
CGeometryDoc::CGeometryDoc()
|
||||||
|
: OCC_3dBaseDoc()
|
||||||
{
|
{
|
||||||
FitMode = false;
|
FitMode = false;
|
||||||
AfxInitRichEdit();
|
AfxInitRichEdit();
|
||||||
|
|
||||||
// TODO: add one-time construction code here
|
|
||||||
Handle(Graphic3d_GraphicDriver) aGraphicDriver =
|
|
||||||
((CGeometryApp*)AfxGetApp())->GetGraphicDriver();
|
|
||||||
|
|
||||||
TCollection_ExtendedString a3DName("Visu3D");
|
|
||||||
myViewer = new V3d_Viewer(aGraphicDriver,a3DName.ToExtString());
|
|
||||||
myViewer->SetDefaultLights();
|
|
||||||
myViewer->SetLightOn();
|
|
||||||
|
|
||||||
myAISContext =new AIS_InteractiveContext(myViewer);
|
|
||||||
myAISContext->DefaultDrawer()->UIsoAspect()->SetNumber(11);
|
myAISContext->DefaultDrawer()->UIsoAspect()->SetNumber(11);
|
||||||
myAISContext->DefaultDrawer()->VIsoAspect()->SetNumber(11);
|
myAISContext->DefaultDrawer()->VIsoAspect()->SetNumber(11);
|
||||||
|
|
||||||
|
Handle(Graphic3d_GraphicDriver) aGraphicDriver = ((OCC_App*)AfxGetApp())->GetGraphicDriver();
|
||||||
TCollection_ExtendedString a2DName("Visu2D");
|
TCollection_ExtendedString a2DName("Visu2D");
|
||||||
myViewer2D = new V3d_Viewer(aGraphicDriver,a2DName.ToExtString());
|
myViewer2D = new V3d_Viewer(aGraphicDriver,a2DName.ToExtString());
|
||||||
myViewer2D->SetCircularGridValues(0,0,1,8,0);
|
myViewer2D->SetCircularGridValues(0,0,1,8,0);
|
||||||
myViewer2D->SetRectangularGridValues(0,0,1,1,0);
|
myViewer2D->SetRectangularGridValues(0,0,1,1,0);
|
||||||
//set view projection
|
|
||||||
|
// Set view projection
|
||||||
myViewer2D->SetDefaultViewProj(V3d_Zpos);
|
myViewer2D->SetDefaultViewProj(V3d_Zpos);
|
||||||
myAISContext2D = new AIS_InteractiveContext(myViewer2D);
|
myAISContext2D = new AIS_InteractiveContext(myViewer2D);
|
||||||
myCResultDialog.Create(CResultDialog::IDD,NULL);
|
myCResultDialog.Create(CResultDialog::IDD,NULL);
|
||||||
@ -200,9 +193,7 @@ BOOL CGeometryDoc::OnNewDocument()
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CGeometryDoc::OnWindowNew2d()
|
||||||
|
|
||||||
void CGeometryDoc::OnWindowNew2d()
|
|
||||||
{
|
{
|
||||||
((CGeometryApp*)AfxGetApp())->CreateView2D(this);
|
((CGeometryApp*)AfxGetApp())->CreateView2D(this);
|
||||||
}
|
}
|
||||||
@ -330,6 +321,48 @@ void CGeometryDoc::Popup2D(const Standard_Integer x,
|
|||||||
AfxGetMainWnd());
|
AfxGetMainWnd());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------------------
|
||||||
|
void CGeometryDoc::Popup (const Standard_Integer theMouseX,
|
||||||
|
const Standard_Integer theMouseY,
|
||||||
|
const Handle(V3d_View)& theView)
|
||||||
|
{
|
||||||
|
Standard_Integer PopupMenuNumber=0;
|
||||||
|
GetAISContext()->InitCurrent();
|
||||||
|
if (GetAISContext()->MoreCurrent())
|
||||||
|
{
|
||||||
|
PopupMenuNumber=1;
|
||||||
|
}
|
||||||
|
|
||||||
|
CMenu menu;
|
||||||
|
VERIFY(menu.LoadMenu(IDR_Popup3D));
|
||||||
|
CMenu* pPopup = menu.GetSubMenu(PopupMenuNumber);
|
||||||
|
ASSERT(pPopup != NULL);
|
||||||
|
|
||||||
|
POINT winCoord = { theMouseX , theMouseY };
|
||||||
|
Handle(WNT_Window) aWNTWindow = Handle(WNT_Window)::DownCast(theView->Window());
|
||||||
|
ClientToScreen ( (HWND)(aWNTWindow->HWindow()), &winCoord );
|
||||||
|
|
||||||
|
pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON ,
|
||||||
|
winCoord.x, winCoord.y ,
|
||||||
|
AfxGetMainWnd());
|
||||||
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------------------
|
||||||
|
void CGeometryDoc::InputEvent (const Standard_Integer /*theMouseX*/,
|
||||||
|
const Standard_Integer /*theMouseY*/,
|
||||||
|
const Handle(V3d_View)& /*theView*/)
|
||||||
|
{
|
||||||
|
myAISContext->Select();
|
||||||
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------------------
|
||||||
void CGeometryDoc::Put2DOnTop(bool isMax)
|
void CGeometryDoc::Put2DOnTop(bool isMax)
|
||||||
{
|
{
|
||||||
POSITION position = GetFirstViewPosition();
|
POSITION position = GetFirstViewPosition();
|
||||||
@ -354,6 +387,9 @@ void CGeometryDoc::Put2DOnTop(bool isMax)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------------------
|
||||||
void CGeometryDoc::Minimize2D()
|
void CGeometryDoc::Minimize2D()
|
||||||
{
|
{
|
||||||
POSITION position = GetFirstViewPosition();
|
POSITION position = GetFirstViewPosition();
|
||||||
@ -371,6 +407,9 @@ void CGeometryDoc::Minimize2D()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------------------
|
||||||
void CGeometryDoc::Fit2DViews()
|
void CGeometryDoc::Fit2DViews()
|
||||||
{
|
{
|
||||||
POSITION position = GetFirstViewPosition();
|
POSITION position = GetFirstViewPosition();
|
||||||
@ -385,6 +424,10 @@ void CGeometryDoc::Fit2DViews()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------------------
|
||||||
void CGeometryDoc::Put3DOnTop(bool isMax)
|
void CGeometryDoc::Put3DOnTop(bool isMax)
|
||||||
{
|
{
|
||||||
POSITION position = GetFirstViewPosition();
|
POSITION position = GetFirstViewPosition();
|
||||||
@ -409,6 +452,9 @@ void CGeometryDoc::Put3DOnTop(bool isMax)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------------------
|
||||||
void CGeometryDoc::Minimize3D()
|
void CGeometryDoc::Minimize3D()
|
||||||
{
|
{
|
||||||
POSITION position = GetFirstViewPosition();
|
POSITION position = GetFirstViewPosition();
|
||||||
@ -426,6 +472,9 @@ void CGeometryDoc::Minimize3D()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------------------
|
||||||
void CGeometryDoc::Fit3DViews(Quantity_Coefficient Coef)
|
void CGeometryDoc::Fit3DViews(Quantity_Coefficient Coef)
|
||||||
{
|
{
|
||||||
POSITION position = GetFirstViewPosition();
|
POSITION position = GetFirstViewPosition();
|
||||||
@ -441,6 +490,9 @@ void CGeometryDoc::Fit3DViews(Quantity_Coefficient Coef)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------------------
|
||||||
void CGeometryDoc::Set3DViewsZoom(const Quantity_Factor& Coef)
|
void CGeometryDoc::Set3DViewsZoom(const Quantity_Factor& Coef)
|
||||||
{
|
{
|
||||||
POSITION position = GetFirstViewPosition();
|
POSITION position = GetFirstViewPosition();
|
||||||
@ -456,6 +508,9 @@ void CGeometryDoc::Set3DViewsZoom(const Quantity_Factor& Coef)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------------------
|
||||||
|
// Buttons event handlers
|
||||||
|
//-----------------------------------------------------------------------------------------
|
||||||
void CGeometryDoc::OnBUTTONTest1()
|
void CGeometryDoc::OnBUTTONTest1()
|
||||||
{ Current = 1;
|
{ Current = 1;
|
||||||
GeomSources::gpTest1(this); }
|
GeomSources::gpTest1(this); }
|
||||||
@ -1013,15 +1068,6 @@ void CGeometryDoc::OnCloseDocument()
|
|||||||
CDocument::OnCloseDocument();
|
CDocument::OnCloseDocument();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGeometryDoc::Fit()
|
|
||||||
{
|
|
||||||
CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
|
|
||||||
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame();
|
|
||||||
OCC_3dView *pView = (OCC_3dView *) pChild->GetActiveView();
|
|
||||||
pView->FitAll();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void CGeometryDoc::OnCreateSol()
|
void CGeometryDoc::OnCreateSol()
|
||||||
{
|
{
|
||||||
// TODO: Add your command handler code here
|
// TODO: Add your command handler code here
|
||||||
@ -1368,7 +1414,7 @@ void CGeometryDoc::simplify(const TopoDS_Shape& aShape)
|
|||||||
if(aPoints1(i).X() > aPntMax.X())
|
if(aPoints1(i).X() > aPntMax.X())
|
||||||
{
|
{
|
||||||
aIndex = i;
|
aIndex = i;
|
||||||
aPntMax = aPoints1(aIndex);
|
aPntMax = aPoints1(aIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,12 +9,12 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#endif // _MSC_VER >= 1000
|
#endif // _MSC_VER >= 1000
|
||||||
|
|
||||||
#include "OCC_BaseDoc.h"
|
#include "OCC_3dBaseDoc.h"
|
||||||
#include "ResultDialog.h"
|
#include "ResultDialog.h"
|
||||||
|
|
||||||
class Handle_AIS_Point;
|
class Handle_AIS_Point;
|
||||||
|
|
||||||
class CGeometryDoc : public OCC_BaseDoc
|
class CGeometryDoc : public OCC_3dBaseDoc
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void Put2DOnTop(bool isMax = true);
|
void Put2DOnTop(bool isMax = true);
|
||||||
@ -25,32 +25,41 @@ public:
|
|||||||
void simplify(const TopoDS_Shape& aShape);
|
void simplify(const TopoDS_Shape& aShape);
|
||||||
|
|
||||||
|
|
||||||
static void Fit();
|
//-------------------- 2D -------------------//
|
||||||
|
|
||||||
// 2D
|
|
||||||
void DragEvent2D (const Standard_Integer x ,
|
void DragEvent2D (const Standard_Integer x ,
|
||||||
const Standard_Integer y ,
|
const Standard_Integer y ,
|
||||||
const Standard_Integer TheState,
|
const Standard_Integer TheState,
|
||||||
const Handle_V3d_View& aView );
|
const Handle_V3d_View& aView );
|
||||||
void InputEvent2D (const Standard_Integer x ,
|
void InputEvent2D (const Standard_Integer x ,
|
||||||
const Standard_Integer y ,
|
const Standard_Integer y ,
|
||||||
const Handle_V3d_View& aView );
|
const Handle_V3d_View& aView );
|
||||||
void MoveEvent2D (const Standard_Integer x ,
|
void MoveEvent2D (const Standard_Integer x ,
|
||||||
const Standard_Integer y ,
|
const Standard_Integer y ,
|
||||||
const Handle_V3d_View& aView );
|
const Handle_V3d_View& aView );
|
||||||
void ShiftMoveEvent2D (const Standard_Integer x ,
|
void ShiftMoveEvent2D (const Standard_Integer x ,
|
||||||
const Standard_Integer y ,
|
const Standard_Integer y ,
|
||||||
const Handle_V3d_View& aView );
|
const Handle_V3d_View& aView );
|
||||||
void ShiftDragEvent2D (const Standard_Integer x ,
|
void ShiftDragEvent2D (const Standard_Integer x ,
|
||||||
const Standard_Integer y ,
|
const Standard_Integer y ,
|
||||||
const Standard_Integer TheState,
|
const Standard_Integer TheState,
|
||||||
const Handle_V3d_View& aView );
|
const Handle_V3d_View& aView );
|
||||||
void ShiftInputEvent2D (const Standard_Integer x ,
|
void ShiftInputEvent2D (const Standard_Integer x ,
|
||||||
const Standard_Integer y ,
|
const Standard_Integer y ,
|
||||||
const Handle_V3d_View& aView );
|
const Handle_V3d_View& aView );
|
||||||
void Popup2D (const Standard_Integer x ,
|
void Popup2D (const Standard_Integer x ,
|
||||||
const Standard_Integer y ,
|
const Standard_Integer y ,
|
||||||
const Handle_V3d_View& aView );
|
const Handle_V3d_View& aView );
|
||||||
|
|
||||||
|
//-------------------- 3D -------------------//
|
||||||
|
|
||||||
|
virtual void Popup (const Standard_Integer theMouseX,
|
||||||
|
const Standard_Integer theMouseY,
|
||||||
|
const Handle(V3d_View)& theView);
|
||||||
|
|
||||||
|
virtual void InputEvent (const Standard_Integer theMouseX,
|
||||||
|
const Standard_Integer theMouseY,
|
||||||
|
const Handle(V3d_View)& theView);
|
||||||
|
|
||||||
Handle_AIS_InteractiveObject drawSurface
|
Handle_AIS_InteractiveObject drawSurface
|
||||||
(const Handle_Geom_Surface& theSurface,
|
(const Handle_Geom_Surface& theSurface,
|
||||||
@ -211,10 +220,6 @@ protected:
|
|||||||
//}}AFX_MSG
|
//}}AFX_MSG
|
||||||
DECLARE_MESSAGE_MAP()
|
DECLARE_MESSAGE_MAP()
|
||||||
|
|
||||||
private:
|
|
||||||
Handle_V3d_Viewer myViewer2D;
|
|
||||||
Handle_AIS_InteractiveContext myAISContext2D;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int Current;
|
int Current;
|
||||||
void Minimize3D();
|
void Minimize3D();
|
||||||
@ -223,9 +228,14 @@ public:
|
|||||||
Handle_AIS_InteractiveContext& GetISessionContext() { return myAISContext2D; };
|
Handle_AIS_InteractiveContext& GetISessionContext() { return myAISContext2D; };
|
||||||
BOOL FitMode;
|
BOOL FitMode;
|
||||||
|
|
||||||
public :
|
public:
|
||||||
CResultDialog myCResultDialog;
|
CResultDialog myCResultDialog;
|
||||||
|
|
||||||
|
private:
|
||||||
|
Handle_V3d_Viewer myViewer2D;
|
||||||
|
Handle_AIS_InteractiveContext myAISContext2D;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -23,21 +23,6 @@ IMPLEMENT_DYNCREATE(CGeometryView, OCC_3dView)
|
|||||||
BEGIN_MESSAGE_MAP(CGeometryView, OCC_3dView)
|
BEGIN_MESSAGE_MAP(CGeometryView, OCC_3dView)
|
||||||
//{{AFX_MSG_MAP(CGeometryView)
|
//{{AFX_MSG_MAP(CGeometryView)
|
||||||
ON_COMMAND(ID_FILE_EXPORT_IMAGE, OnFileExportImage)
|
ON_COMMAND(ID_FILE_EXPORT_IMAGE, OnFileExportImage)
|
||||||
ON_WM_SIZE()
|
|
||||||
ON_WM_LBUTTONDOWN()
|
|
||||||
ON_WM_LBUTTONUP()
|
|
||||||
ON_WM_MBUTTONDOWN()
|
|
||||||
ON_WM_MBUTTONUP()
|
|
||||||
ON_WM_MOUSEMOVE()
|
|
||||||
ON_WM_RBUTTONDOWN()
|
|
||||||
ON_WM_RBUTTONUP()
|
|
||||||
ON_UPDATE_COMMAND_UI(ID_BUTTONHlrOff, OnUpdateBUTTONHlrOff)
|
|
||||||
ON_UPDATE_COMMAND_UI(ID_BUTTONHlrOn, OnUpdateBUTTONHlrOn)
|
|
||||||
ON_UPDATE_COMMAND_UI(ID_BUTTONPanGlo, OnUpdateBUTTONPanGlo)
|
|
||||||
ON_UPDATE_COMMAND_UI(ID_BUTTONPan, OnUpdateBUTTONPan)
|
|
||||||
ON_UPDATE_COMMAND_UI(ID_BUTTONZoomProg, OnUpdateBUTTONZoomProg)
|
|
||||||
ON_UPDATE_COMMAND_UI(ID_BUTTONZoomWin, OnUpdateBUTTONZoomWin)
|
|
||||||
ON_UPDATE_COMMAND_UI(ID_BUTTONRot, OnUpdateBUTTONRot)
|
|
||||||
//}}AFX_MSG_MAP
|
//}}AFX_MSG_MAP
|
||||||
END_MESSAGE_MAP()
|
END_MESSAGE_MAP()
|
||||||
|
|
||||||
@ -76,402 +61,7 @@ CGeometryDoc* CGeometryView::GetDocument() // non-debug version is inline
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// CGeometryView message handlers
|
// CGeometryView message handlers
|
||||||
|
|
||||||
|
|
||||||
void CGeometryView::OnFileExportImage()
|
void CGeometryView::OnFileExportImage()
|
||||||
{
|
{
|
||||||
GetDocument()->ExportView (myView);
|
GetDocument()->ExportView (myView);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGeometryView::OnSize(UINT /*nType*/, int /*cx*/, int /*cy*/)
|
|
||||||
{
|
|
||||||
if (!myView.IsNull())
|
|
||||||
myView->MustBeResized();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGeometryView::OnLButtonDown(UINT nFlags, CPoint point)
|
|
||||||
{
|
|
||||||
// save the current mouse coordinate in min
|
|
||||||
myXmin=point.x; myYmin=point.y;
|
|
||||||
myXmax=point.x; myYmax=point.y;
|
|
||||||
|
|
||||||
if ( nFlags & MK_CONTROL )
|
|
||||||
{
|
|
||||||
// Button MB1 down Control :start zomming
|
|
||||||
// SetCursor(AfxGetApp()->LoadStandardCursor());
|
|
||||||
}
|
|
||||||
else // if ( Ctrl )
|
|
||||||
{
|
|
||||||
switch (myCurrentMode)
|
|
||||||
{
|
|
||||||
case CurAction3d_Nothing : // start a drag
|
|
||||||
if (nFlags & MK_SHIFT)
|
|
||||||
ShiftDragEvent(myXmax,myYmax,-1);
|
|
||||||
else
|
|
||||||
DragEvent(myXmax,myYmax,-1);
|
|
||||||
break;
|
|
||||||
break;
|
|
||||||
case CurAction3d_DynamicZooming : // noting
|
|
||||||
// SetCursor(AfxGetApp()->LoadStandardCursor());
|
|
||||||
break;
|
|
||||||
case CurAction3d_WindowZooming :
|
|
||||||
break;
|
|
||||||
case CurAction3d_DynamicPanning :// noting
|
|
||||||
// SetCursor(AfxGetApp()->LoadStandardCursor());
|
|
||||||
break;
|
|
||||||
case CurAction3d_GlobalPanning :// noting
|
|
||||||
// SetCursor(AfxGetApp()->LoadStandardCursor());
|
|
||||||
break;
|
|
||||||
case CurAction3d_DynamicRotation :
|
|
||||||
// SetCursor(AfxGetApp()->LoadStandardCursor());
|
|
||||||
if (myHlrModeIsOn)
|
|
||||||
{
|
|
||||||
myView->SetComputedMode (Standard_False);
|
|
||||||
}
|
|
||||||
myView->StartRotation (point.x, point.y);
|
|
||||||
break;
|
|
||||||
default :
|
|
||||||
Standard_Failure::Raise(" incompatible Current Mode ");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGeometryView::OnLButtonUp(UINT nFlags, CPoint point)
|
|
||||||
{
|
|
||||||
if ( nFlags & MK_CONTROL )
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else // if ( Ctrl )
|
|
||||||
{
|
|
||||||
switch (myCurrentMode)
|
|
||||||
{
|
|
||||||
case CurAction3d_Nothing :
|
|
||||||
if (point.x == myXmin && point.y == myYmin)
|
|
||||||
{ // no offset between down and up --> selectEvent
|
|
||||||
myXmax=point.x;
|
|
||||||
myYmax=point.y;
|
|
||||||
if (nFlags & MK_SHIFT )
|
|
||||||
ShiftInputEvent(point.x,point.y);
|
|
||||||
else
|
|
||||||
InputEvent (point.x,point.y);
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
myXmax=point.x; myYmax=point.y;
|
|
||||||
DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False);
|
|
||||||
if (nFlags & MK_SHIFT)
|
|
||||||
ShiftDragEvent(point.x,point.y,1);
|
|
||||||
else
|
|
||||||
DragEvent(point.x,point.y,1);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case CurAction3d_DynamicZooming :
|
|
||||||
// SetCursor(AfxGetApp()->LoadStandardCursor());
|
|
||||||
myCurrentMode = CurAction3d_Nothing;
|
|
||||||
break;
|
|
||||||
case CurAction3d_WindowZooming :
|
|
||||||
myXmax=point.x; myYmax=point.y;
|
|
||||||
DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False,LongDash);
|
|
||||||
if ((abs(myXmin-myXmax)>ValZWMin) || (abs(myYmin-myYmax)>ValZWMin))
|
|
||||||
// Test if the zoom window is greater than a minimale window.
|
|
||||||
{
|
|
||||||
// Do the zoom window between Pmin and Pmax
|
|
||||||
myView->WindowFitAll(myXmin,myYmin,myXmax,myYmax);
|
|
||||||
}
|
|
||||||
myCurrentMode = CurAction3d_Nothing;
|
|
||||||
break;
|
|
||||||
case CurAction3d_DynamicPanning :
|
|
||||||
myCurrentMode = CurAction3d_Nothing;
|
|
||||||
break;
|
|
||||||
case CurAction3d_GlobalPanning :
|
|
||||||
myView->Place(point.x,point.y,myCurZoom);
|
|
||||||
myCurrentMode = CurAction3d_Nothing;
|
|
||||||
break;
|
|
||||||
case CurAction3d_DynamicRotation :
|
|
||||||
myCurrentMode = CurAction3d_Nothing;
|
|
||||||
break;
|
|
||||||
default :
|
|
||||||
Standard_Failure::Raise(" incompatible Current Mode ");
|
|
||||||
break;
|
|
||||||
} //switch (myCurrentMode)
|
|
||||||
} // else // if ( Ctrl )
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGeometryView::OnMButtonDown(UINT nFlags, CPoint /*point*/)
|
|
||||||
{
|
|
||||||
if ( nFlags & MK_CONTROL )
|
|
||||||
{
|
|
||||||
// Button MB2 down Control : panning init
|
|
||||||
// SetCursor(AfxGetApp()->LoadStandardCursor());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGeometryView::OnMButtonUp(UINT nFlags, CPoint /*point*/)
|
|
||||||
{
|
|
||||||
if ( nFlags & MK_CONTROL )
|
|
||||||
{
|
|
||||||
// Button MB2 down Control : panning init
|
|
||||||
// SetCursor(AfxGetApp()->LoadStandardCursor());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGeometryView::OnRButtonDown(UINT nFlags, CPoint point)
|
|
||||||
{
|
|
||||||
if ( nFlags & MK_CONTROL )
|
|
||||||
{
|
|
||||||
// SetCursor(AfxGetApp()->LoadStandardCursor());
|
|
||||||
if (myHlrModeIsOn)
|
|
||||||
{
|
|
||||||
myView->SetComputedMode (Standard_False);
|
|
||||||
}
|
|
||||||
myView->StartRotation (point.x, point.y);
|
|
||||||
}
|
|
||||||
else // if ( Ctrl )
|
|
||||||
{
|
|
||||||
Popup (point.x, point.y);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGeometryView::OnRButtonUp(UINT /*nFlags*/, CPoint /*point*/)
|
|
||||||
{
|
|
||||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
|
|
||||||
myView->SetComputedMode (myHlrModeIsOn);
|
|
||||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGeometryView::OnMouseMove(UINT nFlags, CPoint point)
|
|
||||||
{
|
|
||||||
// ============================ LEFT BUTTON =======================
|
|
||||||
if ( nFlags & MK_LBUTTON)
|
|
||||||
{
|
|
||||||
if ( nFlags & MK_CONTROL )
|
|
||||||
{
|
|
||||||
// move with MB1 and Control : on the dynamic zooming
|
|
||||||
// Do the zoom in function of mouse's coordinates
|
|
||||||
myView->Zoom(myXmax,myYmax,point.x,point.y);
|
|
||||||
// save the current mouse coordinate in min
|
|
||||||
myXmax = point.x;
|
|
||||||
myYmax = point.y;
|
|
||||||
}
|
|
||||||
else // if ( Ctrl )
|
|
||||||
{
|
|
||||||
switch (myCurrentMode)
|
|
||||||
{
|
|
||||||
case CurAction3d_Nothing :
|
|
||||||
DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False);
|
|
||||||
myXmax = point.x;
|
|
||||||
myYmax = point.y;
|
|
||||||
if (nFlags & MK_SHIFT)
|
|
||||||
ShiftDragEvent(myXmax,myYmax,0);
|
|
||||||
else
|
|
||||||
DragEvent(myXmax,myYmax,0);
|
|
||||||
DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_True);
|
|
||||||
break;
|
|
||||||
case CurAction3d_DynamicZooming :
|
|
||||||
myView->Zoom(myXmax,myYmax,point.x,point.y);
|
|
||||||
// save the current mouse coordinate in min \n";
|
|
||||||
myXmax=point.x; myYmax=point.y;
|
|
||||||
break;
|
|
||||||
case CurAction3d_WindowZooming :
|
|
||||||
myXmax = point.x; myYmax = point.y;
|
|
||||||
DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False,LongDash);
|
|
||||||
DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_True,LongDash);
|
|
||||||
break;
|
|
||||||
case CurAction3d_DynamicPanning :
|
|
||||||
myView->Pan(point.x-myXmax,myYmax-point.y); // Realize the panning
|
|
||||||
myXmax = point.x; myYmax = point.y;
|
|
||||||
break;
|
|
||||||
case CurAction3d_GlobalPanning : // nothing
|
|
||||||
break;
|
|
||||||
case CurAction3d_DynamicRotation :
|
|
||||||
myView->Rotation(point.x,point.y);
|
|
||||||
myView->Redraw();
|
|
||||||
break;
|
|
||||||
default :
|
|
||||||
Standard_Failure::Raise(" incompatible Current Mode ");
|
|
||||||
break;
|
|
||||||
}// switch (myCurrentMode)
|
|
||||||
}// if ( nFlags & MK_CONTROL ) else
|
|
||||||
} else // if ( nFlags & MK_LBUTTON)
|
|
||||||
// ============================ MIDDLE BUTTON =======================
|
|
||||||
if ( nFlags & MK_MBUTTON)
|
|
||||||
{
|
|
||||||
if ( nFlags & MK_CONTROL )
|
|
||||||
{
|
|
||||||
myView->Pan(point.x-myXmax,myYmax-point.y); // Realize the panning
|
|
||||||
myXmax = point.x; myYmax = point.y;
|
|
||||||
|
|
||||||
}
|
|
||||||
} else // if ( nFlags & MK_MBUTTON)
|
|
||||||
// ============================ RIGHT BUTTON =======================
|
|
||||||
if ( nFlags & MK_RBUTTON)
|
|
||||||
{
|
|
||||||
if ( nFlags & MK_CONTROL )
|
|
||||||
{
|
|
||||||
myView->Rotation(point.x,point.y);
|
|
||||||
}
|
|
||||||
}else //if ( nFlags & MK_RBUTTON)
|
|
||||||
// ============================ NO BUTTON =======================
|
|
||||||
{ // No buttons
|
|
||||||
myXmax = point.x; myYmax = point.y;
|
|
||||||
if (nFlags & MK_SHIFT)
|
|
||||||
ShiftMoveEvent(point.x,point.y);
|
|
||||||
else
|
|
||||||
MoveEvent(point.x,point.y);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGeometryView::OnUpdateBUTTONHlrOff (CCmdUI* pCmdUI)
|
|
||||||
{
|
|
||||||
pCmdUI->SetCheck (!myHlrModeIsOn);
|
|
||||||
pCmdUI->Enable (myHlrModeIsOn);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGeometryView::OnUpdateBUTTONHlrOn (CCmdUI* pCmdUI)
|
|
||||||
{
|
|
||||||
pCmdUI->SetCheck (myHlrModeIsOn);
|
|
||||||
pCmdUI->Enable (!myHlrModeIsOn);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGeometryView::OnUpdateBUTTONPanGlo(CCmdUI* pCmdUI)
|
|
||||||
{
|
|
||||||
pCmdUI->SetCheck (myCurrentMode == CurAction3d_GlobalPanning);
|
|
||||||
pCmdUI->Enable (myCurrentMode != CurAction3d_GlobalPanning);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGeometryView::OnUpdateBUTTONPan(CCmdUI* pCmdUI)
|
|
||||||
{
|
|
||||||
pCmdUI->SetCheck (myCurrentMode == CurAction3d_DynamicPanning);
|
|
||||||
pCmdUI->Enable (myCurrentMode != CurAction3d_DynamicPanning );
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGeometryView::OnUpdateBUTTONZoomProg(CCmdUI* pCmdUI)
|
|
||||||
{
|
|
||||||
pCmdUI->SetCheck (myCurrentMode == CurAction3d_DynamicZooming );
|
|
||||||
pCmdUI->Enable (myCurrentMode != CurAction3d_DynamicZooming);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGeometryView::OnUpdateBUTTONZoomWin(CCmdUI* pCmdUI)
|
|
||||||
{
|
|
||||||
pCmdUI->SetCheck (myCurrentMode == CurAction3d_WindowZooming);
|
|
||||||
pCmdUI->Enable (myCurrentMode != CurAction3d_WindowZooming);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGeometryView::OnUpdateBUTTONRot(CCmdUI* pCmdUI)
|
|
||||||
{
|
|
||||||
pCmdUI->SetCheck (myCurrentMode == CurAction3d_DynamicRotation);
|
|
||||||
pCmdUI->Enable (myCurrentMode != CurAction3d_DynamicRotation);
|
|
||||||
}
|
|
||||||
|
|
||||||
//==========================================================================================
|
|
||||||
//==========================================================================================
|
|
||||||
//==========================================================================================
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
//-----------------------------------------------------------------------------------------
|
|
||||||
void CGeometryView::DragEvent(const Standard_Integer x ,
|
|
||||||
const Standard_Integer y ,
|
|
||||||
const Standard_Integer TheState )
|
|
||||||
{
|
|
||||||
|
|
||||||
// TheState == -1 button down
|
|
||||||
// TheState == 0 move
|
|
||||||
// TheState == 1 button up
|
|
||||||
|
|
||||||
static Standard_Integer theButtonDownX=0;
|
|
||||||
static Standard_Integer theButtonDownY=0;
|
|
||||||
|
|
||||||
if (TheState == -1)
|
|
||||||
{
|
|
||||||
theButtonDownX=x;
|
|
||||||
theButtonDownY=y;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (TheState == 0)
|
|
||||||
GetDocument()->GetAISContext()->Select(theButtonDownX,theButtonDownY,x,y,myView);
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
//-----------------------------------------------------------------------------------------
|
|
||||||
void CGeometryView::InputEvent(const Standard_Integer /*x*/,
|
|
||||||
const Standard_Integer /*y*/)
|
|
||||||
{
|
|
||||||
GetDocument()->GetAISContext()->Select();
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
//-----------------------------------------------------------------------------------------
|
|
||||||
void CGeometryView::MoveEvent(const Standard_Integer x,
|
|
||||||
const Standard_Integer y)
|
|
||||||
{
|
|
||||||
GetDocument()->GetAISContext()->MoveTo(x,y,myView);
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
//-----------------------------------------------------------------------------------------
|
|
||||||
void CGeometryView::ShiftMoveEvent(const Standard_Integer x ,
|
|
||||||
const Standard_Integer y )
|
|
||||||
{
|
|
||||||
GetDocument()->GetAISContext()->MoveTo(x,y,myView);
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
//-----------------------------------------------------------------------------------------
|
|
||||||
void CGeometryView::ShiftDragEvent(const Standard_Integer x ,
|
|
||||||
const Standard_Integer y ,
|
|
||||||
const Standard_Integer TheState )
|
|
||||||
{
|
|
||||||
static Standard_Integer theButtonDownX=0;
|
|
||||||
static Standard_Integer theButtonDownY=0;
|
|
||||||
|
|
||||||
if (TheState == -1)
|
|
||||||
{
|
|
||||||
theButtonDownX=x;
|
|
||||||
theButtonDownY=y;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (TheState == 0)
|
|
||||||
GetDocument()->GetAISContext()->ShiftSelect(theButtonDownX,theButtonDownY,x,y,myView);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
//-----------------------------------------------------------------------------------------
|
|
||||||
void CGeometryView::ShiftInputEvent(const Standard_Integer /*x*/,
|
|
||||||
const Standard_Integer /*y*/)
|
|
||||||
{
|
|
||||||
GetDocument()->GetAISContext()->ShiftSelect();
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
//-----------------------------------------------------------------------------------------
|
|
||||||
void CGeometryView::Popup(const Standard_Integer x,
|
|
||||||
const Standard_Integer y )
|
|
||||||
{
|
|
||||||
Standard_Integer PopupMenuNumber=0;
|
|
||||||
GetDocument()->GetAISContext()->InitCurrent();
|
|
||||||
if (GetDocument()->GetAISContext()->MoreCurrent())
|
|
||||||
PopupMenuNumber=1;
|
|
||||||
|
|
||||||
CMenu menu;
|
|
||||||
VERIFY(menu.LoadMenu(IDR_Popup3D));
|
|
||||||
CMenu* pPopup = menu.GetSubMenu(PopupMenuNumber);
|
|
||||||
ASSERT(pPopup != NULL);
|
|
||||||
|
|
||||||
POINT winCoord = { x , y };
|
|
||||||
Handle(WNT_Window) aWNTWindow=
|
|
||||||
Handle(WNT_Window)::DownCast(myView->Window());
|
|
||||||
ClientToScreen ( &winCoord);
|
|
||||||
pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON , winCoord.x, winCoord.y ,
|
|
||||||
AfxGetMainWnd());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -51,42 +51,8 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
//{{AFX_MSG(CGeometryView)
|
//{{AFX_MSG(CGeometryView)
|
||||||
afx_msg void OnFileExportImage();
|
afx_msg void OnFileExportImage();
|
||||||
afx_msg void OnSize(UINT nType, int cx, int cy);
|
|
||||||
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
|
|
||||||
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
|
|
||||||
afx_msg void OnMButtonDown(UINT nFlags, CPoint point);
|
|
||||||
afx_msg void OnMButtonUp(UINT nFlags, CPoint point);
|
|
||||||
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
|
|
||||||
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
|
|
||||||
afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
|
|
||||||
afx_msg void OnUpdateBUTTONHlrOff(CCmdUI* pCmdUI);
|
|
||||||
afx_msg void OnUpdateBUTTONHlrOn(CCmdUI* pCmdUI);
|
|
||||||
afx_msg void OnUpdateBUTTONPanGlo(CCmdUI* pCmdUI);
|
|
||||||
afx_msg void OnUpdateBUTTONPan(CCmdUI* pCmdUI);
|
|
||||||
afx_msg void OnUpdateBUTTONZoomProg(CCmdUI* pCmdUI);
|
|
||||||
afx_msg void OnUpdateBUTTONZoomWin(CCmdUI* pCmdUI);
|
|
||||||
afx_msg void OnUpdateBUTTONRot(CCmdUI* pCmdUI);
|
|
||||||
//}}AFX_MSG
|
//}}AFX_MSG
|
||||||
DECLARE_MESSAGE_MAP()
|
DECLARE_MESSAGE_MAP()
|
||||||
|
|
||||||
private:
|
|
||||||
void DragEvent (const Standard_Integer x ,
|
|
||||||
const Standard_Integer y ,
|
|
||||||
const Standard_Integer TheState);
|
|
||||||
void InputEvent (const Standard_Integer x ,
|
|
||||||
const Standard_Integer y );
|
|
||||||
void MoveEvent (const Standard_Integer x ,
|
|
||||||
const Standard_Integer y );
|
|
||||||
void ShiftMoveEvent (const Standard_Integer x ,
|
|
||||||
const Standard_Integer y );
|
|
||||||
void ShiftDragEvent (const Standard_Integer x ,
|
|
||||||
const Standard_Integer y ,
|
|
||||||
const Standard_Integer TheState);
|
|
||||||
void ShiftInputEvent(const Standard_Integer x ,
|
|
||||||
const Standard_Integer y );
|
|
||||||
void Popup (const Standard_Integer x ,
|
|
||||||
const Standard_Integer y );
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef _DEBUG // debug version in GeometryView.cpp
|
#ifndef _DEBUG // debug version in GeometryView.cpp
|
||||||
|
@ -477,15 +477,15 @@
|
|||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="..\..\..\src\Viewer3d.rc">
|
<ResourceCompile Include="..\..\..\res\Viewer3d.rc">
|
||||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">res;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">res;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">res;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">res;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@ -495,7 +495,7 @@
|
|||||||
<ClInclude Include="..\..\..\src\ModelClippingDlg.h" />
|
<ClInclude Include="..\..\..\src\ModelClippingDlg.h" />
|
||||||
<ClInclude Include="..\..\..\src\OCCDemo_Presentation.h" />
|
<ClInclude Include="..\..\..\src\OCCDemo_Presentation.h" />
|
||||||
<ClInclude Include="..\..\..\src\offsetdlg.h" />
|
<ClInclude Include="..\..\..\src\offsetdlg.h" />
|
||||||
<ClInclude Include="..\..\..\src\resource.h" />
|
<ClInclude Include="..\..\..\res\resource.h" />
|
||||||
<ClInclude Include="..\..\..\src\scaledlg.h" />
|
<ClInclude Include="..\..\..\src\scaledlg.h" />
|
||||||
<ClInclude Include="..\..\..\src\ShadingModelDlg.h" />
|
<ClInclude Include="..\..\..\src\ShadingModelDlg.h" />
|
||||||
<ClInclude Include="..\..\..\src\State.h" />
|
<ClInclude Include="..\..\..\src\State.h" />
|
||||||
@ -509,9 +509,9 @@
|
|||||||
<ClInclude Include="..\..\..\src\ZCueingDlg.h" />
|
<ClInclude Include="..\..\..\src\ZCueingDlg.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="..\..\..\src\resource.hm" />
|
<None Include="..\..\..\res\resource.hm" />
|
||||||
<None Include="..\..\..\res\AIS_TB.bmp" />
|
<None Include="..\..\..\res\AIS_TB.bmp" />
|
||||||
<None Include="..\..\..\src\AISToolbar.bmp" />
|
<None Include="..\..\..\res\AISToolbar.bmp" />
|
||||||
<None Include="..\..\..\res\Toolbar.bmp" />
|
<None Include="..\..\..\res\Toolbar.bmp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -68,7 +68,7 @@
|
|||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="..\..\..\src\Viewer3d.rc">
|
<ResourceCompile Include="..\..\..\res\Viewer3d.rc">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
@ -91,7 +91,7 @@
|
|||||||
<ClInclude Include="..\..\..\src\offsetdlg.h">
|
<ClInclude Include="..\..\..\src\offsetdlg.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\..\..\src\resource.h">
|
<ClInclude Include="..\..\..\res\resource.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\..\..\src\scaledlg.h">
|
<ClInclude Include="..\..\..\src\scaledlg.h">
|
||||||
@ -129,13 +129,13 @@
|
|||||||
</ClInclude>
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="..\..\..\src\resource.hm">
|
<None Include="..\..\..\res\resource.hm">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</None>
|
</None>
|
||||||
<None Include="..\..\..\res\AIS_TB.bmp">
|
<None Include="..\..\..\res\AIS_TB.bmp">
|
||||||
<Filter>Resource Files</Filter>
|
<Filter>Resource Files</Filter>
|
||||||
</None>
|
</None>
|
||||||
<None Include="..\..\..\src\AISToolbar.bmp">
|
<None Include="..\..\..\res\AISToolbar.bmp">
|
||||||
<Filter>Resource Files</Filter>
|
<Filter>Resource Files</Filter>
|
||||||
</None>
|
</None>
|
||||||
<None Include="..\..\..\res\Toolbar.bmp">
|
<None Include="..\..\..\res\Toolbar.bmp">
|
||||||
|
@ -481,15 +481,15 @@
|
|||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="..\..\..\src\Viewer3d.rc">
|
<ResourceCompile Include="..\..\..\res\Viewer3d.rc">
|
||||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">res;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">res;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">res;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">res;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@ -499,7 +499,7 @@
|
|||||||
<ClInclude Include="..\..\..\src\ModelClippingDlg.h" />
|
<ClInclude Include="..\..\..\src\ModelClippingDlg.h" />
|
||||||
<ClInclude Include="..\..\..\src\OCCDemo_Presentation.h" />
|
<ClInclude Include="..\..\..\src\OCCDemo_Presentation.h" />
|
||||||
<ClInclude Include="..\..\..\src\offsetdlg.h" />
|
<ClInclude Include="..\..\..\src\offsetdlg.h" />
|
||||||
<ClInclude Include="..\..\..\src\resource.h" />
|
<ClInclude Include="..\..\..\res\resource.h" />
|
||||||
<ClInclude Include="..\..\..\src\scaledlg.h" />
|
<ClInclude Include="..\..\..\src\scaledlg.h" />
|
||||||
<ClInclude Include="..\..\..\src\ShadingModelDlg.h" />
|
<ClInclude Include="..\..\..\src\ShadingModelDlg.h" />
|
||||||
<ClInclude Include="..\..\..\src\State.h" />
|
<ClInclude Include="..\..\..\src\State.h" />
|
||||||
@ -513,9 +513,9 @@
|
|||||||
<ClInclude Include="..\..\..\src\ZCueingDlg.h" />
|
<ClInclude Include="..\..\..\src\ZCueingDlg.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="..\..\..\src\resource.hm" />
|
<None Include="..\..\..\res\resource.hm" />
|
||||||
<None Include="..\..\..\res\AIS_TB.bmp" />
|
<None Include="..\..\..\res\AIS_TB.bmp" />
|
||||||
<None Include="..\..\..\src\AISToolbar.bmp" />
|
<None Include="..\..\..\res\AISToolbar.bmp" />
|
||||||
<None Include="..\..\..\res\Toolbar.bmp" />
|
<None Include="..\..\..\res\Toolbar.bmp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -68,7 +68,7 @@
|
|||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="..\..\..\src\Viewer3d.rc">
|
<ResourceCompile Include="..\..\..\res\Viewer3d.rc">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
@ -91,7 +91,7 @@
|
|||||||
<ClInclude Include="..\..\..\src\offsetdlg.h">
|
<ClInclude Include="..\..\..\src\offsetdlg.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\..\..\src\resource.h">
|
<ClInclude Include="..\..\..\res\resource.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\..\..\src\scaledlg.h">
|
<ClInclude Include="..\..\..\src\scaledlg.h">
|
||||||
@ -129,13 +129,13 @@
|
|||||||
</ClInclude>
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="..\..\..\src\resource.hm">
|
<None Include="..\..\..\res\resource.hm">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</None>
|
</None>
|
||||||
<None Include="..\..\..\res\AIS_TB.bmp">
|
<None Include="..\..\..\res\AIS_TB.bmp">
|
||||||
<Filter>Resource Files</Filter>
|
<Filter>Resource Files</Filter>
|
||||||
</None>
|
</None>
|
||||||
<None Include="..\..\..\src\AISToolbar.bmp">
|
<None Include="..\..\..\res\AISToolbar.bmp">
|
||||||
<Filter>Resource Files</Filter>
|
<Filter>Resource Files</Filter>
|
||||||
</None>
|
</None>
|
||||||
<None Include="..\..\..\res\Toolbar.bmp">
|
<None Include="..\..\..\res\Toolbar.bmp">
|
||||||
|
@ -481,15 +481,15 @@
|
|||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="..\..\..\src\Viewer3d.rc">
|
<ResourceCompile Include="..\..\..\res\Viewer3d.rc">
|
||||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">res;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">res;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">res;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">res;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@ -499,7 +499,7 @@
|
|||||||
<ClInclude Include="..\..\..\src\ModelClippingDlg.h" />
|
<ClInclude Include="..\..\..\src\ModelClippingDlg.h" />
|
||||||
<ClInclude Include="..\..\..\src\OCCDemo_Presentation.h" />
|
<ClInclude Include="..\..\..\src\OCCDemo_Presentation.h" />
|
||||||
<ClInclude Include="..\..\..\src\offsetdlg.h" />
|
<ClInclude Include="..\..\..\src\offsetdlg.h" />
|
||||||
<ClInclude Include="..\..\..\src\resource.h" />
|
<ClInclude Include="..\..\..\res\resource.h" />
|
||||||
<ClInclude Include="..\..\..\src\scaledlg.h" />
|
<ClInclude Include="..\..\..\src\scaledlg.h" />
|
||||||
<ClInclude Include="..\..\..\src\ShadingModelDlg.h" />
|
<ClInclude Include="..\..\..\src\ShadingModelDlg.h" />
|
||||||
<ClInclude Include="..\..\..\src\State.h" />
|
<ClInclude Include="..\..\..\src\State.h" />
|
||||||
@ -513,9 +513,9 @@
|
|||||||
<ClInclude Include="..\..\..\src\ZCueingDlg.h" />
|
<ClInclude Include="..\..\..\src\ZCueingDlg.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="..\..\..\src\resource.hm" />
|
<None Include="..\..\..\res\resource.hm" />
|
||||||
<None Include="..\..\..\res\AIS_TB.bmp" />
|
<None Include="..\..\..\res\AIS_TB.bmp" />
|
||||||
<None Include="..\..\..\src\AISToolbar.bmp" />
|
<None Include="..\..\..\res\AISToolbar.bmp" />
|
||||||
<None Include="..\..\..\res\Toolbar.bmp" />
|
<None Include="..\..\..\res\Toolbar.bmp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -68,7 +68,7 @@
|
|||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="..\..\..\src\Viewer3d.rc">
|
<ResourceCompile Include="..\..\..\res\Viewer3d.rc">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
@ -91,7 +91,7 @@
|
|||||||
<ClInclude Include="..\..\..\src\offsetdlg.h">
|
<ClInclude Include="..\..\..\src\offsetdlg.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\..\..\src\resource.h">
|
<ClInclude Include="..\..\..\res\resource.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\..\..\src\scaledlg.h">
|
<ClInclude Include="..\..\..\src\scaledlg.h">
|
||||||
@ -129,13 +129,13 @@
|
|||||||
</ClInclude>
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="..\..\..\src\resource.hm">
|
<None Include="..\..\..\res\resource.hm">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</None>
|
</None>
|
||||||
<None Include="..\..\..\res\AIS_TB.bmp">
|
<None Include="..\..\..\res\AIS_TB.bmp">
|
||||||
<Filter>Resource Files</Filter>
|
<Filter>Resource Files</Filter>
|
||||||
</None>
|
</None>
|
||||||
<None Include="..\..\..\src\AISToolbar.bmp">
|
<None Include="..\..\..\res\AISToolbar.bmp">
|
||||||
<Filter>Resource Files</Filter>
|
<Filter>Resource Files</Filter>
|
||||||
</None>
|
</None>
|
||||||
<None Include="..\..\..\res\Toolbar.bmp">
|
<None Include="..\..\..\res\Toolbar.bmp">
|
||||||
|
@ -729,7 +729,7 @@
|
|||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\..\src\Viewer3d.rc"
|
RelativePath="..\..\..\res\Viewer3d.rc"
|
||||||
>
|
>
|
||||||
<FileConfiguration
|
<FileConfiguration
|
||||||
Name="Release|Win32"
|
Name="Release|Win32"
|
||||||
@ -1086,11 +1086,11 @@
|
|||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\..\src\resource.h"
|
RelativePath="..\..\..\res\resource.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\..\src\resource.hm"
|
RelativePath="..\..\..\res\resource.hm"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
|
@ -726,7 +726,7 @@
|
|||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\..\src\Viewer3d.rc"
|
RelativePath="..\..\..\res\Viewer3d.rc"
|
||||||
>
|
>
|
||||||
<FileConfiguration
|
<FileConfiguration
|
||||||
Name="Release|Win32"
|
Name="Release|Win32"
|
||||||
@ -734,7 +734,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCResourceCompilerTool"
|
Name="VCResourceCompilerTool"
|
||||||
PreprocessorDefinitions=""
|
PreprocessorDefinitions=""
|
||||||
AdditionalIncludeDirectories="src"
|
AdditionalIncludeDirectories="res"
|
||||||
/>
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
<FileConfiguration
|
<FileConfiguration
|
||||||
@ -743,7 +743,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCResourceCompilerTool"
|
Name="VCResourceCompilerTool"
|
||||||
PreprocessorDefinitions=""
|
PreprocessorDefinitions=""
|
||||||
AdditionalIncludeDirectories="src"
|
AdditionalIncludeDirectories="res"
|
||||||
/>
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
<FileConfiguration
|
<FileConfiguration
|
||||||
@ -752,7 +752,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCResourceCompilerTool"
|
Name="VCResourceCompilerTool"
|
||||||
PreprocessorDefinitions=""
|
PreprocessorDefinitions=""
|
||||||
AdditionalIncludeDirectories="src"
|
AdditionalIncludeDirectories="res"
|
||||||
/>
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
<FileConfiguration
|
<FileConfiguration
|
||||||
@ -761,7 +761,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCResourceCompilerTool"
|
Name="VCResourceCompilerTool"
|
||||||
PreprocessorDefinitions=""
|
PreprocessorDefinitions=""
|
||||||
AdditionalIncludeDirectories="src"
|
AdditionalIncludeDirectories="res"
|
||||||
/>
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
@ -1083,11 +1083,11 @@
|
|||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\..\src\resource.h"
|
RelativePath="..\..\..\res\resource.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\..\src\resource.hm"
|
RelativePath="..\..\..\res\resource.hm"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
@ -1144,7 +1144,7 @@
|
|||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\..\src\AISToolbar.bmp"
|
RelativePath="..\..\..\res\AISToolbar.bmp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
|
0
samples/mfc/standard/04_Viewer3d/src/AISToolbar.bmp → samples/mfc/standard/04_Viewer3d/res/AISToolbar.bmp
Executable file → Normal file
0
samples/mfc/standard/04_Viewer3d/src/AISToolbar.bmp → samples/mfc/standard/04_Viewer3d/res/AISToolbar.bmp
Executable file → Normal file
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
@ -1,7 +1,12 @@
|
|||||||
//Microsoft Developer Studio generated resource script.
|
// Microsoft Visual C++ generated resource script.
|
||||||
//
|
//
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
|
||||||
|
// Generated Help ID header file
|
||||||
|
#define APSTUDIO_HIDDEN_SYMBOLS
|
||||||
|
#include "resource.hm"
|
||||||
|
#undef APSTUDIO_HIDDEN_SYMBOLS
|
||||||
|
|
||||||
#define APSTUDIO_READONLY_SYMBOLS
|
#define APSTUDIO_READONLY_SYMBOLS
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
@ -27,43 +32,34 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
|
|||||||
//
|
//
|
||||||
|
|
||||||
IDD_SETOFFSETS DIALOGEX 442, 45, 187, 60
|
IDD_SETOFFSETS DIALOGEX 442, 45, 187, 60
|
||||||
STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | WS_POPUP | WS_VISIBLE |
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||||
WS_CAPTION | WS_SYSMENU
|
|
||||||
EXSTYLE WS_EX_TOOLWINDOW
|
EXSTYLE WS_EX_TOOLWINDOW
|
||||||
CAPTION "Set offsets"
|
CAPTION "Set offsets"
|
||||||
FONT 8, "MS Sans Serif", 0, 0, 0x1
|
FONT 8, "MS Sans Serif", 0, 0, 0x1
|
||||||
BEGIN
|
BEGIN
|
||||||
CONTROL "Slider2",IDC_SLIDER_OFFSETFACTOR,"msctls_trackbar32",
|
CONTROL "Slider2",IDC_SLIDER_OFFSETFACTOR,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,39,14,100,15
|
||||||
TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,39,14,100,15
|
|
||||||
LTEXT "Factor:",IDC_STATIC,13,17,23,15
|
LTEXT "Factor:",IDC_STATIC,13,17,23,15
|
||||||
LTEXT "Units:",IDC_STATIC,13,35,19,8
|
LTEXT "Units:",IDC_STATIC,13,35,19,8
|
||||||
CONTROL "Slider3",IDC_SLIDER_OFFSETUNITS,"msctls_trackbar32",
|
CONTROL "Slider3",IDC_SLIDER_OFFSETUNITS,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,39,32,100,15
|
||||||
TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,39,32,100,15
|
|
||||||
GROUPBOX "Offset parameters",IDC_STATIC,7,6,173,47
|
GROUPBOX "Offset parameters",IDC_STATIC,7,6,173,47
|
||||||
EDITTEXT IDC_EDIT_OFFSETFACTOR,148,14,22,14,ES_AUTOHSCROLL |
|
EDITTEXT IDC_EDIT_OFFSETFACTOR,148,14,22,14,ES_AUTOHSCROLL | ES_NUMBER
|
||||||
ES_NUMBER
|
EDITTEXT IDC_EDIT_OFFSETUNITS,148,32,22,14,ES_AUTOHSCROLL | ES_NUMBER
|
||||||
EDITTEXT IDC_EDIT_OFFSETUNITS,148,32,22,14,ES_AUTOHSCROLL |
|
|
||||||
ES_NUMBER
|
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_TRIHEDRON DIALOG DISCARDABLE 0, 0, 138, 95
|
IDD_TRIHEDRON DIALOG 0, 0, 138, 95
|
||||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
CAPTION "Triedron settings"
|
CAPTION "Triedron settings"
|
||||||
FONT 8, "MS Sans Serif"
|
FONT 8, "MS Sans Serif"
|
||||||
BEGIN
|
BEGIN
|
||||||
DEFPUSHBUTTON "OK",IDOK,21,75,50,14
|
DEFPUSHBUTTON "OK",IDOK,21,75,50,14
|
||||||
PUSHBUTTON "Cancel",IDCANCEL,73,75,50,14
|
PUSHBUTTON "Cancel",IDCANCEL,73,75,50,14
|
||||||
COMBOBOX IDC_COMBOTRIHEDRPOS,38,8,92,60,CBS_DROPDOWN | CBS_SORT |
|
COMBOBOX IDC_COMBOTRIHEDRPOS,38,8,92,60,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||||
WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_COMBOTRIHEDRCOLOR,38,29,92,78,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||||
COMBOBOX IDC_COMBOTRIHEDRCOLOR,38,29,92,78,CBS_DROPDOWN |
|
EDITTEXT IDC_EDITTRIHEDRSCALE,38,51,33,12,ES_CENTER | ES_AUTOHSCROLL
|
||||||
CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
|
||||||
EDITTEXT IDC_EDITTRIHEDRSCALE,38,51,33,12,ES_CENTER |
|
|
||||||
ES_AUTOHSCROLL
|
|
||||||
LTEXT "Color:",IDC_STATIC,8,31,20,8
|
LTEXT "Color:",IDC_STATIC,8,31,20,8
|
||||||
LTEXT "Position:",IDC_STATIC,8,10,28,8
|
LTEXT "Position:",IDC_STATIC,8,10,28,8
|
||||||
LTEXT "Scale:",IDC_STATIC,8,53,24,10
|
LTEXT "Scale:",IDC_STATIC,8,53,24,10
|
||||||
CONTROL "Spin1",IDC_SPINTRIHEDRSCALE,"msctls_updown32",
|
CONTROL "Spin1",IDC_SPINTRIHEDRSCALE,"msctls_updown32",UDS_AUTOBUDDY | UDS_ARROWKEYS,70,51,11,12
|
||||||
UDS_AUTOBUDDY | UDS_ARROWKEYS,70,51,11,12
|
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
||||||
@ -73,7 +69,7 @@ END
|
|||||||
//
|
//
|
||||||
|
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
GUIDELINES DESIGNINFO MOVEABLE PURE
|
GUIDELINES DESIGNINFO
|
||||||
BEGIN
|
BEGIN
|
||||||
IDD_SETOFFSETS, DIALOG
|
IDD_SETOFFSETS, DIALOG
|
||||||
BEGIN
|
BEGIN
|
||||||
@ -103,55 +99,45 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
|||||||
// Dialog
|
// Dialog
|
||||||
//
|
//
|
||||||
|
|
||||||
IDD_ZCLIPPING DIALOG DISCARDABLE 0, 0, 180, 95
|
IDD_ZCLIPPING DIALOG 0, 0, 180, 95
|
||||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
|
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION
|
||||||
CAPTION "ZClipping"
|
CAPTION "ZClipping"
|
||||||
FONT 8, "MS Sans Serif"
|
FONT 8, "MS Sans Serif"
|
||||||
BEGIN
|
BEGIN
|
||||||
DEFPUSHBUTTON "OK",IDOK,13,68,50,14
|
DEFPUSHBUTTON "OK",IDOK,13,68,50,14
|
||||||
PUSHBUTTON "Cancel",IDCANCEL,70,68,50,14
|
PUSHBUTTON "Cancel",IDCANCEL,70,68,50,14
|
||||||
CONTROL "Slider1",IDC_SLIDER_ZCLIPPINGDEPTH,"msctls_trackbar32",
|
CONTROL "Slider1",IDC_SLIDER_ZCLIPPINGDEPTH,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,34,6,97,15
|
||||||
TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,34,6,97,15
|
|
||||||
LTEXT "Depth:",IDC_STATIC,13,9,22,8
|
LTEXT "Depth:",IDC_STATIC,13,9,22,8
|
||||||
GROUPBOX "",IDC_STATIC,7,0,166,44
|
GROUPBOX "",IDC_STATIC,7,0,166,44
|
||||||
EDITTEXT IDC_EDIT_ZCLIPPINGDEPTH,131,7,34,14,ES_AUTOHSCROLL |
|
EDITTEXT IDC_EDIT_ZCLIPPINGDEPTH,131,7,34,14,ES_AUTOHSCROLL | ES_NUMBER
|
||||||
ES_NUMBER
|
CONTROL "Slider2",IDC_SLIDER_ZCLIPPINGWIDTH,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,34,25,97,15
|
||||||
CONTROL "Slider2",IDC_SLIDER_ZCLIPPINGWIDTH,"msctls_trackbar32",
|
|
||||||
TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,34,25,97,15
|
|
||||||
LTEXT "Width:",IDC_STATIC,13,28,22,8
|
LTEXT "Width:",IDC_STATIC,13,28,22,8
|
||||||
EDITTEXT IDC_EDIT_ZCLIPPINGWIDTH,131,26,34,14,ES_AUTOHSCROLL |
|
EDITTEXT IDC_EDIT_ZCLIPPINGWIDTH,131,26,34,14,ES_AUTOHSCROLL | ES_NUMBER
|
||||||
ES_NUMBER
|
COMBOBOX IDC_COMBO_ZCLIPPINGTYPE,39,47,80,55,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||||
COMBOBOX IDC_COMBO_ZCLIPPINGTYPE,39,47,80,55,CBS_DROPDOWNLIST |
|
|
||||||
CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
|
||||||
LTEXT "Type:",IDC_STATIC,13,49,19,8
|
LTEXT "Type:",IDC_STATIC,13,49,19,8
|
||||||
GROUPBOX "",IDC_STATIC,7,59,166,29
|
GROUPBOX "",IDC_STATIC,7,59,166,29
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_ZCUEING DIALOG DISCARDABLE 0, 0, 180, 95
|
IDD_ZCUEING DIALOG 0, 0, 180, 95
|
||||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
|
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION
|
||||||
CAPTION "ZCueing"
|
CAPTION "ZCueing"
|
||||||
FONT 8, "MS Sans Serif"
|
FONT 8, "MS Sans Serif"
|
||||||
BEGIN
|
BEGIN
|
||||||
DEFPUSHBUTTON "OK",IDOK,13,68,50,14
|
DEFPUSHBUTTON "OK",IDOK,13,68,50,14
|
||||||
PUSHBUTTON "Cancel",IDCANCEL,70,68,50,14
|
PUSHBUTTON "Cancel",IDCANCEL,70,68,50,14
|
||||||
CONTROL "Slider1",IDC_SLIDER_ZCUEINGDEPTH,"msctls_trackbar32",
|
CONTROL "Slider1",IDC_SLIDER_ZCUEINGDEPTH,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,34,6,97,15
|
||||||
TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,34,6,97,15
|
|
||||||
LTEXT "Depth:",-1,13,9,22,8
|
LTEXT "Depth:",-1,13,9,22,8
|
||||||
GROUPBOX "",-1,7,0,166,44
|
GROUPBOX "",-1,7,0,166,44
|
||||||
EDITTEXT IDC_EDIT_ZCUEINGDEPTH,131,7,34,14,ES_AUTOHSCROLL |
|
EDITTEXT IDC_EDIT_ZCUEINGDEPTH,131,7,34,14,ES_AUTOHSCROLL | ES_NUMBER
|
||||||
ES_NUMBER
|
CONTROL "Slider2",IDC_SLIDER_ZCUEINGWIDTH,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,34,25,97,15
|
||||||
CONTROL "Slider2",IDC_SLIDER_ZCUEINGWIDTH,"msctls_trackbar32",
|
|
||||||
TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,34,25,97,15
|
|
||||||
LTEXT "Width:",-1,13,28,22,8
|
LTEXT "Width:",-1,13,28,22,8
|
||||||
EDITTEXT IDC_EDIT_ZCUEINGWIDTH,131,26,34,14,ES_AUTOHSCROLL |
|
EDITTEXT IDC_EDIT_ZCUEINGWIDTH,131,26,34,14,ES_AUTOHSCROLL | ES_NUMBER
|
||||||
ES_NUMBER
|
|
||||||
GROUPBOX "",-1,7,59,166,29
|
GROUPBOX "",-1,7,59,166,29
|
||||||
CONTROL "Cueing ON/OFF",IDC_CHECK_CUEINGONOFF,"Button",
|
CONTROL "Cueing ON/OFF",IDC_CHECK_CUEINGONOFF,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,49,67,10
|
||||||
BS_AUTOCHECKBOX | WS_TABSTOP,13,49,67,10
|
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_SHADINGMODEL DIALOG DISCARDABLE 0, 0, 60, 66
|
IDD_SHADINGMODEL DIALOG 0, 0, 60, 66
|
||||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
CAPTION "ShadingModel"
|
CAPTION "ShadingModel"
|
||||||
FONT 8, "MS Sans Serif"
|
FONT 8, "MS Sans Serif"
|
||||||
BEGIN
|
BEGIN
|
||||||
@ -160,24 +146,47 @@ BEGIN
|
|||||||
PUSHBUTTON "GOURAUD",IDC_SHADINGMODEL_GOURAUD,7,43,46,16
|
PUSHBUTTON "GOURAUD",IDC_SHADINGMODEL_GOURAUD,7,43,46,16
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_MODELCLIPPING DIALOG DISCARDABLE 0, 0, 180, 74
|
IDD_MODELCLIPPING DIALOG 0, 0, 180, 74
|
||||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
|
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION
|
||||||
CAPTION "Model clipping"
|
CAPTION "Model clipping"
|
||||||
FONT 8, "MS Sans Serif"
|
FONT 8, "MS Sans Serif"
|
||||||
BEGIN
|
BEGIN
|
||||||
DEFPUSHBUTTON "OK",IDOK,13,47,50,14
|
DEFPUSHBUTTON "OK",IDOK,13,47,50,14
|
||||||
PUSHBUTTON "Cancel",IDCANCEL,70,47,50,14
|
PUSHBUTTON "Cancel",IDCANCEL,70,47,50,14
|
||||||
CONTROL "Slider1",IDC_SLIDER_MODELCLIPPING_Z,"msctls_trackbar32",
|
CONTROL "Slider1",IDC_SLIDER_MODELCLIPPING_Z,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,21,6,97,15
|
||||||
TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,21,6,97,15
|
|
||||||
LTEXT "Z:",-1,12,10,8,8
|
LTEXT "Z:",-1,12,10,8,8
|
||||||
GROUPBOX "",-1,7,0,166,25
|
GROUPBOX "",-1,7,0,166,25
|
||||||
EDITTEXT IDC_EDIT_MODELCLIPPING_Z,118,7,34,14,ES_AUTOHSCROLL |
|
EDITTEXT IDC_EDIT_MODELCLIPPING_Z,118,7,34,14,ES_AUTOHSCROLL | ES_NUMBER
|
||||||
ES_NUMBER
|
|
||||||
GROUPBOX "",-1,7,38,166,29
|
GROUPBOX "",-1,7,38,166,29
|
||||||
CONTROL "Model clipping ON/OFF",IDC_CHECK_MODELCLIPPINGONOFF,
|
CONTROL "Model clipping ON/OFF",IDC_CHECK_MODELCLIPPINGONOFF,
|
||||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,28,91,10
|
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,28,91,10
|
||||||
END
|
END
|
||||||
|
|
||||||
|
IDD_RADIUS DIALOGEX 0, 0, 151, 82
|
||||||
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
|
CAPTION "Radius"
|
||||||
|
FONT 8, "MS Sans Serif", 0, 0, 0x1
|
||||||
|
BEGIN
|
||||||
|
DEFPUSHBUTTON "OK",IDOK,7,61,50,14
|
||||||
|
PUSHBUTTON "Cancel",IDCANCEL,94,61,50,14
|
||||||
|
CONTROL "Spin1",IDC_SPIN_RADIUS,"msctls_updown32",UDS_ARROWKEYS,98,43,11,14
|
||||||
|
EDITTEXT IDC_EDIT_RADIUS,48,42,45,13,ES_AUTOHSCROLL | NOT WS_TABSTOP
|
||||||
|
CTEXT "Radius Fillet",IDC_RadiusFillet,33,20,94,18,0,WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE | WS_EX_STATICEDGE,HIDC_RadiusFillet
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_ISOS DIALOG 0, 0, 161, 66
|
||||||
|
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
|
CAPTION "Isos"
|
||||||
|
FONT 8, "MS Sans Serif"
|
||||||
|
BEGIN
|
||||||
|
DEFPUSHBUTTON "OK",IDOK,7,44,50,14
|
||||||
|
PUSHBUTTON "Cancel",IDCANCEL,104,44,50,14
|
||||||
|
LTEXT "U Isos Number",IDC_ISOU,31,13,48,8
|
||||||
|
LTEXT "V Isos Number",IDC_ISOV,31,28,47,8
|
||||||
|
EDITTEXT IDC_EDIT_ISOU,93,7,40,14,ES_AUTOHSCROLL
|
||||||
|
EDITTEXT IDC_EDIT_ISOV,93,24,40,12,ES_AUTOHSCROLL
|
||||||
|
END
|
||||||
|
|
||||||
|
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
@ -185,18 +194,18 @@ END
|
|||||||
// TEXTINCLUDE
|
// TEXTINCLUDE
|
||||||
//
|
//
|
||||||
|
|
||||||
1 TEXTINCLUDE MOVEABLE PURE
|
1 TEXTINCLUDE
|
||||||
BEGIN
|
BEGIN
|
||||||
"resource.h\0"
|
"resource.h\0"
|
||||||
END
|
END
|
||||||
|
|
||||||
2 TEXTINCLUDE MOVEABLE PURE
|
2 TEXTINCLUDE
|
||||||
BEGIN
|
BEGIN
|
||||||
"#include ""afxres.h""\r\n"
|
"#include ""afxres.h""\r\n"
|
||||||
"#include ""..\\..\\Common\\res\\OCC_Resource.h""\0"
|
"#include ""..\\..\\Common\\res\\OCC_Resource.h""\0"
|
||||||
END
|
END
|
||||||
|
|
||||||
3 TEXTINCLUDE MOVEABLE PURE
|
3 TEXTINCLUDE
|
||||||
BEGIN
|
BEGIN
|
||||||
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
|
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
|
||||||
"#define _AFX_NO_OLE_RESOURCES\r\n"
|
"#define _AFX_NO_OLE_RESOURCES\r\n"
|
||||||
@ -220,18 +229,20 @@ END
|
|||||||
// Bitmap
|
// Bitmap
|
||||||
//
|
//
|
||||||
|
|
||||||
IDR_MAINFRAME BITMAP MOVEABLE PURE "..//res//Toolbar.bmp"
|
IDR_MAINFRAME BITMAP "..//res//Toolbar.bmp"
|
||||||
IDR_TB_AIS BITMAP MOVEABLE PURE "..//res//AIS_TB.bmp"
|
IDR_TB_AIS BITMAP "..//res//AIS_TB.bmp"
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Toolbar
|
// Toolbar
|
||||||
//
|
//
|
||||||
|
|
||||||
IDR_MAINFRAME TOOLBAR MOVEABLE PURE 20, 20
|
IDR_MAINFRAME TOOLBAR 20, 20
|
||||||
BEGIN
|
BEGIN
|
||||||
BUTTON ID_FILE_NEW
|
BUTTON ID_FILE_NEW
|
||||||
SEPARATOR
|
SEPARATOR
|
||||||
|
BUTTON ID_CIRCLE
|
||||||
|
BUTTON ID_LINE
|
||||||
BUTTON ID_BOX
|
BUTTON ID_BOX
|
||||||
BUTTON ID_Cylinder
|
BUTTON ID_Cylinder
|
||||||
BUTTON ID_SPHERE
|
BUTTON ID_SPHERE
|
||||||
@ -253,15 +264,32 @@ BEGIN
|
|||||||
BUTTON ID_ZCUEING
|
BUTTON ID_ZCUEING
|
||||||
BUTTON ID_SCALE
|
BUTTON ID_SCALE
|
||||||
SEPARATOR
|
SEPARATOR
|
||||||
|
BUTTON ID_NBISOS
|
||||||
BUTTON ID_SHADINGMODEL
|
BUTTON ID_SHADINGMODEL
|
||||||
BUTTON ID_ANTIALIASINGONOFF
|
BUTTON ID_ANTIALIASINGONOFF
|
||||||
SEPARATOR
|
SEPARATOR
|
||||||
BUTTON ID_MODELCLIPPING
|
BUTTON ID_MODELCLIPPING
|
||||||
SEPARATOR
|
SEPARATOR
|
||||||
|
BUTTON ID_VERTICES
|
||||||
|
BUTTON ID_EDGES
|
||||||
|
BUTTON ID_FACES
|
||||||
|
BUTTON ID_NEUTRAL
|
||||||
|
SEPARATOR
|
||||||
|
BUTTON ID_FILLET3D
|
||||||
|
SEPARATOR
|
||||||
|
BUTTON ID_TEXTURE_ON
|
||||||
|
BUTTON ID_BUTTONStart
|
||||||
|
BUTTON ID_BUTTONPrev
|
||||||
|
BUTTON ID_BUTTONRepeat
|
||||||
|
BUTTON ID_BUTTONNext
|
||||||
|
BUTTON ID_BUTTONEnd
|
||||||
|
SEPARATOR
|
||||||
|
BUTTON ID_DUMP_VIEW
|
||||||
|
SEPARATOR
|
||||||
BUTTON ID_APP_ABOUT
|
BUTTON ID_APP_ABOUT
|
||||||
END
|
END
|
||||||
|
|
||||||
IDR_TB_AIS TOOLBAR MOVEABLE PURE 20, 20
|
IDR_TB_AIS TOOLBAR 20, 20
|
||||||
BEGIN
|
BEGIN
|
||||||
BUTTON ID_OBJECT_WIREFRAME
|
BUTTON ID_OBJECT_WIREFRAME
|
||||||
BUTTON ID_OBJECT_SHADING
|
BUTTON ID_OBJECT_SHADING
|
||||||
@ -275,6 +303,7 @@ BEGIN
|
|||||||
BUTTON ID_OBJECT_DISPLAYALL
|
BUTTON ID_OBJECT_DISPLAYALL
|
||||||
SEPARATOR
|
SEPARATOR
|
||||||
BUTTON ID_OBJECT_REMOVE
|
BUTTON ID_OBJECT_REMOVE
|
||||||
|
BUTTON ID_OBJECT_DIM
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
||||||
@ -283,7 +312,7 @@ END
|
|||||||
// Menu
|
// Menu
|
||||||
//
|
//
|
||||||
|
|
||||||
IDR_MAINFRAME MENU DISCARDABLE
|
IDR_MAINFRAME MENU
|
||||||
BEGIN
|
BEGIN
|
||||||
POPUP "&File"
|
POPUP "&File"
|
||||||
BEGIN
|
BEGIN
|
||||||
@ -302,7 +331,7 @@ BEGIN
|
|||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
||||||
IDR_3DTYPE MENU DISCARDABLE
|
IDR_3DTYPE MENU
|
||||||
BEGIN
|
BEGIN
|
||||||
POPUP "&File"
|
POPUP "&File"
|
||||||
BEGIN
|
BEGIN
|
||||||
@ -321,9 +350,7 @@ BEGIN
|
|||||||
POPUP "&Trihedron"
|
POPUP "&Trihedron"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "&Static Trihedron...", ID_OPTIONS_TRIHEDRON_STATIC_TRIHEDRON
|
MENUITEM "&Static Trihedron...", ID_OPTIONS_TRIHEDRON_STATIC_TRIHEDRON
|
||||||
|
|
||||||
MENUITEM "&Dynamic Trihedron", ID_OPTIONS_TRIHEDRON_DYNAMIC_TRIHEDRON
|
MENUITEM "&Dynamic Trihedron", ID_OPTIONS_TRIHEDRON_DYNAMIC_TRIHEDRON
|
||||||
|
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
POPUP "&Window"
|
POPUP "&Window"
|
||||||
@ -339,8 +366,52 @@ BEGIN
|
|||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
||||||
|
IDR_Popup3D MENU
|
||||||
|
BEGIN
|
||||||
|
POPUP "BackGround"
|
||||||
|
BEGIN
|
||||||
|
MENUITEM "Background Color...", ID_Modify_ChangeBackground
|
||||||
|
END
|
||||||
|
POPUP "Object(s)"
|
||||||
|
BEGIN
|
||||||
|
MENUITEM "Erase", ID_OBJECT_ERASE
|
||||||
|
MENUITEM "Shading", ID_OBJECT_SHADING
|
||||||
|
MENUITEM "Wireframe", ID_OBJECT_WIREFRAME
|
||||||
|
MENUITEM "Color...", ID_OBJECT_COLOR
|
||||||
|
MENUITEM "Material...", ID_OBJECT_MATERIAL
|
||||||
|
POPUP "Material"
|
||||||
|
BEGIN
|
||||||
|
MENUITEM "Aluminium", ID_OBJECT_MATERIAL_ALUMINIUM
|
||||||
|
MENUITEM "Brass", ID_OBJECT_MATERIAL_BRASS
|
||||||
|
MENUITEM "Bronze", ID_OBJECT_MATERIAL_BRONZE
|
||||||
|
MENUITEM "Chrome", ID_OBJECT_MATERIAL_CHROME
|
||||||
|
MENUITEM "Copper", ID_OBJECT_MATERIAL_COPPER
|
||||||
|
MENUITEM "Gold", ID_OBJECT_MATERIAL_GOLD
|
||||||
|
MENUITEM "Jade", ID_OBJECT_MATERIAL_JADE
|
||||||
|
MENUITEM "Metalized", ID_OBJECT_MATERIAL_METALIZED
|
||||||
|
MENUITEM "Neon GNC", ID_OBJECT_MATERIAL_NEON_GNC
|
||||||
|
MENUITEM "Neon PHC", ID_OBJECT_MATERIAL_NEON_PHC
|
||||||
|
MENUITEM "Obsidian", ID_OBJECT_MATERIAL_OBSIDIAN
|
||||||
|
MENUITEM "Pewter", ID_OBJECT_MATERIAL_PEWTER
|
||||||
|
MENUITEM "Plaster", ID_OBJECT_MATERIAL_PLASTER
|
||||||
|
MENUITEM "Plastic", ID_OBJECT_MATERIAL_PLASTIC
|
||||||
|
MENUITEM "Satin", ID_OBJECT_MATERIAL_SATIN
|
||||||
|
MENUITEM "Shiny plastic", ID_OBJECT_MATERIAL_SHINY_PLASTIC
|
||||||
|
MENUITEM "Silver", ID_OBJECT_MATERIAL_SILVER
|
||||||
|
MENUITEM "Steel", ID_OBJECT_MATERIAL_STEEL
|
||||||
|
MENUITEM "Stone", ID_OBJECT_MATERIAL_STONE
|
||||||
|
MENUITEM SEPARATOR
|
||||||
|
MENUITEM "Default", ID_OBJECT_MATERIAL_DEFAULT
|
||||||
|
END
|
||||||
|
MENUITEM "Transparency...", ID_OBJECT_TRANSPARENCY
|
||||||
|
END
|
||||||
|
POPUP "User cylinder"
|
||||||
|
BEGIN
|
||||||
|
MENUITEM "Change face color", ID_USERCYLINDER_CHANGEFACECOLOR
|
||||||
|
END
|
||||||
|
END
|
||||||
|
|
||||||
|
|
||||||
#ifndef _MAC
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Version
|
// Version
|
||||||
@ -363,13 +434,13 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
BLOCK "040904b0"
|
BLOCK "040904b0"
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "FileDescription", "Viewer MFC Application\0"
|
VALUE "FileDescription", "Viewer MFC Application"
|
||||||
VALUE "FileVersion", "1, 0, 0, 1\0"
|
VALUE "FileVersion", "1, 0, 0, 1"
|
||||||
VALUE "InternalName", "Viewer\0"
|
VALUE "InternalName", "Viewer"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 1997\0"
|
VALUE "LegalCopyright", "Copyright (C) 1997"
|
||||||
VALUE "OriginalFilename", "Viewer.EXE\0"
|
VALUE "OriginalFilename", "Viewer.EXE"
|
||||||
VALUE "ProductName", "SampleViewer3d Application\0"
|
VALUE "ProductName", "SampleViewer3d Application"
|
||||||
VALUE "ProductVersion", "1, 0, 0, 1\0"
|
VALUE "ProductVersion", "1, 0, 0, 1"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
@ -378,21 +449,19 @@ BEGIN
|
|||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
||||||
#endif // !_MAC
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// String Table
|
// String Table
|
||||||
//
|
//
|
||||||
|
|
||||||
STRINGTABLE DISCARDABLE
|
STRINGTABLE
|
||||||
BEGIN
|
BEGIN
|
||||||
IDR_MAINFRAME "Viewer3d"
|
IDR_MAINFRAME "Viewer3d"
|
||||||
IDR_3DTYPE "\nViewer3d\n\n\n\n.Document\n Document"
|
IDR_3DTYPE "\nViewer3d\n\n\n\n.Document\n Document"
|
||||||
END
|
END
|
||||||
|
|
||||||
STRINGTABLE DISCARDABLE
|
STRINGTABLE
|
||||||
BEGIN
|
BEGIN
|
||||||
ID_BOX "Create and display a box\nBox"
|
ID_BOX "Create and display a box\nBox"
|
||||||
ID_Cylinder "Create and display a cylinder\nCylinder"
|
ID_Cylinder "Create and display a cylinder\nCylinder"
|
||||||
@ -409,7 +478,7 @@ BEGIN
|
|||||||
ID_ANTIALIASINGONOFF "Antialiasing ON/OFF\nAntialiasing"
|
ID_ANTIALIASINGONOFF "Antialiasing ON/OFF\nAntialiasing"
|
||||||
END
|
END
|
||||||
|
|
||||||
STRINGTABLE DISCARDABLE
|
STRINGTABLE
|
||||||
BEGIN
|
BEGIN
|
||||||
ID_CLEAR_LIGHTS "Clear all the light sources\nClear lights"
|
ID_CLEAR_LIGHTS "Clear all the light sources\nClear lights"
|
||||||
ID_MODELCLIPPING "ModelClipping\nModelClipping"
|
ID_MODELCLIPPING "ModelClipping\nModelClipping"
|
||||||
@ -423,6 +492,35 @@ BEGIN
|
|||||||
ID_SCALE "Scale\nScale"
|
ID_SCALE "Scale\nScale"
|
||||||
END
|
END
|
||||||
|
|
||||||
|
STRINGTABLE
|
||||||
|
BEGIN
|
||||||
|
ID_CIRCLE "Clear all the light sources\nClear lights"
|
||||||
|
ID_LINE "Create and display a line with standard tools\nLine"
|
||||||
|
ID_VERTICES "Set the selection mode to vertices\nVertices"
|
||||||
|
ID_EDGES "Set the selection mode to edges\nEdges"
|
||||||
|
ID_FACES "Set the selection modes to faces\nFaces"
|
||||||
|
ID_NEUTRAL "Neutral point for selection\nNeutral point"
|
||||||
|
ID_FILLET3D "Make a fillet between faces\nFillet"
|
||||||
|
ID_NBISOS "Set global isos number\nIsos"
|
||||||
|
ID_BUTTONStart "Press to go to the first sample\nFirst sample (Home)"
|
||||||
|
ID_BUTTONPrev "Press to go to the previous sample\nPrevious sample (PgUp)"
|
||||||
|
ID_BUTTONRepeat "Press to repeat the current sample\nRepeat sample (Space)"
|
||||||
|
ID_BUTTONNext "Press to go to the next sample\nNext sample (PgDn)"
|
||||||
|
ID_BUTTONEnd "Press to go to the last sample\nLast sample (End)"
|
||||||
|
END
|
||||||
|
|
||||||
|
STRINGTABLE
|
||||||
|
BEGIN
|
||||||
|
ID_DUMP_VIEW "Save current frame into an image file\nExport view (F12)"
|
||||||
|
ID_TEXTURE_ON "Run texture example\nRun texture example"
|
||||||
|
END
|
||||||
|
|
||||||
|
STRINGTABLE
|
||||||
|
BEGIN
|
||||||
|
ID_OBJECT_DIMENSIONS "Add dimensions"
|
||||||
|
ID_LOCALCONTEXT_ADDDIMENSION "Add new dimension for selected objects"
|
||||||
|
END
|
||||||
|
|
||||||
#endif // English (U.S.) resources
|
#endif // English (U.S.) resources
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@ -441,8 +539,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
|
|||||||
// Dialog
|
// Dialog
|
||||||
//
|
//
|
||||||
|
|
||||||
IDD_SCALE DIALOG DISCARDABLE 0, 0, 186, 103
|
IDD_SCALE DIALOG 0, 0, 186, 103
|
||||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
CAPTION "Heterogeneous Scale"
|
CAPTION "Heterogeneous Scale"
|
||||||
FONT 8, "MS Sans Serif"
|
FONT 8, "MS Sans Serif"
|
||||||
BEGIN
|
BEGIN
|
||||||
@ -450,16 +548,13 @@ BEGIN
|
|||||||
PUSHBUTTON "Cancel",IDCANCEL,70,78,50,14
|
PUSHBUTTON "Cancel",IDCANCEL,70,78,50,14
|
||||||
GROUPBOX "",IDC_STATIC,7,69,166,29
|
GROUPBOX "",IDC_STATIC,7,69,166,29
|
||||||
GROUPBOX "",IDC_STATIC,7,0,166,65
|
GROUPBOX "",IDC_STATIC,7,0,166,65
|
||||||
CONTROL "Slider1",IDC_SLIDER_SCALEX,"msctls_trackbar32",TBS_BOTH |
|
CONTROL "Slider1",IDC_SLIDER_SCALEX,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,34,6,97,15
|
||||||
TBS_NOTICKS | WS_TABSTOP,34,6,97,15
|
|
||||||
LTEXT "X:",IDC_STATIC,13,9,8,8
|
LTEXT "X:",IDC_STATIC,13,9,8,8
|
||||||
EDITTEXT IDC_EDIT_SCALEX,131,7,34,14,ES_AUTOHSCROLL | ES_NUMBER
|
EDITTEXT IDC_EDIT_SCALEX,131,7,34,14,ES_AUTOHSCROLL | ES_NUMBER
|
||||||
CONTROL "Slider2",IDC_SLIDER_SCALEY,"msctls_trackbar32",TBS_BOTH |
|
CONTROL "Slider2",IDC_SLIDER_SCALEY,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,34,25,97,15
|
||||||
TBS_NOTICKS | WS_TABSTOP,34,25,97,15
|
|
||||||
LTEXT "Y:",IDC_STATIC,13,28,8,8
|
LTEXT "Y:",IDC_STATIC,13,28,8,8
|
||||||
EDITTEXT IDC_EDIT_SCALEY,131,26,34,14,ES_AUTOHSCROLL | ES_NUMBER
|
EDITTEXT IDC_EDIT_SCALEY,131,26,34,14,ES_AUTOHSCROLL | ES_NUMBER
|
||||||
CONTROL "Slider2",IDC_SLIDER_SCALEZ,"msctls_trackbar32",TBS_BOTH |
|
CONTROL "Slider2",IDC_SLIDER_SCALEZ,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,34,45,97,15
|
||||||
TBS_NOTICKS | WS_TABSTOP,34,45,97,15
|
|
||||||
LTEXT "Z:",IDC_STATIC,13,48,8,8
|
LTEXT "Z:",IDC_STATIC,13,48,8,8
|
||||||
EDITTEXT IDC_EDIT_SCALEZ,131,46,34,14,ES_AUTOHSCROLL | ES_NUMBER
|
EDITTEXT IDC_EDIT_SCALEZ,131,46,34,14,ES_AUTOHSCROLL | ES_NUMBER
|
||||||
END
|
END
|
||||||
@ -471,7 +566,7 @@ END
|
|||||||
//
|
//
|
||||||
|
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
GUIDELINES DESIGNINFO DISCARDABLE
|
GUIDELINES DESIGNINFO
|
||||||
BEGIN
|
BEGIN
|
||||||
IDD_SCALE, DIALOG
|
IDD_SCALE, DIALOG
|
||||||
BEGIN
|
BEGIN
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
//{{NO_DEPENDENCIES}}
|
//{{NO_DEPENDENCIES}}
|
||||||
// Microsoft Developer Studio generated include file.
|
// Microsoft Visual C++ generated include file.
|
||||||
// Used by Viewer3d.rc
|
// Used by Viewer3d.rc
|
||||||
//
|
//
|
||||||
#define IDD_SHADINGMODEL 131
|
#define IDD_SHADINGMODEL 131
|
||||||
#define IDD_SETOFFSETS 134
|
#define IDD_SETOFFSETS 134
|
||||||
#define IDD_SCALE 139
|
#define IDD_SCALE 139
|
||||||
|
#define IDD_RADIUS 144
|
||||||
#define IDD_ZCLIPPING 152
|
#define IDD_ZCLIPPING 152
|
||||||
#define IDD_ZCUEING 153
|
#define IDD_ZCUEING 153
|
||||||
#define IDD_TRIHEDRON 542
|
#define IDD_TRIHEDRON 542
|
||||||
@ -17,6 +18,7 @@
|
|||||||
#define ID_POSITIONAL_LIGHT 808
|
#define ID_POSITIONAL_LIGHT 808
|
||||||
#define ID_SPOT_LIGHT 809
|
#define ID_SPOT_LIGHT 809
|
||||||
#define ID_LIGHTOFF 810
|
#define ID_LIGHTOFF 810
|
||||||
|
#define ID_USERCYLINDER_CHANGEFACECOLOR 810
|
||||||
#define ID_ZCLIPPING 812
|
#define ID_ZCLIPPING 812
|
||||||
#define ID_ZCUEING 813
|
#define ID_ZCUEING 813
|
||||||
#define ID_SHADINGMODEL 814
|
#define ID_SHADINGMODEL 814
|
||||||
@ -33,13 +35,34 @@
|
|||||||
#define ID_OPTIONS_TRIHEDRON_STATIC_TRIHEDRON 829
|
#define ID_OPTIONS_TRIHEDRON_STATIC_TRIHEDRON 829
|
||||||
#define ID_OPTIONS_TRIHEDRON_DYNAMIC_TRIHEDRON 830
|
#define ID_OPTIONS_TRIHEDRON_DYNAMIC_TRIHEDRON 830
|
||||||
#define ID_SCALE 831
|
#define ID_SCALE 831
|
||||||
|
#define ID_CIRCLE 833
|
||||||
|
#define ID_LINE 834
|
||||||
|
#define ID_VERTICES 837
|
||||||
|
#define ID_EDGES 838
|
||||||
|
#define ID_FACES 839
|
||||||
|
#define ID_NEUTRAL 840
|
||||||
|
#define ID_FILLET3D 841
|
||||||
|
#define ID_NBISOS 842
|
||||||
|
#define ID_BUTTONStart 843
|
||||||
|
#define ID_BUTTONPrev 844
|
||||||
|
#define ID_BUTTONRepeat 845
|
||||||
|
#define ID_BUTTONNext 846
|
||||||
|
#define ID_BUTTONEnd 847
|
||||||
|
#define ID_DUMP_VIEW 848
|
||||||
|
#define ID_TEXTURE_ON 849
|
||||||
|
#define IDC_SPIN_RADIUS 1000
|
||||||
|
#define IDC_EDIT_RADIUS 1001
|
||||||
#define IDC_SHADINGMODEL_COLOR 1002
|
#define IDC_SHADINGMODEL_COLOR 1002
|
||||||
|
#define IDC_EDIT_ISOU 1002
|
||||||
#define IDC_SHADINGMODEL_MULTICOLOR 1003
|
#define IDC_SHADINGMODEL_MULTICOLOR 1003
|
||||||
#define IDC_SLIDER_MODELCLIPPING_Z 1003
|
#define IDC_SLIDER_MODELCLIPPING_Z 1003
|
||||||
#define IDC_SHADINGMODEL_FLAT 1004
|
#define IDC_SHADINGMODEL_FLAT 1004
|
||||||
|
#define IDC_ISOU 1004
|
||||||
#define IDC_SHADINGMODEL_HIDDEN 1005
|
#define IDC_SHADINGMODEL_HIDDEN 1005
|
||||||
#define IDC_EDIT_MODELCLIPPING_Z 1005
|
#define IDC_EDIT_MODELCLIPPING_Z 1005
|
||||||
|
#define IDC_ISOV 1005
|
||||||
#define IDC_SHADINGMODEL_GOURAUD 1006
|
#define IDC_SHADINGMODEL_GOURAUD 1006
|
||||||
|
#define IDC_EDIT_ISOV 1006
|
||||||
#define IDC_CHECK_MODELCLIPPINGONOFF 1008
|
#define IDC_CHECK_MODELCLIPPINGONOFF 1008
|
||||||
#define IDC_SLIDER_OFFSETFACTOR 1010
|
#define IDC_SLIDER_OFFSETFACTOR 1010
|
||||||
#define IDC_SLIDER_OFFSETUNITS 1011
|
#define IDC_SLIDER_OFFSETUNITS 1011
|
||||||
@ -50,10 +73,12 @@
|
|||||||
#define IDC_SLIDER_SCALEY 1029
|
#define IDC_SLIDER_SCALEY 1029
|
||||||
#define IDC_EDIT_SCALEX 1030
|
#define IDC_EDIT_SCALEX 1030
|
||||||
#define IDC_EDIT_SCALEY 1031
|
#define IDC_EDIT_SCALEY 1031
|
||||||
|
#define IDC_RadiusFillet 1031
|
||||||
#define IDC_SLIDER_SCALEZ 1032
|
#define IDC_SLIDER_SCALEZ 1032
|
||||||
#define IDC_EDIT_SCALEZ 1033
|
#define IDC_EDIT_SCALEZ 1033
|
||||||
#define IDD_RESULTMESSAGEDLG 1500
|
#define IDD_RESULTMESSAGEDLG 1500
|
||||||
#define IDD_MODELCLIPPING 1501
|
#define IDD_MODELCLIPPING 1501
|
||||||
|
#define IDD_ISOS 1502
|
||||||
#define IDC_COMBO_ZCLIPPINGTYPE 1650
|
#define IDC_COMBO_ZCLIPPINGTYPE 1650
|
||||||
#define IDC_CHECK_CUEINGONOFF 1651
|
#define IDC_CHECK_CUEINGONOFF 1651
|
||||||
#define IDC_EDITTRIHEDRSCALE 1686
|
#define IDC_EDITTRIHEDRSCALE 1686
|
||||||
@ -75,7 +100,7 @@
|
|||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
#define _APS_3D_CONTROLS 1
|
#define _APS_3D_CONTROLS 1
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 140
|
#define _APS_NEXT_RESOURCE_VALUE 140
|
||||||
#define _APS_NEXT_COMMAND_VALUE 832
|
#define _APS_NEXT_COMMAND_VALUE 850
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1032
|
#define _APS_NEXT_CONTROL_VALUE 1032
|
||||||
#define _APS_NEXT_SYMED_VALUE 104
|
#define _APS_NEXT_SYMED_VALUE 104
|
||||||
#endif
|
#endif
|
||||||
|
0
samples/mfc/standard/04_Viewer3d/src/resource.hm → samples/mfc/standard/04_Viewer3d/res/resource.hm
Executable file → Normal file
0
samples/mfc/standard/04_Viewer3d/src/resource.hm → samples/mfc/standard/04_Viewer3d/res/resource.hm
Executable file → Normal file
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "resource.h"
|
#include "..\res\resource.h"
|
||||||
#include "offsetdlg.h"
|
#include "offsetdlg.h"
|
||||||
#include "Viewer3dView.h"
|
#include "Viewer3dView.h"
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
// ScaleDlg.h : header file
|
// ScaleDlg.h : header file
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "resource.h"
|
#include "..\res\resource.h"
|
||||||
#include "Viewer3dView.h"
|
#include "Viewer3dView.h"
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#endif // _MSC_VER >= 1000
|
#endif // _MSC_VER >= 1000
|
||||||
|
|
||||||
#include "resource.h"
|
#include "..\res\resource.h"
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// CShadingModelDlg dialog
|
// CShadingModelDlg dialog
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
|
|
||||||
#include "State.h"
|
#include "State.h"
|
||||||
|
|
||||||
#include <resource.h>
|
#include <..\res\resource.h>
|
||||||
|
|
||||||
//{{AFX_INSERT_LOCATION}}
|
//{{AFX_INSERT_LOCATION}}
|
||||||
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
|
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#include <Aspect.hxx>
|
#include <Aspect.hxx>
|
||||||
#include <Quantity_NameOfColor.hxx>
|
#include <Quantity_NameOfColor.hxx>
|
||||||
|
|
||||||
#include "resource.h"
|
#include "..\res\resource.h"
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// CTrihedronDlg dialog
|
// CTrihedronDlg dialog
|
||||||
|
|
||||||
|
@ -1,606 +0,0 @@
|
|||||||
// Microsoft Visual C++ generated resource script.
|
|
||||||
//
|
|
||||||
#include "resource.h"
|
|
||||||
|
|
||||||
// Generated Help ID header file
|
|
||||||
#define APSTUDIO_HIDDEN_SYMBOLS
|
|
||||||
#include "resource.hm"
|
|
||||||
#undef APSTUDIO_HIDDEN_SYMBOLS
|
|
||||||
|
|
||||||
#define APSTUDIO_READONLY_SYMBOLS
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Generated from the TEXTINCLUDE 2 resource.
|
|
||||||
//
|
|
||||||
#include "afxres.h"
|
|
||||||
#include "..\..\Common\res\OCC_Resource.h"
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
#undef APSTUDIO_READONLY_SYMBOLS
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Russian resources
|
|
||||||
|
|
||||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
|
|
||||||
#ifdef _WIN32
|
|
||||||
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
|
|
||||||
#pragma code_page(1251)
|
|
||||||
#endif //_WIN32
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Dialog
|
|
||||||
//
|
|
||||||
|
|
||||||
IDD_SETOFFSETS DIALOGEX 442, 45, 187, 60
|
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
|
||||||
EXSTYLE WS_EX_TOOLWINDOW
|
|
||||||
CAPTION "Set offsets"
|
|
||||||
FONT 8, "MS Sans Serif", 0, 0, 0x1
|
|
||||||
BEGIN
|
|
||||||
CONTROL "Slider2",IDC_SLIDER_OFFSETFACTOR,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,39,14,100,15
|
|
||||||
LTEXT "Factor:",IDC_STATIC,13,17,23,15
|
|
||||||
LTEXT "Units:",IDC_STATIC,13,35,19,8
|
|
||||||
CONTROL "Slider3",IDC_SLIDER_OFFSETUNITS,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,39,32,100,15
|
|
||||||
GROUPBOX "Offset parameters",IDC_STATIC,7,6,173,47
|
|
||||||
EDITTEXT IDC_EDIT_OFFSETFACTOR,148,14,22,14,ES_AUTOHSCROLL | ES_NUMBER
|
|
||||||
EDITTEXT IDC_EDIT_OFFSETUNITS,148,32,22,14,ES_AUTOHSCROLL | ES_NUMBER
|
|
||||||
END
|
|
||||||
|
|
||||||
IDD_TRIHEDRON DIALOG 0, 0, 138, 95
|
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
|
||||||
CAPTION "Triedron settings"
|
|
||||||
FONT 8, "MS Sans Serif"
|
|
||||||
BEGIN
|
|
||||||
DEFPUSHBUTTON "OK",IDOK,21,75,50,14
|
|
||||||
PUSHBUTTON "Cancel",IDCANCEL,73,75,50,14
|
|
||||||
COMBOBOX IDC_COMBOTRIHEDRPOS,38,8,92,60,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
|
||||||
COMBOBOX IDC_COMBOTRIHEDRCOLOR,38,29,92,78,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
|
||||||
EDITTEXT IDC_EDITTRIHEDRSCALE,38,51,33,12,ES_CENTER | ES_AUTOHSCROLL
|
|
||||||
LTEXT "Color:",IDC_STATIC,8,31,20,8
|
|
||||||
LTEXT "Position:",IDC_STATIC,8,10,28,8
|
|
||||||
LTEXT "Scale:",IDC_STATIC,8,53,24,10
|
|
||||||
CONTROL "Spin1",IDC_SPINTRIHEDRSCALE,"msctls_updown32",UDS_AUTOBUDDY | UDS_ARROWKEYS,70,51,11,12
|
|
||||||
END
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// DESIGNINFO
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifdef APSTUDIO_INVOKED
|
|
||||||
GUIDELINES DESIGNINFO
|
|
||||||
BEGIN
|
|
||||||
IDD_SETOFFSETS, DIALOG
|
|
||||||
BEGIN
|
|
||||||
LEFTMARGIN, 7
|
|
||||||
RIGHTMARGIN, 180
|
|
||||||
TOPMARGIN, 6
|
|
||||||
BOTTOMMARGIN, 53
|
|
||||||
END
|
|
||||||
END
|
|
||||||
#endif // APSTUDIO_INVOKED
|
|
||||||
|
|
||||||
#endif // Russian resources
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// English (U.S.) resources
|
|
||||||
|
|
||||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
|
||||||
#ifdef _WIN32
|
|
||||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
|
||||||
#pragma code_page(1252)
|
|
||||||
#endif //_WIN32
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Dialog
|
|
||||||
//
|
|
||||||
|
|
||||||
IDD_ZCLIPPING DIALOG 0, 0, 180, 95
|
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION
|
|
||||||
CAPTION "ZClipping"
|
|
||||||
FONT 8, "MS Sans Serif"
|
|
||||||
BEGIN
|
|
||||||
DEFPUSHBUTTON "OK",IDOK,13,68,50,14
|
|
||||||
PUSHBUTTON "Cancel",IDCANCEL,70,68,50,14
|
|
||||||
CONTROL "Slider1",IDC_SLIDER_ZCLIPPINGDEPTH,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,34,6,97,15
|
|
||||||
LTEXT "Depth:",IDC_STATIC,13,9,22,8
|
|
||||||
GROUPBOX "",IDC_STATIC,7,0,166,44
|
|
||||||
EDITTEXT IDC_EDIT_ZCLIPPINGDEPTH,131,7,34,14,ES_AUTOHSCROLL | ES_NUMBER
|
|
||||||
CONTROL "Slider2",IDC_SLIDER_ZCLIPPINGWIDTH,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,34,25,97,15
|
|
||||||
LTEXT "Width:",IDC_STATIC,13,28,22,8
|
|
||||||
EDITTEXT IDC_EDIT_ZCLIPPINGWIDTH,131,26,34,14,ES_AUTOHSCROLL | ES_NUMBER
|
|
||||||
COMBOBOX IDC_COMBO_ZCLIPPINGTYPE,39,47,80,55,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
|
||||||
LTEXT "Type:",IDC_STATIC,13,49,19,8
|
|
||||||
GROUPBOX "",IDC_STATIC,7,59,166,29
|
|
||||||
END
|
|
||||||
|
|
||||||
IDD_ZCUEING DIALOG 0, 0, 180, 95
|
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION
|
|
||||||
CAPTION "ZCueing"
|
|
||||||
FONT 8, "MS Sans Serif"
|
|
||||||
BEGIN
|
|
||||||
DEFPUSHBUTTON "OK",IDOK,13,68,50,14
|
|
||||||
PUSHBUTTON "Cancel",IDCANCEL,70,68,50,14
|
|
||||||
CONTROL "Slider1",IDC_SLIDER_ZCUEINGDEPTH,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,34,6,97,15
|
|
||||||
LTEXT "Depth:",-1,13,9,22,8
|
|
||||||
GROUPBOX "",-1,7,0,166,44
|
|
||||||
EDITTEXT IDC_EDIT_ZCUEINGDEPTH,131,7,34,14,ES_AUTOHSCROLL | ES_NUMBER
|
|
||||||
CONTROL "Slider2",IDC_SLIDER_ZCUEINGWIDTH,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,34,25,97,15
|
|
||||||
LTEXT "Width:",-1,13,28,22,8
|
|
||||||
EDITTEXT IDC_EDIT_ZCUEINGWIDTH,131,26,34,14,ES_AUTOHSCROLL | ES_NUMBER
|
|
||||||
GROUPBOX "",-1,7,59,166,29
|
|
||||||
CONTROL "Cueing ON/OFF",IDC_CHECK_CUEINGONOFF,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,49,67,10
|
|
||||||
END
|
|
||||||
|
|
||||||
IDD_SHADINGMODEL DIALOG 0, 0, 60, 86
|
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
|
||||||
CAPTION "ShadingModel"
|
|
||||||
FONT 8, "MS Sans Serif"
|
|
||||||
BEGIN
|
|
||||||
PUSHBUTTON "COLOR",IDC_SHADINGMODEL_COLOR,7,7,46,16
|
|
||||||
PUSHBUTTON "FLAT",IDC_SHADINGMODEL_FLAT,7,25,46,15
|
|
||||||
PUSHBUTTON "GOURAUD",IDC_SHADINGMODEL_GOURAUD,7,43,46,16
|
|
||||||
PUSHBUTTON "PHONG",IDC_SHADINGMODEL_PHONG,7,62,46,16
|
|
||||||
END
|
|
||||||
|
|
||||||
IDD_MODELCLIPPING DIALOG 0, 0, 180, 74
|
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION
|
|
||||||
CAPTION "Model clipping"
|
|
||||||
FONT 8, "MS Sans Serif"
|
|
||||||
BEGIN
|
|
||||||
DEFPUSHBUTTON "OK",IDOK,13,47,50,14
|
|
||||||
PUSHBUTTON "Cancel",IDCANCEL,70,47,50,14
|
|
||||||
CONTROL "Slider1",IDC_SLIDER_MODELCLIPPING_Z,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,21,6,97,15
|
|
||||||
LTEXT "Z:",-1,12,10,8,8
|
|
||||||
GROUPBOX "",-1,7,0,166,25
|
|
||||||
EDITTEXT IDC_EDIT_MODELCLIPPING_Z,118,7,34,14,ES_AUTOHSCROLL | ES_NUMBER
|
|
||||||
GROUPBOX "",-1,7,38,166,29
|
|
||||||
CONTROL "Model clipping ON/OFF",IDC_CHECK_MODELCLIPPINGONOFF,
|
|
||||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,28,91,10
|
|
||||||
END
|
|
||||||
|
|
||||||
IDD_RADIUS DIALOGEX 0, 0, 151, 82
|
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
|
||||||
CAPTION "Radius"
|
|
||||||
FONT 8, "MS Sans Serif", 0, 0, 0x1
|
|
||||||
BEGIN
|
|
||||||
DEFPUSHBUTTON "OK",IDOK,7,61,50,14
|
|
||||||
PUSHBUTTON "Cancel",IDCANCEL,94,61,50,14
|
|
||||||
CONTROL "Spin1",IDC_SPIN_RADIUS,"msctls_updown32",UDS_ARROWKEYS,98,43,11,14
|
|
||||||
EDITTEXT IDC_EDIT_RADIUS,48,42,45,13,ES_AUTOHSCROLL | NOT WS_TABSTOP
|
|
||||||
CTEXT "Radius Fillet",IDC_RadiusFillet,33,20,94,18,0,WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE | WS_EX_STATICEDGE,HIDC_RadiusFillet
|
|
||||||
END
|
|
||||||
|
|
||||||
IDD_ISOS DIALOG 0, 0, 161, 66
|
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
|
||||||
CAPTION "Isos"
|
|
||||||
FONT 8, "MS Sans Serif"
|
|
||||||
BEGIN
|
|
||||||
DEFPUSHBUTTON "OK",IDOK,7,44,50,14
|
|
||||||
PUSHBUTTON "Cancel",IDCANCEL,104,44,50,14
|
|
||||||
LTEXT "U Isos Number",IDC_ISOU,31,13,48,8
|
|
||||||
LTEXT "V Isos Number",IDC_ISOV,31,28,47,8
|
|
||||||
EDITTEXT IDC_EDIT_ISOU,93,7,40,14,ES_AUTOHSCROLL
|
|
||||||
EDITTEXT IDC_EDIT_ISOV,93,24,40,12,ES_AUTOHSCROLL
|
|
||||||
END
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef APSTUDIO_INVOKED
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// TEXTINCLUDE
|
|
||||||
//
|
|
||||||
|
|
||||||
1 TEXTINCLUDE
|
|
||||||
BEGIN
|
|
||||||
"resource.h\0"
|
|
||||||
END
|
|
||||||
|
|
||||||
2 TEXTINCLUDE
|
|
||||||
BEGIN
|
|
||||||
"#include ""afxres.h""\r\n"
|
|
||||||
"#include ""..\\..\\Common\\res\\OCC_Resource.h""\0"
|
|
||||||
END
|
|
||||||
|
|
||||||
3 TEXTINCLUDE
|
|
||||||
BEGIN
|
|
||||||
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
|
|
||||||
"#define _AFX_NO_OLE_RESOURCES\r\n"
|
|
||||||
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
|
|
||||||
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
|
|
||||||
"\r\n"
|
|
||||||
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
|
|
||||||
"#ifdef _WIN32\r\n"
|
|
||||||
"LANGUAGE 9, 1\r\n"
|
|
||||||
"#pragma code_page(1252)\r\n"
|
|
||||||
"#endif\r\n"
|
|
||||||
"#include ""afxres.rc"" // Standard components\r\n"
|
|
||||||
"#endif\0"
|
|
||||||
END
|
|
||||||
|
|
||||||
#endif // APSTUDIO_INVOKED
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Bitmap
|
|
||||||
//
|
|
||||||
|
|
||||||
IDR_MAINFRAME BITMAP "..//res//Toolbar.bmp"
|
|
||||||
IDR_TB_AIS BITMAP "..//res//AIS_TB.bmp"
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Toolbar
|
|
||||||
//
|
|
||||||
|
|
||||||
IDR_MAINFRAME TOOLBAR 20, 20
|
|
||||||
BEGIN
|
|
||||||
BUTTON ID_FILE_NEW
|
|
||||||
SEPARATOR
|
|
||||||
BUTTON ID_CIRCLE
|
|
||||||
BUTTON ID_LINE
|
|
||||||
BUTTON ID_BOX
|
|
||||||
BUTTON ID_Cylinder
|
|
||||||
BUTTON ID_SPHERE
|
|
||||||
SEPARATOR
|
|
||||||
BUTTON ID_OVERLAPPED_BOX
|
|
||||||
BUTTON ID_OVERLAPPED_CYLINDER
|
|
||||||
BUTTON ID_OVERLAPPED_SPHERE
|
|
||||||
BUTTON ID_POLYGON_OFFSETS
|
|
||||||
SEPARATOR
|
|
||||||
BUTTON ID_ERASEALL
|
|
||||||
SEPARATOR
|
|
||||||
BUTTON ID_SPOT_LIGHT
|
|
||||||
BUTTON ID_POSITIONAL_LIGHT
|
|
||||||
BUTTON ID_DIRECTIONAL_LIGHT
|
|
||||||
BUTTON ID_AMBIENT_LIGHT
|
|
||||||
BUTTON ID_CLEAR_LIGHTS
|
|
||||||
SEPARATOR
|
|
||||||
BUTTON ID_ZCLIPPING
|
|
||||||
BUTTON ID_ZCUEING
|
|
||||||
BUTTON ID_SCALE
|
|
||||||
SEPARATOR
|
|
||||||
BUTTON ID_NBISOS
|
|
||||||
BUTTON ID_SHADINGMODEL
|
|
||||||
BUTTON ID_ANTIALIASINGONOFF
|
|
||||||
SEPARATOR
|
|
||||||
BUTTON ID_MODELCLIPPING
|
|
||||||
SEPARATOR
|
|
||||||
BUTTON ID_VERTICES
|
|
||||||
BUTTON ID_EDGES
|
|
||||||
BUTTON ID_FACES
|
|
||||||
BUTTON ID_NEUTRAL
|
|
||||||
SEPARATOR
|
|
||||||
BUTTON ID_FILLET3D
|
|
||||||
SEPARATOR
|
|
||||||
BUTTON ID_TEXTURE_ON
|
|
||||||
BUTTON ID_BUTTONStart
|
|
||||||
BUTTON ID_BUTTONPrev
|
|
||||||
BUTTON ID_BUTTONRepeat
|
|
||||||
BUTTON ID_BUTTONNext
|
|
||||||
BUTTON ID_BUTTONEnd
|
|
||||||
SEPARATOR
|
|
||||||
BUTTON ID_DUMP_VIEW
|
|
||||||
SEPARATOR
|
|
||||||
BUTTON ID_APP_ABOUT
|
|
||||||
END
|
|
||||||
|
|
||||||
IDR_TB_AIS TOOLBAR 20, 20
|
|
||||||
BEGIN
|
|
||||||
BUTTON ID_OBJECT_WIREFRAME
|
|
||||||
BUTTON ID_OBJECT_SHADING
|
|
||||||
BUTTON ID_OBJECT_COLORED_MESH
|
|
||||||
SEPARATOR
|
|
||||||
BUTTON ID_OBJECT_COLOR
|
|
||||||
BUTTON ID_OBJECT_MATERIAL
|
|
||||||
BUTTON ID_OBJECT_TRANSPARENCY
|
|
||||||
SEPARATOR
|
|
||||||
BUTTON ID_OBJECT_ERASE
|
|
||||||
BUTTON ID_OBJECT_DISPLAYALL
|
|
||||||
SEPARATOR
|
|
||||||
BUTTON ID_OBJECT_REMOVE
|
|
||||||
BUTTON ID_OBJECT_DIM
|
|
||||||
END
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Menu
|
|
||||||
//
|
|
||||||
|
|
||||||
IDR_MAINFRAME MENU
|
|
||||||
BEGIN
|
|
||||||
POPUP "&File"
|
|
||||||
BEGIN
|
|
||||||
MENUITEM "&New\tCtrl+N", ID_FILE_NEW
|
|
||||||
MENUITEM SEPARATOR
|
|
||||||
MENUITEM "E&xit", ID_APP_EXIT
|
|
||||||
END
|
|
||||||
POPUP "&View"
|
|
||||||
BEGIN
|
|
||||||
MENUITEM "&Toolbar", ID_VIEW_TOOLBAR
|
|
||||||
MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR
|
|
||||||
END
|
|
||||||
POPUP "&Help"
|
|
||||||
BEGIN
|
|
||||||
MENUITEM "&About Viewer3d...", ID_APP_ABOUT
|
|
||||||
END
|
|
||||||
END
|
|
||||||
|
|
||||||
IDR_3DTYPE MENU
|
|
||||||
BEGIN
|
|
||||||
POPUP "&File"
|
|
||||||
BEGIN
|
|
||||||
MENUITEM "&New\tCtrl+N", ID_FILE_NEW
|
|
||||||
MENUITEM "&Close", ID_FILE_CLOSE
|
|
||||||
MENUITEM SEPARATOR
|
|
||||||
MENUITEM "E&xit", ID_APP_EXIT
|
|
||||||
END
|
|
||||||
POPUP "&View"
|
|
||||||
BEGIN
|
|
||||||
MENUITEM "&Toolbar", ID_VIEW_TOOLBAR
|
|
||||||
MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR
|
|
||||||
END
|
|
||||||
POPUP "&Options"
|
|
||||||
BEGIN
|
|
||||||
POPUP "&Trihedron"
|
|
||||||
BEGIN
|
|
||||||
MENUITEM "&Static Trihedron...", ID_OPTIONS_TRIHEDRON_STATIC_TRIHEDRON
|
|
||||||
MENUITEM "&Dynamic Trihedron", ID_OPTIONS_TRIHEDRON_DYNAMIC_TRIHEDRON
|
|
||||||
END
|
|
||||||
END
|
|
||||||
POPUP "&Window"
|
|
||||||
BEGIN
|
|
||||||
MENUITEM "&New Window", ID_WINDOW_NEW
|
|
||||||
MENUITEM "&Cascade", ID_WINDOW_CASCADE
|
|
||||||
MENUITEM "&Tile", ID_WINDOW_TILE_HORZ
|
|
||||||
MENUITEM "&Arrange Icons", ID_WINDOW_ARRANGE
|
|
||||||
END
|
|
||||||
POPUP "&Help"
|
|
||||||
BEGIN
|
|
||||||
MENUITEM "&About Viewer3d...", ID_APP_ABOUT
|
|
||||||
END
|
|
||||||
END
|
|
||||||
|
|
||||||
IDR_Popup3D MENU
|
|
||||||
BEGIN
|
|
||||||
POPUP "BackGround"
|
|
||||||
BEGIN
|
|
||||||
MENUITEM "Background Color...", ID_Modify_ChangeBackground
|
|
||||||
END
|
|
||||||
POPUP "Object(s)"
|
|
||||||
BEGIN
|
|
||||||
MENUITEM "Erase", ID_OBJECT_ERASE
|
|
||||||
MENUITEM "Shading", ID_OBJECT_SHADING
|
|
||||||
MENUITEM "Wireframe", ID_OBJECT_WIREFRAME
|
|
||||||
MENUITEM "Color...", ID_OBJECT_COLOR
|
|
||||||
MENUITEM "Material...", ID_OBJECT_MATERIAL
|
|
||||||
POPUP "Material"
|
|
||||||
BEGIN
|
|
||||||
MENUITEM "Aluminium", ID_OBJECT_MATERIAL_ALUMINIUM
|
|
||||||
MENUITEM "Brass", ID_OBJECT_MATERIAL_BRASS
|
|
||||||
MENUITEM "Bronze", ID_OBJECT_MATERIAL_BRONZE
|
|
||||||
MENUITEM "Chrome", ID_OBJECT_MATERIAL_CHROME
|
|
||||||
MENUITEM "Copper", ID_OBJECT_MATERIAL_COPPER
|
|
||||||
MENUITEM "Gold", ID_OBJECT_MATERIAL_GOLD
|
|
||||||
MENUITEM "Jade", ID_OBJECT_MATERIAL_JADE
|
|
||||||
MENUITEM "Metalized", ID_OBJECT_MATERIAL_METALIZED
|
|
||||||
MENUITEM "Neon GNC", ID_OBJECT_MATERIAL_NEON_GNC
|
|
||||||
MENUITEM "Neon PHC", ID_OBJECT_MATERIAL_NEON_PHC
|
|
||||||
MENUITEM "Obsidian", ID_OBJECT_MATERIAL_OBSIDIAN
|
|
||||||
MENUITEM "Pewter", ID_OBJECT_MATERIAL_PEWTER
|
|
||||||
MENUITEM "Plaster", ID_OBJECT_MATERIAL_PLASTER
|
|
||||||
MENUITEM "Plastic", ID_OBJECT_MATERIAL_PLASTIC
|
|
||||||
MENUITEM "Satin", ID_OBJECT_MATERIAL_SATIN
|
|
||||||
MENUITEM "Shiny plastic", ID_OBJECT_MATERIAL_SHINY_PLASTIC
|
|
||||||
MENUITEM "Silver", ID_OBJECT_MATERIAL_SILVER
|
|
||||||
MENUITEM "Steel", ID_OBJECT_MATERIAL_STEEL
|
|
||||||
MENUITEM "Stone", ID_OBJECT_MATERIAL_STONE
|
|
||||||
MENUITEM SEPARATOR
|
|
||||||
MENUITEM "Default", ID_OBJECT_MATERIAL_DEFAULT
|
|
||||||
END
|
|
||||||
MENUITEM "Transparency...", ID_OBJECT_TRANSPARENCY
|
|
||||||
END
|
|
||||||
POPUP "User cylinder"
|
|
||||||
BEGIN
|
|
||||||
MENUITEM "Change face color", ID_USERCYLINDER_CHANGEFACECOLOR
|
|
||||||
END
|
|
||||||
END
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Version
|
|
||||||
//
|
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
|
||||||
FILEVERSION 1,0,0,1
|
|
||||||
PRODUCTVERSION 1,0,0,1
|
|
||||||
FILEFLAGSMASK 0x3fL
|
|
||||||
#ifdef _DEBUG
|
|
||||||
FILEFLAGS 0x1L
|
|
||||||
#else
|
|
||||||
FILEFLAGS 0x0L
|
|
||||||
#endif
|
|
||||||
FILEOS 0x4L
|
|
||||||
FILETYPE 0x1L
|
|
||||||
FILESUBTYPE 0x0L
|
|
||||||
BEGIN
|
|
||||||
BLOCK "StringFileInfo"
|
|
||||||
BEGIN
|
|
||||||
BLOCK "040904b0"
|
|
||||||
BEGIN
|
|
||||||
VALUE "FileDescription", "Viewer MFC Application"
|
|
||||||
VALUE "FileVersion", "1, 0, 0, 1"
|
|
||||||
VALUE "InternalName", "Viewer"
|
|
||||||
VALUE "LegalCopyright", "Copyright (C) 1997"
|
|
||||||
VALUE "OriginalFilename", "Viewer.EXE"
|
|
||||||
VALUE "ProductName", "SampleViewer3d Application"
|
|
||||||
VALUE "ProductVersion", "1, 0, 0, 1"
|
|
||||||
END
|
|
||||||
END
|
|
||||||
BLOCK "VarFileInfo"
|
|
||||||
BEGIN
|
|
||||||
VALUE "Translation", 0x409, 1200
|
|
||||||
END
|
|
||||||
END
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// String Table
|
|
||||||
//
|
|
||||||
|
|
||||||
STRINGTABLE
|
|
||||||
BEGIN
|
|
||||||
IDR_MAINFRAME "Viewer3d"
|
|
||||||
IDR_3DTYPE "\nViewer3d\n\n\n\n.Document\n Document"
|
|
||||||
END
|
|
||||||
|
|
||||||
STRINGTABLE
|
|
||||||
BEGIN
|
|
||||||
ID_BOX "Create and display a box\nBox"
|
|
||||||
ID_Cylinder "Create and display a cylinder\nCylinder"
|
|
||||||
ID_SPHERE "Create and display a sphere\nSphere"
|
|
||||||
ID_ERASEALL "Remove all\nRemove all"
|
|
||||||
ID_AMBIENT_LIGHT "Create an ambient light source\nAmbient light"
|
|
||||||
ID_DIRECTIONAL_LIGHT "Create an directional light source\nDirectional light"
|
|
||||||
ID_POSITIONAL_LIGHT "Create an positional light source\nPositional light"
|
|
||||||
ID_SPOT_LIGHT "Create an spot light source\nSpot light"
|
|
||||||
ID_LIGHTOFF "Delete lights\nDelete lights"
|
|
||||||
ID_ZCLIPPING "ZClipping\nZClipping"
|
|
||||||
ID_ZCUEING "ZCueing\nZCueing"
|
|
||||||
ID_SHADINGMODEL "Define shading model\nShadingModel"
|
|
||||||
ID_ANTIALIASINGONOFF "Antialiasing ON/OFF\nAntialiasing"
|
|
||||||
END
|
|
||||||
|
|
||||||
STRINGTABLE
|
|
||||||
BEGIN
|
|
||||||
ID_CLEAR_LIGHTS "Clear all the light sources\nClear lights"
|
|
||||||
ID_MODELCLIPPING "ModelClipping\nModelClipping"
|
|
||||||
ID_OVERLAPPED_BOX "Create and display two overlapped boxes\nOverlapped boxes"
|
|
||||||
ID_BUTTON819 "Create and display two overlapped spheres\nOverlapped spheres"
|
|
||||||
ID_OVERLAPPED_SPHERE "Create and display two overlapped spheres\nOverlapped spheres"
|
|
||||||
ID_BUTTON821 "Create and display two overlapped boxes\nOverlapped boxes"
|
|
||||||
ID_OVERLAPPED_CYLINDER "Create and display two overlapped cylinders\nOverlapped cylinders"
|
|
||||||
ID_POLYGON_OFFSETS "Set/unset offsets\nSet/unset offsets"
|
|
||||||
ID_OBJECT_COLORED_MESH "Puts cylinder in colored mesh\nColored mesh"
|
|
||||||
ID_SCALE "Scale\nScale"
|
|
||||||
END
|
|
||||||
|
|
||||||
STRINGTABLE
|
|
||||||
BEGIN
|
|
||||||
ID_CIRCLE "Clear all the light sources\nClear lights"
|
|
||||||
ID_LINE "Create and display a line with standard tools\nLine"
|
|
||||||
ID_VERTICES "Set the selection mode to vertices\nVertices"
|
|
||||||
ID_EDGES "Set the selection mode to edges\nEdges"
|
|
||||||
ID_FACES "Set the selection modes to faces\nFaces"
|
|
||||||
ID_NEUTRAL "Neutral point for selection\nNeutral point"
|
|
||||||
ID_FILLET3D "Make a fillet between faces\nFillet"
|
|
||||||
ID_NBISOS "Set global isos number\nIsos"
|
|
||||||
ID_BUTTONStart "Press to go to the first sample\nFirst sample (Home)"
|
|
||||||
ID_BUTTONPrev "Press to go to the previous sample\nPrevious sample (PgUp)"
|
|
||||||
ID_BUTTONRepeat "Press to repeat the current sample\nRepeat sample (Space)"
|
|
||||||
ID_BUTTONNext "Press to go to the next sample\nNext sample (PgDn)"
|
|
||||||
ID_BUTTONEnd "Press to go to the last sample\nLast sample (End)"
|
|
||||||
END
|
|
||||||
|
|
||||||
STRINGTABLE
|
|
||||||
BEGIN
|
|
||||||
ID_DUMP_VIEW "Save current frame into an image file\nExport view (F12)"
|
|
||||||
ID_TEXTURE_ON "Run texture example\nRun texture example"
|
|
||||||
END
|
|
||||||
|
|
||||||
STRINGTABLE
|
|
||||||
BEGIN
|
|
||||||
ID_OBJECT_DIMENSIONS "Add dimensions"
|
|
||||||
ID_LOCALCONTEXT_ADDDIMENSION "Add new dimension for selected objetcs"
|
|
||||||
END
|
|
||||||
|
|
||||||
#endif // English (U.S.) resources
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// English (U.K.) resources
|
|
||||||
|
|
||||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG)
|
|
||||||
#ifdef _WIN32
|
|
||||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
|
|
||||||
#pragma code_page(1252)
|
|
||||||
#endif //_WIN32
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Dialog
|
|
||||||
//
|
|
||||||
|
|
||||||
IDD_SCALE DIALOG 0, 0, 186, 103
|
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
|
||||||
CAPTION "Heterogeneous Scale"
|
|
||||||
FONT 8, "MS Sans Serif"
|
|
||||||
BEGIN
|
|
||||||
DEFPUSHBUTTON "OK",IDOK,13,78,50,14
|
|
||||||
PUSHBUTTON "Cancel",IDCANCEL,70,78,50,14
|
|
||||||
GROUPBOX "",IDC_STATIC,7,69,166,29
|
|
||||||
GROUPBOX "",IDC_STATIC,7,0,166,65
|
|
||||||
CONTROL "Slider1",IDC_SLIDER_SCALEX,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,34,6,97,15
|
|
||||||
LTEXT "X:",IDC_STATIC,13,9,8,8
|
|
||||||
EDITTEXT IDC_EDIT_SCALEX,131,7,34,14,ES_AUTOHSCROLL | ES_NUMBER
|
|
||||||
CONTROL "Slider2",IDC_SLIDER_SCALEY,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,34,25,97,15
|
|
||||||
LTEXT "Y:",IDC_STATIC,13,28,8,8
|
|
||||||
EDITTEXT IDC_EDIT_SCALEY,131,26,34,14,ES_AUTOHSCROLL | ES_NUMBER
|
|
||||||
CONTROL "Slider2",IDC_SLIDER_SCALEZ,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,34,45,97,15
|
|
||||||
LTEXT "Z:",IDC_STATIC,13,48,8,8
|
|
||||||
EDITTEXT IDC_EDIT_SCALEZ,131,46,34,14,ES_AUTOHSCROLL | ES_NUMBER
|
|
||||||
END
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// DESIGNINFO
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifdef APSTUDIO_INVOKED
|
|
||||||
GUIDELINES DESIGNINFO
|
|
||||||
BEGIN
|
|
||||||
IDD_SCALE, DIALOG
|
|
||||||
BEGIN
|
|
||||||
LEFTMARGIN, 7
|
|
||||||
RIGHTMARGIN, 179
|
|
||||||
TOPMARGIN, 7
|
|
||||||
BOTTOMMARGIN, 96
|
|
||||||
END
|
|
||||||
END
|
|
||||||
#endif // APSTUDIO_INVOKED
|
|
||||||
|
|
||||||
#endif // English (U.K.) resources
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef APSTUDIO_INVOKED
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Generated from the TEXTINCLUDE 3 resource.
|
|
||||||
//
|
|
||||||
#define _AFX_NO_SPLITTER_RESOURCES
|
|
||||||
#define _AFX_NO_OLE_RESOURCES
|
|
||||||
#define _AFX_NO_TRACKER_RESOURCES
|
|
||||||
#define _AFX_NO_PROPERTY_RESOURCES
|
|
||||||
|
|
||||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
|
||||||
#ifdef _WIN32
|
|
||||||
LANGUAGE 9, 1
|
|
||||||
#pragma code_page(1252)
|
|
||||||
#endif
|
|
||||||
#include "afxres.rc" // Standard components
|
|
||||||
#endif
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
#endif // not APSTUDIO_INVOKED
|
|
||||||
|
|
@ -20,57 +20,57 @@
|
|||||||
|
|
||||||
IMPLEMENT_DYNCREATE(CViewer3dDoc, CDocument)
|
IMPLEMENT_DYNCREATE(CViewer3dDoc, CDocument)
|
||||||
|
|
||||||
BEGIN_MESSAGE_MAP(CViewer3dDoc, OCC_3dBaseDoc)
|
BEGIN_MESSAGE_MAP(CViewer3dDoc, OCC_3dDoc)
|
||||||
//{{AFX_MSG_MAP(CViewer3dDoc)
|
//{{AFX_MSG_MAP(CViewer3dDoc)
|
||||||
ON_COMMAND(ID_BOX, OnBox)
|
ON_COMMAND(ID_BOX, OnBox)
|
||||||
ON_COMMAND(ID_Cylinder, OnCylinder)
|
ON_COMMAND(ID_Cylinder, OnCylinder)
|
||||||
ON_COMMAND(ID_SPHERE, OnSphere)
|
ON_COMMAND(ID_SPHERE, OnSphere)
|
||||||
ON_COMMAND(ID_ERASEALL, OnRemoveAll)
|
ON_COMMAND(ID_ERASEALL, OnRemoveAll)
|
||||||
ON_COMMAND(ID_NBISOS, OnNbisos)
|
ON_COMMAND(ID_NBISOS, OnNbisos)
|
||||||
ON_COMMAND(ID_FACES, OnFaces)
|
ON_COMMAND(ID_FACES, OnFaces)
|
||||||
ON_COMMAND(ID_EDGES, OnEdges)
|
ON_COMMAND(ID_EDGES, OnEdges)
|
||||||
ON_COMMAND(ID_VERTICES, OnVertices)
|
ON_COMMAND(ID_VERTICES, OnVertices)
|
||||||
ON_COMMAND(ID_NEUTRAL, OnNeutral)
|
ON_COMMAND(ID_NEUTRAL, OnNeutral)
|
||||||
ON_COMMAND(ID_USERCYLINDER_CHANGEFACECOLOR, OnUsercylinderChangefacecolor)
|
ON_COMMAND(ID_USERCYLINDER_CHANGEFACECOLOR, OnUsercylinderChangefacecolor)
|
||||||
ON_COMMAND(ID_FILLET3D, OnFillet3d)
|
ON_COMMAND(ID_FILLET3D, OnFillet3d)
|
||||||
ON_COMMAND(ID_CIRCLE, OnCircle)
|
ON_COMMAND(ID_CIRCLE, OnCircle)
|
||||||
ON_COMMAND(ID_LINE, OnLine)
|
ON_COMMAND(ID_LINE, OnLine)
|
||||||
ON_COMMAND(ID_OVERLAPPED_BOX, OnOverlappedBox)
|
ON_COMMAND(ID_OVERLAPPED_BOX, OnOverlappedBox)
|
||||||
ON_COMMAND(ID_OVERLAPPED_CYLINDER, OnOverlappedCylinder)
|
ON_COMMAND(ID_OVERLAPPED_CYLINDER, OnOverlappedCylinder)
|
||||||
ON_COMMAND(ID_OVERLAPPED_SPHERE, OnOverlappedSphere)
|
ON_COMMAND(ID_OVERLAPPED_SPHERE, OnOverlappedSphere)
|
||||||
ON_COMMAND(ID_POLYGON_OFFSETS, OnPolygonOffsets)
|
ON_COMMAND(ID_POLYGON_OFFSETS, OnPolygonOffsets)
|
||||||
ON_UPDATE_COMMAND_UI(ID_POLYGON_OFFSETS, OnUpdatePolygonOffsets)
|
ON_UPDATE_COMMAND_UI(ID_POLYGON_OFFSETS, OnUpdatePolygonOffsets)
|
||||||
ON_UPDATE_COMMAND_UI(ID_Cylinder, OnUpdateCylinder)
|
ON_UPDATE_COMMAND_UI(ID_Cylinder, OnUpdateCylinder)
|
||||||
ON_UPDATE_COMMAND_UI(ID_SPHERE, OnUpdateSphere)
|
ON_UPDATE_COMMAND_UI(ID_SPHERE, OnUpdateSphere)
|
||||||
ON_UPDATE_COMMAND_UI(ID_BOX, OnUpdateBox)
|
ON_UPDATE_COMMAND_UI(ID_BOX, OnUpdateBox)
|
||||||
ON_UPDATE_COMMAND_UI(ID_OVERLAPPED_CYLINDER, OnUpdateOverlappedCylinder)
|
ON_UPDATE_COMMAND_UI(ID_OVERLAPPED_CYLINDER, OnUpdateOverlappedCylinder)
|
||||||
ON_UPDATE_COMMAND_UI(ID_OVERLAPPED_SPHERE, OnUpdateOverlappedSphere)
|
ON_UPDATE_COMMAND_UI(ID_OVERLAPPED_SPHERE, OnUpdateOverlappedSphere)
|
||||||
ON_UPDATE_COMMAND_UI(ID_OVERLAPPED_BOX, OnUpdateOverlappedBox)
|
ON_UPDATE_COMMAND_UI(ID_OVERLAPPED_BOX, OnUpdateOverlappedBox)
|
||||||
ON_COMMAND(ID_OBJECT_REMOVE, OnObjectRemove)
|
ON_COMMAND(ID_OBJECT_REMOVE, OnObjectRemove)
|
||||||
ON_COMMAND(ID_OBJECT_ERASE, OnObjectErase)
|
ON_COMMAND(ID_OBJECT_ERASE, OnObjectErase)
|
||||||
ON_COMMAND(ID_OBJECT_DISPLAYALL, OnObjectDisplayall)
|
ON_COMMAND(ID_OBJECT_DISPLAYALL, OnObjectDisplayall)
|
||||||
ON_COMMAND(ID_OBJECT_COLORED_MESH, OnObjectColoredMesh)
|
ON_COMMAND(ID_OBJECT_COLORED_MESH, OnObjectColoredMesh)
|
||||||
ON_UPDATE_COMMAND_UI(ID_OBJECT_COLORED_MESH, OnUpdateObjectColoredMesh)
|
ON_UPDATE_COMMAND_UI(ID_OBJECT_COLORED_MESH, OnUpdateObjectColoredMesh)
|
||||||
ON_UPDATE_COMMAND_UI(ID_OBJECT_SHADING, OnUpdateObjectShading)
|
ON_UPDATE_COMMAND_UI(ID_OBJECT_SHADING, OnUpdateObjectShading)
|
||||||
ON_UPDATE_COMMAND_UI(ID_OBJECT_WIREFRAME, OnUpdateObjectWireframe)
|
ON_UPDATE_COMMAND_UI(ID_OBJECT_WIREFRAME, OnUpdateObjectWireframe)
|
||||||
ON_COMMAND(ID_OPTIONS_TRIHEDRON_DYNAMIC_TRIHEDRON, OnOptionsTrihedronDynamicTrihedron)
|
ON_COMMAND(ID_OPTIONS_TRIHEDRON_DYNAMIC_TRIHEDRON, OnOptionsTrihedronDynamicTrihedron)
|
||||||
ON_UPDATE_COMMAND_UI(ID_OPTIONS_TRIHEDRON_DYNAMIC_TRIHEDRON, OnUpdateOptionsTrihedronDynamicTrihedron)
|
ON_UPDATE_COMMAND_UI(ID_OPTIONS_TRIHEDRON_DYNAMIC_TRIHEDRON, OnUpdateOptionsTrihedronDynamicTrihedron)
|
||||||
ON_UPDATE_COMMAND_UI(ID_OPTIONS_TRIHEDRON_STATIC_TRIHEDRON, OnUpdateOptionsTrihedronStaticTrihedron)
|
ON_UPDATE_COMMAND_UI(ID_OPTIONS_TRIHEDRON_STATIC_TRIHEDRON, OnUpdateOptionsTrihedronStaticTrihedron)
|
||||||
ON_COMMAND(ID_OBJECT_MATERIAL, OnObjectMaterial)
|
ON_COMMAND(ID_OBJECT_MATERIAL, OnObjectMaterial)
|
||||||
ON_COMMAND(ID_TEXTURE_ON, OnTextureOn)
|
ON_COMMAND(ID_TEXTURE_ON, OnTextureOn)
|
||||||
ON_COMMAND(ID_BUTTONNext, OnBUTTONNext)
|
ON_COMMAND(ID_BUTTONNext, OnBUTTONNext)
|
||||||
ON_COMMAND(ID_BUTTONStart, OnBUTTONStart)
|
ON_COMMAND(ID_BUTTONStart, OnBUTTONStart)
|
||||||
ON_COMMAND(ID_BUTTONRepeat, OnBUTTONRepeat)
|
ON_COMMAND(ID_BUTTONRepeat, OnBUTTONRepeat)
|
||||||
ON_COMMAND(ID_BUTTONPrev, OnBUTTONPrev)
|
ON_COMMAND(ID_BUTTONPrev, OnBUTTONPrev)
|
||||||
ON_COMMAND(ID_BUTTONEnd, OnBUTTONEnd)
|
ON_COMMAND(ID_BUTTONEnd, OnBUTTONEnd)
|
||||||
ON_UPDATE_COMMAND_UI(ID_BUTTONNext, OnUpdateBUTTONNext)
|
ON_UPDATE_COMMAND_UI(ID_BUTTONNext, OnUpdateBUTTONNext)
|
||||||
ON_UPDATE_COMMAND_UI(ID_BUTTONPrev, OnUpdateBUTTONPrev)
|
ON_UPDATE_COMMAND_UI(ID_BUTTONPrev, OnUpdateBUTTONPrev)
|
||||||
ON_UPDATE_COMMAND_UI(ID_BUTTONStart, OnUpdateBUTTONStart)
|
ON_UPDATE_COMMAND_UI(ID_BUTTONStart, OnUpdateBUTTONStart)
|
||||||
ON_UPDATE_COMMAND_UI(ID_BUTTONRepeat, OnUpdateBUTTONRepeat)
|
ON_UPDATE_COMMAND_UI(ID_BUTTONRepeat, OnUpdateBUTTONRepeat)
|
||||||
ON_UPDATE_COMMAND_UI(ID_BUTTONEnd, OnUpdateBUTTONEnd)
|
ON_UPDATE_COMMAND_UI(ID_BUTTONEnd, OnUpdateBUTTONEnd)
|
||||||
ON_COMMAND(ID_FILE_NEW, OnFileNew)
|
ON_COMMAND(ID_FILE_NEW, OnFileNew)
|
||||||
ON_COMMAND(ID_DUMP_VIEW, OnDumpView)
|
ON_COMMAND(ID_DUMP_VIEW, OnDumpView)
|
||||||
//}}AFX_MSG_MAP
|
//}}AFX_MSG_MAP
|
||||||
END_MESSAGE_MAP()
|
END_MESSAGE_MAP()
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
@ -79,34 +79,34 @@ END_MESSAGE_MAP()
|
|||||||
CViewer3dDoc::CViewer3dDoc()
|
CViewer3dDoc::CViewer3dDoc()
|
||||||
:OCC_3dDoc()
|
:OCC_3dDoc()
|
||||||
{
|
{
|
||||||
myCylinder.Nullify();
|
myCylinder.Nullify();
|
||||||
mySphere.Nullify();
|
mySphere.Nullify();
|
||||||
myBox.Nullify();
|
myBox.Nullify();
|
||||||
myOverlappedCylinder.Nullify();
|
myOverlappedCylinder.Nullify();
|
||||||
myOverlappedSphere.Nullify();
|
myOverlappedSphere.Nullify();
|
||||||
myOverlappedBox.Nullify();
|
myOverlappedBox.Nullify();
|
||||||
myOffsetDlg = NULL;
|
myOffsetDlg = NULL;
|
||||||
myStaticTrihedronAxisIsDisplayed = FALSE;
|
myStaticTrihedronAxisIsDisplayed = FALSE;
|
||||||
myState = -1;
|
myState = -1;
|
||||||
|
|
||||||
isTextureSampleStarted = FALSE;
|
isTextureSampleStarted = FALSE;
|
||||||
|
|
||||||
myPresentation = OCCDemo_Presentation::Current;
|
myPresentation = OCCDemo_Presentation::Current;
|
||||||
myPresentation->SetDocument(this);
|
myPresentation->SetDocument(this);
|
||||||
|
|
||||||
|
|
||||||
myAISContext->DefaultDrawer()->ShadingAspect()->SetColor(Quantity_NOC_CHARTREUSE1);
|
myAISContext->DefaultDrawer()->ShadingAspect()->SetColor(Quantity_NOC_CHARTREUSE1);
|
||||||
myAISContext->DefaultDrawer()->ShadingAspect()->SetMaterial(Graphic3d_NOM_SILVER);
|
myAISContext->DefaultDrawer()->ShadingAspect()->SetMaterial(Graphic3d_NOM_SILVER);
|
||||||
|
|
||||||
strcpy_s(myDataDir, "Data");
|
strcpy_s(myDataDir, "Data");
|
||||||
strcpy_s(myLastPath, ".");
|
strcpy_s(myLastPath, ".");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Handle(AIS_Trihedron) myTrihedron;
|
Handle(AIS_Trihedron) myTrihedron;
|
||||||
Handle(Geom_Axis2Placement) myTrihedronAxis=new Geom_Axis2Placement(gp::XOY());
|
Handle(Geom_Axis2Placement) myTrihedronAxis=new Geom_Axis2Placement(gp::XOY());
|
||||||
myTrihedron=new AIS_Trihedron(myTrihedronAxis);
|
myTrihedron=new AIS_Trihedron(myTrihedronAxis);
|
||||||
myAISContext->Display(myTrihedron);
|
myAISContext->Display(myTrihedron);
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
CViewer3dDoc::~CViewer3dDoc()
|
CViewer3dDoc::~CViewer3dDoc()
|
||||||
@ -119,12 +119,12 @@ CViewer3dDoc::~CViewer3dDoc()
|
|||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
void CViewer3dDoc::AssertValid() const
|
void CViewer3dDoc::AssertValid() const
|
||||||
{
|
{
|
||||||
CDocument::AssertValid();
|
CDocument::AssertValid();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CViewer3dDoc::Dump(CDumpContext& dc) const
|
void CViewer3dDoc::Dump(CDumpContext& dc) const
|
||||||
{
|
{
|
||||||
CDocument::Dump(dc);
|
CDocument::Dump(dc);
|
||||||
}
|
}
|
||||||
#endif //_DEBUG
|
#endif //_DEBUG
|
||||||
|
|
||||||
@ -133,9 +133,9 @@ void CViewer3dDoc::Dump(CDumpContext& dc) const
|
|||||||
|
|
||||||
void CViewer3dDoc::UpdateResultMessageDlg (CString theTitle, const TCollection_AsciiString& theMessage)
|
void CViewer3dDoc::UpdateResultMessageDlg (CString theTitle, const TCollection_AsciiString& theMessage)
|
||||||
{
|
{
|
||||||
CString aText (theMessage.ToCString());
|
CString aText (theMessage.ToCString());
|
||||||
myCResultDialog.SetText (aText);
|
myCResultDialog.SetText (aText);
|
||||||
myCResultDialog.SetTitle(theTitle);
|
myCResultDialog.SetTitle(theTitle);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CViewer3dDoc::UpdateResultMessageDlg(CString theTitle, CString theMessage)
|
void CViewer3dDoc::UpdateResultMessageDlg(CString theTitle, CString theMessage)
|
||||||
@ -144,366 +144,347 @@ void CViewer3dDoc::UpdateResultMessageDlg(CString theTitle, CString theMessage)
|
|||||||
myCResultDialog.SetTitle(theTitle);
|
myCResultDialog.SetTitle(theTitle);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CViewer3dDoc::OnBox()
|
void CViewer3dDoc::OnBox()
|
||||||
{
|
{
|
||||||
if(myBox.IsNull()){
|
if(myBox.IsNull())
|
||||||
BRepPrimAPI_MakeBox B(gp_Pnt(0,-400,-100), 200.,150.,100.);
|
{
|
||||||
|
BRepPrimAPI_MakeBox B(gp_Pnt(0,-400,-100), 200.,150.,100.);
|
||||||
|
|
||||||
|
|
||||||
myBox = new AIS_Shape(B.Shape());
|
myBox = new AIS_Shape(B.Shape());
|
||||||
|
|
||||||
myAISContext->SetMaterial(myBox,Graphic3d_NOM_PEWTER);
|
myAISContext->SetMaterial(myBox,Graphic3d_NOM_PEWTER);
|
||||||
myAISContext->SetDisplayMode(myBox,1);
|
myAISContext->SetDisplayMode(myBox,1);
|
||||||
|
|
||||||
myAISContext->Display(myBox);
|
myAISContext->Display(myBox);
|
||||||
TCollection_AsciiString Message("\
|
TCollection_AsciiString Message("\
|
||||||
BRepPrimAPI_MakeBox Box1(gp_Pnt(0,-400,-100), 200.,150.,100.);\n\
|
BRepPrimAPI_MakeBox Box1(gp_Pnt(0,-400,-100), 200.,150.,100.);\n\
|
||||||
");
|
");
|
||||||
|
|
||||||
UpdateResultMessageDlg("Create Box",Message);
|
|
||||||
|
|
||||||
}
|
UpdateResultMessageDlg("Create Box",Message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CViewer3dDoc::OnCylinder()
|
void CViewer3dDoc::OnCylinder()
|
||||||
{
|
{
|
||||||
if(myCylinder.IsNull()) {
|
if(myCylinder.IsNull())
|
||||||
gp_Ax2 CylAx2(gp_Pnt(0,0,-100), gp_Dir(gp_Vec(gp_Pnt(0,0,-100),gp_Pnt(0,0,100))));
|
{
|
||||||
|
gp_Ax2 CylAx2(gp_Pnt(0,0,-100), gp_Dir(gp_Vec(gp_Pnt(0,0,-100),gp_Pnt(0,0,100))));
|
||||||
|
myCylinder = new User_Cylinder(CylAx2, 80.,200.);
|
||||||
|
|
||||||
//BRepPrimAPI_MakeCylinder C(CylAx2, 80.,200.);
|
myAISContext->SetDisplayMode(myCylinder,1);
|
||||||
|
|
||||||
myCylinder = new User_Cylinder(CylAx2, 80.,200.);
|
|
||||||
|
|
||||||
// myCylinder = new AIS_Shape(C.Shape());
|
|
||||||
/*
|
|
||||||
myCylinder->SetTransparency(0.5);
|
|
||||||
|
|
||||||
myAISContext->SetColor(myCylinder,Quantity_NOC_WHITE);
|
myAISContext->Display(myCylinder);
|
||||||
myAISContext->SetMaterial(myCylinder,Graphic3d_NOM_SHINY_PLASTIC);
|
|
||||||
*/
|
|
||||||
myAISContext->SetDisplayMode(myCylinder,1);
|
|
||||||
|
|
||||||
myAISContext->Display(myCylinder);
|
TCollection_AsciiString Message("\
|
||||||
|
|
||||||
TCollection_AsciiString Message("\
|
|
||||||
gp_Ax2 CylAx2(gp_Pnt(0,0,-100), gp_Dir(gp_Vec(gp_Pnt(0,0,-100),gp_Pnt(0,0,100))));\n\
|
gp_Ax2 CylAx2(gp_Pnt(0,0,-100), gp_Dir(gp_Vec(gp_Pnt(0,0,-100),gp_Pnt(0,0,100))));\n\
|
||||||
C = new User_Cylinder(CylAx2, 80.,200.);;\n\
|
C = new User_Cylinder(CylAx2, 80.,200.);;\n\
|
||||||
");
|
");
|
||||||
|
|
||||||
UpdateResultMessageDlg("Create Cylinder",Message);
|
|
||||||
|
|
||||||
}
|
UpdateResultMessageDlg("Create Cylinder",Message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CViewer3dDoc::OnSphere()
|
void CViewer3dDoc::OnSphere()
|
||||||
{
|
{
|
||||||
if(mySphere.IsNull()){
|
if(mySphere.IsNull())
|
||||||
BRepPrimAPI_MakeSphere S(gp_Pnt(0,300,0), 100.);
|
{
|
||||||
|
BRepPrimAPI_MakeSphere S(gp_Pnt(0,300,0), 100.);
|
||||||
|
|
||||||
mySphere = new AIS_Shape(S.Shape());
|
mySphere = new AIS_Shape(S.Shape());
|
||||||
|
|
||||||
myAISContext->SetMaterial(mySphere,Graphic3d_NOM_BRONZE);
|
|
||||||
myAISContext->SetDisplayMode(mySphere,1);
|
|
||||||
|
|
||||||
myAISContext->Display(mySphere);
|
myAISContext->SetMaterial(mySphere,Graphic3d_NOM_BRONZE);
|
||||||
TCollection_AsciiString Message("\
|
myAISContext->SetDisplayMode(mySphere,1);
|
||||||
|
|
||||||
|
myAISContext->Display(mySphere);
|
||||||
|
TCollection_AsciiString Message("\
|
||||||
BRepPrimAPI_MakeSphere S(gp_Pnt(0,300,0), 100.);\n\
|
BRepPrimAPI_MakeSphere S(gp_Pnt(0,300,0), 100.);\n\
|
||||||
");
|
");
|
||||||
UpdateResultMessageDlg("Create Sphere",Message);
|
UpdateResultMessageDlg("Create Sphere",Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CViewer3dDoc::OnRemoveAll()
|
void CViewer3dDoc::OnRemoveAll()
|
||||||
|
|
||||||
{
|
{
|
||||||
AIS_ListOfInteractive aListOfObjects;
|
AIS_ListOfInteractive aListOfObjects;
|
||||||
myAISContext->ObjectsInside(aListOfObjects,AIS_KOI_Shape);
|
myAISContext->ObjectsInside(aListOfObjects,AIS_KOI_Shape);
|
||||||
|
|
||||||
AIS_ListIteratorOfListOfInteractive aListIterator;
|
AIS_ListIteratorOfListOfInteractive aListIterator;
|
||||||
for(aListIterator.Initialize(aListOfObjects);aListIterator.More();aListIterator.Next()){
|
for(aListIterator.Initialize(aListOfObjects);aListIterator.More();aListIterator.Next()){
|
||||||
myAISContext->Remove(aListIterator.Value());
|
myAISContext->Remove(aListIterator.Value());
|
||||||
}
|
}
|
||||||
|
|
||||||
myAISContext->Remove(myCylinder);
|
myAISContext->Remove(myCylinder);
|
||||||
|
|
||||||
|
|
||||||
myCylinder.Nullify();
|
myCylinder.Nullify();
|
||||||
mySphere.Nullify();
|
mySphere.Nullify();
|
||||||
myBox.Nullify();
|
myBox.Nullify();
|
||||||
myOverlappedCylinder.Nullify();
|
myOverlappedCylinder.Nullify();
|
||||||
myOverlappedSphere.Nullify();
|
myOverlappedSphere.Nullify();
|
||||||
myOverlappedBox.Nullify();
|
myOverlappedBox.Nullify();
|
||||||
if(myOffsetDlg && myOffsetDlg->IsWindowVisible())
|
if(myOffsetDlg && myOffsetDlg->IsWindowVisible())
|
||||||
myOffsetDlg->UpdateValues();
|
myOffsetDlg->UpdateValues();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CViewer3dDoc::OnOverlappedBox()
|
void CViewer3dDoc::OnOverlappedBox()
|
||||||
{
|
{
|
||||||
OnBox();
|
OnBox();
|
||||||
if(myOverlappedBox.IsNull()){
|
if(myOverlappedBox.IsNull()){
|
||||||
BRepPrimAPI_MakeBox B(gp_Pnt(0,-400,-100), 200.,150.,100.);
|
BRepPrimAPI_MakeBox B(gp_Pnt(0,-400,-100), 200.,150.,100.);
|
||||||
|
|
||||||
BRepBuilderAPI_NurbsConvert aNurbsConvert(B.Shape());
|
BRepBuilderAPI_NurbsConvert aNurbsConvert(B.Shape());
|
||||||
TopoDS_Shape aBoxShape2 = aNurbsConvert.Shape();
|
TopoDS_Shape aBoxShape2 = aNurbsConvert.Shape();
|
||||||
|
|
||||||
|
|
||||||
myOverlappedBox = new AIS_Shape(aBoxShape2);
|
myOverlappedBox = new AIS_Shape(aBoxShape2);
|
||||||
|
|
||||||
myAISContext->SetMaterial(myOverlappedBox,Graphic3d_NOM_GOLD);
|
myAISContext->SetMaterial(myOverlappedBox,Graphic3d_NOM_GOLD);
|
||||||
myAISContext->SetDisplayMode(myOverlappedBox,1);
|
myAISContext->SetDisplayMode(myOverlappedBox,1);
|
||||||
|
|
||||||
myAISContext->Display(myOverlappedBox);
|
myAISContext->Display(myOverlappedBox);
|
||||||
TCollection_AsciiString Message("\
|
TCollection_AsciiString Message("\
|
||||||
BRepPrimAPI_MakeBox Box1(gp_Pnt(0,-400,-100), 200.,150.,100.);\n\
|
BRepPrimAPI_MakeBox Box1(gp_Pnt(0,-400,-100), 200.,150.,100.);\n\
|
||||||
\n\
|
\n\
|
||||||
BRepPrimAPI_MakeBox Box2(gp_Pnt(0,-400,-100), 200.,150.,100.);\n\
|
BRepPrimAPI_MakeBox Box2(gp_Pnt(0,-400,-100), 200.,150.,100.);\n\
|
||||||
BRepBuilderAPI_NurbsConvert aNurbsConvert(Box2.Shape());\n\
|
BRepBuilderAPI_NurbsConvert aNurbsConvert(Box2.Shape());\n\
|
||||||
");
|
");
|
||||||
UpdateResultMessageDlg("Create overlapped boxes",Message);
|
UpdateResultMessageDlg("Create overlapped boxes",Message);
|
||||||
if(myOffsetDlg && myOffsetDlg->IsWindowVisible())
|
if(myOffsetDlg && myOffsetDlg->IsWindowVisible())
|
||||||
myOffsetDlg->UpdateValues();
|
myOffsetDlg->UpdateValues();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CViewer3dDoc::OnOverlappedCylinder()
|
void CViewer3dDoc::OnOverlappedCylinder()
|
||||||
{
|
{
|
||||||
OnCylinder();
|
OnCylinder();
|
||||||
|
|
||||||
if(myOverlappedCylinder.IsNull()){
|
if(myOverlappedCylinder.IsNull()){
|
||||||
gp_Ax2 CylAx2(gp_Pnt(0,0,-100), gp_Dir(gp_Vec(gp_Pnt(0,0,-100),gp_Pnt(0,0,100))));
|
gp_Ax2 CylAx2(gp_Pnt(0,0,-100), gp_Dir(gp_Vec(gp_Pnt(0,0,-100),gp_Pnt(0,0,100))));
|
||||||
BRepPrimAPI_MakeCylinder C(CylAx2, 80.,200.);
|
BRepPrimAPI_MakeCylinder C(CylAx2, 80.,200.);
|
||||||
|
|
||||||
BRepBuilderAPI_NurbsConvert aNurbsConvert(C.Shape());
|
BRepBuilderAPI_NurbsConvert aNurbsConvert(C.Shape());
|
||||||
TopoDS_Shape aCylShape2 = aNurbsConvert.Shape();
|
TopoDS_Shape aCylShape2 = aNurbsConvert.Shape();
|
||||||
|
|
||||||
myOverlappedCylinder = new AIS_Shape(aCylShape2);
|
myOverlappedCylinder = new AIS_Shape(aCylShape2);
|
||||||
|
|
||||||
|
|
||||||
myAISContext->SetMaterial(myOverlappedCylinder,Graphic3d_NOM_GOLD);
|
|
||||||
myAISContext->SetDisplayMode(myOverlappedCylinder,1);
|
|
||||||
|
|
||||||
myAISContext->Display(myOverlappedCylinder);
|
myAISContext->SetMaterial(myOverlappedCylinder,Graphic3d_NOM_GOLD);
|
||||||
|
myAISContext->SetDisplayMode(myOverlappedCylinder,1);
|
||||||
|
|
||||||
TCollection_AsciiString Message("\
|
myAISContext->Display(myOverlappedCylinder);
|
||||||
|
|
||||||
|
TCollection_AsciiString Message("\
|
||||||
gp_Ax2 CylAx2(gp_Pnt(0,0,-100), gp_Dir(gp_Vec(gp_Pnt(0,0,-100),gp_Pnt(0,0,100))));\n\
|
gp_Ax2 CylAx2(gp_Pnt(0,0,-100), gp_Dir(gp_Vec(gp_Pnt(0,0,-100),gp_Pnt(0,0,100))));\n\
|
||||||
Cylinder1 = new User_Cylinder(CylAx2, 80.,200.);\n\
|
Cylinder1 = new User_Cylinder(CylAx2, 80.,200.);\n\
|
||||||
\n\
|
\n\
|
||||||
BRepPrimAPI_MakeCylinder Cylinder2(CylAx2, 80.,200.);\n\
|
BRepPrimAPI_MakeCylinder Cylinder2(CylAx2, 80.,200.);\n\
|
||||||
BRepBuilderAPI_NurbsConvert aNurbsConvert(Cylinder2.Shape());\n\
|
BRepBuilderAPI_NurbsConvert aNurbsConvert(Cylinder2.Shape());\n\
|
||||||
");
|
");
|
||||||
UpdateResultMessageDlg("Create overlapped cylinders",Message);
|
UpdateResultMessageDlg("Create overlapped cylinders",Message);
|
||||||
if(myOffsetDlg && myOffsetDlg->IsWindowVisible())
|
if (myOffsetDlg && myOffsetDlg->IsWindowVisible())
|
||||||
myOffsetDlg->UpdateValues();
|
{
|
||||||
|
myOffsetDlg->UpdateValues();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CViewer3dDoc::OnOverlappedSphere()
|
void CViewer3dDoc::OnOverlappedSphere()
|
||||||
{
|
{
|
||||||
OnSphere();
|
OnSphere();
|
||||||
if(myOverlappedSphere.IsNull()){
|
if(myOverlappedSphere.IsNull()){
|
||||||
BRepPrimAPI_MakeSphere S(gp_Pnt(0,300,0), 100.);
|
BRepPrimAPI_MakeSphere S(gp_Pnt(0,300,0), 100.);
|
||||||
|
|
||||||
BRepBuilderAPI_NurbsConvert aNurbsConvert(S.Shape());
|
BRepBuilderAPI_NurbsConvert aNurbsConvert(S.Shape());
|
||||||
TopoDS_Shape aSphereShape2 = aNurbsConvert.Shape();
|
TopoDS_Shape aSphereShape2 = aNurbsConvert.Shape();
|
||||||
|
|
||||||
myOverlappedSphere = new AIS_Shape(aSphereShape2);
|
myOverlappedSphere = new AIS_Shape(aSphereShape2);
|
||||||
|
|
||||||
myAISContext->SetMaterial(myOverlappedSphere,Graphic3d_NOM_GOLD);
|
myAISContext->SetMaterial(myOverlappedSphere,Graphic3d_NOM_GOLD);
|
||||||
|
|
||||||
myAISContext->SetDisplayMode(myOverlappedSphere,1);
|
myAISContext->SetDisplayMode(myOverlappedSphere,1);
|
||||||
|
|
||||||
myAISContext->Display(myOverlappedSphere);
|
myAISContext->Display(myOverlappedSphere);
|
||||||
|
|
||||||
TCollection_AsciiString Message("\
|
TCollection_AsciiString Message("\
|
||||||
BRepPrimAPI_MakeSphere Sphere1(gp_Pnt(0,300,0), 100.);\n\
|
BRepPrimAPI_MakeSphere Sphere1(gp_Pnt(0,300,0), 100.);\n\
|
||||||
\n\
|
\n\
|
||||||
BRepPrimAPI_MakeSphere Sphere2(gp_Pnt(0,300,0), 100.);\n\
|
BRepPrimAPI_MakeSphere Sphere2(gp_Pnt(0,300,0), 100.);\n\
|
||||||
BRepBuilderAPI_NurbsConvert aNurbsConvert(Sphere2.Shape());\n\
|
BRepBuilderAPI_NurbsConvert aNurbsConvert(Sphere2.Shape());\n\
|
||||||
");
|
");
|
||||||
UpdateResultMessageDlg("Create overlapped spheres",Message);
|
UpdateResultMessageDlg("Create overlapped spheres",Message);
|
||||||
if(myOffsetDlg && myOffsetDlg->IsWindowVisible())
|
if (myOffsetDlg && myOffsetDlg->IsWindowVisible())
|
||||||
myOffsetDlg->UpdateValues();
|
{
|
||||||
|
myOffsetDlg->UpdateValues();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CViewer3dDoc::OnPolygonOffsets()
|
void CViewer3dDoc::OnPolygonOffsets()
|
||||||
{
|
{
|
||||||
|
myOffsetDlg = new COffsetDlg(this);
|
||||||
myOffsetDlg = new COffsetDlg(this);
|
myOffsetDlg->Create(COffsetDlg::IDD,NULL);
|
||||||
myOffsetDlg->Create(COffsetDlg::IDD,NULL);
|
myAISContext->UpdateCurrentViewer();
|
||||||
myAISContext->UpdateCurrentViewer();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CViewer3dDoc::OnUpdatePolygonOffsets(CCmdUI* pCmdUI)
|
void CViewer3dDoc::OnUpdatePolygonOffsets(CCmdUI* pCmdUI)
|
||||||
{
|
{
|
||||||
Standard_Integer aOffsetMode;
|
Standard_Integer aOffsetMode;
|
||||||
Standard_ShortReal aFactor;
|
Standard_ShortReal aFactor;
|
||||||
Standard_ShortReal aCylUnits = 0;
|
Standard_ShortReal aCylUnits = 0;
|
||||||
Standard_ShortReal aSphereUnits = 0;
|
Standard_ShortReal aSphereUnits = 0;
|
||||||
Standard_ShortReal aBoxUnits = 0;
|
Standard_ShortReal aBoxUnits = 0;
|
||||||
|
|
||||||
BOOL IsOverlappedCylinderDisplayed = myAISContext->IsDisplayed(myOverlappedCylinder);
|
BOOL IsOverlappedCylinderDisplayed = myAISContext->IsDisplayed(myOverlappedCylinder);
|
||||||
BOOL IsOverlappedSphereDisplayed = myAISContext->IsDisplayed(myOverlappedSphere);
|
BOOL IsOverlappedSphereDisplayed = myAISContext->IsDisplayed(myOverlappedSphere);
|
||||||
BOOL IsOverlappedBoxDisplayed = myAISContext->IsDisplayed(myOverlappedBox);
|
BOOL IsOverlappedBoxDisplayed = myAISContext->IsDisplayed(myOverlappedBox);
|
||||||
BOOL IsAnyOverlappedObjectDisplayed =
|
BOOL IsAnyOverlappedObjectDisplayed =
|
||||||
IsOverlappedCylinderDisplayed || IsOverlappedSphereDisplayed || IsOverlappedBoxDisplayed;
|
IsOverlappedCylinderDisplayed || IsOverlappedSphereDisplayed || IsOverlappedBoxDisplayed;
|
||||||
|
|
||||||
if(!myOverlappedCylinder.IsNull() && IsOverlappedCylinderDisplayed){
|
|
||||||
myOverlappedCylinder->PolygonOffsets(aOffsetMode,aFactor,aCylUnits);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!myOverlappedSphere.IsNull() && IsOverlappedSphereDisplayed){
|
|
||||||
myOverlappedSphere->PolygonOffsets(aOffsetMode,aFactor,aSphereUnits);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!myOverlappedBox.IsNull() && IsOverlappedBoxDisplayed){
|
if(!myOverlappedCylinder.IsNull() && IsOverlappedCylinderDisplayed){
|
||||||
myOverlappedBox->PolygonOffsets(aOffsetMode,aFactor,aBoxUnits);
|
myOverlappedCylinder->PolygonOffsets(aOffsetMode,aFactor,aCylUnits);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(myOffsetDlg && myOffsetDlg->IsWindowVisible())
|
if(!myOverlappedSphere.IsNull() && IsOverlappedSphereDisplayed){
|
||||||
pCmdUI->SetCheck(TRUE);
|
myOverlappedSphere->PolygonOffsets(aOffsetMode,aFactor,aSphereUnits);
|
||||||
else
|
}
|
||||||
pCmdUI->SetCheck(FALSE);
|
|
||||||
if (IsAnyOverlappedObjectDisplayed)
|
if(!myOverlappedBox.IsNull() && IsOverlappedBoxDisplayed){
|
||||||
if(myOffsetDlg)
|
myOverlappedBox->PolygonOffsets(aOffsetMode,aFactor,aBoxUnits);
|
||||||
pCmdUI->Enable(!myOffsetDlg->IsWindowVisible());
|
}
|
||||||
else
|
|
||||||
pCmdUI->Enable(TRUE);
|
if(myOffsetDlg && myOffsetDlg->IsWindowVisible())
|
||||||
else
|
pCmdUI->SetCheck(TRUE);
|
||||||
pCmdUI->Enable(FALSE);
|
else
|
||||||
|
pCmdUI->SetCheck(FALSE);
|
||||||
|
if (IsAnyOverlappedObjectDisplayed)
|
||||||
|
if(myOffsetDlg)
|
||||||
|
pCmdUI->Enable(!myOffsetDlg->IsWindowVisible());
|
||||||
|
else
|
||||||
|
pCmdUI->Enable(TRUE);
|
||||||
|
else
|
||||||
|
pCmdUI->Enable(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CViewer3dDoc::OnUpdateCylinder(CCmdUI* pCmdUI)
|
void CViewer3dDoc::OnUpdateCylinder(CCmdUI* pCmdUI)
|
||||||
{
|
{
|
||||||
pCmdUI->Enable(myCylinder.IsNull());
|
pCmdUI->Enable(myCylinder.IsNull());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CViewer3dDoc::OnUpdateSphere(CCmdUI* pCmdUI)
|
void CViewer3dDoc::OnUpdateSphere(CCmdUI* pCmdUI)
|
||||||
{
|
{
|
||||||
pCmdUI->Enable(mySphere.IsNull());
|
pCmdUI->Enable(mySphere.IsNull());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CViewer3dDoc::OnUpdateBox(CCmdUI* pCmdUI)
|
void CViewer3dDoc::OnUpdateBox(CCmdUI* pCmdUI)
|
||||||
{
|
{
|
||||||
pCmdUI->Enable(myBox.IsNull());
|
pCmdUI->Enable(myBox.IsNull());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CViewer3dDoc::OnUpdateOverlappedCylinder(CCmdUI* pCmdUI)
|
void CViewer3dDoc::OnUpdateOverlappedCylinder(CCmdUI* pCmdUI)
|
||||||
{
|
{
|
||||||
pCmdUI->Enable (myOverlappedCylinder.IsNull()
|
pCmdUI->Enable (myOverlappedCylinder.IsNull()
|
||||||
|| myCylinder.IsNull());
|
|| myCylinder.IsNull());
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void CViewer3dDoc::OnUpdateOverlappedSphere(CCmdUI* pCmdUI)
|
|
||||||
{
|
|
||||||
pCmdUI->Enable (myOverlappedSphere.IsNull()
|
|
||||||
|| mySphere.IsNull());
|
|
||||||
}
|
|
||||||
|
|
||||||
void CViewer3dDoc::OnUpdateOverlappedBox(CCmdUI* pCmdUI)
|
|
||||||
{
|
|
||||||
pCmdUI->Enable (myOverlappedBox.IsNull()
|
|
||||||
|| myBox.IsNull());
|
|
||||||
}
|
|
||||||
|
|
||||||
void CViewer3dDoc::OnObjectRemove()
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
if(myAISContext->IsCurrent(myBox))
|
|
||||||
myBox.Nullify();
|
|
||||||
|
|
||||||
if(myAISContext->IsCurrent(myCylinder))
|
|
||||||
myCylinder.Nullify();
|
|
||||||
|
|
||||||
if(myAISContext->IsCurrent(mySphere))
|
|
||||||
mySphere.Nullify();
|
|
||||||
|
|
||||||
if(myAISContext->IsCurrent(myOverlappedBox))
|
|
||||||
myOverlappedBox.Nullify();
|
|
||||||
|
|
||||||
if(myAISContext->IsCurrent(myOverlappedCylinder))
|
|
||||||
myOverlappedCylinder.Nullify();
|
|
||||||
|
|
||||||
if(myAISContext->IsCurrent(myOverlappedSphere))
|
|
||||||
myOverlappedSphere.Nullify();
|
|
||||||
|
|
||||||
|
|
||||||
for(myAISContext->InitCurrent();myAISContext->MoreCurrent();myAISContext->InitCurrent())
|
|
||||||
myAISContext->Remove(myAISContext->Current(),Standard_True);
|
|
||||||
|
|
||||||
if(myOffsetDlg && myOffsetDlg->IsWindowVisible())
|
|
||||||
myOffsetDlg->UpdateValues();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CViewer3dDoc::OnObjectErase()
|
void CViewer3dDoc::OnUpdateOverlappedSphere(CCmdUI* pCmdUI)
|
||||||
|
|
||||||
{
|
{
|
||||||
OCC_3dBaseDoc::OnObjectErase();
|
pCmdUI->Enable (myOverlappedSphere.IsNull()
|
||||||
if(myOffsetDlg && myOffsetDlg->IsWindowVisible())
|
|| mySphere.IsNull());
|
||||||
myOffsetDlg->UpdateValues();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CViewer3dDoc::OnObjectDisplayall()
|
void CViewer3dDoc::OnUpdateOverlappedBox(CCmdUI* pCmdUI)
|
||||||
|
{
|
||||||
|
pCmdUI->Enable (myOverlappedBox.IsNull()
|
||||||
|
|| myBox.IsNull());
|
||||||
|
}
|
||||||
|
|
||||||
|
void CViewer3dDoc::OnObjectRemove()
|
||||||
|
{
|
||||||
|
if(myAISContext->IsCurrent(myBox))
|
||||||
|
myBox.Nullify();
|
||||||
|
|
||||||
|
if(myAISContext->IsCurrent(myCylinder))
|
||||||
|
myCylinder.Nullify();
|
||||||
|
|
||||||
|
if(myAISContext->IsCurrent(mySphere))
|
||||||
|
mySphere.Nullify();
|
||||||
|
|
||||||
|
if(myAISContext->IsCurrent(myOverlappedBox))
|
||||||
|
myOverlappedBox.Nullify();
|
||||||
|
|
||||||
|
if(myAISContext->IsCurrent(myOverlappedCylinder))
|
||||||
|
myOverlappedCylinder.Nullify();
|
||||||
|
|
||||||
|
if(myAISContext->IsCurrent(myOverlappedSphere))
|
||||||
|
myOverlappedSphere.Nullify();
|
||||||
|
|
||||||
|
|
||||||
|
for(myAISContext->InitCurrent();myAISContext->MoreCurrent();myAISContext->InitCurrent())
|
||||||
|
myAISContext->Remove(myAISContext->Current(),Standard_True);
|
||||||
|
|
||||||
|
if(myOffsetDlg && myOffsetDlg->IsWindowVisible())
|
||||||
|
myOffsetDlg->UpdateValues();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CViewer3dDoc::OnObjectErase()
|
||||||
|
|
||||||
{
|
{
|
||||||
OCC_3dBaseDoc::OnObjectDisplayall();
|
OCC_3dBaseDoc::OnObjectErase();
|
||||||
if(myOffsetDlg && myOffsetDlg->IsWindowVisible())
|
if(myOffsetDlg && myOffsetDlg->IsWindowVisible())
|
||||||
myOffsetDlg->UpdateValues();
|
myOffsetDlg->UpdateValues();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CViewer3dDoc::OnObjectDisplayall()
|
||||||
|
|
||||||
|
{
|
||||||
|
OCC_3dBaseDoc::OnObjectDisplayall();
|
||||||
|
if(myOffsetDlg && myOffsetDlg->IsWindowVisible())
|
||||||
|
myOffsetDlg->UpdateValues();
|
||||||
}
|
}
|
||||||
|
|
||||||
Handle_User_Cylinder CViewer3dDoc::GetCylinder()
|
Handle_User_Cylinder CViewer3dDoc::GetCylinder()
|
||||||
{
|
{
|
||||||
return myCylinder;
|
return myCylinder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Handle_AIS_Shape CViewer3dDoc::GetSphere()
|
Handle_AIS_Shape CViewer3dDoc::GetSphere()
|
||||||
{
|
{
|
||||||
return mySphere;
|
return mySphere;
|
||||||
}
|
}
|
||||||
|
|
||||||
Handle_AIS_Shape CViewer3dDoc::GetBox()
|
Handle_AIS_Shape CViewer3dDoc::GetBox()
|
||||||
{
|
{
|
||||||
return myBox;
|
return myBox;
|
||||||
}
|
}
|
||||||
|
|
||||||
Handle_AIS_Shape CViewer3dDoc::GetOverlappedCylinder()
|
Handle_AIS_Shape CViewer3dDoc::GetOverlappedCylinder()
|
||||||
{
|
{
|
||||||
return myOverlappedCylinder;
|
return myOverlappedCylinder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Handle_AIS_Shape CViewer3dDoc::GetOverlappedSphere()
|
Handle_AIS_Shape CViewer3dDoc::GetOverlappedSphere()
|
||||||
{
|
{
|
||||||
return myOverlappedSphere;
|
return myOverlappedSphere;
|
||||||
}
|
}
|
||||||
|
|
||||||
Handle_AIS_Shape CViewer3dDoc::GetOverlappedBox()
|
Handle_AIS_Shape CViewer3dDoc::GetOverlappedBox()
|
||||||
{
|
{
|
||||||
return myOverlappedBox;
|
return myOverlappedBox;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CViewer3dDoc::DragEvent(const Standard_Integer x ,
|
void CViewer3dDoc::DragEvent (const Standard_Integer theX,
|
||||||
const Standard_Integer y ,
|
const Standard_Integer theY,
|
||||||
const Standard_Integer TheState ,
|
const Standard_Integer theState,
|
||||||
const Handle(V3d_View)& aView )
|
const Handle(V3d_View)& theView)
|
||||||
{
|
{
|
||||||
OCC_3dBaseDoc::DragEvent(x,y, TheState,aView);
|
OCC_3dBaseDoc::DragEvent (theX, theY, theState, theView);
|
||||||
if(myOffsetDlg && myOffsetDlg->IsWindowVisible())
|
if(myOffsetDlg && myOffsetDlg->IsWindowVisible())
|
||||||
myOffsetDlg->UpdateValues();
|
myOffsetDlg->UpdateValues();
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------------------
|
||||||
@ -592,12 +573,12 @@ void CViewer3dDoc::InputEvent(const Standard_Integer /*x*/,
|
|||||||
//-----------------------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
//-----------------------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------------------
|
||||||
void CViewer3dDoc::ShiftDragEvent(const Standard_Integer x ,
|
void CViewer3dDoc::ShiftDragEvent (const Standard_Integer theX,
|
||||||
const Standard_Integer y ,
|
const Standard_Integer theY,
|
||||||
const Standard_Integer TheState ,
|
const Standard_Integer theState,
|
||||||
const Handle(V3d_View)& aView )
|
const Handle(V3d_View)& theView)
|
||||||
{
|
{
|
||||||
OCC_3dBaseDoc::ShiftDragEvent(x,y,TheState,aView);
|
OCC_3dBaseDoc::ShiftDragEvent(theX, theY, theState, theView);
|
||||||
if(myOffsetDlg && myOffsetDlg->IsWindowVisible())
|
if(myOffsetDlg && myOffsetDlg->IsWindowVisible())
|
||||||
myOffsetDlg->UpdateValues();
|
myOffsetDlg->UpdateValues();
|
||||||
}
|
}
|
||||||
@ -606,17 +587,16 @@ void CViewer3dDoc::ShiftDragEvent(const Standard_Integer x ,
|
|||||||
//-----------------------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
//-----------------------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------------------
|
||||||
|
void CViewer3dDoc::ShiftInputEvent (const Standard_Integer theX,
|
||||||
void CViewer3dDoc::ShiftInputEvent(const Standard_Integer x ,
|
const Standard_Integer theY,
|
||||||
const Standard_Integer y ,
|
const Handle(V3d_View)& theView)
|
||||||
const Handle(V3d_View)& aView )
|
|
||||||
{
|
{
|
||||||
OCC_3dBaseDoc::ShiftInputEvent(x,y,aView);
|
OCC_3dBaseDoc::ShiftInputEvent (theX, theY, theView);
|
||||||
if(myOffsetDlg && myOffsetDlg->IsWindowVisible())
|
if(myOffsetDlg && myOffsetDlg->IsWindowVisible())
|
||||||
myOffsetDlg->UpdateValues();
|
myOffsetDlg->UpdateValues();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CViewer3dDoc::OnObjectColoredMesh()
|
void CViewer3dDoc::OnObjectColoredMesh()
|
||||||
{
|
{
|
||||||
for(myAISContext->InitCurrent();myAISContext->MoreCurrent();myAISContext->NextCurrent())
|
for(myAISContext->InitCurrent();myAISContext->MoreCurrent();myAISContext->NextCurrent())
|
||||||
if (myAISContext->Current()->IsKind(STANDARD_TYPE(User_Cylinder)))
|
if (myAISContext->Current()->IsKind(STANDARD_TYPE(User_Cylinder)))
|
||||||
@ -627,70 +607,69 @@ void CViewer3dDoc::OnObjectColoredMesh()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CViewer3dDoc::OnUpdateObjectColoredMesh(CCmdUI* pCmdUI)
|
void CViewer3dDoc::OnUpdateObjectColoredMesh(CCmdUI* pCmdUI)
|
||||||
{
|
{
|
||||||
bool CylinderIsCurrentAndDisplayed = false;
|
bool CylinderIsCurrentAndDisplayed = false;
|
||||||
for (myAISContext->InitCurrent();myAISContext->MoreCurrent ();myAISContext->NextCurrent ())
|
for (myAISContext->InitCurrent();myAISContext->MoreCurrent ();myAISContext->NextCurrent ())
|
||||||
if(myAISContext->Current()->IsKind(STANDARD_TYPE(User_Cylinder)))
|
if(myAISContext->Current()->IsKind(STANDARD_TYPE(User_Cylinder)))
|
||||||
CylinderIsCurrentAndDisplayed=true;
|
CylinderIsCurrentAndDisplayed=true;
|
||||||
pCmdUI->Enable (CylinderIsCurrentAndDisplayed);
|
pCmdUI->Enable (CylinderIsCurrentAndDisplayed);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CViewer3dDoc::OnUpdateObjectWireframe(CCmdUI* pCmdUI)
|
void CViewer3dDoc::OnUpdateObjectWireframe(CCmdUI* pCmdUI)
|
||||||
{
|
{
|
||||||
bool OneOrMoreInShadingOrColoredMesh = false;
|
bool OneOrMoreInShadingOrColoredMesh = false;
|
||||||
for (myAISContext->InitCurrent();myAISContext->MoreCurrent ();myAISContext->NextCurrent ())
|
for (myAISContext->InitCurrent();myAISContext->MoreCurrent ();myAISContext->NextCurrent ())
|
||||||
if (myAISContext->IsDisplayed(myAISContext->Current(),1) || myAISContext->IsDisplayed(myAISContext->Current(),6))
|
if (myAISContext->IsDisplayed(myAISContext->Current(),1) || myAISContext->IsDisplayed(myAISContext->Current(),6))
|
||||||
OneOrMoreInShadingOrColoredMesh=true;
|
OneOrMoreInShadingOrColoredMesh=true;
|
||||||
pCmdUI->Enable (OneOrMoreInShadingOrColoredMesh);
|
pCmdUI->Enable (OneOrMoreInShadingOrColoredMesh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CViewer3dDoc::OnUpdateObjectShading(CCmdUI* pCmdUI)
|
void CViewer3dDoc::OnUpdateObjectShading(CCmdUI* pCmdUI)
|
||||||
{
|
{
|
||||||
bool OneOrMoreInWireframeOrColoredMesh = false;
|
bool OneOrMoreInWireframeOrColoredMesh = false;
|
||||||
for (myAISContext->InitCurrent();myAISContext->MoreCurrent ();myAISContext->NextCurrent ())
|
for (myAISContext->InitCurrent();myAISContext->MoreCurrent ();myAISContext->NextCurrent ())
|
||||||
if (myAISContext->IsDisplayed(myAISContext->Current(),0) || myAISContext->IsDisplayed(myAISContext->Current(),6))
|
if (myAISContext->IsDisplayed(myAISContext->Current(),0) || myAISContext->IsDisplayed(myAISContext->Current(),6))
|
||||||
OneOrMoreInWireframeOrColoredMesh=true;
|
OneOrMoreInWireframeOrColoredMesh=true;
|
||||||
pCmdUI->Enable (OneOrMoreInWireframeOrColoredMesh);
|
pCmdUI->Enable (OneOrMoreInWireframeOrColoredMesh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CViewer3dDoc::OnOptionsTrihedronDynamicTrihedron()
|
||||||
void CViewer3dDoc::OnOptionsTrihedronDynamicTrihedron()
|
|
||||||
{
|
{
|
||||||
if (myAISContext -> IsDisplayed(myTrihedron))
|
if (myAISContext -> IsDisplayed(myTrihedron))
|
||||||
{
|
{
|
||||||
myAISContext->Remove(myTrihedron);
|
myAISContext->Remove(myTrihedron);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Handle(Geom_Axis2Placement) myTrihedronAxis=new Geom_Axis2Placement(gp::XOY());
|
Handle(Geom_Axis2Placement) myTrihedronAxis=new Geom_Axis2Placement(gp::XOY());
|
||||||
myTrihedron=new AIS_Trihedron(myTrihedronAxis);
|
myTrihedron=new AIS_Trihedron(myTrihedronAxis);
|
||||||
myAISContext->SetTrihedronSize(200, Standard_True);
|
myAISContext->SetTrihedronSize(200, Standard_True);
|
||||||
myAISContext->Display(myTrihedron);
|
myAISContext->Display(myTrihedron);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CViewer3dDoc::OnUpdateOptionsTrihedronDynamicTrihedron(CCmdUI* pCmdUI)
|
void CViewer3dDoc::OnUpdateOptionsTrihedronDynamicTrihedron(CCmdUI* pCmdUI)
|
||||||
{
|
{
|
||||||
if (myAISContext->IsDisplayed(myTrihedron))
|
if (myAISContext->IsDisplayed(myTrihedron))
|
||||||
pCmdUI->SetCheck(1);
|
pCmdUI->SetCheck(1);
|
||||||
else
|
else
|
||||||
pCmdUI->SetCheck(0);
|
pCmdUI->SetCheck(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CViewer3dDoc::SetMyStaticTrihedronAxisIsDisplayed(BOOL IsDisplayed)
|
void CViewer3dDoc::SetMyStaticTrihedronAxisIsDisplayed(BOOL IsDisplayed)
|
||||||
{
|
{
|
||||||
myStaticTrihedronAxisIsDisplayed = IsDisplayed;
|
myStaticTrihedronAxisIsDisplayed = IsDisplayed;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CViewer3dDoc::OnUpdateOptionsTrihedronStaticTrihedron(CCmdUI* pCmdUI)
|
void CViewer3dDoc::OnUpdateOptionsTrihedronStaticTrihedron(CCmdUI* pCmdUI)
|
||||||
{
|
{
|
||||||
if (myStaticTrihedronAxisIsDisplayed)
|
if (myStaticTrihedronAxisIsDisplayed)
|
||||||
pCmdUI->SetCheck(1);
|
pCmdUI->SetCheck(1);
|
||||||
else
|
else
|
||||||
pCmdUI->SetCheck(0);
|
pCmdUI->SetCheck(0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CViewer3dDoc::Popup (const Standard_Integer x,
|
void CViewer3dDoc::Popup (const Standard_Integer x,
|
||||||
@ -791,22 +770,19 @@ void CViewer3dDoc::OnFillet3d()
|
|||||||
myAISContext->InitSelected();
|
myAISContext->InitSelected();
|
||||||
if (myAISContext->MoreSelected())
|
if (myAISContext->MoreSelected())
|
||||||
{
|
{
|
||||||
Handle(AIS_Shape) S = Handle(AIS_Shape)::DownCast (myAISContext->SelectedInteractive());
|
const Handle(AIS_Shape)& aSelInteractive = Handle(AIS_Shape)::DownCast (myAISContext->SelectedInteractive());
|
||||||
|
if (aSelInteractive.IsNull())
|
||||||
if (S.IsNull())
|
|
||||||
{
|
{
|
||||||
AfxMessageBox (L"It is necessary to activate the edges selection mode\n"
|
AfxMessageBox (L"It is necessary to activate the edges selection mode\n"
|
||||||
L"and select edges on an object before \nrunning this function");
|
L"and select edges on an object before \nrunning this function");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
TopoDS_Shape Sh=S->Shape();
|
BRepFilletAPI_MakeFillet aFillet (aSelInteractive->Shape());
|
||||||
|
|
||||||
BRepFilletAPI_MakeFillet aFillet(Sh);
|
|
||||||
|
|
||||||
for (myAISContext->InitSelected(); myAISContext->MoreSelected(); myAISContext->NextSelected())
|
for (myAISContext->InitSelected(); myAISContext->MoreSelected(); myAISContext->NextSelected())
|
||||||
{
|
{
|
||||||
TopoDS_Shape aSelShape = myAISContext->SelectedShape();
|
const TopoDS_Shape& aSelShape = myAISContext->SelectedShape();
|
||||||
if (aSelShape.ShapeType() != TopAbs_EDGE)
|
if (aSelShape.ShapeType() != TopAbs_EDGE)
|
||||||
{
|
{
|
||||||
AfxMessageBox (L"It is necessary to activate the edges selection mode\n"
|
AfxMessageBox (L"It is necessary to activate the edges selection mode\n"
|
||||||
@ -815,13 +791,16 @@ void CViewer3dDoc::OnFillet3d()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BoxRadius dlg(NULL,10.);
|
BoxRadius aDialog (NULL,10.);
|
||||||
if (dlg.DoModal() == IDOK)
|
if (aDialog.DoModal() == IDOK)
|
||||||
{
|
{
|
||||||
for (myAISContext->InitSelected(); myAISContext->MoreSelected(); myAISContext->NextSelected())
|
for (myAISContext->InitSelected(); myAISContext->MoreSelected(); myAISContext->NextSelected())
|
||||||
{
|
{
|
||||||
TopoDS_Edge anEdge = TopoDS::Edge(myAISContext->SelectedShape());
|
// Selected shape has its own location, and sub-shapes in the solid shape for fillet building
|
||||||
aFillet.Add(dlg.m_radius,anEdge);
|
// don't have own locations. Fillet builder needs to know that input edge is just the same one as
|
||||||
|
// some sub-shape in our target solid shape, so no location is to be in input edge for fillet builder.
|
||||||
|
TopoDS_Shape aSelShape = myAISContext->SelectedShape().Located (TopLoc_Location());
|
||||||
|
aFillet.Add (aDialog.m_radius, TopoDS::Edge (aSelShape) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -840,8 +819,8 @@ void CViewer3dDoc::OnFillet3d()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
S ->Set (aNewShape);
|
aSelInteractive ->Set (aNewShape);
|
||||||
myAISContext->Redisplay (S);
|
myAISContext->Redisplay (aSelInteractive);
|
||||||
}
|
}
|
||||||
|
|
||||||
myCResultDialog.SetTitle("Make a fillet");
|
myCResultDialog.SetTitle("Make a fillet");
|
||||||
|
@ -25,127 +25,130 @@ class OCCDemo_Presentation;
|
|||||||
|
|
||||||
class CViewer3dDoc : public OCC_3dDoc
|
class CViewer3dDoc : public OCC_3dDoc
|
||||||
{
|
{
|
||||||
DECLARE_DYNCREATE(CViewer3dDoc)
|
DECLARE_DYNCREATE(CViewer3dDoc)
|
||||||
|
|
||||||
protected: // create from serialization only
|
protected: // create from serialization only
|
||||||
CViewer3dDoc();
|
CViewer3dDoc();
|
||||||
void InitViewButtons();
|
void InitViewButtons();
|
||||||
void DoSample();
|
void DoSample();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void SetMyStaticTrihedronAxisIsDisplayed(BOOL IsDisplayed);
|
void SetMyStaticTrihedronAxisIsDisplayed(BOOL IsDisplayed);
|
||||||
Handle_AIS_Shape GetBox();
|
Handle_AIS_Shape GetBox();
|
||||||
Handle_AIS_Shape GetSphere();
|
Handle_AIS_Shape GetSphere();
|
||||||
Handle_User_Cylinder GetCylinder();
|
Handle_User_Cylinder GetCylinder();
|
||||||
Handle_AIS_Shape GetOverlappedBox();
|
Handle_AIS_Shape GetOverlappedBox();
|
||||||
Handle_AIS_Shape GetOverlappedSphere();
|
Handle_AIS_Shape GetOverlappedSphere();
|
||||||
Handle_AIS_Shape GetOverlappedCylinder();
|
Handle_AIS_Shape GetOverlappedCylinder();
|
||||||
void Start();
|
void Start();
|
||||||
Standard_CString GetDataDir() {return myDataDir;}
|
Standard_CString GetDataDir() {return myDataDir;}
|
||||||
static void Fit();
|
static void Fit();
|
||||||
|
|
||||||
virtual ~CViewer3dDoc();
|
virtual ~CViewer3dDoc();
|
||||||
void UpdateResultMessageDlg (CString theTitle, const TCollection_AsciiString& theMessage);
|
void UpdateResultMessageDlg (CString theTitle, const TCollection_AsciiString& theMessage);
|
||||||
void UpdateResultMessageDlg (CString theTitle, CString theMessage);
|
void UpdateResultMessageDlg (CString theTitle, CString theMessage);
|
||||||
virtual BOOL OnNewDocument();
|
virtual BOOL OnNewDocument();
|
||||||
virtual void Popup (const Standard_Integer x ,
|
virtual void Popup (const Standard_Integer x,
|
||||||
const Standard_Integer y ,
|
const Standard_Integer y,
|
||||||
const Handle(V3d_View)& aView );
|
const Handle(V3d_View)& aView);
|
||||||
|
|
||||||
virtual void DragEvent (const Standard_Integer x ,
|
virtual void DragEvent (const Standard_Integer x,
|
||||||
const Standard_Integer y ,
|
const Standard_Integer y,
|
||||||
const Standard_Integer TheState,
|
const Standard_Integer TheState,
|
||||||
const Handle(V3d_View)& aView );
|
const Handle(V3d_View)& aView);
|
||||||
virtual void InputEvent (const Standard_Integer x ,
|
|
||||||
const Standard_Integer y ,
|
virtual void InputEvent (const Standard_Integer x,
|
||||||
const Handle(V3d_View)& aView );
|
const Standard_Integer y,
|
||||||
virtual void ShiftDragEvent (const Standard_Integer x ,
|
const Handle(V3d_View)& aView);
|
||||||
const Standard_Integer y ,
|
|
||||||
const Standard_Integer TheState,
|
virtual void ShiftDragEvent (const Standard_Integer x,
|
||||||
const Handle(V3d_View)& aView );
|
const Standard_Integer y,
|
||||||
virtual void ShiftInputEvent(const Standard_Integer x ,
|
const Standard_Integer TheState,
|
||||||
const Standard_Integer y ,
|
const Handle(V3d_View)& aView);
|
||||||
const Handle(V3d_View)& aView );
|
|
||||||
|
virtual void ShiftInputEvent (const Standard_Integer x,
|
||||||
|
const Standard_Integer y,
|
||||||
|
const Handle(V3d_View)& aView);
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
virtual void AssertValid() const;
|
virtual void AssertValid() const;
|
||||||
virtual void Dump(CDumpContext& dc) const;
|
virtual void Dump(CDumpContext& dc) const;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Generated message map functions
|
// Generated message map functions
|
||||||
protected:
|
protected:
|
||||||
BOOL myStaticTrihedronAxisIsDisplayed;
|
BOOL myStaticTrihedronAxisIsDisplayed;
|
||||||
//{{AFX_MSG(CViewer3dDoc)
|
//{{AFX_MSG(CViewer3dDoc)
|
||||||
afx_msg void OnBox();
|
afx_msg void OnBox();
|
||||||
afx_msg void OnCylinder();
|
afx_msg void OnCylinder();
|
||||||
afx_msg void OnSphere();
|
afx_msg void OnSphere();
|
||||||
afx_msg void OnRemoveAll();
|
afx_msg void OnRemoveAll();
|
||||||
afx_msg void OnNbisos();
|
afx_msg void OnNbisos();
|
||||||
afx_msg void OnFaces();
|
afx_msg void OnFaces();
|
||||||
afx_msg void OnEdges();
|
afx_msg void OnEdges();
|
||||||
afx_msg void OnVertices();
|
afx_msg void OnVertices();
|
||||||
afx_msg void OnNeutral();
|
afx_msg void OnNeutral();
|
||||||
afx_msg void OnUsercylinderChangefacecolor();
|
afx_msg void OnUsercylinderChangefacecolor();
|
||||||
afx_msg void OnFillet3d();
|
afx_msg void OnFillet3d();
|
||||||
afx_msg void OnCircle();
|
afx_msg void OnCircle();
|
||||||
afx_msg void OnLine();
|
afx_msg void OnLine();
|
||||||
afx_msg void OnOverlappedBox();
|
afx_msg void OnOverlappedBox();
|
||||||
afx_msg void OnOverlappedCylinder();
|
afx_msg void OnOverlappedCylinder();
|
||||||
afx_msg void OnOverlappedSphere();
|
afx_msg void OnOverlappedSphere();
|
||||||
afx_msg void OnPolygonOffsets();
|
afx_msg void OnPolygonOffsets();
|
||||||
afx_msg void OnUpdatePolygonOffsets(CCmdUI* pCmdUI);
|
afx_msg void OnUpdatePolygonOffsets(CCmdUI* pCmdUI);
|
||||||
afx_msg void OnUpdateCylinder(CCmdUI* pCmdUI);
|
afx_msg void OnUpdateCylinder(CCmdUI* pCmdUI);
|
||||||
afx_msg void OnUpdateSphere(CCmdUI* pCmdUI);
|
afx_msg void OnUpdateSphere(CCmdUI* pCmdUI);
|
||||||
afx_msg void OnUpdateBox(CCmdUI* pCmdUI);
|
afx_msg void OnUpdateBox(CCmdUI* pCmdUI);
|
||||||
afx_msg void OnUpdateOverlappedCylinder(CCmdUI* pCmdUI);
|
afx_msg void OnUpdateOverlappedCylinder(CCmdUI* pCmdUI);
|
||||||
afx_msg void OnUpdateOverlappedSphere(CCmdUI* pCmdUI);
|
afx_msg void OnUpdateOverlappedSphere(CCmdUI* pCmdUI);
|
||||||
afx_msg void OnUpdateOverlappedBox(CCmdUI* pCmdUI);
|
afx_msg void OnUpdateOverlappedBox(CCmdUI* pCmdUI);
|
||||||
afx_msg void OnObjectRemove();
|
afx_msg void OnObjectRemove();
|
||||||
afx_msg void OnObjectErase();
|
afx_msg void OnObjectErase();
|
||||||
afx_msg void OnObjectDisplayall();
|
afx_msg void OnObjectDisplayall();
|
||||||
afx_msg void OnObjectColoredMesh();
|
afx_msg void OnObjectColoredMesh();
|
||||||
afx_msg void OnUpdateObjectColoredMesh(CCmdUI* pCmdUI);
|
afx_msg void OnUpdateObjectColoredMesh(CCmdUI* pCmdUI);
|
||||||
afx_msg void OnUpdateObjectShading(CCmdUI* pCmdUI);
|
afx_msg void OnUpdateObjectShading(CCmdUI* pCmdUI);
|
||||||
afx_msg void OnUpdateObjectWireframe(CCmdUI* pCmdUI);
|
afx_msg void OnUpdateObjectWireframe(CCmdUI* pCmdUI);
|
||||||
afx_msg void OnOptionsTrihedronDynamicTrihedron();
|
afx_msg void OnOptionsTrihedronDynamicTrihedron();
|
||||||
afx_msg void OnUpdateOptionsTrihedronDynamicTrihedron(CCmdUI* pCmdUI);
|
afx_msg void OnUpdateOptionsTrihedronDynamicTrihedron(CCmdUI* pCmdUI);
|
||||||
afx_msg void OnUpdateOptionsTrihedronStaticTrihedron(CCmdUI* pCmdUI);
|
afx_msg void OnUpdateOptionsTrihedronStaticTrihedron(CCmdUI* pCmdUI);
|
||||||
afx_msg void OnTextureOn();
|
afx_msg void OnTextureOn();
|
||||||
afx_msg void OnBUTTONNext();
|
afx_msg void OnBUTTONNext();
|
||||||
afx_msg void OnBUTTONStart();
|
afx_msg void OnBUTTONStart();
|
||||||
afx_msg void OnBUTTONRepeat();
|
afx_msg void OnBUTTONRepeat();
|
||||||
afx_msg void OnBUTTONPrev();
|
afx_msg void OnBUTTONPrev();
|
||||||
afx_msg void OnBUTTONEnd();
|
afx_msg void OnBUTTONEnd();
|
||||||
afx_msg void OnUpdateBUTTONNext(CCmdUI* pCmdUI);
|
afx_msg void OnUpdateBUTTONNext(CCmdUI* pCmdUI);
|
||||||
afx_msg void OnUpdateBUTTONPrev(CCmdUI* pCmdUI);
|
afx_msg void OnUpdateBUTTONPrev(CCmdUI* pCmdUI);
|
||||||
afx_msg void OnUpdateBUTTONStart(CCmdUI* pCmdUI);
|
afx_msg void OnUpdateBUTTONStart(CCmdUI* pCmdUI);
|
||||||
afx_msg void OnUpdateBUTTONRepeat(CCmdUI* pCmdUI);
|
afx_msg void OnUpdateBUTTONRepeat(CCmdUI* pCmdUI);
|
||||||
afx_msg void OnUpdateBUTTONEnd(CCmdUI* pCmdUI);
|
afx_msg void OnUpdateBUTTONEnd(CCmdUI* pCmdUI);
|
||||||
afx_msg void OnFileNew();
|
afx_msg void OnFileNew();
|
||||||
afx_msg void OnBUTTONShowResult();
|
afx_msg void OnBUTTONShowResult();
|
||||||
afx_msg void OnDumpView();
|
afx_msg void OnDumpView();
|
||||||
//}}AFX_MSG
|
//}}AFX_MSG
|
||||||
DECLARE_MESSAGE_MAP()
|
DECLARE_MESSAGE_MAP()
|
||||||
|
|
||||||
//Attributes
|
//Attributes
|
||||||
protected:
|
protected:
|
||||||
int myState;
|
int myState;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
COffsetDlg* myOffsetDlg;
|
COffsetDlg* myOffsetDlg;
|
||||||
|
|
||||||
Handle_User_Cylinder myCylinder;
|
Handle_User_Cylinder myCylinder;
|
||||||
Handle_AIS_Shape mySphere;
|
Handle_AIS_Shape mySphere;
|
||||||
Handle_AIS_Shape myBox;
|
Handle_AIS_Shape myBox;
|
||||||
Handle_AIS_Shape myOverlappedCylinder;
|
Handle_AIS_Shape myOverlappedCylinder;
|
||||||
Handle_AIS_Shape myOverlappedSphere;
|
Handle_AIS_Shape myOverlappedSphere;
|
||||||
Handle_AIS_Shape myOverlappedBox;
|
Handle_AIS_Shape myOverlappedBox;
|
||||||
Handle_AIS_Trihedron myTrihedron;
|
Handle_AIS_Trihedron myTrihedron;
|
||||||
|
|
||||||
OCCDemo_Presentation *myPresentation;
|
OCCDemo_Presentation *myPresentation;
|
||||||
char myDataDir[5]; // for "Data\0"
|
char myDataDir[5]; // for "Data\0"
|
||||||
char myLastPath[MAX_PATH]; // directory of lastly saved file in DumpView()
|
char myLastPath[MAX_PATH]; // directory of lastly saved file in DumpView()
|
||||||
bool isTextureSampleStarted;
|
bool isTextureSampleStarted;
|
||||||
};
|
};
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -655,8 +655,9 @@ void CViewer3dView::OnMouseMove(UINT nFlags, CPoint point)
|
|||||||
switch (myCurrentMode)
|
switch (myCurrentMode)
|
||||||
{
|
{
|
||||||
case CurAction3d_Nothing :
|
case CurAction3d_Nothing :
|
||||||
myXmax = point.x; myYmax = point.y;
|
|
||||||
DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False);
|
DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False);
|
||||||
|
myXmax = point.x; myYmax = point.y;
|
||||||
if (nFlags & MK_SHIFT)
|
if (nFlags & MK_SHIFT)
|
||||||
GetDocument()->ShiftDragEvent(myXmax,myYmax,0,myView);
|
GetDocument()->ShiftDragEvent(myXmax,myYmax,0,myView);
|
||||||
else
|
else
|
||||||
|
@ -1,108 +0,0 @@
|
|||||||
//{{NO_DEPENDENCIES}}
|
|
||||||
// Microsoft Visual C++ generated include file.
|
|
||||||
// Used by Viewer3d.rc
|
|
||||||
//
|
|
||||||
#define IDD_SHADINGMODEL 131
|
|
||||||
#define IDD_SETOFFSETS 134
|
|
||||||
#define IDD_SCALE 139
|
|
||||||
#define IDD_RADIUS 144
|
|
||||||
#define IDD_ZCLIPPING 152
|
|
||||||
#define IDD_ZCUEING 153
|
|
||||||
#define IDD_TRIHEDRON 542
|
|
||||||
#define ID_BOX 802
|
|
||||||
#define ID_Cylinder 803
|
|
||||||
#define ID_SPHERE 804
|
|
||||||
#define ID_ERASEALL 805
|
|
||||||
#define ID_AMBIENT_LIGHT 806
|
|
||||||
#define ID_DIRECTIONAL_LIGHT 807
|
|
||||||
#define ID_POSITIONAL_LIGHT 808
|
|
||||||
#define ID_SPOT_LIGHT 809
|
|
||||||
#define ID_LIGHTOFF 810
|
|
||||||
#define ID_USERCYLINDER_CHANGEFACECOLOR 810
|
|
||||||
#define ID_ZCLIPPING 812
|
|
||||||
#define ID_ZCUEING 813
|
|
||||||
#define ID_SHADINGMODEL 814
|
|
||||||
#define ID_ANTIALIASINGONOFF 815
|
|
||||||
#define ID_CLEAR_LIGHTS 816
|
|
||||||
#define ID_MODELCLIPPING 817
|
|
||||||
#define ID_OVERLAPPED_BOX 818
|
|
||||||
#define ID_BUTTON819 819
|
|
||||||
#define ID_OVERLAPPED_SPHERE 820
|
|
||||||
#define ID_BUTTON821 821
|
|
||||||
#define ID_OVERLAPPED_CYLINDER 822
|
|
||||||
#define ID_POLYGON_OFFSETS 823
|
|
||||||
#define ID_OBJECT_COLORED_MESH 827
|
|
||||||
#define ID_OPTIONS_TRIHEDRON_STATIC_TRIHEDRON 829
|
|
||||||
#define ID_OPTIONS_TRIHEDRON_DYNAMIC_TRIHEDRON 830
|
|
||||||
#define ID_SCALE 831
|
|
||||||
#define ID_CIRCLE 833
|
|
||||||
#define ID_LINE 834
|
|
||||||
#define ID_VERTICES 837
|
|
||||||
#define ID_EDGES 838
|
|
||||||
#define ID_FACES 839
|
|
||||||
#define ID_NEUTRAL 840
|
|
||||||
#define ID_FILLET3D 841
|
|
||||||
#define ID_NBISOS 842
|
|
||||||
#define ID_BUTTONStart 843
|
|
||||||
#define ID_BUTTONPrev 844
|
|
||||||
#define ID_BUTTONRepeat 845
|
|
||||||
#define ID_BUTTONNext 846
|
|
||||||
#define ID_BUTTONEnd 847
|
|
||||||
#define ID_DUMP_VIEW 848
|
|
||||||
#define ID_TEXTURE_ON 849
|
|
||||||
#define IDC_SPIN_RADIUS 1000
|
|
||||||
#define IDC_EDIT_RADIUS 1001
|
|
||||||
#define IDC_SHADINGMODEL_COLOR 1002
|
|
||||||
#define IDC_EDIT_ISOU 1002
|
|
||||||
#define IDC_SHADINGMODEL_MULTICOLOR 1003
|
|
||||||
#define IDC_SLIDER_MODELCLIPPING_Z 1003
|
|
||||||
#define IDC_SHADINGMODEL_FLAT 1004
|
|
||||||
#define IDC_ISOU 1004
|
|
||||||
#define IDC_SHADINGMODEL_HIDDEN 1005
|
|
||||||
#define IDC_EDIT_MODELCLIPPING_Z 1005
|
|
||||||
#define IDC_ISOV 1005
|
|
||||||
#define IDC_SHADINGMODEL_GOURAUD 1006
|
|
||||||
#define IDC_EDIT_ISOV 1006
|
|
||||||
#define IDC_SHADINGMODEL_PHONG 1007
|
|
||||||
#define IDC_CHECK_MODELCLIPPINGONOFF 1008
|
|
||||||
#define IDC_SLIDER_OFFSETFACTOR 1010
|
|
||||||
#define IDC_SLIDER_OFFSETUNITS 1011
|
|
||||||
#define IDC_EDIT_OFFSETFACTOR 1012
|
|
||||||
#define IDC_EDIT_OFFSETUNITS 1013
|
|
||||||
#define IDC_COMBO_OFFSETTYPE 1023
|
|
||||||
#define IDC_SLIDER_SCALEX 1028
|
|
||||||
#define IDC_SLIDER_SCALEY 1029
|
|
||||||
#define IDC_EDIT_SCALEX 1030
|
|
||||||
#define IDC_EDIT_SCALEY 1031
|
|
||||||
#define IDC_RadiusFillet 1031
|
|
||||||
#define IDC_SLIDER_SCALEZ 1032
|
|
||||||
#define IDC_EDIT_SCALEZ 1033
|
|
||||||
#define IDD_RESULTMESSAGEDLG 1500
|
|
||||||
#define IDD_MODELCLIPPING 1501
|
|
||||||
#define IDD_ISOS 1502
|
|
||||||
#define IDC_COMBO_ZCLIPPINGTYPE 1650
|
|
||||||
#define IDC_CHECK_CUEINGONOFF 1651
|
|
||||||
#define IDC_EDITTRIHEDRSCALE 1686
|
|
||||||
#define IDC_SPINTRIHEDRSCALE 1737
|
|
||||||
#define IDC_COMBOTRIHEDRPOS 1739
|
|
||||||
#define IDC_COMBOTRIHEDRCOLOR 1740
|
|
||||||
#define IDC_SLIDER_ZCLIPPINGDEPTH 2004
|
|
||||||
#define IDC_SLIDER_ZCLIPPINGWIDTH 2005
|
|
||||||
#define IDC_EDIT_ZCLIPPINGDEPTH 2006
|
|
||||||
#define IDC_EDIT_ZCLIPPINGWIDTH 2007
|
|
||||||
#define IDC_SLIDER_ZCUEINGDEPTH 2009
|
|
||||||
#define IDC_SLIDER_ZCUEINGWIDTH 2010
|
|
||||||
#define IDC_EDIT_ZCUEINGDEPTH 2011
|
|
||||||
#define IDC_EDIT_ZCUEINGWIDTH 2012
|
|
||||||
|
|
||||||
// Next default values for new objects
|
|
||||||
//
|
|
||||||
#ifdef APSTUDIO_INVOKED
|
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
|
||||||
#define _APS_3D_CONTROLS 1
|
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 140
|
|
||||||
#define _APS_NEXT_COMMAND_VALUE 850
|
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1032
|
|
||||||
#define _APS_NEXT_SYMED_VALUE 104
|
|
||||||
#endif
|
|
||||||
#endif
|
|
@ -22,9 +22,9 @@ static char THIS_FILE[] = __FILE__;
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// CImportExportDoc
|
// CImportExportDoc
|
||||||
|
|
||||||
IMPLEMENT_DYNCREATE(CImportExportDoc, CDocument)
|
IMPLEMENT_DYNCREATE(CImportExportDoc, OCC_3dDoc)
|
||||||
|
|
||||||
BEGIN_MESSAGE_MAP(CImportExportDoc, OCC_3dBaseDoc)
|
BEGIN_MESSAGE_MAP(CImportExportDoc, OCC_3dDoc)
|
||||||
//{{AFX_MSG_MAP(CImportExportDoc)
|
//{{AFX_MSG_MAP(CImportExportDoc)
|
||||||
ON_COMMAND(ID_FILE_IMPORT_BREP, OnFileImportBrep)
|
ON_COMMAND(ID_FILE_IMPORT_BREP, OnFileImportBrep)
|
||||||
ON_COMMAND(ID_FILE_IMPORT_CSFDB, OnFileImportCSFDB)
|
ON_COMMAND(ID_FILE_IMPORT_CSFDB, OnFileImportCSFDB)
|
||||||
@ -48,23 +48,8 @@ END_MESSAGE_MAP()
|
|||||||
// CImportExportDoc construction/destruction
|
// CImportExportDoc construction/destruction
|
||||||
|
|
||||||
CImportExportDoc::CImportExportDoc()
|
CImportExportDoc::CImportExportDoc()
|
||||||
|
: OCC_3dDoc (false)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
Handle(Graphic3d_WNTGraphicDevice) theGraphicDevice =
|
|
||||||
((CImportExportApp*)AfxGetApp())->GetGraphicDevice();
|
|
||||||
|
|
||||||
TCollection_ExtendedString a3DName("Visu3D");
|
|
||||||
myViewer = new V3d_Viewer(theGraphicDevice,a3DName.ToExtString(),"", 1000.0,
|
|
||||||
V3d_XposYnegZpos, Quantity_NOC_GRAY30,
|
|
||||||
V3d_ZBUFFER,V3d_GOURAUD,V3d_WAIT,
|
|
||||||
Standard_True, Standard_False);
|
|
||||||
|
|
||||||
myViewer->SetDefaultLights();
|
|
||||||
myViewer->SetLightOn();
|
|
||||||
|
|
||||||
myAISContext =new AIS_InteractiveContext(myViewer);
|
|
||||||
|
|
||||||
*/
|
|
||||||
/*
|
/*
|
||||||
// TRIHEDRON
|
// TRIHEDRON
|
||||||
Handle(AIS_Trihedron) aTrihedron;
|
Handle(AIS_Trihedron) aTrihedron;
|
||||||
|
@ -10,9 +10,10 @@
|
|||||||
#endif // _MSC_VER >= 1000
|
#endif // _MSC_VER >= 1000
|
||||||
|
|
||||||
#include <ColoredShapes.h>
|
#include <ColoredShapes.h>
|
||||||
#include <OCC_3dBaseDoc.h>
|
#include <OCC_3dDoc.h>
|
||||||
|
|
||||||
class CImportExportDoc : public OCC_3dBaseDoc{
|
class CImportExportDoc : public OCC_3dDoc
|
||||||
|
{
|
||||||
DECLARE_DYNCREATE(CImportExportDoc)
|
DECLARE_DYNCREATE(CImportExportDoc)
|
||||||
public:
|
public:
|
||||||
CImportExportDoc();
|
CImportExportDoc();
|
||||||
|
@ -1100,40 +1100,39 @@ m_App->SaveAs(myOcafDoc,(TCollection_ExtendedString) TPath); \n\
|
|||||||
myCResultDialog.SetText(text);
|
myCResultDialog.SetText(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL COcafDoc::OnOpenDocument(LPCTSTR lpszPathName)
|
BOOL COcafDoc::OnOpenDocument(LPCTSTR lpszPathName)
|
||||||
{
|
{
|
||||||
if (!CDocument::OnOpenDocument(lpszPathName))
|
if (!CDocument::OnOpenDocument(lpszPathName))
|
||||||
return FALSE;
|
{
|
||||||
|
return FALSE;
|
||||||
Handle(TOcaf_Application) m_App= ((COcafApp*)AfxGetApp())->GetApp();
|
}
|
||||||
|
|
||||||
CWaitCursor aWaitCursor;
|
Handle(TOcaf_Application) m_App= ((COcafApp*)AfxGetApp())->GetApp();
|
||||||
PathName=lpszPathName;
|
|
||||||
|
|
||||||
Standard_CString SPath = (Standard_CString) lpszPathName;
|
CWaitCursor aWaitCursor;
|
||||||
TCollection_ExtendedString TPath(SPath);
|
PathName = lpszPathName;
|
||||||
PathName=lpszPathName;
|
|
||||||
|
|
||||||
// open the document in the current application
|
const wchar_t* aPathName = lpszPathName;
|
||||||
|
TCollection_ExtendedString anOccPathName ((Standard_ExtString)aPathName);
|
||||||
|
|
||||||
|
// Open the document in the current application
|
||||||
//PCDM_ReaderStatus RS = m_App->Open(TPath,myOcafDoc);
|
//PCDM_ReaderStatus RS = m_App->Open(TPath,myOcafDoc);
|
||||||
m_App->Open(TPath,myOcafDoc);
|
m_App->Open(anOccPathName, myOcafDoc);
|
||||||
//CDF_RetrievableStatus RS = m_App->Open(TPath,myOcafDoc);
|
//CDF_RetrievableStatus RS = m_App->Open(TPath,myOcafDoc);
|
||||||
|
|
||||||
//connect the document CAF (myDoc) with the AISContext (myAISContext)
|
// Connect the document CAF (myDoc) with the AISContext (myAISContext)
|
||||||
//TPrsStd_AISViewer::Has(myOcafDoc->Main());
|
TPrsStd_AISViewer::New (myOcafDoc->Main(), myViewer);
|
||||||
TPrsStd_AISViewer::New(myOcafDoc->Main(),myViewer);
|
myOcafDoc->SetUndoLimit (10);
|
||||||
myOcafDoc->SetUndoLimit(10);
|
|
||||||
|
|
||||||
Handle(AIS_InteractiveContext) CTX;
|
Handle(AIS_InteractiveContext) aContext;
|
||||||
TPrsStd_AISViewer::Find(myOcafDoc->Main(),CTX);
|
TPrsStd_AISViewer::Find (myOcafDoc->Main(), aContext);
|
||||||
CTX->SetDisplayMode(AIS_Shaded);
|
aContext->SetDisplayMode (AIS_Shaded);
|
||||||
|
myAISContext = aContext;
|
||||||
|
|
||||||
myAISContext = CTX;
|
// Display the presentations (which was not stored in the document)
|
||||||
|
DisplayPrs();
|
||||||
|
|
||||||
// Display the presentations (which was not stored in the document)
|
TCollection_AsciiString Message = TCollection_AsciiString("\
|
||||||
DisplayPrs();
|
|
||||||
|
|
||||||
TCollection_AsciiString Message = TCollection_AsciiString("\
|
|
||||||
// Retrieve a document \n\
|
// Retrieve a document \n\
|
||||||
\n\
|
\n\
|
||||||
Handle(TOcaf_Application) m_App= ((COcafApp*)AfxGetApp())->GetApp(); \n\
|
Handle(TOcaf_Application) m_App= ((COcafApp*)AfxGetApp())->GetApp(); \n\
|
||||||
@ -1149,11 +1148,11 @@ myOcafDoc->SetUndoLimit(10); \n\
|
|||||||
\n\
|
\n\
|
||||||
\n");
|
\n");
|
||||||
|
|
||||||
myCResultDialog.SetTitle("Open a document");
|
myCResultDialog.SetTitle ("Open a document");
|
||||||
CString text(Message.ToCString());
|
CString text (Message.ToCString());
|
||||||
myCResultDialog.SetText(text);
|
myCResultDialog.SetText (text);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -250,7 +250,7 @@ STYLE DS_SETFONT | DS_MODALFRAME | WS_CAPTION
|
|||||||
CAPTION "Choose Shapes and Projector"
|
CAPTION "Choose Shapes and Projector"
|
||||||
FONT 8, "MS Sans Serif", 0, 0, 0x1
|
FONT 8, "MS Sans Serif", 0, 0, 0x1
|
||||||
BEGIN
|
BEGIN
|
||||||
CONTROL "2",IDC_DUMMYBUTTON,"Button",BS_OWNERDRAW | WS_DISABLED | WS_TABSTOP,110,60,100,80,WS_EX_TRANSPARENT
|
CONTROL "2",IDC_HlrDlgView,"Button",BS_OWNERDRAW | WS_DISABLED | WS_TABSTOP,110,60,100,80,WS_EX_TRANSPARENT
|
||||||
CONTROL "Default",IDC_DisplayDefault,"Button",BS_AUTORADIOBUTTON | WS_GROUP,17,0,70,10
|
CONTROL "Default",IDC_DisplayDefault,"Button",BS_AUTORADIOBUTTON | WS_GROUP,17,0,70,10
|
||||||
CONTROL "sharp Edges",IDC_VsharpEdges,"Button",BS_AUTORADIOBUTTON,20,20,70,10
|
CONTROL "sharp Edges",IDC_VsharpEdges,"Button",BS_AUTORADIOBUTTON,20,20,70,10
|
||||||
CONTROL "smooth Edges",IDC_VsmoothEdges,"Button",BS_AUTORADIOBUTTON,20,30,70,10
|
CONTROL "smooth Edges",IDC_VsmoothEdges,"Button",BS_AUTORADIOBUTTON,20,30,70,10
|
||||||
|
@ -104,7 +104,7 @@
|
|||||||
#define ID_Update2D 1522
|
#define ID_Update2D 1522
|
||||||
#define IDC_HlrModeIsOn 1523
|
#define IDC_HlrModeIsOn 1523
|
||||||
#define IDC_TopView 1529
|
#define IDC_TopView 1529
|
||||||
#define IDC_DUMMYBUTTON 1530
|
#define IDC_HlrDlgView 1530
|
||||||
#define IDC_BottomView 1531
|
#define IDC_BottomView 1531
|
||||||
#define IDC_LeftView 1532
|
#define IDC_LeftView 1532
|
||||||
#define IDC_RightView 1533
|
#define IDC_RightView 1533
|
||||||
|
@ -165,6 +165,7 @@ void CHLRDoc::OnBUTTONHLRDialog()
|
|||||||
myCSelectionDialogIsCreated = true;
|
myCSelectionDialogIsCreated = true;
|
||||||
}
|
}
|
||||||
myCSelectionDialog->ShowWindow(SW_RESTORE);
|
myCSelectionDialog->ShowWindow(SW_RESTORE);
|
||||||
|
myCSelectionDialog->UpdateWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHLRDoc::OnFileImportBrep()
|
void CHLRDoc::OnFileImportBrep()
|
||||||
|
@ -32,8 +32,7 @@ IMPLEMENT_DYNCREATE(CHLRView2D, OCC_2dView)
|
|||||||
|
|
||||||
BEGIN_MESSAGE_MAP(CHLRView2D, OCC_2dView)
|
BEGIN_MESSAGE_MAP(CHLRView2D, OCC_2dView)
|
||||||
//{{AFX_MSG_MAP(CHLRView2D)
|
//{{AFX_MSG_MAP(CHLRView2D)
|
||||||
// NOTE - the ClassWizard will add and remove mapping macros here.
|
ON_WM_MOUSEMOVE()
|
||||||
// DO NOT EDIT what you see in these blocks of generated code!
|
|
||||||
//}}AFX_MSG_MAP
|
//}}AFX_MSG_MAP
|
||||||
END_MESSAGE_MAP()
|
END_MESSAGE_MAP()
|
||||||
|
|
||||||
@ -119,7 +118,6 @@ void CHLRView2D::MultiDragEvent2D(const Standard_Integer /*x*/,
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
//-----------------------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------------------
|
||||||
@ -128,6 +126,84 @@ void CHLRView2D::MultiInputEvent2D(const Standard_Integer /*x*/,
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------------------
|
||||||
|
void CHLRView2D::OnMouseMove(UINT nFlags, CPoint point)
|
||||||
|
{
|
||||||
|
if ( (nFlags & MK_LBUTTON) &! (nFlags & MK_RBUTTON) ) // Left + Right is specific
|
||||||
|
{
|
||||||
|
if ( nFlags & CASCADESHORTCUTKEY )
|
||||||
|
{
|
||||||
|
// move with MB1 and CASCADESHORTCUTKEY : on the dynamic zooming
|
||||||
|
// Do the zoom in function of mouse's coordinates
|
||||||
|
myV2dView->Zoom(myXmax,myYmax,point.x,point.y);
|
||||||
|
myXmax = point.x;
|
||||||
|
myYmax = point.y;
|
||||||
|
}
|
||||||
|
else // if ( CASCADESHORTCUTKEY )
|
||||||
|
{
|
||||||
|
switch (myCurrentMode)
|
||||||
|
{
|
||||||
|
case CurAction2d_Nothing :
|
||||||
|
myXmax = point.x;
|
||||||
|
myYmax = point.y;
|
||||||
|
DragEvent2D(myXmax,myYmax,0);
|
||||||
|
break;
|
||||||
|
case CurAction2d_DynamicZooming :
|
||||||
|
myV2dView->Zoom(myXmax,myYmax,point.x,point.y);
|
||||||
|
myXmax=point.x;
|
||||||
|
myYmax=point.y;
|
||||||
|
break;
|
||||||
|
case CurAction2d_WindowZooming :
|
||||||
|
myXmax = point.x;
|
||||||
|
myYmax = point.y;
|
||||||
|
break;
|
||||||
|
case CurAction2d_DynamicPanning :
|
||||||
|
myV2dView->Pan(point.x-myXmax,myYmax-point.y); // Realize the panning
|
||||||
|
myXmax = point.x;
|
||||||
|
myYmax = point.y;
|
||||||
|
break;
|
||||||
|
case CurAction2d_GlobalPanning :
|
||||||
|
break;
|
||||||
|
default :
|
||||||
|
Standard_Failure::Raise(" incompatible Current Mode ");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if ( nFlags & MK_MBUTTON)
|
||||||
|
{
|
||||||
|
if ( nFlags & CASCADESHORTCUTKEY )
|
||||||
|
{
|
||||||
|
myV2dView->Pan (point.x-myXmax,myYmax-point.y);
|
||||||
|
myXmax = point.x;
|
||||||
|
myYmax = point.y;
|
||||||
|
}
|
||||||
|
} else if ( (nFlags & MK_RBUTTON) &! (nFlags & MK_LBUTTON) )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
else if ( (nFlags & MK_RBUTTON) && (nFlags & MK_LBUTTON) )
|
||||||
|
{
|
||||||
|
if ( nFlags & CASCADESHORTCUTKEY )
|
||||||
|
{
|
||||||
|
myV2dView->Pan(point.x-myXmax,myYmax-point.y); // Realize the panning
|
||||||
|
myXmax = point.x; myYmax = point.y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ // No buttons
|
||||||
|
myXmax = point.x;
|
||||||
|
myYmax = point.y;
|
||||||
|
if (nFlags & MULTISELECTIONKEY)
|
||||||
|
{
|
||||||
|
MultiMoveEvent2D(point.x,point.y);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MoveEvent2D(point.x,point.y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
void CHLRView2D::AssertValid() const
|
void CHLRView2D::AssertValid() const
|
||||||
|
@ -21,6 +21,10 @@ protected: // create from serialization only
|
|||||||
CHLRView2D();
|
CHLRView2D();
|
||||||
DECLARE_DYNCREATE(CHLRView2D)
|
DECLARE_DYNCREATE(CHLRView2D)
|
||||||
|
|
||||||
|
// Override MouseMove event to exclude rectangle selection emulation as
|
||||||
|
// no selection is supported in DragEvent2D for this view.
|
||||||
|
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
|
||||||
|
DECLARE_MESSAGE_MAP()
|
||||||
|
|
||||||
// Overrides
|
// Overrides
|
||||||
// ClassWizard generated virtual function overrides
|
// ClassWizard generated virtual function overrides
|
||||||
@ -51,17 +55,6 @@ public:
|
|||||||
virtual void AssertValid() const;
|
virtual void AssertValid() const;
|
||||||
virtual void Dump(CDumpContext& dc) const;
|
virtual void Dump(CDumpContext& dc) const;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
// Generated message map functions
|
|
||||||
protected:
|
|
||||||
//{{AFX_MSG(CHLRView2D)
|
|
||||||
// NOTE - the ClassWizard will add and remove member functions here.
|
|
||||||
// DO NOT EDIT what you see in these blocks of generated code !
|
|
||||||
//}}AFX_MSG
|
|
||||||
DECLARE_MESSAGE_MAP()
|
|
||||||
|
|
||||||
};
|
};
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@ -104,10 +104,10 @@ BOOL CSelectionDialog::OnInitDialog()
|
|||||||
// get the View Window position to managed mouse move
|
// get the View Window position to managed mouse move
|
||||||
CRect BoxRect,ViewRect;
|
CRect BoxRect,ViewRect;
|
||||||
GetWindowRect (BoxRect);
|
GetWindowRect (BoxRect);
|
||||||
CWnd * TheViewerWindow = GetDlgItem (IDC_DUMMYBUTTON);
|
CWnd * TheViewerWindow = GetDlgItem (IDC_HlrDlgView);
|
||||||
TheViewerWindow->GetWindowRect (ViewRect);
|
TheViewerWindow->GetWindowRect (ViewRect);
|
||||||
myPosMinX = ViewRect.TopLeft().x - BoxRect.TopLeft().x;
|
myPosMinX = ViewRect.TopLeft().x - BoxRect.TopLeft().x;
|
||||||
myPosMaxX = ViewRect.Width()+myPosMinX;
|
myPosMaxX = ViewRect.Width() + myPosMinX;
|
||||||
myPosMinY = ViewRect.TopLeft().y - BoxRect.TopLeft().y;
|
myPosMinY = ViewRect.TopLeft().y - BoxRect.TopLeft().y;
|
||||||
myPosMaxY = myPosMinY + ViewRect.Height();
|
myPosMaxY = myPosMinY + ViewRect.Height();
|
||||||
|
|
||||||
@ -121,10 +121,12 @@ BOOL CSelectionDialog::OnInitDialog()
|
|||||||
|
|
||||||
void CSelectionDialog::OnDisplay (bool isFit)
|
void CSelectionDialog::OnDisplay (bool isFit)
|
||||||
{
|
{
|
||||||
GetDlgItem(IDC_DUMMYBUTTON)->SetRedraw (true);
|
// GetDlgItem(IDC_HlrDlgView)->SetRedraw() wrapping of this method makes view blinking,
|
||||||
|
// but displaying of big models may be faster.
|
||||||
|
//GetDlgItem(IDC_HlrDlgView)->SetRedraw(true);
|
||||||
if (!myIsDisplayed)
|
if (!myIsDisplayed)
|
||||||
{
|
{
|
||||||
Handle(Graphic3d_GraphicDriver) aGraphicDriver =
|
Handle(Graphic3d_GraphicDriver) aGraphicDriver =
|
||||||
((CHLRApp*)AfxGetApp())->GetGraphicDriver();
|
((CHLRApp*)AfxGetApp())->GetGraphicDriver();
|
||||||
|
|
||||||
myActiveViewer = new V3d_Viewer (aGraphicDriver, (short *) "Visu3D");
|
myActiveViewer = new V3d_Viewer (aGraphicDriver, (short *) "Visu3D");
|
||||||
@ -132,7 +134,7 @@ void CSelectionDialog::OnDisplay (bool isFit)
|
|||||||
myActiveViewer->SetLightOn();
|
myActiveViewer->SetLightOn();
|
||||||
myActiveView = myActiveViewer->CreateView();
|
myActiveView = myActiveViewer->CreateView();
|
||||||
|
|
||||||
Handle(WNT_Window) aWNTWindow = new WNT_Window (GetDlgItem (IDC_DUMMYBUTTON)->GetSafeHwnd(),
|
Handle(WNT_Window) aWNTWindow = new WNT_Window (GetDlgItem (IDC_HlrDlgView)->GetSafeHwnd(),
|
||||||
Quantity_NOC_GRAY);
|
Quantity_NOC_GRAY);
|
||||||
myActiveView->SetComputedMode (m_HlrModeIsOn);
|
myActiveView->SetComputedMode (m_HlrModeIsOn);
|
||||||
myActiveView->SetWindow(aWNTWindow);
|
myActiveView->SetWindow(aWNTWindow);
|
||||||
@ -144,6 +146,7 @@ void CSelectionDialog::OnDisplay (bool isFit)
|
|||||||
myTrihedron = new AIS_Trihedron (aTrihedronAxis);
|
myTrihedron = new AIS_Trihedron (aTrihedronAxis);
|
||||||
|
|
||||||
myInteractiveContext->Display (myTrihedron);
|
myInteractiveContext->Display (myTrihedron);
|
||||||
|
myIsDisplayed = Standard_True;
|
||||||
}
|
}
|
||||||
if(isFit)
|
if(isFit)
|
||||||
{
|
{
|
||||||
@ -152,8 +155,7 @@ void CSelectionDialog::OnDisplay (bool isFit)
|
|||||||
}
|
}
|
||||||
|
|
||||||
myActiveView->Redraw();
|
myActiveView->Redraw();
|
||||||
myIsDisplayed = Standard_True;
|
//GetDlgItem (IDC_HlrDlgView)->SetRedraw (false);
|
||||||
GetDlgItem (IDC_DUMMYBUTTON)->SetRedraw (false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -551,6 +553,5 @@ void CSelectionDialog::OnOK()
|
|||||||
|
|
||||||
void CSelectionDialog::OnPaint()
|
void CSelectionDialog::OnPaint()
|
||||||
{
|
{
|
||||||
CPaintDC dc(this); // device context for painting
|
|
||||||
OnDisplay(false);
|
OnDisplay(false);
|
||||||
}
|
}
|
||||||
|
@ -142,15 +142,16 @@ void CAngleParamsVerticesPage::OnBnClickedVertex3Btn()
|
|||||||
anAspect->TextAspect()->SetHeight (aDimDlg->GetFontHeight());
|
anAspect->TextAspect()->SetHeight (aDimDlg->GetFontHeight());
|
||||||
anAspect->MakeTextShaded (aDimDlg->IsText3dShaded());
|
anAspect->MakeTextShaded (aDimDlg->IsText3dShaded());
|
||||||
anAspect->SetCommonColor (aDimDlg->GetDimensionColor());
|
anAspect->SetCommonColor (aDimDlg->GetDimensionColor());
|
||||||
anAngleDim->DimensionAspect()->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
anAspect->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
||||||
if (aDimDlg->IsUnitsDisplayed())
|
if (aDimDlg->IsUnitsDisplayed())
|
||||||
{
|
{
|
||||||
anAngleDim->SetDisplayUnits (aDimDlg->GetUnits());
|
anAngleDim->SetDisplayUnits (aDimDlg->GetUnits());
|
||||||
if ((anAngleDim->GetDisplayUnits().IsEqual (TCollection_AsciiString ("deg"))))
|
if ((anAngleDim->GetDisplayUnits().IsEqual (TCollection_AsciiString ("deg"))))
|
||||||
{
|
{
|
||||||
anAngleDim->DimensionAspect()->MakeUnitsDisplayed (Standard_False);
|
// No units - for degree is special symbol that is enabled by default
|
||||||
|
anAspect->MakeUnitsDisplayed (Standard_False);
|
||||||
}
|
}
|
||||||
else
|
else // radians - no special symbol
|
||||||
{
|
{
|
||||||
anAngleDim->SetDisplaySpecialSymbol (AIS_DSS_No);
|
anAngleDim->SetDisplaySpecialSymbol (AIS_DSS_No);
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#include <TColStd_ListIteratorOfListOfInteger.hxx>
|
#include <TColStd_ListIteratorOfListOfInteger.hxx>
|
||||||
#include <TColStd_ListOfInteger.hxx>
|
#include <TColStd_ListOfInteger.hxx>
|
||||||
#include <AIS_LocalContext.hxx>
|
#include <AIS_LocalContext.hxx>
|
||||||
|
#include <AIS_Selection.hxx>
|
||||||
#include <Quantity_Color.hxx>
|
#include <Quantity_Color.hxx>
|
||||||
|
|
||||||
BEGIN_MESSAGE_MAP(CDimensionDlg, CDialog)
|
BEGIN_MESSAGE_MAP(CDimensionDlg, CDialog)
|
||||||
@ -762,3 +763,11 @@ void CDimensionDlg::OnClose()
|
|||||||
}
|
}
|
||||||
CDialog::OnClose();
|
CDialog::OnClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TopoDS_Shape CDimensionDlg::SelectedShape()
|
||||||
|
{
|
||||||
|
Handle(Standard_Transient) aSelection = AIS_Selection::CurrentSelection()->Value();
|
||||||
|
Handle(SelectMgr_EntityOwner) anOwner = *((Handle(SelectMgr_EntityOwner)*)&aSelection);
|
||||||
|
Handle(StdSelect_BRepOwner) aBrepOwner = Handle(StdSelect_BRepOwner)::DownCast(anOwner);
|
||||||
|
return aBrepOwner->Shape().Located (aBrepOwner->Location() * aBrepOwner->Shape().Location());
|
||||||
|
}
|
||||||
|
@ -37,6 +37,13 @@ public:
|
|||||||
const TCollection_AsciiString GetUnits() const;
|
const TCollection_AsciiString GetUnits() const;
|
||||||
const Quantity_Color GetDimensionColor() const;
|
const Quantity_Color GetDimensionColor() const;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Workaround: AIS_LocalContext::SelectedShape() doesn't take into account local location of selected TopoDS shape,
|
||||||
|
// and operates with selected interactive object transformation only.
|
||||||
|
static TopoDS_Shape SelectedShape();
|
||||||
|
|
||||||
|
public:
|
||||||
// Dialog Data
|
// Dialog Data
|
||||||
enum { IDD = IDD_Dimension };
|
enum { IDD = IDD_Dimension };
|
||||||
// Initialization of dialog
|
// Initialization of dialog
|
||||||
|
@ -60,6 +60,7 @@ CButton* CLengthParamsEdgePage::GetButton()
|
|||||||
return (CButton*)GetDlgItem (IDC_ChooseEdgeBtn);
|
return (CButton*)GetDlgItem (IDC_ChooseEdgeBtn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include <AIS_Selection.hxx>
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : OnBnClickedChooseEdgeBtn
|
//function : OnBnClickedChooseEdgeBtn
|
||||||
//purpose :
|
//purpose :
|
||||||
@ -75,28 +76,32 @@ void CLengthParamsEdgePage::OnBnClickedChooseEdgeBtn()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
TopoDS_Edge anEdge = TopoDS::Edge(myAISContext->LocalContext()->SelectedShape());
|
// Workaround for AIS_LocalContext::SelectedShape()
|
||||||
|
//TopoDS_Shape aSelShape = myAISContext->LocalContext()->SelectedShape();
|
||||||
|
TopoDS_Shape aSelShape = CDimensionDlg::SelectedShape();
|
||||||
|
const TopoDS_Edge& anEdge = TopoDS::Edge (aSelShape);
|
||||||
|
|
||||||
myAISContext->LocalContext()->ClearSelected();
|
myAISContext->LocalContext()->ClearSelected();
|
||||||
TopoDS_Vertex aFirstVertex, aSecondVertex;
|
TopoDS_Vertex aFirstVertex, aSecondVertex;
|
||||||
TopExp::Vertices (anEdge, aFirstVertex, aSecondVertex);
|
TopExp::Vertices (TopoDS::Edge (anEdge), aFirstVertex, aSecondVertex);
|
||||||
|
|
||||||
gp_Pnt aP1=BRep_Tool::Pnt (aFirstVertex);
|
gp_Pnt aP1 = BRep_Tool::Pnt (aFirstVertex);
|
||||||
gp_Pnt aP2=BRep_Tool::Pnt (aSecondVertex);
|
gp_Pnt aP2 = BRep_Tool::Pnt (aSecondVertex);
|
||||||
gp_Pnt aP3(aP2.X()+10, aP2.Y()+10, aP2.Z()+10);
|
gp_Pnt aP3 (aP2.X() + 10, aP2.Y() + 10, aP2.Z() + 10);
|
||||||
|
|
||||||
GC_MakePlane aMkPlane (aP1,aP2,aP3);
|
GC_MakePlane aMkPlane (aP1,aP2,aP3);
|
||||||
Handle(Geom_Plane) aPlane = aMkPlane.Value ();
|
Handle(Geom_Plane) aPlane = aMkPlane.Value();
|
||||||
|
|
||||||
CDimensionDlg *aDimDlg = (CDimensionDlg*)(GetParentOwner());
|
CDimensionDlg *aDimDlg = (CDimensionDlg*)(GetParentOwner());
|
||||||
|
|
||||||
Handle(AIS_LengthDimension) aLenDim = new AIS_LengthDimension (anEdge, aPlane->Pln());
|
Handle(AIS_LengthDimension) aLenDim = new AIS_LengthDimension (TopoDS::Edge (anEdge), aPlane->Pln());
|
||||||
Handle(Prs3d_DimensionAspect) anAspect = new Prs3d_DimensionAspect();
|
Handle(Prs3d_DimensionAspect) anAspect = new Prs3d_DimensionAspect();
|
||||||
anAspect->MakeArrows3d (Standard_False);
|
anAspect->MakeArrows3d (Standard_False);
|
||||||
anAspect->MakeText3d (aDimDlg->GetTextType());
|
anAspect->MakeText3d (aDimDlg->GetTextType());
|
||||||
anAspect->TextAspect()->SetHeight (aDimDlg->GetFontHeight());
|
anAspect->TextAspect()->SetHeight (aDimDlg->GetFontHeight());
|
||||||
anAspect->MakeTextShaded (aDimDlg->IsText3dShaded());
|
anAspect->MakeTextShaded (aDimDlg->IsText3dShaded());
|
||||||
anAspect->SetCommonColor (aDimDlg->GetDimensionColor());
|
anAspect->SetCommonColor (aDimDlg->GetDimensionColor());
|
||||||
aLenDim->DimensionAspect()->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
anAspect->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
||||||
if (aDimDlg->IsUnitsDisplayed())
|
if (aDimDlg->IsUnitsDisplayed())
|
||||||
{
|
{
|
||||||
aLenDim->SetDisplayUnits (aDimDlg->GetUnits());
|
aLenDim->SetDisplayUnits (aDimDlg->GetUnits());
|
||||||
|
@ -78,7 +78,10 @@ void CLengthParamsEdgesPage::OnBnClickedEdge1Btn()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
myFirstEdge = TopoDS::Edge (myAISContext->LocalContext()->SelectedShape());
|
// Workaround for AIS_LocalContext::SelectedShape()
|
||||||
|
myFirstEdge = TopoDS::Edge (CDimensionDlg::SelectedShape());
|
||||||
|
//myFirstEdge = TopoDS::Edge (myAISContext->LocalContext()->SelectedShape());
|
||||||
|
|
||||||
myAISContext->LocalContext()->ClearSelected();
|
myAISContext->LocalContext()->ClearSelected();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,7 +100,10 @@ void CLengthParamsEdgesPage::OnBnClickedEdge2Btn()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mySecondEdge = TopoDS::Edge (myAISContext->LocalContext()->SelectedShape());
|
// Workaround for AIS_LocalContext::SelectedShape()
|
||||||
|
mySecondEdge = TopoDS::Edge (CDimensionDlg::SelectedShape());
|
||||||
|
//mySecondEdge = TopoDS::Edge (myAISContext->LocalContext()->SelectedShape());
|
||||||
|
|
||||||
myAISContext->LocalContext()->ClearSelected();
|
myAISContext->LocalContext()->ClearSelected();
|
||||||
|
|
||||||
// Build plane through three points
|
// Build plane through three points
|
||||||
@ -122,6 +128,7 @@ void CLengthParamsEdgesPage::OnBnClickedEdge2Btn()
|
|||||||
anAspect->TextAspect()->SetHeight (aDimDlg->GetFontHeight());
|
anAspect->TextAspect()->SetHeight (aDimDlg->GetFontHeight());
|
||||||
anAspect->MakeTextShaded (aDimDlg->IsText3dShaded());
|
anAspect->MakeTextShaded (aDimDlg->IsText3dShaded());
|
||||||
anAspect->SetCommonColor (aDimDlg->GetDimensionColor());
|
anAspect->SetCommonColor (aDimDlg->GetDimensionColor());
|
||||||
|
anAspect->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
||||||
if (myIsAngleDimension)
|
if (myIsAngleDimension)
|
||||||
{
|
{
|
||||||
// Build an angle dimension between two non-parallel edges
|
// Build an angle dimension between two non-parallel edges
|
||||||
@ -148,10 +155,9 @@ void CLengthParamsEdgesPage::OnBnClickedEdge2Btn()
|
|||||||
{
|
{
|
||||||
Handle(AIS_LengthDimension) aLenDim = new AIS_LengthDimension (myFirstEdge, mySecondEdge, aPlane->Pln());
|
Handle(AIS_LengthDimension) aLenDim = new AIS_LengthDimension (myFirstEdge, mySecondEdge, aPlane->Pln());
|
||||||
aLenDim->SetDimensionAspect (anAspect);
|
aLenDim->SetDimensionAspect (anAspect);
|
||||||
aLenDim->DimensionAspect()->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
aLenDim->SetFlyout (aDimDlg->GetFlyout());
|
||||||
if (aDimDlg->IsUnitsDisplayed())
|
if (aDimDlg->IsUnitsDisplayed())
|
||||||
{
|
{
|
||||||
aLenDim->SetFlyout (aDimDlg->GetFlyout());
|
|
||||||
aLenDim->SetDisplayUnits (aDimDlg->GetUnits());
|
aLenDim->SetDisplayUnits (aDimDlg->GetUnits());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ void CLengthParamsVerticesPage::OnBnClickedVertex2Btn()
|
|||||||
anAspect->MakeText3d (aDimDlg->GetTextType());
|
anAspect->MakeText3d (aDimDlg->GetTextType());
|
||||||
anAspect->TextAspect()->SetHeight (aDimDlg->GetFontHeight());
|
anAspect->TextAspect()->SetHeight (aDimDlg->GetFontHeight());
|
||||||
anAspect->MakeTextShaded (aDimDlg->IsText3dShaded());
|
anAspect->MakeTextShaded (aDimDlg->IsText3dShaded());
|
||||||
aLenDim->DimensionAspect()->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
anAspect->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
||||||
if (aDimDlg->IsUnitsDisplayed())
|
if (aDimDlg->IsUnitsDisplayed())
|
||||||
{
|
{
|
||||||
aLenDim->SetDisplayUnits (aDimDlg->GetUnits ());
|
aLenDim->SetDisplayUnits (aDimDlg->GetUnits ());
|
||||||
|
@ -13,7 +13,9 @@
|
|||||||
#include "ResultDialog.h"
|
#include "ResultDialog.h"
|
||||||
#include <WNT_Window.hxx>
|
#include <WNT_Window.hxx>
|
||||||
|
|
||||||
class AFX_EXT_CLASS OCC_2dDoc : public OCC_BaseDoc
|
// Mouse and clipboard event tracker for OCC_2dView
|
||||||
|
// NO 3D operation are supported (like rotation)
|
||||||
|
class AFX_EXT_CLASS OCC_2dDoc : public OCC_BaseDoc
|
||||||
{
|
{
|
||||||
DECLARE_DYNCREATE(OCC_2dDoc)
|
DECLARE_DYNCREATE(OCC_2dDoc)
|
||||||
|
|
||||||
@ -22,19 +24,24 @@ public:
|
|||||||
OCC_2dDoc();
|
OCC_2dDoc();
|
||||||
~OCC_2dDoc();
|
~OCC_2dDoc();
|
||||||
|
|
||||||
// Operations
|
public: // New operations
|
||||||
public:
|
|
||||||
|
|
||||||
Handle_V3d_Viewer GetViewer2D () { return myViewer; };
|
|
||||||
|
|
||||||
void FitAll2DViews(Standard_Boolean theUpdateViewer = Standard_False);
|
void FitAll2DViews(Standard_Boolean theUpdateViewer = Standard_False);
|
||||||
|
|
||||||
|
public: // getters
|
||||||
|
|
||||||
|
Handle_V3d_Viewer GetViewer2D () { return myViewer; };
|
||||||
|
|
||||||
Handle(AIS_InteractiveContext)& GetInteractiveContext() { return myAISContext; };
|
Handle(AIS_InteractiveContext)& GetInteractiveContext() { return myAISContext; };
|
||||||
|
|
||||||
|
public: // Operations to override
|
||||||
|
|
||||||
|
// Mouse move event tracking for 2D view : no rotation is supported in 2D view.
|
||||||
virtual void MoveEvent(const Standard_Integer theMouseX,
|
virtual void MoveEvent(const Standard_Integer theMouseX,
|
||||||
const Standard_Integer theMouseY,
|
const Standard_Integer theMouseY,
|
||||||
const Handle(V3d_View)& theView);
|
const Handle(V3d_View)& theView);
|
||||||
|
|
||||||
|
// Shift move event tracking for 2D view : no rotation is supported in 2D view.
|
||||||
virtual void ShiftMoveEvent(const Standard_Integer theMouseX,
|
virtual void ShiftMoveEvent(const Standard_Integer theMouseX,
|
||||||
const Standard_Integer theMouseY,
|
const Standard_Integer theMouseY,
|
||||||
const Handle(V3d_View)& theViewView);
|
const Handle(V3d_View)& theViewView);
|
||||||
|
@ -38,8 +38,6 @@ BEGIN_MESSAGE_MAP(OCC_3dBaseDoc, OCC_BaseDoc)
|
|||||||
ON_UPDATE_COMMAND_UI(ID_OBJECT_DISPLAYALL, OnUpdateObjectDisplayall)
|
ON_UPDATE_COMMAND_UI(ID_OBJECT_DISPLAYALL, OnUpdateObjectDisplayall)
|
||||||
ON_COMMAND(ID_OBJECT_REMOVE, OnObjectRemove)
|
ON_COMMAND(ID_OBJECT_REMOVE, OnObjectRemove)
|
||||||
ON_UPDATE_COMMAND_UI(ID_OBJECT_REMOVE, OnUpdateObjectRemove)
|
ON_UPDATE_COMMAND_UI(ID_OBJECT_REMOVE, OnUpdateObjectRemove)
|
||||||
ON_COMMAND(ID_OBJECT_DIM, OnObjectAddDimensions)
|
|
||||||
ON_UPDATE_COMMAND_UI(ID_OBJECT_DIM, OnUpdateObjectAddDimensions)
|
|
||||||
|
|
||||||
//}}AFX_MSG_MAP
|
//}}AFX_MSG_MAP
|
||||||
ON_COMMAND_EX_RANGE(ID_OBJECT_MATERIAL_BRASS,ID_OBJECT_MATERIAL_DEFAULT, OnObjectMaterialRange)
|
ON_COMMAND_EX_RANGE(ID_OBJECT_MATERIAL_BRASS,ID_OBJECT_MATERIAL_DEFAULT, OnObjectMaterialRange)
|
||||||
@ -52,20 +50,16 @@ END_MESSAGE_MAP()
|
|||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
OCC_3dBaseDoc::OCC_3dBaseDoc()
|
OCC_3dBaseDoc::OCC_3dBaseDoc()
|
||||||
:myPopupMenuNumber(0),
|
:myPopupMenuNumber(0)
|
||||||
myDimensionDlg()
|
|
||||||
{
|
{
|
||||||
AfxInitRichEdit();
|
AfxInitRichEdit();
|
||||||
|
|
||||||
Handle(Graphic3d_GraphicDriver) aGraphicDriver =
|
Handle(Graphic3d_GraphicDriver) aGraphicDriver = ((OCC_App*)AfxGetApp())->GetGraphicDriver();
|
||||||
((OCC_App*)AfxGetApp())->GetGraphicDriver();
|
|
||||||
|
|
||||||
myViewer = new V3d_Viewer (aGraphicDriver, Standard_ExtString("Visu3D") );
|
myViewer = new V3d_Viewer (aGraphicDriver, Standard_ExtString("Visu3D") );
|
||||||
myViewer->SetDefaultLights();
|
myViewer->SetDefaultLights();
|
||||||
myViewer->SetLightOn();
|
myViewer->SetLightOn();
|
||||||
myAISContext = new AIS_InteractiveContext (myViewer);
|
myAISContext = new AIS_InteractiveContext (myViewer);
|
||||||
myDimensionDlg.SetContext (myAISContext);
|
|
||||||
myDimensionDlg.Create(CDimensionDlg::IDD, NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
OCC_3dBaseDoc::~OCC_3dBaseDoc()
|
OCC_3dBaseDoc::~OCC_3dBaseDoc()
|
||||||
@ -87,20 +81,27 @@ void OCC_3dBaseDoc::DragEvent (const Standard_Integer theMouseX,
|
|||||||
static Standard_Integer aStartDragX = 0;
|
static Standard_Integer aStartDragX = 0;
|
||||||
static Standard_Integer aStartDragY = 0;
|
static Standard_Integer aStartDragY = 0;
|
||||||
|
|
||||||
if (theState == -1)
|
switch (theState)
|
||||||
{
|
{
|
||||||
// button down
|
case -1:
|
||||||
aStartDragX = theMouseX;
|
{
|
||||||
aStartDragY = theMouseY;
|
aStartDragX = theMouseX;
|
||||||
}
|
aStartDragY = theMouseY;
|
||||||
|
break;
|
||||||
if (theState == 1)
|
}
|
||||||
{
|
case 0:
|
||||||
// button up
|
{
|
||||||
myAISContext->Select (aStartDragX, aStartDragY,
|
myAISContext->UpdateCurrentViewer();
|
||||||
theMouseX, theMouseY,
|
break;
|
||||||
theView);
|
}
|
||||||
}
|
case 1:
|
||||||
|
{
|
||||||
|
myAISContext->Select (aStartDragX, aStartDragY,
|
||||||
|
theMouseX, theMouseY,
|
||||||
|
theView);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------------------
|
||||||
@ -423,18 +424,3 @@ void OCC_3dBaseDoc::SetMaterial(Graphic3d_NameOfMaterial Material)
|
|||||||
myAISContext->SetMaterial (myAISContext->Current(),
|
myAISContext->SetMaterial (myAISContext->Current(),
|
||||||
(Graphic3d_NameOfMaterial)(Material));
|
(Graphic3d_NameOfMaterial)(Material));
|
||||||
}
|
}
|
||||||
|
|
||||||
void OCC_3dBaseDoc::OnObjectAddDimensions()
|
|
||||||
{
|
|
||||||
//Add dimentions dialog is opened here
|
|
||||||
myDimensionDlg.ShowWindow(SW_SHOW);
|
|
||||||
myDimensionDlg.UpdateStandardMode ();
|
|
||||||
}
|
|
||||||
|
|
||||||
void OCC_3dBaseDoc::OnUpdateObjectAddDimensions(CCmdUI* /*pCmdUI*/)
|
|
||||||
{
|
|
||||||
// Check if local context is opened
|
|
||||||
//pCmdUI->Enable (myAISContext->HasOpenedContext());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,9 +15,6 @@
|
|||||||
|
|
||||||
class AFX_EXT_CLASS OCC_3dBaseDoc : public OCC_BaseDoc
|
class AFX_EXT_CLASS OCC_3dBaseDoc : public OCC_BaseDoc
|
||||||
{
|
{
|
||||||
protected:
|
|
||||||
CDimensionDlg myDimensionDlg;
|
|
||||||
int myPopupMenuNumber;
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
OCC_3dBaseDoc();
|
OCC_3dBaseDoc();
|
||||||
@ -83,11 +80,13 @@ protected:
|
|||||||
afx_msg void OnUpdateObjectDisplayall(CCmdUI* pCmdUI);
|
afx_msg void OnUpdateObjectDisplayall(CCmdUI* pCmdUI);
|
||||||
afx_msg void OnObjectRemove();
|
afx_msg void OnObjectRemove();
|
||||||
afx_msg void OnUpdateObjectRemove(CCmdUI* pCmdUI);
|
afx_msg void OnUpdateObjectRemove(CCmdUI* pCmdUI);
|
||||||
afx_msg void OnObjectAddDimensions();
|
|
||||||
afx_msg void OnUpdateObjectAddDimensions(CCmdUI* pCmdUI);
|
|
||||||
|
|
||||||
//}}AFX_MSG
|
//}}AFX_MSG
|
||||||
DECLARE_MESSAGE_MAP()
|
DECLARE_MESSAGE_MAP()
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
int myPopupMenuNumber;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // !defined(AFX_OCC_3dBaseDoc_H__02CE7BD9_39BE_11D7_8611_0060B0EE281E__INCLUDED_)
|
#endif // !defined(AFX_OCC_3dBaseDoc_H__02CE7BD9_39BE_11D7_8611_0060B0EE281E__INCLUDED_)
|
||||||
|
@ -5,27 +5,36 @@
|
|||||||
#include <stdafx.h>
|
#include <stdafx.h>
|
||||||
#include "OCC_3dDoc.h"
|
#include "OCC_3dDoc.h"
|
||||||
|
|
||||||
|
BEGIN_MESSAGE_MAP(OCC_3dDoc, OCC_3dBaseDoc)
|
||||||
|
ON_COMMAND(ID_OBJECT_DIM, OnObjectAddDimensions)
|
||||||
|
END_MESSAGE_MAP()
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// Construction/Destruction
|
// Construction/Destruction
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
OCC_3dDoc::OCC_3dDoc()
|
OCC_3dDoc::OCC_3dDoc (bool theIsResultDialog)
|
||||||
|
: myDimensionDlg()
|
||||||
{
|
{
|
||||||
|
if (theIsResultDialog)
|
||||||
|
{
|
||||||
|
myCResultDialog.Create(CResultDialog::IDD,NULL);
|
||||||
|
|
||||||
myCResultDialog.Create(CResultDialog::IDD,NULL);
|
RECT dlgrect;
|
||||||
|
myCResultDialog.GetWindowRect(&dlgrect);
|
||||||
RECT dlgrect;
|
LONG width = dlgrect.right-dlgrect.left;
|
||||||
myCResultDialog.GetWindowRect(&dlgrect);
|
LONG height = dlgrect.bottom-dlgrect.top;
|
||||||
LONG width = dlgrect.right-dlgrect.left;
|
|
||||||
LONG height = dlgrect.bottom-dlgrect.top;
|
|
||||||
|
|
||||||
RECT MainWndRect;
|
|
||||||
AfxGetApp()->m_pMainWnd->GetWindowRect(&MainWndRect);
|
|
||||||
LONG left = MainWndRect.left+3;
|
|
||||||
LONG top = MainWndRect.top + 112;
|
|
||||||
|
|
||||||
myCResultDialog.MoveWindow(left,top,width,height);
|
|
||||||
|
|
||||||
|
RECT MainWndRect;
|
||||||
|
AfxGetApp()->m_pMainWnd->GetWindowRect(&MainWndRect);
|
||||||
|
LONG left = MainWndRect.left+3;
|
||||||
|
LONG top = MainWndRect.top + 112;
|
||||||
|
|
||||||
|
myCResultDialog.MoveWindow(left,top,width,height);
|
||||||
|
}
|
||||||
|
|
||||||
|
myDimensionDlg.SetContext (myAISContext);
|
||||||
|
myDimensionDlg.Create(CDimensionDlg::IDD, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
OCC_3dDoc::~OCC_3dDoc()
|
OCC_3dDoc::~OCC_3dDoc()
|
||||||
@ -36,7 +45,6 @@ OCC_3dDoc::~OCC_3dDoc()
|
|||||||
void OCC_3dDoc::PocessTextInDialog (CString theTitle,
|
void OCC_3dDoc::PocessTextInDialog (CString theTitle,
|
||||||
CString theMessage)
|
CString theMessage)
|
||||||
{
|
{
|
||||||
// aMessage+= "-------------------------------- END ----------------------------------------\n";
|
|
||||||
myCResultDialog.SetTitle (theTitle);
|
myCResultDialog.SetTitle (theTitle);
|
||||||
myCResultDialog.SetText (theMessage);
|
myCResultDialog.SetText (theMessage);
|
||||||
SetTitle (theTitle);
|
SetTitle (theTitle);
|
||||||
@ -73,3 +81,10 @@ void OCC_3dDoc::SetDialogTitle(TCollection_AsciiString theTitle)
|
|||||||
{
|
{
|
||||||
myCResultDialog.SetTitle(theTitle.ToCString());
|
myCResultDialog.SetTitle(theTitle.ToCString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OCC_3dDoc::OnObjectAddDimensions()
|
||||||
|
{
|
||||||
|
//Add dimentions dialog is opened here
|
||||||
|
myDimensionDlg.ShowWindow(SW_SHOW);
|
||||||
|
myDimensionDlg.UpdateStandardMode ();
|
||||||
|
}
|
||||||
|
@ -13,26 +13,39 @@
|
|||||||
#include "ResultDialog.h"
|
#include "ResultDialog.h"
|
||||||
#include <Standard_Macro.hxx>
|
#include <Standard_Macro.hxx>
|
||||||
|
|
||||||
class AFX_EXT_CLASS OCC_3dDoc : public OCC_3dBaseDoc
|
// Event tracker for 3D views with support of advanced message dialog operations
|
||||||
|
// and dimensions dialog
|
||||||
|
class AFX_EXT_CLASS OCC_3dDoc : public OCC_3dBaseDoc
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void SetDialogTitle(TCollection_AsciiString theTitle);
|
|
||||||
CString GetDialogText();
|
|
||||||
OCC_3dDoc();
|
|
||||||
virtual ~OCC_3dDoc();
|
|
||||||
|
|
||||||
void PocessTextInDialog (CString theTitle, CString theMessage);
|
OCC_3dDoc (bool theIsResultDialog = true);
|
||||||
void PocessTextInDialog (CString theTitle, const TCollection_AsciiString& theMessage)
|
virtual ~OCC_3dDoc();
|
||||||
{
|
|
||||||
CString aMessage (theMessage.ToCString());
|
|
||||||
PocessTextInDialog (theTitle, aMessage);
|
|
||||||
}
|
|
||||||
void ClearDialog();
|
|
||||||
void AddTextInDialog(TCollection_AsciiString& aMessage);
|
|
||||||
|
|
||||||
|
public: // Dialog operations
|
||||||
|
|
||||||
|
void SetDialogTitle(TCollection_AsciiString theTitle);
|
||||||
|
CString GetDialogText();
|
||||||
|
|
||||||
|
void PocessTextInDialog (CString theTitle, CString theMessage);
|
||||||
|
void PocessTextInDialog (CString theTitle, const TCollection_AsciiString& theMessage)
|
||||||
|
{
|
||||||
|
CString aMessage (theMessage.ToCString());
|
||||||
|
PocessTextInDialog (theTitle, aMessage);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ClearDialog();
|
||||||
|
void AddTextInDialog(TCollection_AsciiString& aMessage);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
CResultDialog myCResultDialog;
|
|
||||||
|
afx_msg void OnObjectAddDimensions();
|
||||||
|
DECLARE_MESSAGE_MAP()
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
CResultDialog myCResultDialog;
|
||||||
|
CDimensionDlg myDimensionDlg;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // !defined(AFX_OCC_3DDOC_H__1F4065AD_39C4_11D7_8611_0060B0EE281E__INCLUDED_)
|
#endif // !defined(AFX_OCC_3DDOC_H__1F4065AD_39C4_11D7_8611_0060B0EE281E__INCLUDED_)
|
||||||
|
@ -345,7 +345,6 @@ void OCC_3dView::OnLButtonUp(UINT nFlags, CPoint point)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CurAction3d_DynamicZooming :
|
case CurAction3d_DynamicZooming :
|
||||||
// SetCursor(AfxGetApp()->LoadStandardCursor());
|
|
||||||
myCurrentMode = CurAction3d_Nothing;
|
myCurrentMode = CurAction3d_Nothing;
|
||||||
break;
|
break;
|
||||||
case CurAction3d_WindowZooming :
|
case CurAction3d_WindowZooming :
|
||||||
@ -445,9 +444,11 @@ void OCC_3dView::OnMouseMove(UINT nFlags, CPoint point)
|
|||||||
switch (myCurrentMode)
|
switch (myCurrentMode)
|
||||||
{
|
{
|
||||||
case CurAction3d_Nothing :
|
case CurAction3d_Nothing :
|
||||||
myXmax = point.x; myYmax = point.y;
|
|
||||||
DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False);
|
DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False);
|
||||||
if (nFlags & MK_SHIFT)
|
myXmax = point.x;
|
||||||
|
myYmax = point.y;
|
||||||
|
|
||||||
|
if (nFlags & MK_SHIFT)
|
||||||
GetDocument()->ShiftDragEvent(myXmax,myYmax,0,myView);
|
GetDocument()->ShiftDragEvent(myXmax,myYmax,0,myView);
|
||||||
else
|
else
|
||||||
GetDocument()->DragEvent(myXmax,myYmax,0,myView);
|
GetDocument()->DragEvent(myXmax,myYmax,0,myView);
|
||||||
|
@ -136,7 +136,7 @@ BOOL CAboutDlgStd::OnInitDialog(){
|
|||||||
|
|
||||||
CWnd* aReadmeEdit = GetDlgItem(IDC_README);
|
CWnd* aReadmeEdit = GetDlgItem(IDC_README);
|
||||||
CFile aFile;
|
CFile aFile;
|
||||||
CString aHelpFilePath = CString (((OCC_App*)AfxGetApp())->GetInitDataDir()) + "\\README.txt";
|
CString aHelpFilePath = CString (((OCC_App*)AfxGetApp())->GetInitDataDir()) + L"\\README.txt";
|
||||||
if(aFile.Open (aHelpFilePath, CFile::modeRead))
|
if(aFile.Open (aHelpFilePath, CFile::modeRead))
|
||||||
{
|
{
|
||||||
aReadmeEdit->ShowWindow(TRUE);
|
aReadmeEdit->ShowWindow(TRUE);
|
||||||
@ -145,9 +145,8 @@ BOOL CAboutDlgStd::OnInitDialog(){
|
|||||||
aFile.Read(buffer,aFileLength);
|
aFile.Read(buffer,aFileLength);
|
||||||
ReadmeText = buffer;
|
ReadmeText = buffer;
|
||||||
delete[] buffer;
|
delete[] buffer;
|
||||||
ReadmeText.SetAt (aFileLength, '\0');
|
|
||||||
ReadmeText.Replace (L"\n", L"\r\n");
|
ReadmeText.Replace (L"\n", L"\r\n");
|
||||||
UpdateData(FALSE);
|
UpdateData (FALSE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -51,7 +51,10 @@ void CParamsFacesPage::OnBnClickedFacesbtn1()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
myFirstFace = TopoDS::Face (myAISContext->LocalContext()->SelectedShape());
|
// Workaround for AIS_LocalContext::SelectedShape()
|
||||||
|
myFirstFace = TopoDS::Face (CDimensionDlg::SelectedShape());
|
||||||
|
//myFirstFace = TopoDS::Face (myAISContext->LocalContext()->SelectedShape());
|
||||||
|
|
||||||
myAISContext->LocalContext()->ClearSelected();
|
myAISContext->LocalContext()->ClearSelected();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,7 +69,9 @@ void CParamsFacesPage::OnBnClickedFacesbtn2()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mySecondFace = TopoDS::Face (myAISContext->LocalContext()->SelectedShape());
|
// Workaround for AIS_LocalContext::SelectedShape()
|
||||||
|
mySecondFace = TopoDS::Face (CDimensionDlg::SelectedShape());
|
||||||
|
//mySecondFace = TopoDS::Face (myAISContext->LocalContext()->SelectedShape());
|
||||||
myAISContext->LocalContext()->ClearSelected();
|
myAISContext->LocalContext()->ClearSelected();
|
||||||
|
|
||||||
CDimensionDlg *aDimDlg = (CDimensionDlg*)(GetParentOwner());
|
CDimensionDlg *aDimDlg = (CDimensionDlg*)(GetParentOwner());
|
||||||
@ -79,12 +84,13 @@ void CParamsFacesPage::OnBnClickedFacesbtn2()
|
|||||||
anAspect->TextAspect()->SetHeight (aDimDlg->GetFontHeight());
|
anAspect->TextAspect()->SetHeight (aDimDlg->GetFontHeight());
|
||||||
anAspect->MakeTextShaded (aDimDlg->IsText3dShaded());
|
anAspect->MakeTextShaded (aDimDlg->IsText3dShaded());
|
||||||
anAspect->SetCommonColor (aDimDlg->GetDimensionColor());
|
anAspect->SetCommonColor (aDimDlg->GetDimensionColor());
|
||||||
|
anAspect->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
||||||
if (myIsAngleDimension)
|
if (myIsAngleDimension)
|
||||||
{
|
{
|
||||||
// Build an angle dimension between two non-parallel edges
|
// Build an angle dimension between two non-parallel edges
|
||||||
Handle(AIS_AngleDimension) anAngleDim = new AIS_AngleDimension (myFirstFace, mySecondFace);
|
Handle(AIS_AngleDimension) anAngleDim = new AIS_AngleDimension (myFirstFace, mySecondFace);
|
||||||
anAngleDim->SetDimensionAspect (anAspect);
|
anAngleDim->SetDimensionAspect (anAspect);
|
||||||
anAngleDim->DimensionAspect()->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
|
||||||
if (aDimDlg->IsUnitsDisplayed())
|
if (aDimDlg->IsUnitsDisplayed())
|
||||||
{
|
{
|
||||||
anAngleDim->SetDisplayUnits (aDimDlg->GetUnits ());
|
anAngleDim->SetDisplayUnits (aDimDlg->GetUnits ());
|
||||||
@ -105,7 +111,7 @@ void CParamsFacesPage::OnBnClickedFacesbtn2()
|
|||||||
{
|
{
|
||||||
Handle(AIS_LengthDimension) aLenDim = new AIS_LengthDimension (myFirstFace, mySecondFace);
|
Handle(AIS_LengthDimension) aLenDim = new AIS_LengthDimension (myFirstFace, mySecondFace);
|
||||||
aLenDim->SetDimensionAspect (anAspect);
|
aLenDim->SetDimensionAspect (anAspect);
|
||||||
aLenDim->DimensionAspect()->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
|
||||||
if (aLenDim->DimensionAspect()->IsUnitsDisplayed())
|
if (aLenDim->DimensionAspect()->IsUnitsDisplayed())
|
||||||
{
|
{
|
||||||
aLenDim->SetFlyout (aDimDlg->GetFlyout());
|
aLenDim->SetFlyout (aDimDlg->GetFlyout());
|
||||||
|
@ -69,7 +69,10 @@ void CRadiusParamsPage::OnBnClickedObjectBtn()
|
|||||||
Standard_Boolean isAttachPoint = Standard_False;
|
Standard_Boolean isAttachPoint = Standard_False;
|
||||||
Standard_Real aFirstPar = 0, aLastPar = 0;
|
Standard_Real aFirstPar = 0, aLastPar = 0;
|
||||||
|
|
||||||
TopoDS_Shape aSelShape = myAISContext->LocalContext()->SelectedShape();
|
// Workaround for AIS_LocalContext::SelectedShape()
|
||||||
|
TopoDS_Shape aSelShape = CDimensionDlg::SelectedShape();
|
||||||
|
//TopoDS_Shape aSelShape = myAISContext->LocalContext()->SelectedShape();
|
||||||
|
|
||||||
if (aSelShape.ShapeType() != TopAbs_EDGE &&
|
if (aSelShape.ShapeType() != TopAbs_EDGE &&
|
||||||
aSelShape.ShapeType() != TopAbs_FACE &&
|
aSelShape.ShapeType() != TopAbs_FACE &&
|
||||||
aSelShape.ShapeType() != TopAbs_WIRE)
|
aSelShape.ShapeType() != TopAbs_WIRE)
|
||||||
@ -113,7 +116,7 @@ void CRadiusParamsPage::OnBnClickedObjectBtn()
|
|||||||
anAspect->TextAspect()->SetHeight (aDimDlg->GetFontHeight());
|
anAspect->TextAspect()->SetHeight (aDimDlg->GetFontHeight());
|
||||||
anAspect->MakeTextShaded (aDimDlg->IsText3dShaded());
|
anAspect->MakeTextShaded (aDimDlg->IsText3dShaded());
|
||||||
anAspect->SetCommonColor (aDimDlg->GetDimensionColor());
|
anAspect->SetCommonColor (aDimDlg->GetDimensionColor());
|
||||||
aDim->DimensionAspect()->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
anAspect->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
||||||
if (aDimDlg->IsUnitsDisplayed())
|
if (aDimDlg->IsUnitsDisplayed())
|
||||||
{
|
{
|
||||||
aDim->SetDisplayUnits (aDimDlg->GetUnits());
|
aDim->SetDisplayUnits (aDimDlg->GetUnits());
|
||||||
|
@ -683,7 +683,7 @@ END
|
|||||||
STRINGTABLE
|
STRINGTABLE
|
||||||
BEGIN
|
BEGIN
|
||||||
ID_OBJECT_DIMENSIONS "Add dimensions"
|
ID_OBJECT_DIMENSIONS "Add dimensions"
|
||||||
ID_LOCALCONTEXT_ADDDIMENSION "Add new dimension for selected objetcs"
|
ID_LOCALCONTEXT_ADDDIMENSION "Add new dimension for selected objects"
|
||||||
END
|
END
|
||||||
|
|
||||||
STRINGTABLE
|
STRINGTABLE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user