mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-24 13:50:49 +03:00
0024133: Development of improvement of dimensions implementation; new length, radius,diameter and angle dimensions.
Some corrections; test cases were added; coding standards in MFC samples & presentations Request stencil buffer for Linux. correct test cases; correct compilation errors compilation warnings (gcc/Linux)
This commit is contained in:
Binary file not shown.
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.1 KiB |
@@ -303,6 +303,7 @@ BEGIN
|
||||
BUTTON ID_OBJECT_DISPLAYALL
|
||||
SEPARATOR
|
||||
BUTTON ID_OBJECT_REMOVE
|
||||
BUTTON ID_OBJECT_DIM
|
||||
END
|
||||
|
||||
|
||||
@@ -371,10 +372,6 @@ BEGIN
|
||||
BEGIN
|
||||
MENUITEM "Background Color...", ID_Modify_ChangeBackground
|
||||
END
|
||||
POPUP "User cylinder"
|
||||
BEGIN
|
||||
MENUITEM "Change face color", ID_USERCYLINDER_CHANGEFACECOLOR
|
||||
END
|
||||
POPUP "Object(s)"
|
||||
BEGIN
|
||||
MENUITEM "Erase", ID_OBJECT_ERASE
|
||||
@@ -408,6 +405,10 @@ BEGIN
|
||||
END
|
||||
MENUITEM "Transparency...", ID_OBJECT_TRANSPARENCY
|
||||
END
|
||||
POPUP "User cylinder"
|
||||
BEGIN
|
||||
MENUITEM "Change face color", ID_USERCYLINDER_CHANGEFACECOLOR
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
@@ -514,6 +515,12 @@ BEGIN
|
||||
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
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
@@ -77,6 +77,7 @@ END_MESSAGE_MAP()
|
||||
// CViewer3dDoc construction/destruction
|
||||
|
||||
CViewer3dDoc::CViewer3dDoc()
|
||||
:OCC_3dDoc()
|
||||
{
|
||||
myCylinder.Nullify();
|
||||
mySphere.Nullify();
|
||||
@@ -86,21 +87,9 @@ CViewer3dDoc::CViewer3dDoc()
|
||||
myOverlappedBox.Nullify();
|
||||
myOffsetDlg = NULL;
|
||||
myStaticTrihedronAxisIsDisplayed = FALSE;
|
||||
|
||||
myState = -1;
|
||||
|
||||
isTextureSampleStarted = FALSE;
|
||||
/*
|
||||
// TODO: add one-time construction code here
|
||||
Handle(Graphic3d_WNTGraphicDevice) theGraphicDevice =
|
||||
((CViewer3dApp*)AfxGetApp())->GetGraphicDevice();
|
||||
|
||||
myViewer = new V3d_Viewer(theGraphicDevice,(short *) "Visu3D");
|
||||
myViewer->SetDefaultLights();
|
||||
myViewer->SetLightOn();
|
||||
*/
|
||||
|
||||
// myViewer->SetDefaultBackgroundColor(Quantity_TOC_RGB, 0.,0.,0.);
|
||||
|
||||
myPresentation = OCCDemo_Presentation::Current;
|
||||
myPresentation->SetDocument(this);
|
||||
@@ -702,39 +691,22 @@ void CViewer3dDoc::OnUpdateOptionsTrihedronStaticTrihedron(CCmdUI* pCmdUI)
|
||||
|
||||
}
|
||||
|
||||
void CViewer3dDoc::Popup( const Standard_Integer x,
|
||||
const Standard_Integer y ,
|
||||
const Handle(V3d_View)& aView )
|
||||
void CViewer3dDoc::Popup (const Standard_Integer x,
|
||||
const Standard_Integer y ,
|
||||
const Handle(V3d_View)& aView)
|
||||
{
|
||||
Standard_Integer PopupMenuNumber=0;
|
||||
myAISContext->InitCurrent();
|
||||
if (myAISContext->MoreCurrent()) {
|
||||
if (myAISContext->Current()->IsKind(STANDARD_TYPE(User_Cylinder)))
|
||||
return;
|
||||
else
|
||||
PopupMenuNumber = 1;
|
||||
}
|
||||
|
||||
CMenu menu;
|
||||
VERIFY(menu.LoadMenu(IDR_Popup3D));
|
||||
CMenu* pPopup = menu.GetSubMenu(PopupMenuNumber);
|
||||
|
||||
ASSERT(pPopup != NULL);
|
||||
if (PopupMenuNumber == 1) // more than 1 object.
|
||||
myPopupMenuNumber=0;
|
||||
// Specified check for context menu number to call
|
||||
myAISContext->InitCurrent();
|
||||
if (myAISContext->MoreCurrent())
|
||||
{
|
||||
bool OneOrMoreInShading = false;
|
||||
for (myAISContext->InitCurrent();myAISContext->MoreCurrent ();myAISContext->NextCurrent ())
|
||||
if (myAISContext->IsDisplayed(myAISContext->Current(),1)) OneOrMoreInShading=true;
|
||||
if(!OneOrMoreInShading)
|
||||
pPopup->EnableMenuItem(5, MF_BYPOSITION | MF_DISABLED | MF_GRAYED);
|
||||
}
|
||||
|
||||
POINT winCoord = { x , y };
|
||||
Handle(WNT_Window) aWNTWindow=
|
||||
Handle(WNT_Window)::DownCast(aView->Window());
|
||||
ClientToScreen ( (HWND)(aWNTWindow->HWindow()),&winCoord);
|
||||
pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON , winCoord.x, winCoord.y ,
|
||||
AfxGetMainWnd());
|
||||
if (myAISContext->Current()->IsKind(STANDARD_TYPE(User_Cylinder)))
|
||||
{
|
||||
myPopupMenuNumber = 2;
|
||||
//return;
|
||||
}
|
||||
}
|
||||
OCC_3dBaseDoc::Popup(x,y, aView);
|
||||
}
|
||||
|
||||
//Set faces selection mode
|
||||
|
Binary file not shown.
163
samples/mfc/standard/Common/AngleParamsVerticesPage.cpp
Normal file
163
samples/mfc/standard/Common/AngleParamsVerticesPage.cpp
Normal file
@@ -0,0 +1,163 @@
|
||||
// AngleParamsVerticesPage.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "AngleParamsVerticesPage.h"
|
||||
#include "DimensionDlg.h"
|
||||
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
#include <AIS_LocalContext.hxx>
|
||||
#include <AIS_LengthDimension.hxx>
|
||||
#include <AIS_AngleDimension.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <GC_MakePlane.hxx>
|
||||
#include <Prs3d_DimensionAspect.hxx>
|
||||
|
||||
// CAngleParamsVerticesPage dialog
|
||||
|
||||
IMPLEMENT_DYNAMIC(CAngleParamsVerticesPage, CDialog)
|
||||
|
||||
//=======================================================================
|
||||
//function : CAngleParamsVerticesPage
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
CAngleParamsVerticesPage::CAngleParamsVerticesPage (Handle(AIS_InteractiveContext) theAISContext,
|
||||
CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CAngleParamsVerticesPage::IDD, pParent)
|
||||
{
|
||||
myAISContext = theAISContext;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ~CAngleParamsVerticesPage
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
CAngleParamsVerticesPage::~CAngleParamsVerticesPage()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : DoDataExchange
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void CAngleParamsVerticesPage::DoDataExchange (CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange (pDX);
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CAngleParamsVerticesPage, CDialog)
|
||||
ON_BN_CLICKED(IDC_BUTTON1, &CAngleParamsVerticesPage::OnBnClickedVertex1Btn)
|
||||
ON_BN_CLICKED(IDC_BUTTON3, &CAngleParamsVerticesPage::OnBnClickedVertex2Btn)
|
||||
ON_BN_CLICKED(IDC_BUTTON4, &CAngleParamsVerticesPage::OnBnClickedVertex3Btn)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : OnBnClickedVertex1Btn
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void CAngleParamsVerticesPage::OnBnClickedVertex1Btn()
|
||||
{
|
||||
// Open local context and choose the vertex for angle dimensions
|
||||
if (!myAISContext->HasOpenedContext())
|
||||
{
|
||||
myAISContext->OpenLocalContext();
|
||||
myAISContext->ActivateStandardMode(TopAbs_VERTEX);
|
||||
AfxMessageBox (_T ("Local context was not opened. Choose the edge and press the button again"),
|
||||
MB_ICONINFORMATION | MB_OK);
|
||||
return;
|
||||
}
|
||||
|
||||
// Now it's ok, local context is opened and edge selection mode is activated
|
||||
// Check if some vertex is selected
|
||||
myAISContext->LocalContext()->InitSelected();
|
||||
if (!myAISContext->LocalContext()->MoreSelected())
|
||||
{
|
||||
AfxMessageBox (_T ("Choose the vertex and press the button again"),
|
||||
MB_ICONINFORMATION | MB_OK);
|
||||
return;
|
||||
}
|
||||
|
||||
myFirstVertex = TopoDS::Vertex (myAISContext->LocalContext()->SelectedShape());
|
||||
myAISContext->LocalContext()->ClearSelected();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : OnBnClickedVertex2Btn
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void CAngleParamsVerticesPage::OnBnClickedVertex2Btn()
|
||||
{
|
||||
myAISContext->LocalContext()->InitSelected();
|
||||
if (!myAISContext->LocalContext()->MoreSelected())
|
||||
{
|
||||
AfxMessageBox ( _T("Choose the vertex and press the button again"), MB_ICONINFORMATION | MB_OK);
|
||||
return;
|
||||
}
|
||||
|
||||
mySecondVertex = TopoDS::Vertex (myAISContext->LocalContext()->SelectedShape());
|
||||
|
||||
myAISContext->LocalContext()->ClearSelected();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : OnBnClickedVertex3Btn
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void CAngleParamsVerticesPage::OnBnClickedVertex3Btn()
|
||||
{
|
||||
myAISContext->LocalContext()->InitSelected();
|
||||
if (!myAISContext->LocalContext()->MoreSelected())
|
||||
{
|
||||
AfxMessageBox (_T ("Choose the vertex and press the button again"), MB_ICONINFORMATION | MB_OK);
|
||||
return;
|
||||
}
|
||||
|
||||
myThirdVertex = TopoDS::Vertex (myAISContext->LocalContext()->SelectedShape());
|
||||
myAISContext->LocalContext()->ClearSelected();
|
||||
|
||||
//Build dimension here
|
||||
TopoDS_Edge anEdge12 = BRepBuilderAPI_MakeEdge (myFirstVertex, mySecondVertex);
|
||||
TopoDS_Edge anEdge23 = BRepBuilderAPI_MakeEdge (mySecondVertex, myThirdVertex);
|
||||
|
||||
CDimensionDlg *aDimDlg = (CDimensionDlg*)(GetParentOwner());
|
||||
|
||||
gp_Pnt aP1 = BRep_Tool::Pnt (myFirstVertex),
|
||||
aP2 = BRep_Tool::Pnt (mySecondVertex),
|
||||
aP3 = BRep_Tool::Pnt (myThirdVertex);
|
||||
GC_MakePlane aPlaneBuilder (aP1,aP2,aP3);
|
||||
|
||||
Handle(Geom_Plane) aPlane = aPlaneBuilder.Value();
|
||||
Handle(AIS_AngleDimension) anAngleDim = new AIS_AngleDimension (aP1,aP2,aP3);
|
||||
Handle(Prs3d_DimensionAspect) anAspect = new Prs3d_DimensionAspect();
|
||||
anAspect->MakeArrows3d (Standard_False);
|
||||
anAspect->MakeText3d (aDimDlg->GetTextType());
|
||||
anAspect->TextAspect()->SetHeight (aDimDlg->GetFontHeight());
|
||||
anAspect->MakeTextShaded (aDimDlg->IsText3dShaded());
|
||||
anAspect->SetCommonColor (aDimDlg->GetDimensionColor());
|
||||
anAngleDim->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
||||
if (anAngleDim->IsUnitsDisplayed())
|
||||
{
|
||||
anAngleDim->SetDisplayUnits (aDimDlg->GetUnits());
|
||||
if ((anAngleDim->DisplayUnits().IsEqual (TCollection_AsciiString ("deg"))))
|
||||
{
|
||||
anAngleDim->MakeUnitsDisplayed (Standard_False);
|
||||
}
|
||||
else
|
||||
{
|
||||
anAngleDim->SetDisplaySpecialSymbol (AIS_DSS_No);
|
||||
}
|
||||
}
|
||||
anAngleDim->SetDimensionAspect (anAspect);
|
||||
myAISContext->CloseAllContexts();
|
||||
myAISContext->Display (anAngleDim);
|
||||
myAISContext->OpenLocalContext();
|
||||
myAISContext->ActivateStandardMode (TopAbs_VERTEX);
|
||||
}
|
31
samples/mfc/standard/Common/AngleParamsVerticesPage.h
Normal file
31
samples/mfc/standard/Common/AngleParamsVerticesPage.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
#include "res\OCC_Resource.h"
|
||||
|
||||
// CAngleParamsVerticesPage dialog
|
||||
|
||||
class CAngleParamsVerticesPage : public CDialog
|
||||
{
|
||||
DECLARE_DYNAMIC(CAngleParamsVerticesPage)
|
||||
private:
|
||||
Handle(AIS_InteractiveContext) myAISContext;
|
||||
TopoDS_Vertex myFirstVertex;
|
||||
TopoDS_Vertex mySecondVertex;
|
||||
TopoDS_Vertex myThirdVertex;
|
||||
public:
|
||||
CAngleParamsVerticesPage(Handle (AIS_InteractiveContext) theAISContext,
|
||||
CWnd* pParent = NULL); // standard constructor
|
||||
virtual ~CAngleParamsVerticesPage();
|
||||
|
||||
// Dialog Data
|
||||
enum { IDD = IDD_AngleParamsVerticesPage };
|
||||
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
public:
|
||||
afx_msg void OnBnClickedVertex1Btn();
|
||||
afx_msg void OnBnClickedVertex2Btn();
|
||||
afx_msg void OnBnClickedVertex3Btn();
|
||||
};
|
686
samples/mfc/standard/Common/DimensionDlg.cpp
Normal file
686
samples/mfc/standard/Common/DimensionDlg.cpp
Normal file
@@ -0,0 +1,686 @@
|
||||
// CDimensionDlg.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "DimensionDlg.h"
|
||||
#include "LengthParamsEdgePage.h"
|
||||
#include "LengthParamsVerticesPage.h"
|
||||
#include "LengthParamsEdgesPage.h"
|
||||
#include "AngleParamsVerticesPage.h"
|
||||
#include "RadiusParamsPage.h"
|
||||
#include <Standard_Macro.hxx>
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
#include <TColStd_ListIteratorOfListOfInteger.hxx>
|
||||
#include <TColStd_ListOfInteger.hxx>
|
||||
#include <AIS_LocalContext.hxx>
|
||||
#include <Quantity_Color.hxx>
|
||||
|
||||
BEGIN_MESSAGE_MAP(CDimensionDlg, CDialog)
|
||||
ON_BN_CLICKED(IDOK, &CDimensionDlg::OnBnClickedOk)
|
||||
ON_BN_CLICKED(IDC_DimLength, &CDimensionDlg::OnBnClickedDimLength)
|
||||
ON_BN_CLICKED(IDC_DimAngle, &CDimensionDlg::OnBnClickedDimAngle)
|
||||
ON_BN_CLICKED(IDC_DimRadius, &CDimensionDlg::OnBnClickedDimRadius)
|
||||
ON_NOTIFY(TCN_SELCHANGE, IDC_LengthTab, &CDimensionDlg::OnTcnSelChangeLengthTab)
|
||||
ON_NOTIFY(TCN_SELCHANGING, IDC_LengthTab, &CDimensionDlg::OnTcnSelChangingLengthTab)
|
||||
ON_WM_DESTROY()
|
||||
ON_NOTIFY(TCN_SELCHANGE, IDC_AngleTab, &CDimensionDlg::OnTcnSelChangeAngleTab)
|
||||
ON_NOTIFY(TCN_SELCHANGING, IDC_AngleTab, &CDimensionDlg::OnTcnSelChangingAngleTab)
|
||||
ON_BN_CLICKED(IDC_DimDiameter, &CDimensionDlg::OnBnClickedDimDiameter)
|
||||
ON_BN_CLICKED(IDC_2DText, &CDimensionDlg::OnBnClicked2dText)
|
||||
ON_BN_CLICKED(IDC_3DText, &CDimensionDlg::OnBnClicked3dText)
|
||||
ON_BN_CLICKED(IDC_DimensionColor, &CDimensionDlg::OnBnClickedDimensionColor)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
//=======================================================================
|
||||
//function : CDimensionDlg
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
CDimensionDlg::CDimensionDlg(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CDimensionDlg::IDD, pParent),
|
||||
mySelectedDimType(0),
|
||||
myFontSize (10),
|
||||
myDimensionColor (Quantity_NOC_LAWNGREEN)
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : CDimensionDlg
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
CDimensionDlg::CDimensionDlg (Handle(AIS_InteractiveContext) &theAISContext,
|
||||
CWnd* pParent)
|
||||
: CDialog(CDimensionDlg::IDD, pParent),
|
||||
mySelectedDimType(0),
|
||||
myFontSize (10),
|
||||
myDimensionColor (Quantity_NOC_LAWNGREEN)
|
||||
{
|
||||
myAISContext = theAISContext;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ~CDimensionDlg
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
CDimensionDlg::~CDimensionDlg()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetContext
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void CDimensionDlg::SetContext (const Handle(AIS_InteractiveContext) theContext)
|
||||
{
|
||||
myAISContext = theContext;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : OnInitDialog
|
||||
//purpose : Initialization of dialog fields and parameters
|
||||
//=======================================================================
|
||||
|
||||
BOOL CDimensionDlg::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
myLengthParams = (CTabCtrl*) GetDlgItem (IDC_LengthTab);
|
||||
myAngleParams = (CTabCtrl*) GetDlgItem (IDC_AngleTab);
|
||||
myRadiusParams = (CTabCtrl*) GetDlgItem (IDC_RadiusTab);
|
||||
myDiameterParams = (CTabCtrl*) GetDlgItem (IDC_DiameterTab);
|
||||
|
||||
CreateLengthParamsTab();
|
||||
CreateAngleParamsTab();
|
||||
CreateRadiusParamsTab();
|
||||
CreateDiameterParamsTab( );
|
||||
|
||||
myLengthParams->ShowWindow (SW_SHOW);
|
||||
myAngleParams->ShowWindow (SW_HIDE);
|
||||
myRadiusParams->ShowWindow (SW_HIDE);
|
||||
myDiameterParams->ShowWindow (SW_HIDE);
|
||||
|
||||
// Setting default values
|
||||
((CSliderCtrl*)GetDlgItem(IDC_Flyout))->SetRange (-30,30,true);
|
||||
((CSliderCtrl*)GetDlgItem(IDC_Flyout))->SetPos (15);
|
||||
UpdateUnitsListForLength ();
|
||||
((CComboBox*)GetDlgItem (IDC_DisplayUnits))->SetCurSel (1);
|
||||
CheckRadioButton (IDC_2DText, IDC_3DText, IDC_2DText);
|
||||
SetTextModeControlsVisible (false);
|
||||
CComboBox* aCombo =(CComboBox* )GetDlgItem (IDC_FontSize);
|
||||
aCombo->SelectString (0,"10");
|
||||
|
||||
UpdateData (FALSE);
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
// EXCEPTION: OCX Property Pages should return FALSE
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : DoDataExchange
|
||||
//purpose : Updating of dialog data if it's needed
|
||||
//=======================================================================
|
||||
|
||||
void CDimensionDlg::DoDataExchange (CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange (pDX);
|
||||
|
||||
DDX_Radio (pDX, IDC_DimLength, mySelectedDimType);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : OnBnClickedOk
|
||||
//purpose : Reset all local contexts and close the dimension dialog
|
||||
//=======================================================================
|
||||
|
||||
void CDimensionDlg::OnBnClickedOk()
|
||||
{
|
||||
if (myAISContext->HasOpenedContext())
|
||||
{
|
||||
myAISContext->CloseAllContexts();
|
||||
}
|
||||
|
||||
OnOK();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetFlyout
|
||||
//purpose : Only for length dimensions! Gets flyout value
|
||||
//=======================================================================
|
||||
|
||||
const Standard_Real CDimensionDlg::GetFlyout() const
|
||||
{
|
||||
return ((CSliderCtrl*)GetDlgItem(IDC_Flyout))->GetPos();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : CreateLengthParamsTab
|
||||
//purpose : Fill tab control for length dimensions
|
||||
//=======================================================================
|
||||
|
||||
void CDimensionDlg::CreateLengthParamsTab()
|
||||
{
|
||||
TC_ITEM aTabItem;
|
||||
aTabItem.mask = TCIF_TEXT;
|
||||
aTabItem.pszText = "Edge";
|
||||
myLengthParams->InsertItem (0, &aTabItem);
|
||||
aTabItem.pszText = "Vertices";
|
||||
myLengthParams->InsertItem (1, &aTabItem);
|
||||
aTabItem.pszText = "Parallel edges";
|
||||
myLengthParams->InsertItem (2, &aTabItem);
|
||||
|
||||
CLengthParamsEdgePage *aPage1 = new CLengthParamsEdgePage (myAISContext);
|
||||
aTabItem.mask = TCIF_PARAM;
|
||||
aTabItem.lParam = (LPARAM)aPage1;
|
||||
myLengthParams->SetItem (0, &aTabItem);
|
||||
VERIFY (aPage1->Create (CLengthParamsEdgePage::IDD,myLengthParams));
|
||||
aPage1->SetWindowPos (NULL,10,30,0,0,SWP_NOSIZE | SWP_NOZORDER);
|
||||
aPage1->ShowWindow (SW_SHOW);
|
||||
|
||||
CLengthParamsVerticesPage *aPage2 = new CLengthParamsVerticesPage (myAISContext);
|
||||
aTabItem.mask = TCIF_PARAM;
|
||||
aTabItem.lParam = (LPARAM)aPage2;
|
||||
myLengthParams->SetItem (1, &aTabItem);
|
||||
VERIFY (aPage2->Create (CLengthParamsVerticesPage::IDD,myLengthParams));
|
||||
aPage2->SetWindowPos (NULL,10,30,0,0,SWP_NOSIZE | SWP_NOZORDER);
|
||||
|
||||
CLengthParamsEdgesPage *aPage3 = new CLengthParamsEdgesPage (myAISContext);
|
||||
aTabItem.mask = TCIF_PARAM;
|
||||
aTabItem.lParam = (LPARAM)aPage3;
|
||||
myLengthParams->SetItem (2, &aTabItem);
|
||||
VERIFY (aPage3->Create (CLengthParamsEdgesPage::IDD,myLengthParams));
|
||||
aPage3->SetWindowPos (NULL,10,30,0,0,SWP_NOSIZE | SWP_NOZORDER);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : CreateAngleParamsTab
|
||||
//purpose : Fill tab control for angle dimensions
|
||||
//=======================================================================
|
||||
|
||||
void CDimensionDlg::CreateAngleParamsTab()
|
||||
{
|
||||
TC_ITEM aTabItem;
|
||||
aTabItem.mask = TCIF_TEXT;
|
||||
aTabItem.pszText = "Two edges";
|
||||
myAngleParams->InsertItem (0, &aTabItem);
|
||||
aTabItem.pszText = "Three vertices";
|
||||
myAngleParams->InsertItem (1, &aTabItem);
|
||||
|
||||
CLengthParamsEdgesPage *aPage1 = new CLengthParamsEdgesPage (myAISContext, true);
|
||||
aTabItem.mask = TCIF_PARAM;
|
||||
aTabItem.lParam = (LPARAM)aPage1;
|
||||
myAngleParams->SetItem (0, &aTabItem);
|
||||
VERIFY (aPage1->Create (CLengthParamsEdgesPage::IDD,myAngleParams));
|
||||
aPage1->SetWindowPos (NULL,10,30,0,0,SWP_NOSIZE | SWP_NOZORDER);
|
||||
aPage1->ShowWindow (SW_SHOW);
|
||||
|
||||
CAngleParamsVerticesPage *aPage2 = new CAngleParamsVerticesPage (myAISContext);
|
||||
aTabItem.mask = TCIF_PARAM;
|
||||
aTabItem.lParam = (LPARAM)aPage2;
|
||||
myAngleParams->SetItem (1, &aTabItem);
|
||||
VERIFY (aPage2->Create (CAngleParamsVerticesPage::IDD,myAngleParams));
|
||||
aPage2->SetWindowPos (NULL,10,30,0,0,SWP_NOSIZE | SWP_NOZORDER);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : CreateRadiusParamsTab
|
||||
//purpose : Fill tab control for radius dimensions
|
||||
//=======================================================================
|
||||
|
||||
void CDimensionDlg::CreateRadiusParamsTab()
|
||||
{
|
||||
TC_ITEM aTabItem;
|
||||
aTabItem.mask = TCIF_TEXT;
|
||||
aTabItem.pszText = "Circle or arc";
|
||||
myRadiusParams->InsertItem (0, &aTabItem);
|
||||
CRadiusParamsPage *aPage1 = new CRadiusParamsPage (myAISContext);
|
||||
aTabItem.mask = TCIF_PARAM;
|
||||
aTabItem.lParam = (LPARAM)aPage1;
|
||||
myRadiusParams->SetItem (0, &aTabItem);
|
||||
VERIFY (aPage1->Create (CRadiusParamsPage::IDD,myRadiusParams));
|
||||
aPage1->SetWindowPos (NULL,10,30,0,0,SWP_NOSIZE | SWP_NOZORDER);
|
||||
aPage1->ShowWindow (SW_SHOW);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : CreateDiameterParamsTab
|
||||
//purpose : Fill tab control for diameter dimensions
|
||||
//=======================================================================
|
||||
|
||||
void CDimensionDlg::CreateDiameterParamsTab()
|
||||
{
|
||||
TC_ITEM aTabItem;
|
||||
aTabItem.mask = TCIF_TEXT;
|
||||
aTabItem.pszText = "Circle or arc";
|
||||
myDiameterParams->InsertItem (0, &aTabItem);
|
||||
CRadiusParamsPage *aPage1 = new CRadiusParamsPage (myAISContext,Standard_True);
|
||||
aTabItem.mask = TCIF_PARAM;
|
||||
aTabItem.lParam = (LPARAM)aPage1;
|
||||
myRadiusParams->SetItem (0, &aTabItem);
|
||||
VERIFY (aPage1->Create (CRadiusParamsPage::IDD,myDiameterParams));
|
||||
aPage1->SetWindowPos (NULL,10,30,0,0,SWP_NOSIZE | SWP_NOZORDER);
|
||||
aPage1->ShowWindow (SW_SHOW);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : UpdateStandardModeForAngle
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void CDimensionDlg::UpdateStandardModeForAngle()
|
||||
{
|
||||
int aTabNum = ((CTabCtrl*) GetDlgItem (IDC_AngleTab))->GetCurSel();
|
||||
myAISContext->CloseAllContexts();
|
||||
myAISContext->OpenLocalContext();
|
||||
myAISContext->ActivateStandardMode (aTabNum == 1 ? TopAbs_VERTEX : TopAbs_EDGE);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : UpdateStandardModeForLength
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void CDimensionDlg::UpdateStandardModeForLength()
|
||||
{
|
||||
int aTabNum = ((CTabCtrl*) GetDlgItem (IDC_LengthTab))->GetCurSel();
|
||||
myAISContext->CloseAllContexts();
|
||||
myAISContext->OpenLocalContext();
|
||||
myAISContext->ActivateStandardMode (aTabNum == 1 ? TopAbs_VERTEX : TopAbs_EDGE);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : UpdateStandardModeForLength
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void CDimensionDlg::UpdateStandardMode()
|
||||
{
|
||||
int aCurIndex = GetCheckedRadioButton (IDC_DimLength, IDC_DimDiameter);
|
||||
switch (aCurIndex)
|
||||
{
|
||||
case IDC_DimLength:
|
||||
UpdateStandardModeForLength();
|
||||
break;
|
||||
case IDC_DimAngle:
|
||||
UpdateStandardModeForAngle();
|
||||
break;
|
||||
case IDC_DimRadius:
|
||||
case IDC_DimDiameter:
|
||||
{
|
||||
myAISContext->OpenLocalContext();
|
||||
myAISContext->ActivateStandardMode (TopAbs_EDGE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : OnBnClickedDimLength
|
||||
//purpose : it is called when <Length> radio button is chosen
|
||||
//=======================================================================
|
||||
|
||||
void CDimensionDlg::OnBnClickedDimLength()
|
||||
{
|
||||
// Update parameters
|
||||
UpdateStandardModeForLength ();
|
||||
(CTabCtrl*) GetDlgItem (IDC_LengthTab)->ShowWindow (SW_SHOW);
|
||||
(CTabCtrl*) GetDlgItem (IDC_AngleTab)->ShowWindow (SW_HIDE);
|
||||
(CTabCtrl*) GetDlgItem (IDC_RadiusTab)->ShowWindow (SW_HIDE);
|
||||
(CTabCtrl*) GetDlgItem (IDC_DiameterTab)->ShowWindow (SW_HIDE);
|
||||
|
||||
UpdateUnitsListForLength ();
|
||||
((CSliderCtrl*)GetDlgItem(IDC_Flyout))->SetPos (15);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : OnBnClickedDimAngle
|
||||
//purpose : it is called when <Angle> radio button is chosen
|
||||
//=======================================================================
|
||||
|
||||
void CDimensionDlg::OnBnClickedDimAngle()
|
||||
{
|
||||
// Update parameters
|
||||
UpdateStandardModeForAngle();
|
||||
(CTabCtrl*) GetDlgItem (IDC_LengthTab)->ShowWindow (SW_HIDE);
|
||||
(CTabCtrl*) GetDlgItem (IDC_AngleTab)->ShowWindow (SW_SHOW);
|
||||
(CTabCtrl*) GetDlgItem (IDC_RadiusTab)->ShowWindow (SW_HIDE);
|
||||
(CTabCtrl*) GetDlgItem (IDC_DiameterTab)->ShowWindow (SW_HIDE);
|
||||
|
||||
UpdateUnitsListForAngle();
|
||||
((CSliderCtrl*)GetDlgItem(IDC_Flyout))->SetPos (15);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : OnBnClickedDimDiameter
|
||||
//purpose : it is called when <Diameter> radio button is chosen
|
||||
//=======================================================================
|
||||
|
||||
void CDimensionDlg::OnBnClickedDimDiameter()
|
||||
{
|
||||
// Update parameters
|
||||
myAISContext->CloseAllContexts();
|
||||
myAISContext->OpenLocalContext();
|
||||
myAISContext->ActivateStandardMode (TopAbs_EDGE);
|
||||
|
||||
(CTabCtrl*) GetDlgItem (IDC_LengthTab)->ShowWindow (SW_HIDE);
|
||||
(CTabCtrl*) GetDlgItem (IDC_AngleTab)->ShowWindow (SW_HIDE);
|
||||
(CTabCtrl*) GetDlgItem (IDC_RadiusTab)->ShowWindow (SW_HIDE);
|
||||
(CTabCtrl*) GetDlgItem (IDC_DiameterTab)->ShowWindow (SW_SHOW);
|
||||
|
||||
UpdateUnitsListForLength();
|
||||
((CSliderCtrl*)GetDlgItem(IDC_Flyout))->SetPos (0);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : OnBnClickedDimRadius
|
||||
//purpose : it is called when <Radius> radio button is chosen
|
||||
//=======================================================================
|
||||
|
||||
void CDimensionDlg::OnBnClickedDimRadius()
|
||||
{
|
||||
// Update parameters
|
||||
myAISContext->CloseAllContexts();
|
||||
myAISContext->OpenLocalContext();
|
||||
myAISContext->ActivateStandardMode (TopAbs_EDGE);
|
||||
(CTabCtrl*) GetDlgItem (IDC_LengthTab)->ShowWindow (SW_HIDE);
|
||||
(CTabCtrl*) GetDlgItem (IDC_AngleTab)->ShowWindow (SW_HIDE);
|
||||
(CTabCtrl*) GetDlgItem (IDC_RadiusTab)->ShowWindow (SW_SHOW);
|
||||
(CTabCtrl*) GetDlgItem (IDC_DiameterTab)->ShowWindow (SW_HIDE);
|
||||
|
||||
UpdateUnitsListForLength();
|
||||
((CSliderCtrl*)GetDlgItem(IDC_Flyout))->SetPos (0);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : OnTcnSelChangeLengthTab
|
||||
//purpose : it is called when in Length tab control current tab was changed
|
||||
//=======================================================================
|
||||
|
||||
void CDimensionDlg::OnTcnSelChangeLengthTab (NMHDR *pNMHDR, LRESULT *pResult)
|
||||
{
|
||||
// Show this chosen tab page
|
||||
int aTabNum = ((CTabCtrl*) GetDlgItem (IDC_LengthTab))->GetCurSel();
|
||||
TC_ITEM anItem;
|
||||
anItem.mask = TCIF_PARAM;
|
||||
((CTabCtrl*) GetDlgItem (IDC_LengthTab))->GetItem (aTabNum, &anItem);
|
||||
ASSERT(anItem.lParam);
|
||||
CWnd *aWnd = (CWnd*)anItem.lParam;
|
||||
aWnd->ShowWindow (SW_SHOW);
|
||||
UpdateStandardModeForLength();
|
||||
*pResult = 0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : OnTcnSelChangingLengthTab
|
||||
//purpose : it is called when in Length tab control current tab
|
||||
// is changing
|
||||
// It is used to hide the current tab here to prevent collisions.
|
||||
//=======================================================================
|
||||
|
||||
void CDimensionDlg::OnTcnSelChangingLengthTab (NMHDR *pNMHDR, LRESULT *pResult)
|
||||
{
|
||||
// Hide current tab page
|
||||
int aTabNum = ((CTabCtrl*) GetDlgItem (IDC_LengthTab))->GetCurSel();
|
||||
TC_ITEM anItem;
|
||||
anItem.mask = TCIF_PARAM;
|
||||
((CTabCtrl*) GetDlgItem (IDC_LengthTab))->GetItem (aTabNum, &anItem);
|
||||
ASSERT (anItem.lParam);
|
||||
CWnd *aWnd = (CWnd*)anItem.lParam;
|
||||
aWnd->ShowWindow (SW_HIDE);
|
||||
*pResult = 0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : OnTcnSelChangeAngleTab
|
||||
//purpose : it is called when in Angle tab control current tab was changed
|
||||
//=======================================================================
|
||||
|
||||
void CDimensionDlg::OnTcnSelChangeAngleTab (NMHDR *pNMHDR, LRESULT *pResult)
|
||||
{
|
||||
int aTabNum = ((CTabCtrl*) GetDlgItem (IDC_AngleTab))->GetCurSel();
|
||||
TC_ITEM anItem;
|
||||
anItem.mask = TCIF_PARAM;
|
||||
((CTabCtrl*) GetDlgItem (IDC_AngleTab))->GetItem (aTabNum, &anItem);
|
||||
ASSERT (anItem.lParam);
|
||||
CWnd *aWnd = (CWnd*)anItem.lParam;
|
||||
aWnd->ShowWindow (SW_SHOW);
|
||||
UpdateStandardModeForAngle();
|
||||
*pResult = 0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : OnTcnSelChangingAngleTab
|
||||
//purpose : it is called when in Angle tab control current tab
|
||||
// is changing
|
||||
// It is used to hide the current tab here to prevent collisions.
|
||||
//=======================================================================
|
||||
|
||||
void CDimensionDlg::OnTcnSelChangingAngleTab (NMHDR *pNMHDR, LRESULT *pResult)
|
||||
{
|
||||
int aTabNum = ((CTabCtrl*) GetDlgItem (IDC_AngleTab))->GetCurSel();
|
||||
TC_ITEM anItem;
|
||||
anItem.mask = TCIF_PARAM;
|
||||
((CTabCtrl*) GetDlgItem (IDC_AngleTab))->GetItem (aTabNum, &anItem);
|
||||
ASSERT (anItem.lParam);
|
||||
CWnd *aWnd = (CWnd*)anItem.lParam;
|
||||
aWnd->ShowWindow (SW_HIDE);
|
||||
*pResult = 0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : DeactivateAllStandardModes
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void CDimensionDlg::DeactivateAllStandardModes()
|
||||
{
|
||||
if (myAISContext->HasOpenedContext())
|
||||
{
|
||||
myAISContext->CloseAllContexts();
|
||||
for (TColStd_ListIteratorOfListOfInteger anIt (myAISContext->LocalContext()->StandardModes());
|
||||
anIt.More();
|
||||
anIt.Next())
|
||||
{
|
||||
myAISContext->LocalContext()->DeactivateStandardMode ((TopAbs_ShapeEnum)anIt.Value());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : OnDestroy
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void CDimensionDlg::OnDestroy()
|
||||
{
|
||||
if (myAISContext->HasOpenedContext())
|
||||
{
|
||||
myAISContext->CloseAllContexts();
|
||||
}
|
||||
// Destroy length tab
|
||||
CWnd *aWnd;
|
||||
TC_ITEM anItem;
|
||||
anItem.mask = TCIF_PARAM;
|
||||
for (int i = 2; i >= 0; --i)
|
||||
{
|
||||
((CTabCtrl*) GetDlgItem (IDC_LengthTab))->GetItem (i, &anItem);
|
||||
ASSERT (anItem.lParam);
|
||||
aWnd = (CWnd*) anItem.lParam;
|
||||
aWnd->DestroyWindow();
|
||||
delete aWnd;
|
||||
}
|
||||
// Destroy angle tab
|
||||
for (int i = 1; i >= 0; --i)
|
||||
{
|
||||
((CTabCtrl*) GetDlgItem (IDC_AngleTab))->GetItem (i, &anItem);
|
||||
ASSERT(anItem.lParam);
|
||||
aWnd = (CWnd*) anItem.lParam;
|
||||
aWnd->DestroyWindow();
|
||||
delete aWnd;
|
||||
}
|
||||
|
||||
CDialog::OnDestroy();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetTextType
|
||||
//purpose : Returns true if 3d text is to be used
|
||||
// and false in the case of 2d text.
|
||||
//=======================================================================
|
||||
|
||||
const Standard_Boolean CDimensionDlg::GetTextType() const
|
||||
{
|
||||
CButton* a3DButton = (CButton*)GetDlgItem (IDC_3DText);
|
||||
return a3DButton->GetCheck();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetFontHeight
|
||||
//purpose : Returns font height
|
||||
//=======================================================================
|
||||
|
||||
const Standard_Real CDimensionDlg::GetFontHeight() const
|
||||
{
|
||||
CComboBox *aComboBox = (CComboBox*)GetDlgItem (IDC_FontSize);
|
||||
CString aStr;
|
||||
aComboBox->GetWindowTextA (aStr);
|
||||
return (Standard_Real)atof (aStr);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : IsText3dShaded
|
||||
//purpose : Only for 3d text; returns true if shaded 3d text is to be used
|
||||
//=======================================================================
|
||||
|
||||
const Standard_Boolean CDimensionDlg::IsText3dShaded() const
|
||||
{
|
||||
CComboBox *aComboBox = (CComboBox*)GetDlgItem (IDC_TextDisplayMode);
|
||||
int aCurIndex = aComboBox->GetCurSel();
|
||||
return aCurIndex == 0 ? Standard_False : Standard_True;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetTextModeControlsVisible
|
||||
//purpose : for the dialog updating
|
||||
//=======================================================================
|
||||
|
||||
void CDimensionDlg::SetTextModeControlsVisible (bool isVisible)
|
||||
{
|
||||
GetDlgItem (IDC_TextDisplayMode)->ShowWindow (isVisible ? SW_SHOW : SW_HIDE);
|
||||
GetDlgItem (IDC_TextDisplayModeStatic)->ShowWindow (isVisible ? SW_SHOW : SW_HIDE);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : OnBnClicked2dText
|
||||
//purpose : for the dialog updating when 2d text radio button was chosen
|
||||
//=======================================================================
|
||||
|
||||
void CDimensionDlg::OnBnClicked2dText()
|
||||
{
|
||||
SetTextModeControlsVisible (false);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : OnBnClicked3dText
|
||||
//purpose : for the dialog updating when 3d text radio button was chosen
|
||||
//=======================================================================
|
||||
|
||||
void CDimensionDlg::OnBnClicked3dText()
|
||||
{
|
||||
SetTextModeControlsVisible (true);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : UpdateUnitsListForLength
|
||||
//purpose : for the dialog updating when 3d text radio button was chosen
|
||||
//=======================================================================
|
||||
|
||||
void CDimensionDlg::UpdateUnitsListForLength()
|
||||
{
|
||||
CComboBox *aCombo = (CComboBox*)GetDlgItem (IDC_DisplayUnits);
|
||||
aCombo->ResetContent();
|
||||
aCombo->AddString ("No");
|
||||
aCombo->AddString ("m");
|
||||
aCombo->AddString ("mm");
|
||||
aCombo->AddString ("in");
|
||||
aCombo->SetCurSel (1);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : UpdateUnitsListForAngle
|
||||
//purpose : for the dialog updating when 3d text radio button was chosen
|
||||
//=======================================================================
|
||||
|
||||
void CDimensionDlg::UpdateUnitsListForAngle()
|
||||
{
|
||||
CComboBox *aCombo = (CComboBox*)GetDlgItem (IDC_DisplayUnits);
|
||||
aCombo->ResetContent();
|
||||
aCombo->AddString ("No");
|
||||
aCombo->AddString ("deg");
|
||||
aCombo->AddString ("rad");
|
||||
aCombo->SetCurSel (1);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : IsUnitsDisplayed
|
||||
//purpose : returns true if the units is to be displayed
|
||||
//=======================================================================
|
||||
|
||||
const Standard_Boolean CDimensionDlg::IsUnitsDisplayed() const
|
||||
{
|
||||
CString aStr;
|
||||
GetDlgItem (IDC_DisplayUnits)->GetWindowTextA (aStr);
|
||||
return !aStr.IsEmpty() && aStr != "No";
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetUnits
|
||||
//purpose : returns display quantity units for current dimension
|
||||
//=======================================================================
|
||||
|
||||
const TCollection_AsciiString CDimensionDlg::GetUnits() const
|
||||
{
|
||||
if (!IsUnitsDisplayed())
|
||||
return TCollection_AsciiString();
|
||||
CString aStr;
|
||||
GetDlgItem (IDC_DisplayUnits)->GetWindowTextA (aStr);
|
||||
Standard_CString aChars = (LPCSTR)aStr;
|
||||
return TCollection_AsciiString (aChars);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : OnBnClickedDimensionColor
|
||||
//purpose : returns display quantity units for current dimension
|
||||
//=======================================================================
|
||||
|
||||
void CDimensionDlg::OnBnClickedDimensionColor()
|
||||
{
|
||||
Standard_Real aR;
|
||||
Standard_Real aG;
|
||||
Standard_Real aB;
|
||||
myDimensionColor.Values (aR,aG,aB, Quantity_TOC_RGB);
|
||||
COLORREF aColor = RGB (aR*255, aG*255, aB*255);
|
||||
|
||||
CColorDialog aDlgColor (aColor);
|
||||
if (aDlgColor.DoModal() == IDOK)
|
||||
{
|
||||
aColor = aDlgColor.GetColor();
|
||||
aR = GetRValue(aColor) / 255.0;
|
||||
aG = GetGValue(aColor) / 255.0;
|
||||
aB = GetBValue(aColor) / 255.0;
|
||||
myDimensionColor = Quantity_Color (aR, aG, aB, Quantity_TOC_RGB);
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetDimensionColor
|
||||
//purpose : returns current dimension color
|
||||
//=======================================================================
|
||||
|
||||
const Quantity_Color CDimensionDlg::GetDimensionColor() const
|
||||
{
|
||||
return myDimensionColor;
|
||||
}
|
79
samples/mfc/standard/Common/DimensionDlg.h
Normal file
79
samples/mfc/standard/Common/DimensionDlg.h
Normal file
@@ -0,0 +1,79 @@
|
||||
#pragma once
|
||||
|
||||
// DimensionDlg dialog
|
||||
|
||||
#include <stdafx.h>
|
||||
|
||||
#include "res\OCC_Resource.h"
|
||||
#include <Standard_Macro.hxx>
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <Quantity_Color.hxx>
|
||||
|
||||
class CDimensionDlg : public CDialog
|
||||
{
|
||||
public:
|
||||
/// Construction & termination
|
||||
CDimensionDlg (CWnd* pParent = NULL); // standard constructor
|
||||
CDimensionDlg (Handle(AIS_InteractiveContext) &theAISContext,
|
||||
CWnd* pParent = NULL);
|
||||
virtual ~CDimensionDlg();
|
||||
|
||||
// Methods for data operation
|
||||
void SetContext (const Handle(AIS_InteractiveContext) theContext);
|
||||
void SetTextModeControlsVisible (bool isVisible);
|
||||
void UpdateUnitsListForLength();
|
||||
void UpdateUnitsListForAngle();
|
||||
void Empty();
|
||||
void DeactivateAllStandardModes();
|
||||
void UpdateStandardModeForAngle ();
|
||||
void UpdateStandardModeForLength ();
|
||||
void UpdateStandardMode ();
|
||||
const Standard_Real GetFlyout () const;
|
||||
const Standard_Boolean GetTextType() const;
|
||||
const Standard_Real GetFontHeight() const;
|
||||
const Standard_Boolean IsText3dShaded() const;
|
||||
const Standard_Boolean IsUnitsDisplayed() const;
|
||||
const TCollection_AsciiString GetUnits() const;
|
||||
const Quantity_Color GetDimensionColor() const;
|
||||
|
||||
// Dialog Data
|
||||
enum { IDD = IDD_Dimension };
|
||||
// Initialization of dialog
|
||||
protected:
|
||||
virtual BOOL OnInitDialog();
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
//Attributes
|
||||
private:
|
||||
Handle (AIS_InteractiveContext) myAISContext;
|
||||
int mySelectedDimType;
|
||||
int myFontSize;
|
||||
Quantity_Color myDimensionColor;
|
||||
CTabCtrl *myLengthParams;
|
||||
CTabCtrl *myAngleParams;
|
||||
CTabCtrl *myRadiusParams;
|
||||
CTabCtrl *myDiameterParams;
|
||||
|
||||
void CreateLengthParamsTab();
|
||||
void CreateAngleParamsTab();
|
||||
void CreateRadiusParamsTab();
|
||||
void CreateDiameterParamsTab();
|
||||
|
||||
public:
|
||||
afx_msg void OnBnClickedOk();
|
||||
afx_msg void OnBnClickedDimLength();
|
||||
afx_msg void OnBnClickedDimAngle();
|
||||
afx_msg void OnBnClickedDimRadius();
|
||||
afx_msg void OnTcnSelChangeLengthTab(NMHDR *pNMHDR, LRESULT *pResult);
|
||||
afx_msg void OnTcnSelChangingLengthTab(NMHDR *pNMHDR, LRESULT *pResult);
|
||||
afx_msg void OnDestroy();
|
||||
afx_msg void OnTcnSelChangeAngleTab(NMHDR *pNMHDR, LRESULT *pResult);
|
||||
afx_msg void OnTcnSelChangingAngleTab(NMHDR *pNMHDR, LRESULT *pResult);
|
||||
afx_msg void OnBnClickedDimDiameter();
|
||||
afx_msg void OnBnClicked2dText();
|
||||
afx_msg void OnBnClicked3dText();
|
||||
afx_msg void OnBnClickedDimensionColor();
|
||||
};
|
112
samples/mfc/standard/Common/LengthParamsEdgePage.cpp
Normal file
112
samples/mfc/standard/Common/LengthParamsEdgePage.cpp
Normal file
@@ -0,0 +1,112 @@
|
||||
// LengthParamsEdgePage.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "LengthParamsEdgePage.h"
|
||||
#include "DimensionDlg.h"
|
||||
|
||||
#include <Standard_Macro.hxx>
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
#include <AIS_LocalContext.hxx>
|
||||
#include <AIS_LengthDimension.hxx>
|
||||
#include <GC_MakePlane.hxx>
|
||||
#include <TopExp.hxx>
|
||||
|
||||
// CLengthParamsEdgePage dialog
|
||||
|
||||
IMPLEMENT_DYNAMIC(CLengthParamsEdgePage, CDialog)
|
||||
|
||||
//=======================================================================
|
||||
//function : CLengthParamsEdgePage
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
CLengthParamsEdgePage::CLengthParamsEdgePage (Handle(AIS_InteractiveContext) theContext,CWnd* pParent /*=NULL*/)
|
||||
: CDialog (CLengthParamsEdgePage::IDD, pParent)
|
||||
{
|
||||
myAISContext = theContext;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ~CLengthParamsEdgePage
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
CLengthParamsEdgePage::~CLengthParamsEdgePage()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : DoDataExchange
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void CLengthParamsEdgePage::DoDataExchange (CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
}
|
||||
|
||||
BEGIN_MESSAGE_MAP (CLengthParamsEdgePage, CDialog)
|
||||
ON_BN_CLICKED (IDC_ChooseEdgeBtn, &CLengthParamsEdgePage::OnBnClickedChooseEdgeBtn)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
//=======================================================================
|
||||
//function : GetButton
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
CButton* CLengthParamsEdgePage::GetButton()
|
||||
{
|
||||
return (CButton*)GetDlgItem (IDC_ChooseEdgeBtn);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : OnBnClickedChooseEdgeBtn
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void CLengthParamsEdgePage::OnBnClickedChooseEdgeBtn()
|
||||
{
|
||||
myAISContext->LocalContext()->InitSelected();
|
||||
|
||||
if (!myAISContext->LocalContext()->MoreSelected())
|
||||
{
|
||||
AfxMessageBox ( _T("Choose the vertex and press the button again"), MB_ICONINFORMATION | MB_OK);
|
||||
return;
|
||||
}
|
||||
|
||||
TopoDS_Edge anEdge = TopoDS::Edge(myAISContext->LocalContext()->SelectedShape());
|
||||
myAISContext->LocalContext()->ClearSelected();
|
||||
TopoDS_Vertex aFirstVertex, aSecondVertex;
|
||||
TopExp::Vertices (anEdge, aFirstVertex, aSecondVertex);
|
||||
|
||||
gp_Pnt aP1=BRep_Tool::Pnt (aFirstVertex);
|
||||
gp_Pnt aP2=BRep_Tool::Pnt (aSecondVertex);
|
||||
gp_Pnt aP3(aP2.X()+10, aP2.Y()+10, aP2.Z()+10);
|
||||
|
||||
GC_MakePlane aMkPlane (aP1,aP2,aP3);
|
||||
Handle(Geom_Plane) aPlane = aMkPlane.Value ();
|
||||
|
||||
CDimensionDlg *aDimDlg = (CDimensionDlg*)(GetParentOwner());
|
||||
|
||||
Handle(AIS_LengthDimension) aLenDim = new AIS_LengthDimension (anEdge, aPlane->Pln());
|
||||
Handle(Prs3d_DimensionAspect) anAspect = new Prs3d_DimensionAspect();
|
||||
anAspect->MakeArrows3d (Standard_False);
|
||||
anAspect->MakeText3d (aDimDlg->GetTextType());
|
||||
anAspect->TextAspect()->SetHeight (aDimDlg->GetFontHeight());
|
||||
anAspect->MakeTextShaded (aDimDlg->IsText3dShaded());
|
||||
anAspect->SetCommonColor (aDimDlg->GetDimensionColor());
|
||||
aLenDim->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
||||
if (aLenDim->IsUnitsDisplayed())
|
||||
{
|
||||
aLenDim->SetDisplayUnits (aDimDlg->GetUnits());
|
||||
}
|
||||
|
||||
aLenDim->SetDimensionAspect (anAspect);
|
||||
aLenDim->SetFlyout (aDimDlg->GetFlyout());
|
||||
|
||||
myAISContext->CloseAllContexts();
|
||||
myAISContext->Display (aLenDim);
|
||||
myAISContext->OpenLocalContext();
|
||||
myAISContext->ActivateStandardMode(TopAbs_EDGE);
|
||||
}
|
29
samples/mfc/standard/Common/LengthParamsEdgePage.h
Normal file
29
samples/mfc/standard/Common/LengthParamsEdgePage.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include "res\OCC_Resource.h"
|
||||
#include <Standard_Macro.hxx>
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
|
||||
// CLengthParamsEdgePage dialog
|
||||
|
||||
class CLengthParamsEdgePage : public CDialog
|
||||
{
|
||||
DECLARE_DYNAMIC(CLengthParamsEdgePage)
|
||||
|
||||
public:
|
||||
CLengthParamsEdgePage(Handle(AIS_InteractiveContext) theAISContext,CWnd* pParent = NULL); // standard constructor
|
||||
virtual ~CLengthParamsEdgePage();
|
||||
CButton* GetButton();
|
||||
|
||||
// Dialog Data
|
||||
enum { IDD = IDD_LengthParamsEdgePage };
|
||||
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
private:
|
||||
Handle(AIS_InteractiveContext) myAISContext;
|
||||
public:
|
||||
afx_msg void OnBnClickedChooseEdgeBtn();
|
||||
};
|
163
samples/mfc/standard/Common/LengthParamsEdgesPage.cpp
Normal file
163
samples/mfc/standard/Common/LengthParamsEdgesPage.cpp
Normal file
@@ -0,0 +1,163 @@
|
||||
// LenghtParamsEdgesPage.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "LengthParamsEdgesPage.h"
|
||||
#include "DimensionDlg.h"
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
#include <AIS_LocalContext.hxx>
|
||||
#include <AIS_LengthDimension.hxx>
|
||||
#include <AIS_AngleDimension.hxx>
|
||||
#include <GC_MakePlane.hxx>
|
||||
// CLengthParamsEdgesPage dialog
|
||||
|
||||
//=======================================================================
|
||||
//function : CLengthParamsEdgesPage
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
CLengthParamsEdgesPage::CLengthParamsEdgesPage (Handle(AIS_InteractiveContext) theAISContext,
|
||||
bool isAngleDimension /*= false*/,
|
||||
CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CLengthParamsEdgesPage::IDD, pParent)
|
||||
{
|
||||
myAISContext = theAISContext;
|
||||
myIsAngleDimension = isAngleDimension;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ~CLengthParamsEdgesPage
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
CLengthParamsEdgesPage::~CLengthParamsEdgesPage()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : DoDataExchange
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void CLengthParamsEdgesPage::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CLengthParamsEdgesPage, CDialog)
|
||||
ON_BN_CLICKED(IDC_BUTTON1, &CLengthParamsEdgesPage::OnBnClickedEdge1Btn)
|
||||
ON_BN_CLICKED(IDC_BUTTON3, &CLengthParamsEdgesPage::OnBnClickedEdge2Btn)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : OnBnClickedEdge1Btn
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void CLengthParamsEdgesPage::OnBnClickedEdge1Btn()
|
||||
{
|
||||
// Open local context and choose the edge for length dimensions
|
||||
if (!myAISContext->HasOpenedContext())
|
||||
{
|
||||
myAISContext->OpenLocalContext();
|
||||
myAISContext->ActivateStandardMode (TopAbs_EDGE);
|
||||
AfxMessageBox (_T("Local context was not opened. Choose the edge and press the button again"),
|
||||
MB_ICONINFORMATION | MB_OK);
|
||||
return;
|
||||
}
|
||||
|
||||
// Now it's ok, local context is opened and edge selection mode is activated
|
||||
// Check if some edge is selected
|
||||
myAISContext->LocalContext()->InitSelected();
|
||||
if (!myAISContext->LocalContext()->MoreSelected())
|
||||
{
|
||||
AfxMessageBox(_T("Choose the edge and press the button again"),
|
||||
MB_ICONINFORMATION | MB_OK);
|
||||
return;
|
||||
}
|
||||
|
||||
myFirstEdge = TopoDS::Edge (myAISContext->LocalContext()->SelectedShape());
|
||||
myAISContext->LocalContext()->ClearSelected();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : OnBnClickedEdge2Btn
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void CLengthParamsEdgesPage::OnBnClickedEdge2Btn()
|
||||
{
|
||||
myAISContext->LocalContext()->InitSelected();
|
||||
if (!myAISContext->LocalContext()->MoreSelected())
|
||||
{
|
||||
AfxMessageBox (_T("Choose the edge and press the button again"),
|
||||
MB_ICONINFORMATION | MB_OK);
|
||||
return;
|
||||
}
|
||||
|
||||
mySecondEdge = TopoDS::Edge (myAISContext->LocalContext()->SelectedShape());
|
||||
myAISContext->LocalContext()->ClearSelected();
|
||||
|
||||
// Build plane through three points
|
||||
BRepAdaptor_Curve aCurve1 (myFirstEdge);
|
||||
BRepAdaptor_Curve aCurve2 (mySecondEdge);
|
||||
|
||||
gp_Pnt aP1=aCurve1.Value (0.1);
|
||||
gp_Pnt aP2=aCurve1.Value (0.9);
|
||||
gp_Pnt aP3=aCurve2.Value (0.5);
|
||||
|
||||
GC_MakePlane aMkPlane (aP1,aP2,aP3);
|
||||
|
||||
Handle(Geom_Plane) aPlane = aMkPlane.Value();
|
||||
|
||||
CDimensionDlg *aDimDlg = (CDimensionDlg*)(GetParentOwner());
|
||||
|
||||
myAISContext->CloseAllContexts();
|
||||
|
||||
Handle(Prs3d_DimensionAspect) anAspect = new Prs3d_DimensionAspect();
|
||||
anAspect->MakeArrows3d (Standard_False);
|
||||
anAspect->MakeText3d (aDimDlg->GetTextType());
|
||||
anAspect->TextAspect()->SetHeight (aDimDlg->GetFontHeight());
|
||||
anAspect->MakeTextShaded (aDimDlg->IsText3dShaded());
|
||||
anAspect->SetCommonColor (aDimDlg->GetDimensionColor());
|
||||
if (myIsAngleDimension)
|
||||
{
|
||||
// Build an angle dimension between two non-parallel edges
|
||||
Handle(AIS_AngleDimension) anAngleDim = new AIS_AngleDimension (myFirstEdge, mySecondEdge);
|
||||
anAngleDim->SetDimensionAspect (anAspect);
|
||||
anAngleDim->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
||||
if (anAngleDim->IsUnitsDisplayed())
|
||||
{
|
||||
anAngleDim->SetDisplayUnits (aDimDlg->GetUnits ());
|
||||
if ((anAngleDim->DisplayUnits().IsEqual (TCollection_AsciiString ("deg"))))
|
||||
{
|
||||
anAngleDim->MakeUnitsDisplayed (Standard_False);
|
||||
}
|
||||
else
|
||||
{
|
||||
anAngleDim->SetDisplaySpecialSymbol (AIS_DSS_No);
|
||||
}
|
||||
}
|
||||
|
||||
anAngleDim->SetFlyout (aDimDlg->GetFlyout());
|
||||
myAISContext->Display (anAngleDim);
|
||||
}
|
||||
else
|
||||
{
|
||||
Handle(AIS_LengthDimension) aLenDim = new AIS_LengthDimension (myFirstEdge, mySecondEdge, aPlane->Pln());
|
||||
aLenDim->SetDimensionAspect (anAspect);
|
||||
aLenDim->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
||||
if (aLenDim->IsUnitsDisplayed())
|
||||
{
|
||||
aLenDim->SetFlyout (aDimDlg->GetFlyout());
|
||||
aLenDim->SetDisplayUnits (aDimDlg->GetUnits());
|
||||
}
|
||||
|
||||
myAISContext->Display (aLenDim);
|
||||
}
|
||||
|
||||
myAISContext->OpenLocalContext();
|
||||
myAISContext->ActivateStandardMode (TopAbs_EDGE);
|
||||
}
|
30
samples/mfc/standard/Common/LengthParamsEdgesPage.h
Normal file
30
samples/mfc/standard/Common/LengthParamsEdgesPage.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include "res\OCC_Resource.h"
|
||||
|
||||
// CLenghtParamsEdgesPage dialog
|
||||
|
||||
class CLengthParamsEdgesPage : public CDialog
|
||||
{
|
||||
private:
|
||||
Handle(AIS_InteractiveContext) myAISContext;
|
||||
bool myIsAngleDimension;
|
||||
TopoDS_Edge myFirstEdge;
|
||||
TopoDS_Edge mySecondEdge;
|
||||
public:
|
||||
CLengthParamsEdgesPage (Handle(AIS_InteractiveContext) theAISContext,
|
||||
bool isAngleDimension = false,
|
||||
CWnd* pParent = NULL); // standard constructor
|
||||
virtual ~CLengthParamsEdgesPage();
|
||||
|
||||
// Dialog Data
|
||||
enum { IDD = IDD_LengthParamsEdgesPage };
|
||||
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
public:
|
||||
afx_msg void OnBnClickedEdge1Btn();
|
||||
afx_msg void OnBnClickedEdge2Btn();
|
||||
};
|
153
samples/mfc/standard/Common/LengthParamsVerticesPage.cpp
Normal file
153
samples/mfc/standard/Common/LengthParamsVerticesPage.cpp
Normal file
@@ -0,0 +1,153 @@
|
||||
// LengthParamsVerticesPage.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "LengthParamsVerticesPage.h"
|
||||
#include "DimensionDlg.h"
|
||||
#include <Standard_Macro.hxx>
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
#include <AIS_LocalContext.hxx>
|
||||
#include <AIS_LengthDimension.hxx>
|
||||
#include <GC_MakePlane.hxx>
|
||||
|
||||
|
||||
// CLengthParamsVerticesPage dialog
|
||||
|
||||
IMPLEMENT_DYNAMIC(CLengthParamsVerticesPage, CDialog)
|
||||
|
||||
//=======================================================================
|
||||
//function : CLengthParamsVerticesPage
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
CLengthParamsVerticesPage::CLengthParamsVerticesPage (Handle(AIS_InteractiveContext) theAISContext, CWnd* pParent /*=NULL*/)
|
||||
: CDialog (CLengthParamsVerticesPage::IDD, pParent)
|
||||
{
|
||||
myAISContext = theAISContext;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ~CLengthParamsVerticesPage
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
CLengthParamsVerticesPage::~CLengthParamsVerticesPage()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : DoDataExchange
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void CLengthParamsVerticesPage::DoDataExchange (CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange (pDX);
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CLengthParamsVerticesPage, CDialog)
|
||||
ON_BN_CLICKED(IDC_BUTTON1, &CLengthParamsVerticesPage::OnBnClickedVertex1Btn)
|
||||
ON_BN_CLICKED(IDC_BUTTON2, &CLengthParamsVerticesPage::OnBnClickedVertex2Btn)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : OnBnClickedVertex1Btn
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void CLengthParamsVerticesPage::OnBnClickedVertex1Btn()
|
||||
{
|
||||
// Open local context and choose the edge for length dimensions
|
||||
if (!myAISContext->HasOpenedContext())
|
||||
{
|
||||
myAISContext->OpenLocalContext();
|
||||
myAISContext->ActivateStandardMode(TopAbs_VERTEX);
|
||||
AfxMessageBox(_T("Local context was not opened. Choose the vertices and press the button again"),
|
||||
MB_ICONINFORMATION | MB_OK);
|
||||
return;
|
||||
}
|
||||
|
||||
// Now it's ok, local context is opened and edge selection mode is activated
|
||||
// Check if some edge is selected
|
||||
myAISContext->LocalContext()->InitSelected();
|
||||
if (!myAISContext->LocalContext()->MoreSelected())
|
||||
{
|
||||
AfxMessageBox (_T ("Choose the vertex and press the button again"), MB_ICONINFORMATION | MB_OK);
|
||||
return;
|
||||
}
|
||||
|
||||
myFirstVertex = TopoDS::Vertex (myAISContext->LocalContext()->SelectedShape());
|
||||
|
||||
myAISContext->LocalContext()->ClearSelected();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : OnBnClickedVertex2Btn
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void CLengthParamsVerticesPage::OnBnClickedVertex2Btn()
|
||||
{
|
||||
myAISContext->LocalContext()->InitSelected();
|
||||
if (!myAISContext->LocalContext()->MoreSelected())
|
||||
{
|
||||
AfxMessageBox (_T ("Choose the vertex and press the button again"), MB_ICONINFORMATION | MB_OK);
|
||||
return;
|
||||
}
|
||||
|
||||
mySecondVertex = TopoDS::Vertex (myAISContext->LocalContext()->SelectedShape());
|
||||
myAISContext->LocalContext()->ClearSelected();
|
||||
|
||||
//Build dimension here
|
||||
gp_Pnt aP1=BRep_Tool::Pnt (myFirstVertex);
|
||||
gp_Pnt aP2=BRep_Tool::Pnt (mySecondVertex);
|
||||
gp_Pnt aP3 (aP2.X() + 10, aP2.Y() + 10, aP2.Z() + 10);
|
||||
|
||||
GC_MakePlane aMkPlane (aP1,aP2,aP3);
|
||||
Handle(Geom_Plane) aPlane = aMkPlane.Value();
|
||||
|
||||
CDimensionDlg *aDimDlg = (CDimensionDlg*)(this->GetParentOwner());
|
||||
|
||||
Handle(AIS_LengthDimension) aLenDim = new AIS_LengthDimension (aP1, aP2, aPlane->Pln());
|
||||
|
||||
Handle(Prs3d_DimensionAspect) anAspect = new Prs3d_DimensionAspect();
|
||||
anAspect->MakeArrows3d (Standard_False);
|
||||
anAspect->MakeText3d (aDimDlg->GetTextType());
|
||||
anAspect->TextAspect()->SetHeight (aDimDlg->GetFontHeight());
|
||||
anAspect->MakeTextShaded (aDimDlg->IsText3dShaded());
|
||||
aLenDim->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
||||
if (aLenDim->IsUnitsDisplayed ())
|
||||
{
|
||||
aLenDim->SetDisplayUnits (aDimDlg->GetUnits ());
|
||||
}
|
||||
|
||||
aLenDim->SetDimensionAspect (anAspect);
|
||||
aLenDim->SetFlyout (aDimDlg->GetFlyout());
|
||||
|
||||
myAISContext->CloseAllContexts();
|
||||
myAISContext->Display (aLenDim);
|
||||
myAISContext->OpenLocalContext();
|
||||
myAISContext->ActivateStandardMode (TopAbs_VERTEX);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : getFirstVertex
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
const TopoDS_Vertex& CLengthParamsVerticesPage::getFirstVertex() const
|
||||
{
|
||||
return myFirstVertex;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : getSecondVertex
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
const TopoDS_Vertex& CLengthParamsVerticesPage::getSecondVertex() const
|
||||
{
|
||||
return mySecondVertex;
|
||||
}
|
29
samples/mfc/standard/Common/LengthParamsVerticesPage.h
Normal file
29
samples/mfc/standard/Common/LengthParamsVerticesPage.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include "res\OCC_Resource.h"
|
||||
|
||||
// CLengthParamsVerticesPage dialog
|
||||
|
||||
class CLengthParamsVerticesPage : public CDialog
|
||||
{
|
||||
DECLARE_DYNAMIC(CLengthParamsVerticesPage)
|
||||
|
||||
public:
|
||||
CLengthParamsVerticesPage(Handle(AIS_InteractiveContext) theAISContext,CWnd* pParent = NULL); // standard constructor
|
||||
virtual ~CLengthParamsVerticesPage();
|
||||
const TopoDS_Vertex& getFirstVertex() const;
|
||||
const TopoDS_Vertex& getSecondVertex() const;
|
||||
// Dialog Data
|
||||
enum { IDD = IDD_LengthParamsVerticesPage };
|
||||
private:
|
||||
Handle(AIS_InteractiveContext) myAISContext;
|
||||
TopoDS_Vertex myFirstVertex;
|
||||
TopoDS_Vertex mySecondVertex;
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
public:
|
||||
afx_msg void OnBnClickedVertex1Btn();
|
||||
afx_msg void OnBnClickedVertex2Btn();
|
||||
};
|
@@ -11,8 +11,12 @@
|
||||
#include <res\OCC_Resource.h>
|
||||
#include "ImportExport/ImportExport.h"
|
||||
#include "AISDialogs.h"
|
||||
#include <AIS_LocalContext.hxx>
|
||||
#include <AIS_ListOfInteractive.hxx>
|
||||
#include <AIS_ListIteratorOfListOfInteractive.hxx>
|
||||
#include <TColStd_ListIteratorOfListOfInteger.hxx>
|
||||
#include <TColStd_ListOfInteger.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
|
||||
BEGIN_MESSAGE_MAP(OCC_3dBaseDoc, OCC_BaseDoc)
|
||||
//{{AFX_MSG_MAP(OCC_3dBaseDoc)
|
||||
@@ -34,6 +38,9 @@ BEGIN_MESSAGE_MAP(OCC_3dBaseDoc, OCC_BaseDoc)
|
||||
ON_UPDATE_COMMAND_UI(ID_OBJECT_DISPLAYALL, OnUpdateObjectDisplayall)
|
||||
ON_COMMAND(ID_OBJECT_REMOVE, OnObjectRemove)
|
||||
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
|
||||
ON_COMMAND_EX_RANGE(ID_OBJECT_MATERIAL_BRASS,ID_OBJECT_MATERIAL_DEFAULT, OnObjectMaterialRange)
|
||||
ON_UPDATE_COMMAND_UI_RANGE(ID_OBJECT_MATERIAL_BRASS,ID_OBJECT_MATERIAL_DEFAULT, OnUpdateObjectMaterialRange)
|
||||
@@ -45,6 +52,8 @@ END_MESSAGE_MAP()
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
OCC_3dBaseDoc::OCC_3dBaseDoc()
|
||||
:myPopupMenuNumber(0),
|
||||
myDimensionDlg()
|
||||
{
|
||||
AfxInitRichEdit();
|
||||
|
||||
@@ -55,6 +64,8 @@ OCC_3dBaseDoc::OCC_3dBaseDoc()
|
||||
myViewer->SetDefaultLights();
|
||||
myViewer->SetLightOn();
|
||||
myAISContext = new AIS_InteractiveContext (myViewer);
|
||||
myDimensionDlg.SetContext (myAISContext);
|
||||
myDimensionDlg.Create(CDimensionDlg::IDD, NULL);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------
|
||||
@@ -167,17 +178,20 @@ void OCC_3dBaseDoc::Popup (const Standard_Integer theMouseX,
|
||||
const Standard_Integer theMouseY,
|
||||
const Handle(V3d_View)& theView)
|
||||
{
|
||||
Standard_Integer PopupMenuNumber=0;
|
||||
myAISContext->InitCurrent();
|
||||
if (myAISContext->MoreCurrent())
|
||||
PopupMenuNumber=1;
|
||||
// Base check which context menu to call
|
||||
if (!myPopupMenuNumber)
|
||||
{
|
||||
myAISContext->InitCurrent();
|
||||
if (myAISContext->MoreCurrent())
|
||||
myPopupMenuNumber=1;
|
||||
}
|
||||
|
||||
CMenu menu;
|
||||
VERIFY(menu.LoadMenu(IDR_Popup3D));
|
||||
CMenu* pPopup = menu.GetSubMenu(PopupMenuNumber);
|
||||
CMenu* pPopup = menu.GetSubMenu(myPopupMenuNumber);
|
||||
|
||||
ASSERT(pPopup != NULL);
|
||||
if (PopupMenuNumber == 1) // more than 1 object.
|
||||
if (myPopupMenuNumber == 1) // more than 1 object.
|
||||
{
|
||||
bool OneOrMoreInShading = false;
|
||||
for (myAISContext->InitCurrent();myAISContext->MoreCurrent ();myAISContext->NextCurrent ())
|
||||
@@ -190,8 +204,10 @@ void OCC_3dBaseDoc::Popup (const Standard_Integer theMouseX,
|
||||
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());
|
||||
pPopup->TrackPopupMenu (TPM_LEFTALIGN | TPM_RIGHTBUTTON,
|
||||
winCoord.x,
|
||||
winCoord.y,
|
||||
AfxGetMainWnd());
|
||||
}
|
||||
|
||||
void OCC_3dBaseDoc::Fit()
|
||||
@@ -392,7 +408,7 @@ void OCC_3dBaseDoc::OnUpdateObjectRemove(CCmdUI* pCmdUI)
|
||||
bool OneOrMoreIsDisplayed = false;
|
||||
for (myAISContext->InitCurrent();myAISContext->MoreCurrent ();myAISContext->NextCurrent ())
|
||||
if (myAISContext->IsDisplayed(myAISContext->Current())) OneOrMoreIsDisplayed=true;
|
||||
pCmdUI->Enable (OneOrMoreIsDisplayed);
|
||||
pCmdUI->Enable (OneOrMoreIsDisplayed);
|
||||
}
|
||||
|
||||
void OCC_3dBaseDoc::SetMaterial(Graphic3d_NameOfMaterial Material)
|
||||
@@ -401,3 +417,18 @@ void OCC_3dBaseDoc::SetMaterial(Graphic3d_NameOfMaterial Material)
|
||||
myAISContext->SetMaterial (myAISContext->Current(),
|
||||
(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());
|
||||
}
|
||||
|
||||
|
||||
|
@@ -10,10 +10,14 @@
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#include "OCC_BaseDoc.h"
|
||||
#include "DimensionDlg.h"
|
||||
#include <Standard_Macro.hxx>
|
||||
|
||||
class AFX_EXT_CLASS OCC_3dBaseDoc : public OCC_BaseDoc
|
||||
{
|
||||
protected:
|
||||
CDimensionDlg myDimensionDlg;
|
||||
int myPopupMenuNumber;
|
||||
public:
|
||||
|
||||
OCC_3dBaseDoc();
|
||||
@@ -78,6 +82,9 @@ protected:
|
||||
afx_msg void OnUpdateObjectDisplayall(CCmdUI* pCmdUI);
|
||||
afx_msg void OnObjectRemove();
|
||||
afx_msg void OnUpdateObjectRemove(CCmdUI* pCmdUI);
|
||||
afx_msg void OnObjectAddDimensions();
|
||||
afx_msg void OnUpdateObjectAddDimensions(CCmdUI* pCmdUI);
|
||||
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
133
samples/mfc/standard/Common/RadiusParamsPage.cpp
Normal file
133
samples/mfc/standard/Common/RadiusParamsPage.cpp
Normal file
@@ -0,0 +1,133 @@
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "RadiusParamsPage.h"
|
||||
#include "DimensionDlg.h"
|
||||
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
#include <AIS_LocalContext.hxx>
|
||||
#include <AIS_RadiusDimension.hxx>
|
||||
#include <AIS_DiameterDimension.hxx>
|
||||
#include <ElCLib.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
|
||||
IMPLEMENT_DYNAMIC(CRadiusParamsPage, CDialog)
|
||||
|
||||
//=======================================================================
|
||||
//function : CRadiusParamsPage
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
CRadiusParamsPage::CRadiusParamsPage (const Handle(AIS_InteractiveContext)& theAISContext,
|
||||
const Standard_Boolean isDiameterDimension /* =Standard_False*/,
|
||||
CWnd* pParent /*=NULL*/)
|
||||
: CDialog (CRadiusParamsPage::IDD, pParent)
|
||||
{
|
||||
myAISContext = theAISContext;
|
||||
myIsDiameterDimension = isDiameterDimension;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ~CRadiusParamsPage
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
CRadiusParamsPage::~CRadiusParamsPage()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : DoDataExchange
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void CRadiusParamsPage::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CRadiusParamsPage, CDialog)
|
||||
ON_BN_CLICKED(IDC_BUTTON1, &CRadiusParamsPage::OnBnClickedObjectBtn)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
//=======================================================================
|
||||
//function : OnBnClickedObjectBtn
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void CRadiusParamsPage::OnBnClickedObjectBtn()
|
||||
{
|
||||
//Build dimension here
|
||||
myAISContext->LocalContext()->InitSelected();
|
||||
if (!myAISContext->LocalContext()->MoreSelected())
|
||||
{
|
||||
AfxMessageBox (_T ("Choose the edge and press the button again"), MB_ICONINFORMATION | MB_OK);
|
||||
return;
|
||||
}
|
||||
|
||||
gp_Circ aCircle;
|
||||
Standard_Boolean isAttachPoint = Standard_False;
|
||||
Standard_Real aFirstPar = 0, aLastPar = 0;
|
||||
|
||||
TopoDS_Shape aSelShape = myAISContext->LocalContext()->SelectedShape();
|
||||
if (aSelShape.ShapeType() != TopAbs_EDGE &&
|
||||
aSelShape.ShapeType() != TopAbs_FACE &&
|
||||
aSelShape.ShapeType() != TopAbs_WIRE)
|
||||
return;
|
||||
|
||||
if (aSelShape.ShapeType() == TopAbs_EDGE)
|
||||
{
|
||||
BRepAdaptor_Curve aCurve (TopoDS::Edge (aSelShape));
|
||||
if (aCurve.GetType() != GeomAbs_Circle)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
aCircle = aCurve.Circle();
|
||||
if (aCurve.FirstParameter() != 0 && aCurve.LastParameter() != M_PI * 2)
|
||||
{
|
||||
isAttachPoint = Standard_True;
|
||||
aFirstPar = aCurve.FirstParameter();
|
||||
aLastPar = aCurve.LastParameter();
|
||||
}
|
||||
}
|
||||
|
||||
myAISContext->LocalContext()->ClearSelected();
|
||||
CDimensionDlg *aDimDlg = (CDimensionDlg*)(this->GetParentOwner());
|
||||
// Try to create dimension if it is possible
|
||||
Handle(AIS_Dimension) aDim;
|
||||
if (myIsDiameterDimension)
|
||||
{
|
||||
aDim = isAttachPoint ? new AIS_DiameterDimension (aCircle, ElCLib::Value ((aFirstPar + aLastPar) / 2.0, aCircle))
|
||||
: new AIS_DiameterDimension (aCircle);
|
||||
Handle(AIS_DiameterDimension)::DownCast(aDim)->SetFlyout (aDimDlg->GetFlyout());
|
||||
}
|
||||
else
|
||||
{
|
||||
aDim = isAttachPoint ? new AIS_RadiusDimension (aCircle, ElCLib::Value ((aFirstPar + aLastPar) / 2.0, aCircle))
|
||||
: new AIS_RadiusDimension (aCircle);
|
||||
Handle(AIS_RadiusDimension)::DownCast(aDim)->SetFlyout (aDimDlg->GetFlyout());
|
||||
}
|
||||
|
||||
Handle(Prs3d_DimensionAspect) anAspect = new Prs3d_DimensionAspect();
|
||||
anAspect->MakeArrows3d (Standard_False);
|
||||
anAspect->MakeText3d (aDimDlg->GetTextType());
|
||||
anAspect->TextAspect()->SetHeight (aDimDlg->GetFontHeight());
|
||||
anAspect->MakeTextShaded (aDimDlg->IsText3dShaded());
|
||||
anAspect->SetCommonColor (aDimDlg->GetDimensionColor());
|
||||
aDim->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
||||
if (aDim->IsUnitsDisplayed())
|
||||
{
|
||||
aDim->SetDisplayUnits (aDimDlg->GetUnits());
|
||||
}
|
||||
|
||||
aDim->SetDimensionAspect (anAspect);
|
||||
|
||||
// Display dimension in the neutral point
|
||||
myAISContext->CloseAllContexts();
|
||||
|
||||
myAISContext->Display (aDim);
|
||||
|
||||
myAISContext->OpenLocalContext();
|
||||
myAISContext->ActivateStandardMode (TopAbs_EDGE);
|
||||
}
|
27
samples/mfc/standard/Common/RadiusParamsPage.h
Normal file
27
samples/mfc/standard/Common/RadiusParamsPage.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include "res\OCC_Resource.h"
|
||||
// CRadiusParamsPage dialog
|
||||
|
||||
class CRadiusParamsPage : public CDialog
|
||||
{
|
||||
DECLARE_DYNAMIC(CRadiusParamsPage)
|
||||
private:
|
||||
Handle(AIS_InteractiveContext) myAISContext;
|
||||
Standard_Boolean myIsDiameterDimension;
|
||||
public:
|
||||
CRadiusParamsPage(const Handle(AIS_InteractiveContext)& theAISContext,
|
||||
const Standard_Boolean isDiameterDimension = Standard_False,
|
||||
CWnd* pParent = NULL); // standard constructor
|
||||
virtual ~CRadiusParamsPage();
|
||||
|
||||
// Dialog Data
|
||||
enum { IDD = IDD_RadiusParamsPage };
|
||||
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
public:
|
||||
afx_msg void OnBnClickedObjectBtn();
|
||||
};
|
Binary file not shown.
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
@@ -3,7 +3,13 @@
|
||||
// Used by OCC_Resource.rc
|
||||
//
|
||||
#define IDR_POPUP 116
|
||||
#define IDD_Dimension 119
|
||||
#define IDD_LengthParamsEdgePage 122
|
||||
#define IDD_LengthParamsVerticesPage 123
|
||||
#define IDD_LengthParamsEdgesPage 125
|
||||
#define IDD_AngleParamsVerticesPage 126
|
||||
#define IDR_MAINFRAME 128
|
||||
#define IDD_RadiusParamsPage 128
|
||||
#define IDR_2DTYPE 129
|
||||
#define IDR_3DTYPE 131
|
||||
#define ID_FILE_EXPORT_IMAGE 132
|
||||
@@ -20,8 +26,41 @@
|
||||
#define IDD_COLORMESH 552
|
||||
#define IDB_coloredmesh 554
|
||||
#define IDC_RICHEDIT_ResultDialog 1001
|
||||
#define IDC_EDIT1 1004
|
||||
#define IDC_README 1005
|
||||
#define IDC_ResultNameEdit 1003
|
||||
#define IDC_README 1004
|
||||
#define IDC_DimensionGroupbox 1005
|
||||
#define IDD_DIMENSIONDLG 1006
|
||||
#define IDC_TextParamGroupbox 1007
|
||||
#define IDC_DimensionParametersGroupbox 1010
|
||||
#define IDC_TAB1 1011
|
||||
#define IDC_LengthTab 1014
|
||||
#define IDC_AngleTab 1015
|
||||
#define IDC_BUTTON1 1016
|
||||
#define IDC_XPOS 1017
|
||||
#define IDC_BUTTON2 1018
|
||||
#define IDC_BUTTON3 1019
|
||||
#define IDC_YPOS 1020
|
||||
#define IDC_BUTTON4 1021
|
||||
#define IDC_RadiusTab 1022
|
||||
#define IDC_ZPOS 1023
|
||||
#define IDC_ChooseEdgeBtn 1025
|
||||
#define IDC_ChooseEdgeEdit 1026
|
||||
#define IDC_Flyout 1028
|
||||
#define IDC_DiameterTab 1031
|
||||
#define IDC_DimLength 1032
|
||||
#define IDC_DimAngle 1033
|
||||
#define IDC_DimRadius 1034
|
||||
#define IDC_DimDiameter 1035
|
||||
#define IDC_2DText 1036
|
||||
#define IDC_3DText 1037
|
||||
#define IDC_FontSize 1038
|
||||
#define IDC_FontSizeStatic 1039
|
||||
#define IDC_FlyoutStatic 1044
|
||||
#define IDC_DisplayUnits 1045
|
||||
#define IDC_DisplayUnitsStatic 1046
|
||||
#define IDC_TextDisplayMode 1047
|
||||
#define IDC_TextDisplayModeStatic 1048
|
||||
#define IDC_DimensionColor 1049
|
||||
#define ID_WINDOW_NEW3D 1151
|
||||
#define ID_OBJECT_DISPLAYALL 1201
|
||||
#define ID_OBJECT_MATERIAL 1205
|
||||
@@ -93,6 +132,9 @@
|
||||
#define ID_BUTTONTop 40016
|
||||
#define ID_BUTTON40017 40017
|
||||
#define ID_BUTTON40033 40033
|
||||
#define ID_OBJECT_DIMENSIONS 40035
|
||||
#define ID_OBJECT_DIM 40036
|
||||
#define ID_LOCALCONTEXT_ADDDIMENSION 40037
|
||||
#define ID_FILE_IMPORT_CSFDB 40100
|
||||
#define ID_FILE_IMPORT_BREP 40101
|
||||
#define ID_FILE_IMPORT_STEP 40102
|
||||
@@ -132,9 +174,9 @@
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 119
|
||||
#define _APS_NEXT_COMMAND_VALUE 40034
|
||||
#define _APS_NEXT_CONTROL_VALUE 1006
|
||||
#define _APS_NEXT_RESOURCE_VALUE 131
|
||||
#define _APS_NEXT_COMMAND_VALUE 40038
|
||||
#define _APS_NEXT_CONTROL_VALUE 1052
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
|
@@ -73,6 +73,52 @@ IDB_coloredmesh BITMAP "coloredm.bmp"
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_RadiusParamsPage DIALOGEX 0, 0, 121, 46
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
PUSHBUTTON "Click to set up selected circle or arc",IDC_BUTTON1,26,10,70,25,BS_MULTILINE
|
||||
END
|
||||
|
||||
IDD_AngleParamsVerticesPage DIALOGEX 0, 0, 126, 69
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
PUSHBUTTON "Set up selected vertex",IDC_BUTTON1,39,7,83,18,BS_MULTILINE
|
||||
LTEXT "Vertex1",IDC_STATIC,10,12,26,8
|
||||
PUSHBUTTON "Set up selected vertex",IDC_BUTTON3,39,26,83,17
|
||||
LTEXT "Vertex2",IDC_STATIC,9,30,26,8
|
||||
PUSHBUTTON "Set up selected vertex",IDC_BUTTON4,39,44,83,18
|
||||
LTEXT "Vertex3",IDC_STATIC,9,47,26,8
|
||||
END
|
||||
|
||||
IDD_LengthParamsEdgePage DIALOGEX 0, 0, 70, 35
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
PUSHBUTTON "Click to set up selected edge",IDC_ChooseEdgeBtn,1,1,66,30,BS_MULTILINE
|
||||
END
|
||||
|
||||
IDD_LengthParamsVerticesPage DIALOGEX 0, 0, 135, 55
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
LTEXT "Vertex1",IDC_STATIC,7,11,26,8
|
||||
LTEXT "Vertex2",IDC_STATIC,7,35,26,8
|
||||
PUSHBUTTON "Click to set up selected vertex",IDC_BUTTON1,39,4,74,21,BS_MULTILINE
|
||||
PUSHBUTTON "Click to set up selected vertex",IDC_BUTTON2,39,31,74,20,BS_MULTILINE
|
||||
END
|
||||
|
||||
IDD_LengthParamsEdgesPage DIALOGEX 0, 0, 128, 60
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
PUSHBUTTON "Click to set up selected edge",IDC_BUTTON1,33,1,82,26,BS_MULTILINE
|
||||
PUSHBUTTON "Click to set up selected edge",IDC_BUTTON3,34,30,81,26,BS_MULTILINE
|
||||
LTEXT "Edge1",IDC_STATIC,6,12,21,8
|
||||
LTEXT "Edge2",IDC_STATIC,6,33,21,8
|
||||
END
|
||||
|
||||
IDD_OCC_ABOUTBOX DIALOGEX 34, 22, 284, 257
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "About"
|
||||
@@ -90,7 +136,7 @@ IDD_ResultDialog DIALOG 0, 0, 212, 202
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
CONTROL "",IDC_RICHEDIT_ResultDialog,"RICHEDIT",TCS_HOTTRACK | TCS_VERTICAL | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,0,10,210,160
|
||||
CONTROL "",IDC_RICHEDIT_ResultDialog,"RICHEDIT",TCS_HOTTRACK | TCS_VERTICAL | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,2,9,207,162
|
||||
PUSHBUTTON "Copy selection to clipboard",IDC_CopySelectionToClipboard,5,176,100,15
|
||||
PUSHBUTTON "Copy all to clipboard",IDC_CopyAllToClipboard,107,176,100,15
|
||||
END
|
||||
@@ -204,6 +250,37 @@ BEGIN
|
||||
GROUPBOX "",IDC_STATIC,115,86,8,73
|
||||
END
|
||||
|
||||
IDD_Dimension DIALOGEX 0, 0, 236, 337
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Add dimension"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,97,311,50,14
|
||||
GROUPBOX "Dimension",IDC_DimensionGroupbox,8,9,64,85
|
||||
CONTROL "",IDC_LengthTab,"SysTabControl32",0x0,11,205,194,95
|
||||
CONTROL "",IDC_AngleTab,"SysTabControl32",NOT WS_VISIBLE,10,205,193,94
|
||||
CONTROL "",IDC_RadiusTab,"SysTabControl32",0x0,10,205,193,93
|
||||
GROUPBOX "Dimension parameters",IDC_DimensionParametersGroupbox,9,103,209,84,WS_GROUP
|
||||
CONTROL "",IDC_DiameterTab,"SysTabControl32",0x0,10,205,194,92
|
||||
CONTROL "Length",IDC_DimLength,"Button",BS_AUTORADIOBUTTON | WS_GROUP,20,26,38,10
|
||||
CONTROL "Angle",IDC_DimAngle,"Button",BS_AUTORADIOBUTTON,20,38,34,10
|
||||
CONTROL "Radius",IDC_DimRadius,"Button",BS_AUTORADIOBUTTON,20,50,37,10
|
||||
CONTROL "Diameter",IDC_DimDiameter,"Button",BS_AUTORADIOBUTTON,20,63,45,10
|
||||
GROUPBOX "Text parameters",IDC_TextParamGroupbox,80,9,139,84
|
||||
CONTROL "2D Text",IDC_2DText,"Button",BS_AUTORADIOBUTTON | WS_GROUP,162,20,41,10
|
||||
CONTROL "3D Text",IDC_3DText,"Button",BS_AUTORADIOBUTTON,162,33,41,10
|
||||
LTEXT "Text type:",IDC_STATIC,86,22,47,8
|
||||
LTEXT "Font Size:",IDC_FontSizeStatic,87,51,33,8
|
||||
COMBOBOX IDC_FontSize,157,51,48,57,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Flyout value",IDC_FlyoutStatic,25,117,40,8
|
||||
LTEXT "Display units",IDC_DisplayUnitsStatic,25,138,41,8
|
||||
COMBOBOX IDC_DisplayUnits,105,138,64,59,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Text display mode:",IDC_TextDisplayModeStatic,86,74,62,8
|
||||
COMBOBOX IDC_TextDisplayMode,157,71,48,58,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "Change dimension color",IDC_DimensionColor,105,156,63,24,BS_MULTILINE
|
||||
CONTROL "",IDC_Flyout,"msctls_trackbar32",TBS_TOP | TBS_TOOLTIPS | WS_TABSTOP,73,112,100,20
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -275,6 +352,7 @@ BEGIN
|
||||
BUTTON ID_OBJECT_DISPLAYALL
|
||||
SEPARATOR
|
||||
BUTTON ID_OBJECT_REMOVE
|
||||
BUTTON ID_OBJECT_DIM
|
||||
END
|
||||
|
||||
|
||||
@@ -352,6 +430,29 @@ END
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_RadiusParamsPage, DIALOG
|
||||
BEGIN
|
||||
RIGHTMARGIN, 120
|
||||
BOTTOMMARGIN, 45
|
||||
END
|
||||
|
||||
IDD_AngleParamsVerticesPage, DIALOG
|
||||
BEGIN
|
||||
RIGHTMARGIN, 80
|
||||
BOTTOMMARGIN, 66
|
||||
END
|
||||
|
||||
IDD_LengthParamsVerticesPage, DIALOG
|
||||
BEGIN
|
||||
BOTTOMMARGIN, 51
|
||||
END
|
||||
|
||||
IDD_LengthParamsEdgesPage, DIALOG
|
||||
BEGIN
|
||||
RIGHTMARGIN, 115
|
||||
BOTTOMMARGIN, 58
|
||||
END
|
||||
|
||||
IDD_OCC_ABOUTBOX, DIALOG
|
||||
BEGIN
|
||||
BOTTOMMARGIN, 256
|
||||
@@ -367,10 +468,48 @@ BEGIN
|
||||
RIGHTMARGIN, 67
|
||||
BOTTOMMARGIN, 219
|
||||
END
|
||||
|
||||
IDD_Dimension, DIALOG
|
||||
BEGIN
|
||||
RIGHTMARGIN, 235
|
||||
BOTTOMMARGIN, 336
|
||||
HORZGUIDE, 336
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog Info
|
||||
//
|
||||
|
||||
IDD_Dimension DLGINIT
|
||||
BEGIN
|
||||
IDC_FontSize, 0x403, 2, 0
|
||||
0x0037,
|
||||
IDC_FontSize, 0x403, 2, 0
|
||||
0x0038,
|
||||
IDC_FontSize, 0x403, 2, 0
|
||||
0x0039,
|
||||
IDC_FontSize, 0x403, 3, 0
|
||||
0x3031, "\000"
|
||||
IDC_FontSize, 0x403, 3, 0
|
||||
0x3131, "\000"
|
||||
IDC_FontSize, 0x403, 3, 0
|
||||
0x3231, "\000"
|
||||
IDC_FontSize, 0x403, 3, 0
|
||||
0x3331, "\000"
|
||||
IDC_FontSize, 0x403, 3, 0
|
||||
0x3431, "\000"
|
||||
IDC_TextDisplayMode, 0x403, 10, 0
|
||||
0x6957, 0x6572, 0x7266, 0x6d61, 0x0065,
|
||||
IDC_TextDisplayMode, 0x403, 9, 0
|
||||
0x5320, 0x6168, 0x6964, 0x676e, "\000"
|
||||
0
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
@@ -494,6 +633,12 @@ BEGIN
|
||||
ID_OBJECT_WIREFRAME "Put selection in wireframe\nWireframe"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
ID_OBJECT_DIMENSIONS "Add dimensions"
|
||||
ID_LOCALCONTEXT_ADDDIMENSION "Add new dimension for selected objetcs"
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
@@ -274,6 +274,8 @@
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\Common\AngleParamsVerticesPage.cpp" />
|
||||
<ClCompile Include="..\..\..\..\Common\DimensionDlg.cpp" />
|
||||
<ClCompile Include="..\..\..\..\Common\ImportExport\ImportExport.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
@@ -290,6 +292,10 @@
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\Common\LengthParamsEdgePage.cpp" />
|
||||
<ClCompile Include="..\..\..\..\Common\LengthParamsEdgesPage.cpp" />
|
||||
<ClCompile Include="..\..\..\..\Common\LengthParamsVerticesPage.cpp" />
|
||||
<ClCompile Include="..\..\..\..\Common\RadiusParamsPage.cpp" />
|
||||
<ClCompile Include="..\..\..\src\mfcsample.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
@@ -714,7 +720,12 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\..\Common\AISDialogs.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\AngleParamsVerticesPage.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\DimensionDlg.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\ImportExport\ImportExport.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\LengthParamsEdgePage.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\LengthParamsEdgesPage.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\LengthParamsVerticesPage.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\OCC_2dChildFrame.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\OCC_2dDoc.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\OCC_2dView.h" />
|
||||
@@ -727,6 +738,7 @@
|
||||
<ClInclude Include="..\..\..\..\Common\OCC_BaseDoc.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\OCC_BaseView.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\OCC_MainFrame.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\RadiusParamsPage.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\res\OCC_Resource.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\ResultDialog.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\ImportExport\SaveCSFDBDlg.h" />
|
||||
|
@@ -120,6 +120,24 @@
|
||||
<ClCompile Include="..\..\..\..\Common\ISession2D\ISession2D_Shape.cpp">
|
||||
<Filter>Source Files\ISession2D-src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\Common\DimensionDlg.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\Common\AngleParamsVerticesPage.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\Common\LengthParamsEdgePage.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\Common\LengthParamsEdgesPage.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\Common\LengthParamsVerticesPage.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\Common\RadiusParamsPage.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\..\..\Common\res\OCC_Resource.rc">
|
||||
@@ -211,6 +229,24 @@
|
||||
<ClInclude Include="..\..\..\..\Common\ISession2D\ISession2D_Shape.h">
|
||||
<Filter>Header Files\ISession2D-headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\Common\DimensionDlg.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\Common\AngleParamsVerticesPage.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\Common\LengthParamsEdgePage.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\Common\LengthParamsEdgesPage.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\Common\LengthParamsVerticesPage.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\Common\RadiusParamsPage.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\..\..\Common\res\2dChildFrameTB.bmp">
|
||||
|
@@ -278,6 +278,8 @@
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\Common\AngleParamsVerticesPage.cpp" />
|
||||
<ClCompile Include="..\..\..\..\Common\DimensionDlg.cpp" />
|
||||
<ClCompile Include="..\..\..\..\Common\ImportExport\ImportExport.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
@@ -294,6 +296,10 @@
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\Common\LengthParamsEdgePage.cpp" />
|
||||
<ClCompile Include="..\..\..\..\Common\LengthParamsEdgesPage.cpp" />
|
||||
<ClCompile Include="..\..\..\..\Common\LengthParamsVerticesPage.cpp" />
|
||||
<ClCompile Include="..\..\..\..\Common\RadiusParamsPage.cpp" />
|
||||
<ClCompile Include="..\..\..\src\mfcsample.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
@@ -718,7 +724,12 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\..\Common\AISDialogs.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\AngleParamsVerticesPage.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\DimensionDlg.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\ImportExport\ImportExport.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\LengthParamsEdgePage.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\LengthParamsEdgesPage.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\LengthParamsVerticesPage.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\OCC_2dChildFrame.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\OCC_2dDoc.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\OCC_2dView.h" />
|
||||
@@ -731,6 +742,7 @@
|
||||
<ClInclude Include="..\..\..\..\Common\OCC_BaseDoc.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\OCC_BaseView.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\OCC_MainFrame.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\RadiusParamsPage.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\res\OCC_Resource.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\ResultDialog.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\ImportExport\SaveCSFDBDlg.h" />
|
||||
|
@@ -120,6 +120,24 @@
|
||||
<ClCompile Include="..\..\..\..\Common\ISession2D\ISession2D_Shape.cpp">
|
||||
<Filter>Source Files\ISession2D-src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\Common\DimensionDlg.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\Common\AngleParamsVerticesPage.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\Common\LengthParamsEdgePage.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\Common\LengthParamsEdgesPage.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\Common\LengthParamsVerticesPage.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\Common\RadiusParamsPage.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\..\..\Common\res\OCC_Resource.rc">
|
||||
@@ -211,6 +229,24 @@
|
||||
<ClInclude Include="..\..\..\..\Common\ISession2D\ISession2D_Shape.h">
|
||||
<Filter>Header Files\ISession2D-headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\Common\DimensionDlg.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\Common\AngleParamsVerticesPage.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\Common\LengthParamsEdgePage.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\Common\LengthParamsEdgesPage.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\Common\LengthParamsVerticesPage.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\Common\RadiusParamsPage.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\..\..\Common\res\2dChildFrameTB.bmp">
|
||||
|
@@ -464,6 +464,14 @@
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\AngleParamsVerticesPage.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\DimensionDlg.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\ImportExport\ImportExport.cpp"
|
||||
>
|
||||
@@ -510,6 +518,18 @@
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\LengthParamsEdgePage.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\LengthParamsEdgesPage.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\LengthParamsVerticesPage.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\mfcsample.cpp"
|
||||
>
|
||||
@@ -1148,6 +1168,10 @@
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\RadiusParamsPage.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\ResultDialog.cpp"
|
||||
>
|
||||
@@ -1735,10 +1759,30 @@
|
||||
RelativePath="..\..\..\..\Common\AISDialogs.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\AngleParamsVerticesPage.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\DimensionDlg.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\ImportExport\ImportExport.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\LengthParamsEdgePage.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\LengthParamsEdgesPage.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\LengthParamsVerticesPage.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\OCC_2dChildFrame.h"
|
||||
>
|
||||
@@ -1791,6 +1835,10 @@
|
||||
RelativePath="..\..\..\..\Common\res\OCC_Resource.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\RadiusParamsPage.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\ResultDialog.h"
|
||||
>
|
||||
|
@@ -461,6 +461,14 @@
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\AngleParamsVerticesPage.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\DimensionDlg.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\ImportExport\ImportExport.cpp"
|
||||
>
|
||||
@@ -507,6 +515,18 @@
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\LengthParamsEdgePage.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\LengthParamsEdgesPage.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\LengthParamsVerticesPage.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\mfcsample.cpp"
|
||||
>
|
||||
@@ -1145,6 +1165,10 @@
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\RadiusParamsPage.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\ResultDialog.cpp"
|
||||
>
|
||||
@@ -1732,10 +1756,30 @@
|
||||
RelativePath="..\..\..\..\Common\AISDialogs.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\AngleParamsVerticesPage.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\DimensionDlg.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\ImportExport\ImportExport.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\LengthParamsEdgePage.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\LengthParamsEdgesPage.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\LengthParamsVerticesPage.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\OCC_2dChildFrame.h"
|
||||
>
|
||||
@@ -1788,6 +1832,10 @@
|
||||
RelativePath="..\..\..\..\Common\res\OCC_Resource.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\RadiusParamsPage.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\Common\ResultDialog.h"
|
||||
>
|
||||
|
Reference in New Issue
Block a user