mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-18 14:27:39 +03:00
0029338: Data Exchange - Add Planes for Tolerance zones in Geometric tolerances
Add new poles to Geometric Tolerance objects Some code refactoring in GDT attributes Add Draw functions for affected plane
This commit is contained in:
@@ -27,5 +27,6 @@ XCAFDimTolObjects_DatumObjectSequence.hxx
|
||||
XCAFDimTolObjects_DimensionObjectSequence.hxx
|
||||
XCAFDimTolObjects_GeomToleranceObjectSequence.hxx
|
||||
XCAFDimTolObjects_DataMapOfToleranceDatum.hxx
|
||||
XCAFDimTolObjects_ToleranceZoneAffectedPlane.hxx
|
||||
|
||||
|
||||
|
@@ -26,6 +26,7 @@ XCAFDimTolObjects_GeomToleranceObject::XCAFDimTolObjects_GeomToleranceObject()
|
||||
myHasPlane = Standard_False;
|
||||
myHasPnt = Standard_False;
|
||||
myHasPntText = Standard_False;
|
||||
myAffectedPlaneType = XCAFDimTolObjects_ToleranceZoneAffectedPlane_None;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -51,6 +52,8 @@ XCAFDimTolObjects_GeomToleranceObject::XCAFDimTolObjects_GeomToleranceObject(con
|
||||
myHasPlane = theObj->myHasPlane;
|
||||
myHasPnt = theObj->myHasPnt;
|
||||
myHasPntText = theObj->myHasPntText;
|
||||
myAffectedPlaneType = theObj->myAffectedPlaneType;
|
||||
myAffectedPlane = theObj->myAffectedPlane;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@@ -29,7 +29,9 @@
|
||||
#include <XCAFDimTolObjects_GeomToleranceModifiersSequence.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <XCAFDimTolObjects_GeomToleranceModif.hxx>
|
||||
#include <XCAFDimTolObjects_ToleranceZoneAffectedPlane.hxx>
|
||||
#include <gp_Ax2.hxx>
|
||||
#include <gp_Pln.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
@@ -168,6 +170,45 @@ public:
|
||||
return myPresentationName;
|
||||
}
|
||||
|
||||
// Returns true, if affected plane is specified.
|
||||
Standard_EXPORT bool HasAffectedPlane() const
|
||||
{
|
||||
return (myAffectedPlaneType != XCAFDimTolObjects_ToleranceZoneAffectedPlane_None);
|
||||
}
|
||||
|
||||
// Returns type of affected plane.
|
||||
Standard_EXPORT XCAFDimTolObjects_ToleranceZoneAffectedPlane GetAffectedPlaneType() const
|
||||
{
|
||||
return myAffectedPlaneType;
|
||||
}
|
||||
|
||||
// Sets affected plane type.
|
||||
Standard_EXPORT void SetAffectedPlaneType(const XCAFDimTolObjects_ToleranceZoneAffectedPlane theType)
|
||||
{
|
||||
myAffectedPlaneType = theType;
|
||||
}
|
||||
|
||||
//! Sets affected plane.
|
||||
void SetAffectedPlane(const gp_Pln& thePlane)
|
||||
{
|
||||
myAffectedPlane = thePlane;
|
||||
}
|
||||
|
||||
//! Sets affected plane.
|
||||
void SetAffectedPlane(const gp_Pln& thePlane,
|
||||
const XCAFDimTolObjects_ToleranceZoneAffectedPlane theType)
|
||||
{
|
||||
myAffectedPlaneType = theType;
|
||||
myAffectedPlane = thePlane;
|
||||
}
|
||||
|
||||
//! Returns affected plane.
|
||||
const gp_Pln& GetAffectedPlane() const
|
||||
{
|
||||
return myAffectedPlane;
|
||||
}
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(XCAFDimTolObjects_GeomToleranceObject,Standard_Transient)
|
||||
|
||||
private:
|
||||
@@ -190,6 +231,8 @@ private:
|
||||
Standard_Boolean myHasPntText;
|
||||
TopoDS_Shape myPresentation;
|
||||
Handle(TCollection_HAsciiString) myPresentationName;
|
||||
XCAFDimTolObjects_ToleranceZoneAffectedPlane myAffectedPlaneType;
|
||||
gp_Pln myAffectedPlane;
|
||||
|
||||
};
|
||||
|
||||
|
@@ -0,0 +1,27 @@
|
||||
// Created on: 2017-11-21
|
||||
// Created by: Irina KRYLOVA
|
||||
// Copyright c 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _XCAFDimTolObjects_ToleranceZoneAffectedPlane_HeaderFile
|
||||
#define _XCAFDimTolObjects_ToleranceZoneAffectedPlane_HeaderFile
|
||||
|
||||
//! Defines types of tolerance zone affected plane
|
||||
enum XCAFDimTolObjects_ToleranceZoneAffectedPlane
|
||||
{
|
||||
XCAFDimTolObjects_ToleranceZoneAffectedPlane_None,
|
||||
XCAFDimTolObjects_ToleranceZoneAffectedPlane_Intersection,
|
||||
XCAFDimTolObjects_ToleranceZoneAffectedPlane_Orientation
|
||||
};
|
||||
|
||||
#endif // _XCAFDimTolObjects_ToleranceZoneAffectedPlane_HeaderFile
|
Reference in New Issue
Block a user