// purpose or non-infringement. Please see the License for the specific terms
// and conditions governing the rights and limitations under the License.
-
-
-// Modified by skv - Fri Mar 4 12:07:34 2005 OCC7966
-
#include <BRepClass3d_Intersector3d.ixx>
#include <IntCurveSurface_IntersectionPoint.hxx>
#include <TopoDS_Face.hxx>
#include <TopAbs.hxx>
-
#include <IntCurveSurface_HInter.hxx>
#include <BRepAdaptor_HSurface.hxx>
#include <Geom_Line.hxx>
surface.Initialize(Face,Standard_True);
- Standard_Boolean IsUPer, IsVPer;
- Standard_Real uperiod=0, vperiod=0;
- if ((IsUPer = surface.IsUPeriodic()))
- uperiod = surface.UPeriod();
- if ((IsVPer = surface.IsVPeriodic()))
- vperiod = surface.VPeriod();
-
- Standard_Real U1, U2, V1, V2;
- U1 = surface.FirstUParameter();
- U2 = surface.LastUParameter();
- V1 = surface.FirstVParameter();
- V2 = surface.LastVParameter();
+ const Standard_Boolean IsUPer = surface.IsUPeriodic();
+ const Standard_Boolean IsVPer = surface.IsVPeriodic();
+ const Standard_Real uperiod = IsUPer ? surface.UPeriod() : 0.0;
+ const Standard_Real vperiod = IsVPer ? surface.VPeriod() : 0.0;
+
+ Standard_Real U1 = surface.FirstUParameter();
+ Standard_Real U2 = surface.LastUParameter();
+ Standard_Real V1 = surface.FirstVParameter();
+ Standard_Real V2 = surface.LastVParameter();
//--
Handle(GeomAdaptor_HCurve) HLL = new GeomAdaptor_HCurve(LL);
} //-- Loop on Intersection points.
} //-- HICS.IsDone()
}
-
-
-
// purpose or non-infringement. Please see the License for the specific terms
// and conditions governing the rights and limitations under the License.
-// modified by mps (dec 96) ajout des commandes pour l'analyse de continuite
-
#include <BRepTest.hxx>
#ifdef HAVE_CONFIG_H
# include <config.h>
#include <Standard_ErrorHandler.hxx>
#include <Standard_Failure.hxx>
-//#ifdef WNT
#include <stdio.h>
-#ifdef WNT
-//#define strcasecmp strcmp Already defined
-#endif
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
TopTools_DataMapOfShapeListOfShape mymap;
TopOpeBRepTool_PurgeInternalEdges mypurgealgo(S);
- Standard_Integer nbedges;
-
- if ((nbedges = mypurgealgo.NbEdges())) {
-
+ Standard_Integer nbedges = mypurgealgo.NbEdges();
+ if (nbedges > 0)
+ {
//cout<<nbedges<<" internal (or external) edges to be removed"<<endl;
di<<nbedges<<" internal (or external) edges to be removed"<<"\n";
Handle(BRepAdaptor_HSurface) surf = new BRepAdaptor_HSurface();
surf->ChangeSurface().Initialize( Face, Standard_False );
- Standard_Boolean IsUPer, IsVPer;
- Standard_Real uperiod=0, vperiod=0;
- if ((IsUPer = surf->IsUPeriodic()))
- uperiod = surf->UPeriod();
- if ((IsVPer = surf->IsVPeriodic()))
- vperiod = surf->VPeriod();
+ const Standard_Boolean IsUPer = surf->IsUPeriodic();
+ const Standard_Boolean IsVPer = surf->IsVPeriodic();
+ const Standard_Real uperiod = IsUPer ? surf->UPeriod() : 0.0;
+ const Standard_Real vperiod = IsVPer ? surf->VPeriod() : 0.0;
TopAbs_State Status = TopAbs_UNKNOWN;
Standard_Boolean urecadre = Standard_False, vrecadre = Standard_False;
Handle(BRepAdaptor_HSurface) surf = new BRepAdaptor_HSurface();
surf->ChangeSurface().Initialize( Face, Standard_False );
- Standard_Boolean IsUPer, IsVPer;
- Standard_Real uperiod=0, vperiod=0;
- if ((IsUPer = surf->IsUPeriodic()))
- uperiod = surf->UPeriod();
- if ((IsVPer = surf->IsVPeriodic()))
- vperiod = surf->VPeriod();
+ const Standard_Boolean IsUPer = surf->IsUPeriodic();
+ const Standard_Boolean IsVPer = surf->IsVPeriodic();
+ const Standard_Real uperiod = IsUPer ? surf->UPeriod() : 0.0;
+ const Standard_Real vperiod = IsVPer ? surf->VPeriod() : 0.0;
TopAbs_State Status = TopAbs_UNKNOWN;
Standard_Boolean urecadre = Standard_False, vrecadre = Standard_False;
** Enter the application message-polling loop. This is the anchor for
** the application.
*/
- if(Draw_IsConsoleSubsystem)
-
- hWndFrame = NULL;
-
- else if (hWndFrame = CreateAppWindow(hInst))
+ hWndFrame = !Draw_IsConsoleSubsystem ? CreateAppWindow (hInst) : NULL;
+ if (hWndFrame != NULL)
{
ShowWindow(hWndFrame,nShow);
UpdateWindow(hWndFrame);
// purpose or non-infringement. Please see the License for the specific terms
// and conditions governing the rights and limitations under the License.
-
-
-
#ifdef WNT
-
#include <windows.h>
#include <DrawRessource.h>
#include <init.h>
\*--------------------------------------------------------------------------*/
BOOL CreateProc(HWND hWndFrame)
{
- HWND hWnd;
-
- // Save hWnd in the main window in extra memory in 0
- if (hWnd = CreateMDIClientWindow(hWndFrame))
+ HWND hWnd = CreateMDIClientWindow (hWndFrame);
+ if (hWnd != NULL)
+ {
+ // Save hWnd in the main window in extra memory in 0
SetWindowLong(hWndFrame, CLIENTWND, (LONG)hWnd);
+ }
return(TRUE);
}
\*--------------------------------------------------------------------------*/
BOOL CommandProc(HWND hWndFrame, WPARAM wParam, LPARAM /*lParam*/)
{
- HWND hWndClient; // Handle on window MDI
- HWND hWndActive;
-
- hWndClient = (HWND)GetWindowLong(hWndFrame, CLIENTWND);
+ // Handle on window MDI
+ HWND hWndClient = (HWND)GetWindowLong (hWndFrame, CLIENTWND);
switch (LOWORD(wParam))
{
case IDM_WINDOW_NEXT :
- if(hWndClient = (HWND)GetWindowLong(hWndFrame, CLIENTWND))
- hWndActive = (HWND)SendMessage(hWndClient, WM_MDIGETACTIVE, 0, 0l);
- SendMessage(hWndClient, WM_MDINEXT, (WPARAM)hWndActive, 0l);
+ if(hWndClient)
+ {
+ HWND hWndActive = (HWND)SendMessage(hWndClient, WM_MDIGETACTIVE, 0, 0l);
+ SendMessage(hWndClient, WM_MDINEXT, (WPARAM)hWndActive, 0l);
+ }
break;
case IDM_WINDOW_CASCADE :
- if(hWndClient = (HWND)GetWindowLong(hWndFrame, CLIENTWND))
+ if(hWndClient)
SendMessage(hWndClient, WM_MDICASCADE, 0, 0l);
break;
case IDM_WINDOW_TILEHOR :
- if(hWndClient = (HWND)GetWindowLong(hWndFrame, CLIENTWND))
+ if(hWndClient)
SendMessage(hWndClient, WM_MDITILE, MDITILE_HORIZONTAL, 0l);
break;
case IDM_WINDOW_TILEVERT :
- if(hWndClient = (HWND)GetWindowLong(hWndFrame, CLIENTWND))
+ if(hWndClient)
SendMessage(hWndClient, WM_MDITILE, MDITILE_VERTICAL, 0l);
break;
//analytical case - one curve is always a line
Standard_Integer anInd1 = 0, anInd2 = 1;
GeomAbs_CurveType aType2 = type2;
- if (inverse = (type1 > type2)) {
+ inverse = (type1 > type2);
+ if (inverse) {
//algorithm uses inverse order of arguments
anInd1 = 1;
anInd2 = 0;
gp_Circ2d c1(CCC1->Circ2d());
GccEnt_QualifiedCirc Qc1=GccEnt_QualifiedCirc(c1,Qualified1.Qualifier());
GccAna_Lin2dTanObl Lin(Qc1,TheLine,Angle);
- if((WellDone = Lin.IsDone())) {
+ WellDone = Lin.IsDone();
+ if(WellDone) {
NbrSol = Lin.NbSolutions();
for (Standard_Integer i = 1 ; i <= NbrSol ; i++) {
linsol(i) = Lin.ThisSolution(i);
gp_Circ2d c1(CCC1->Circ2d());
GccEnt_QualifiedCirc Qc1=GccEnt_QualifiedCirc(c1,Qualified1.Qualifier());
GccAna_Lin2dTanObl Lin(Qc1,TheLine,Angle);
- if((WellDone = Lin.IsDone())) {
+ WellDone = Lin.IsDone();
+ if(WellDone) {
NbrSol = Lin.NbSolutions();
for (Standard_Integer i = 1 ; i <= NbrSol ; i++) {
linsol(i) = Lin.ThisSolution(i);
else {
Geom2dGcc_MyQCurve Qc1(C1,Qualified1.Qualifier());
Geom2dGcc_MyL2dTanObl Lin(Qc1,TheLine,TolAng,Param1,Angle);
- if((WellDone = Lin.IsDone())) {
+ WellDone = Lin.IsDone();
+ if(WellDone) {
linsol(1) = Lin.ThisSolution();
Lin.Tangency1(par1sol(1),pararg1(1),pnttg1sol(1));
Lin.Intersection2(par2sol(1),pararg2(1),pntint2sol(1));
myInitOrder->SetValue( i, i );
}
- Standard_Boolean CourbeJoint=Standard_False;
-
- if (NTLinCont != 0 && (CourbeJoint = CourbeJointive( myTol3d )) && IsOrderG1())
+ Standard_Boolean CourbeJoint = (NTLinCont != 0) && CourbeJointive (myTol3d);
+ if (CourbeJoint && IsOrderG1())
{
nopt = 3;
// Tableau contenant le nuage de point pour le calcul du plan
TopAbs_State IntTools_FClass2d::Perform(const gp_Pnt2d& _Puv,
const Standard_Boolean RecadreOnPeriodic) const
{
- Standard_Integer dedans, nbtabclass;
-
- nbtabclass = TabClass.Length();
-
- if(nbtabclass==0) {
- return(TopAbs_IN);
+ Standard_Integer nbtabclass = TabClass.Length();
+ if (nbtabclass == 0)
+ {
+ return TopAbs_IN;
}
-
- //-- U1 is the First Param and U2 is in this case U1+Period
- Standard_Real u, v, uu, vv, uperiod, vperiod;
- Standard_Boolean IsUPer, IsVPer, urecadre, vrecadre;
- TopAbs_State Status= TopAbs_UNKNOWN;
- u=_Puv.X();
- v=_Puv.Y();
- uu = u, vv = v;
+ //-- U1 is the First Param and U2 is in this case U1+Period
+ Standard_Real u = _Puv.X();
+ Standard_Real v = _Puv.Y();
+ Standard_Real uu = u;
+ Standard_Real vv = v;
+ TopAbs_State Status = TopAbs_UNKNOWN;
Handle(BRepAdaptor_HSurface) surf = new BRepAdaptor_HSurface();
surf->ChangeSurface().Initialize( Face, Standard_False );
- uperiod=0., vperiod=0.;
- IsUPer = surf->IsUPeriodic();
- IsVPer = surf->IsVPeriodic();
-
- if (IsUPer){
- uperiod = surf->UPeriod();
- }
+ const Standard_Boolean IsUPer = surf->IsUPeriodic();
+ const Standard_Boolean IsVPer = surf->IsVPeriodic();
+ const Standard_Real uperiod = IsUPer ? surf->UPeriod() : 0.0;
+ const Standard_Real vperiod = IsVPer ? surf->VPeriod() : 0.0;
- if (IsVPer){
- vperiod = surf->VPeriod();
- }
-
- urecadre = Standard_False;
- vrecadre = Standard_False;
+ Standard_Boolean urecadre = Standard_False;
+ Standard_Boolean vrecadre = Standard_False;
+ Standard_Integer dedans = 1;
if (RecadreOnPeriodic) {
const Standard_Real Tol,
const Standard_Boolean RecadreOnPeriodic) const
{
-
- Standard_Integer dedans, nbtabclass;
-
- nbtabclass = TabClass.Length();
-
- if(nbtabclass==0) {
- return(TopAbs_IN);
+ Standard_Integer nbtabclass = TabClass.Length();
+ if (nbtabclass == 0)
+ {
+ return TopAbs_IN;
}
-
+
//-- U1 is the First Param and U2 in this case is U1+Period
Standard_Real u=_Puv.X();
Standard_Real v=_Puv.Y();
Standard_Real uu = u, vv = v;
-
+
Handle(BRepAdaptor_HSurface) surf = new BRepAdaptor_HSurface();
surf->ChangeSurface().Initialize( Face, Standard_False );
- Standard_Boolean IsUPer, IsVPer;
- Standard_Real uperiod=0, vperiod=0;
- if ((IsUPer = surf->IsUPeriodic()))
- uperiod = surf->UPeriod();
- if ((IsVPer = surf->IsVPeriodic()))
- vperiod = surf->VPeriod();
+ const Standard_Boolean IsUPer = surf->IsUPeriodic();
+ const Standard_Boolean IsVPer = surf->IsVPeriodic();
+ const Standard_Real uperiod = IsUPer ? surf->UPeriod() : 0.0;
+ const Standard_Real vperiod = IsVPer ? surf->VPeriod() : 0.0;
TopAbs_State Status = TopAbs_UNKNOWN;
Standard_Boolean urecadre = Standard_False, vrecadre = Standard_False;
-
+ Standard_Integer dedans = 1;
+
if (RecadreOnPeriodic)
{
if (IsUPer)
static void
EvalViewMappingMatrix( tel_view_mapping mapping /* View Mapping */,
- Tint *error_ind /* Out: Error Indicator */,
+ Tint* error_ind /* Out: Error Indicator */,
Tmatrix3 mat /* Out: Mapping Matrix * */,
Tint flag,
Tfloat cx,
Tfloat cy,
Tint /*clip_flag*/,
- Tlimit3 */*clip_limit*/
+ Tlimit3* /*clip_limit*/
)
{
Tfloat gx, gy, xsf, ysf, zsf;
#include <TDF_Label.hxx>
#include <TDataStd_Name.hxx>
-static Standard_Integer OCC23595 (Draw_Interpretor& di, Standard_Integer /*argc*/, const char **/*argv*/)
+static Standard_Integer OCC23595 (Draw_Interpretor& di, Standard_Integer /*argc*/, const char** /*argv*/)
{
const Handle(TDocStd_Application)& anApp = XCAFApp_Application::GetApplication();
Handle(TDocStd_Document) aDoc;
#endif
TCollection_AsciiString anOverlappedViewId("");
- Standard_Boolean isOverlapped = Standard_False;
- while (isOverlapped = IsWindowOverlapped (aPxLeft, aPxTop, aPxLeft + aPxWidth, aPxTop + aPxHeight, anOverlappedViewId))
+
+ while (IsWindowOverlapped (aPxLeft, aPxTop, aPxLeft + aPxWidth, aPxTop + aPxHeight, anOverlappedViewId))
{
ViewerTest_myViews.Find1(anOverlappedViewId)->Window()->Position (aLeft, aTop, aRight, aBottom);
Visual3d_TypeOfAnswer Answer;
Standard_Integer StructId;
Standard_Integer i = MyDisplayedStructure.Extent ();
-
- if ( !( ComputedModeIsActive = aMode ) ) {
+ ComputedModeIsActive = aMode;
+ if (!ComputedModeIsActive) {
while ( S1Iterator.More () ) {