mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0026056: AIS_LengthDimension can not build dimension for face-edge or edge-face
- Correct AIS_LengthDimension::InitEdgeFaceLength() method to support face-edge and edge-face cases - Correct test command to support face-edge and edge-face input geomerty without custom plane
This commit is contained in:
parent
a144d7770f
commit
1c078d3b39
@ -19,6 +19,7 @@
|
|||||||
#include <AIS.hxx>
|
#include <AIS.hxx>
|
||||||
#include <BRep_Tool.hxx>
|
#include <BRep_Tool.hxx>
|
||||||
#include <BRepAdaptor_Curve.hxx>
|
#include <BRepAdaptor_Curve.hxx>
|
||||||
|
#include <BRepExtrema_DistShapeShape.hxx>
|
||||||
#include <BRepLib_MakeVertex.hxx>
|
#include <BRepLib_MakeVertex.hxx>
|
||||||
#include <BRepTopAdaptor_FClass2d.hxx>
|
#include <BRepTopAdaptor_FClass2d.hxx>
|
||||||
#include <BRepTools.hxx>
|
#include <BRepTools.hxx>
|
||||||
@ -26,8 +27,8 @@
|
|||||||
#include <ElSLib.hxx>
|
#include <ElSLib.hxx>
|
||||||
#include <gce_MakeDir.hxx>
|
#include <gce_MakeDir.hxx>
|
||||||
#include <gce_MakePln.hxx>
|
#include <gce_MakePln.hxx>
|
||||||
|
#include <Geom_TrimmedCurve.hxx>
|
||||||
#include <GeomAPI_ExtremaCurveCurve.hxx>
|
#include <GeomAPI_ExtremaCurveCurve.hxx>
|
||||||
#include <GeomAPI_ExtremaCurveSurface.hxx>
|
|
||||||
#include <GeomAPI_ExtremaSurfaceSurface.hxx>
|
#include <GeomAPI_ExtremaSurfaceSurface.hxx>
|
||||||
#include <Geom_Curve.hxx>
|
#include <Geom_Curve.hxx>
|
||||||
#include <Geom_Line.hxx>
|
#include <Geom_Line.hxx>
|
||||||
@ -433,28 +434,32 @@ Standard_Boolean AIS_LengthDimension::InitEdgeFaceLength (const TopoDS_Edge& the
|
|||||||
const TopoDS_Face& theFace,
|
const TopoDS_Face& theFace,
|
||||||
gp_Dir& theEdgeDir)
|
gp_Dir& theEdgeDir)
|
||||||
{
|
{
|
||||||
Handle(Geom_Curve) aCurve;
|
// Compute edge direction
|
||||||
gp_Pnt aFirstPoint, aSecondPoint;
|
BRepAdaptor_Curve aCurveAdaptor (theEdge);
|
||||||
Standard_Boolean isInfinite = Standard_False;
|
Handle(Geom_Curve) aCurve = Handle(Geom_Curve)::DownCast (aCurveAdaptor.Curve().Curve()->Transformed (aCurveAdaptor.Trsf()));
|
||||||
|
if (aCurve.IsNull())
|
||||||
if (!AIS::ComputeGeometry (theEdge, aCurve, aFirstPoint, aSecondPoint, isInfinite))
|
|
||||||
{
|
{
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
theEdgeDir = gce_MakeDir (aFirstPoint, aSecondPoint);
|
Standard_Real aFirst = aCurveAdaptor.FirstParameter();
|
||||||
gp_Pln aPlane;
|
Standard_Real aLast = aCurveAdaptor.LastParameter();
|
||||||
Handle(Geom_Surface) aSurface;
|
gp_Pnt aFirstPoint = !Precision::IsInfinite (aFirst) ? aCurve->Value (aFirst) : gp::Origin();
|
||||||
AIS_KindOfSurface aSurfType;
|
gp_Pnt aSecondPoint = !Precision::IsInfinite (aLast) ? aCurve->Value (aLast) : gp::Origin();
|
||||||
Standard_Real anOffset;
|
gce_MakeDir aMakeDir (aFirstPoint, aSecondPoint);
|
||||||
|
if (!aMakeDir.IsDone())
|
||||||
if (!AIS::GetPlaneFromFace (theFace, aPlane, aSurface, aSurfType, anOffset))
|
|
||||||
{
|
{
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
|
theEdgeDir = aMakeDir.Value();
|
||||||
|
|
||||||
GeomAPI_ExtremaCurveSurface aDistAdaptor (aCurve, aSurface);
|
// Find attachment points
|
||||||
|
BRepExtrema_DistShapeShape aDistAdaptor (theEdge, theFace, Extrema_ExtFlag_MIN);
|
||||||
aDistAdaptor.NearestPoints (myFirstPoint, mySecondPoint);
|
if (!aDistAdaptor.IsDone())
|
||||||
|
{
|
||||||
|
return Standard_False;
|
||||||
|
}
|
||||||
|
myFirstPoint = aDistAdaptor.PointOnShape1 (1);
|
||||||
|
mySecondPoint = aDistAdaptor.PointOnShape2 (1);
|
||||||
|
|
||||||
return IsValidPoints (myFirstPoint, mySecondPoint);
|
return IsValidPoints (myFirstPoint, mySecondPoint);
|
||||||
}
|
}
|
||||||
@ -578,11 +583,11 @@ Standard_Boolean AIS_LengthDimension::InitTwoShapesPoints (const TopoDS_Shape& t
|
|||||||
|
|
||||||
return isSuccess && IsValidPoints (myFirstPoint, mySecondPoint);
|
return isSuccess && IsValidPoints (myFirstPoint, mySecondPoint);
|
||||||
}
|
}
|
||||||
else if (theFirstShape.ShapeType() == TopAbs_EDGE)
|
else if (theSecondShape.ShapeType() == TopAbs_EDGE)
|
||||||
{
|
{
|
||||||
myGeometryType = GeometryType_EdgeFace;
|
myGeometryType = GeometryType_EdgeFace;
|
||||||
isSuccess = InitEdgeFaceLength (TopoDS::Edge (theFirstShape),
|
isSuccess = InitEdgeFaceLength (TopoDS::Edge (theSecondShape),
|
||||||
TopoDS::Face (theSecondShape),
|
TopoDS::Face (theFirstShape),
|
||||||
aDirAttach);
|
aDirAttach);
|
||||||
|
|
||||||
if (isSuccess)
|
if (isSuccess)
|
||||||
@ -627,6 +632,21 @@ Standard_Boolean AIS_LengthDimension::InitTwoShapesPoints (const TopoDS_Shape& t
|
|||||||
theIsPlaneComputed = Standard_True;
|
theIsPlaneComputed = Standard_True;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return isSuccess;
|
||||||
|
}
|
||||||
|
else if (theSecondShape.ShapeType() == TopAbs_FACE)
|
||||||
|
{
|
||||||
|
myGeometryType = GeometryType_EdgeFace;
|
||||||
|
isSuccess = InitEdgeFaceLength (TopoDS::Edge (theFirstShape),
|
||||||
|
TopoDS::Face (theSecondShape),
|
||||||
|
aDirAttach);
|
||||||
|
|
||||||
|
if (isSuccess)
|
||||||
|
{
|
||||||
|
theComputedPlane = ComputePlane (aDirAttach);
|
||||||
|
theIsPlaneComputed = Standard_True;
|
||||||
|
}
|
||||||
|
|
||||||
return isSuccess;
|
return isSuccess;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ DEFINE_STANDARD_HANDLE (AIS_LengthDimension, AIS_Dimension)
|
|||||||
//! In case of face-edge, edge-vertex or face-face lengthes the automatic plane
|
//! In case of face-edge, edge-vertex or face-face lengthes the automatic plane
|
||||||
//! computing is allowed. For this plane the third point is found on the
|
//! computing is allowed. For this plane the third point is found on the
|
||||||
//! edge or on the face.
|
//! edge or on the face.
|
||||||
//!
|
//!
|
||||||
//! Please note that if the inappropriate geometry is defined
|
//! Please note that if the inappropriate geometry is defined
|
||||||
//! or the distance between measured points is less than
|
//! or the distance between measured points is less than
|
||||||
//! Precision::Confusion(), the dimension is invalid and its
|
//! Precision::Confusion(), the dimension is invalid and its
|
||||||
@ -81,8 +81,6 @@ public:
|
|||||||
Standard_EXPORT AIS_LengthDimension (const TopoDS_Face& theFace,
|
Standard_EXPORT AIS_LengthDimension (const TopoDS_Face& theFace,
|
||||||
const TopoDS_Edge& theEdge);
|
const TopoDS_Edge& theEdge);
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
//! Construct length dimension between two faces.
|
//! Construct length dimension between two faces.
|
||||||
//! @param theFirstFace [in] the first face (first shape).
|
//! @param theFirstFace [in] the first face (first shape).
|
||||||
//! @param theSecondFace [in] the second face (second shape).
|
//! @param theSecondFace [in] the second face (second shape).
|
||||||
|
@ -18,20 +18,36 @@
|
|||||||
|
|
||||||
#include <AIS_AngleDimension.hxx>
|
#include <AIS_AngleDimension.hxx>
|
||||||
#include <AIS_Circle.hxx>
|
#include <AIS_Circle.hxx>
|
||||||
|
#include <AIS_ConcentricRelation.hxx>
|
||||||
#include <AIS_DiameterDimension.hxx>
|
#include <AIS_DiameterDimension.hxx>
|
||||||
#include <AIS_DisplayMode.hxx>
|
#include <AIS_DisplayMode.hxx>
|
||||||
|
#include <AIS_EqualDistanceRelation.hxx>
|
||||||
|
#include <AIS_EqualRadiusRelation.hxx>
|
||||||
|
#include <AIS_FixRelation.hxx>
|
||||||
|
#include <AIS_IdenticRelation.hxx>
|
||||||
#include <AIS_InteractiveContext.hxx>
|
#include <AIS_InteractiveContext.hxx>
|
||||||
#include <AIS_LengthDimension.hxx>
|
#include <AIS_LengthDimension.hxx>
|
||||||
#include <AIS_ListIteratorOfListOfInteractive.hxx>
|
#include <AIS_ListIteratorOfListOfInteractive.hxx>
|
||||||
#include <AIS_ListOfInteractive.hxx>
|
#include <AIS_ListOfInteractive.hxx>
|
||||||
#include <AIS_MapOfInteractive.hxx>
|
#include <AIS_MapOfInteractive.hxx>
|
||||||
|
#include <AIS_OffsetDimension.hxx>
|
||||||
|
#include <AIS_ParallelRelation.hxx>
|
||||||
|
#include <AIS_PerpendicularRelation.hxx>
|
||||||
#include <AIS_Point.hxx>
|
#include <AIS_Point.hxx>
|
||||||
#include <AIS_RadiusDimension.hxx>
|
#include <AIS_RadiusDimension.hxx>
|
||||||
#include <AIS_Relation.hxx>
|
#include <AIS_Relation.hxx>
|
||||||
#include <AIS_Shape.hxx>
|
#include <AIS_Shape.hxx>
|
||||||
#include <BRepAdaptor_Curve.hxx>
|
#include <AIS_SymmetricRelation.hxx>
|
||||||
|
#include <AIS_TangentRelation.hxx>
|
||||||
#include <BRep_Builder.hxx>
|
#include <BRep_Builder.hxx>
|
||||||
#include <BRep_Tool.hxx>
|
#include <BRep_Tool.hxx>
|
||||||
|
#include <BRepAdaptor_Curve.hxx>
|
||||||
|
#include <BRepBuilderAPI_MakeVertex.hxx>
|
||||||
|
#include <BRepExtrema_ExtCC.hxx>
|
||||||
|
#include <BRepExtrema_ExtPC.hxx>
|
||||||
|
#include <BRepExtrema_ExtCF.hxx>
|
||||||
|
#include <BRepExtrema_ExtPF.hxx>
|
||||||
|
#include <BRepExtrema_ExtFF.hxx>
|
||||||
#include <BRepTools.hxx>
|
#include <BRepTools.hxx>
|
||||||
#include <Draw_Interpretor.hxx>
|
#include <Draw_Interpretor.hxx>
|
||||||
#include <Draw.hxx>
|
#include <Draw.hxx>
|
||||||
@ -60,6 +76,7 @@
|
|||||||
#include <TopAbs.hxx>
|
#include <TopAbs.hxx>
|
||||||
#include <TopAbs_ShapeEnum.hxx>
|
#include <TopAbs_ShapeEnum.hxx>
|
||||||
#include <TopExp.hxx>
|
#include <TopExp.hxx>
|
||||||
|
#include <TopExp_Explorer.hxx>
|
||||||
#include <TopoDS.hxx>
|
#include <TopoDS.hxx>
|
||||||
#include <TopoDS_Face.hxx>
|
#include <TopoDS_Face.hxx>
|
||||||
#include <TopoDS_Solid.hxx>
|
#include <TopoDS_Solid.hxx>
|
||||||
@ -537,11 +554,6 @@ static int VDimBuilder (Draw_Interpretor& /*theDi*/,
|
|||||||
{
|
{
|
||||||
case AIS_KOD_LENGTH:
|
case AIS_KOD_LENGTH:
|
||||||
{
|
{
|
||||||
if (!isPlaneCustom)
|
|
||||||
{
|
|
||||||
std::cerr << theArgs[0] << ": can not build dimension without working plane.\n";
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
if (aShapes.Extent() == 1)
|
if (aShapes.Extent() == 1)
|
||||||
{
|
{
|
||||||
if (aShapes.First()->Type() == AIS_KOI_Shape
|
if (aShapes.First()->Type() == AIS_KOI_Shape
|
||||||
@ -550,6 +562,12 @@ static int VDimBuilder (Draw_Interpretor& /*theDi*/,
|
|||||||
std::cerr << theArgs[0] << ": wrong shape type.\n";
|
std::cerr << theArgs[0] << ": wrong shape type.\n";
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
if (!isPlaneCustom)
|
||||||
|
{
|
||||||
|
std::cerr << theArgs[0] << ": can not build dimension without working plane.\n";
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
// Adjust working plane
|
// Adjust working plane
|
||||||
TopoDS_Edge anEdge = TopoDS::Edge ((Handle(AIS_Shape)::DownCast(aShapes.First()))->Shape());
|
TopoDS_Edge anEdge = TopoDS::Edge ((Handle(AIS_Shape)::DownCast(aShapes.First()))->Shape());
|
||||||
TopoDS_Vertex aFirst, aSecond;
|
TopoDS_Vertex aFirst, aSecond;
|
||||||
@ -566,8 +584,7 @@ static int VDimBuilder (Draw_Interpretor& /*theDi*/,
|
|||||||
// Getting shapes
|
// Getting shapes
|
||||||
if (aShapes.First()->DynamicType() == STANDARD_TYPE (AIS_Point))
|
if (aShapes.First()->DynamicType() == STANDARD_TYPE (AIS_Point))
|
||||||
{
|
{
|
||||||
Handle(AIS_Point) aPoint1 = Handle(AIS_Point)::DownCast (aShapes.First ());
|
aShape1 = Handle(AIS_Point)::DownCast (aShapes.First ())->Vertex();
|
||||||
aShape1 = aPoint1->Vertex();
|
|
||||||
}
|
}
|
||||||
else if (aShapes.First()->Type() == AIS_KOI_Shape)
|
else if (aShapes.First()->Type() == AIS_KOI_Shape)
|
||||||
{
|
{
|
||||||
@ -576,8 +593,7 @@ static int VDimBuilder (Draw_Interpretor& /*theDi*/,
|
|||||||
|
|
||||||
if (aShapes.Last()->DynamicType() == STANDARD_TYPE (AIS_Point))
|
if (aShapes.Last()->DynamicType() == STANDARD_TYPE (AIS_Point))
|
||||||
{
|
{
|
||||||
Handle(AIS_Point) aPoint2 = Handle(AIS_Point)::DownCast (aShapes.Last ());
|
aShape2 = Handle(AIS_Point)::DownCast (aShapes.Last ())->Vertex();
|
||||||
aShape2 = aPoint2->Vertex();
|
|
||||||
}
|
}
|
||||||
else if (aShapes.Last()->Type() == AIS_KOI_Shape)
|
else if (aShapes.Last()->Type() == AIS_KOI_Shape)
|
||||||
{
|
{
|
||||||
@ -590,17 +606,38 @@ static int VDimBuilder (Draw_Interpretor& /*theDi*/,
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adjust working plane
|
// Face-Face case
|
||||||
if (aShape1.ShapeType() == TopAbs_VERTEX)
|
if (aShape1.ShapeType() == TopAbs_FACE && aShape2.ShapeType() == TopAbs_FACE)
|
||||||
{
|
{
|
||||||
aWorkingPlane.SetLocation (BRep_Tool::Pnt (TopoDS::Vertex (aShape1)));
|
aDim = new AIS_LengthDimension (TopoDS::Face (aShape1), TopoDS::Face (aShape2));
|
||||||
}
|
}
|
||||||
else if (aShape2.ShapeType() == TopAbs_VERTEX)
|
else if (aShape1.ShapeType() == TopAbs_FACE && aShape2.ShapeType() == TopAbs_EDGE)
|
||||||
{
|
{
|
||||||
aWorkingPlane.SetLocation (BRep_Tool::Pnt (TopoDS::Vertex (aShape2)));
|
aDim = new AIS_LengthDimension (TopoDS::Face (aShape1), TopoDS::Edge (aShape2));
|
||||||
}
|
}
|
||||||
|
else if (aShape1.ShapeType() == TopAbs_EDGE && aShape2.ShapeType() == TopAbs_FACE)
|
||||||
|
{
|
||||||
|
aDim = new AIS_LengthDimension (TopoDS::Face (aShape2), TopoDS::Edge (aShape1));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!isPlaneCustom)
|
||||||
|
{
|
||||||
|
std::cerr << theArgs[0] << ": can not build dimension without working plane.\n";
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
// Vertex-Vertex case
|
||||||
|
if (aShape1.ShapeType() == TopAbs_VERTEX)
|
||||||
|
{
|
||||||
|
aWorkingPlane.SetLocation (BRep_Tool::Pnt (TopoDS::Vertex (aShape1)));
|
||||||
|
}
|
||||||
|
else if (aShape2.ShapeType() == TopAbs_VERTEX)
|
||||||
|
{
|
||||||
|
aWorkingPlane.SetLocation (BRep_Tool::Pnt (TopoDS::Vertex (aShape2)));
|
||||||
|
}
|
||||||
|
|
||||||
aDim = new AIS_LengthDimension (aShape1, aShape2, aWorkingPlane);
|
aDim = new AIS_LengthDimension (aShape1, aShape2, aWorkingPlane);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -896,14 +933,6 @@ static int VDiameterDimBuilder(Draw_Interpretor& di, Standard_Integer argc, cons
|
|||||||
//purpose : Display the concentric relation between two surfaces.
|
//purpose : Display the concentric relation between two surfaces.
|
||||||
//Draw arg : vconcentric Name
|
//Draw arg : vconcentric Name
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
#include <AIS_ConcentricRelation.hxx>
|
|
||||||
#include <Geom_Plane.hxx>
|
|
||||||
#include <gp_Pln.hxx>
|
|
||||||
#include <GC_MakePlane.hxx>
|
|
||||||
#include <BRepAdaptor_Curve.hxx>
|
|
||||||
#include <TopExp_Explorer.hxx>
|
|
||||||
|
|
||||||
|
|
||||||
static int VConcentricBuilder(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
static int VConcentricBuilder(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
||||||
{
|
{
|
||||||
// Declarations
|
// Declarations
|
||||||
@ -990,11 +1019,6 @@ static int VConcentricBuilder(Draw_Interpretor& di, Standard_Integer argc, const
|
|||||||
//purpose :
|
//purpose :
|
||||||
//Draw arg : vdiameterdim Name DiameterValue
|
//Draw arg : vdiameterdim Name DiameterValue
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
#include <AIS_EqualDistanceRelation.hxx>
|
|
||||||
#include <BRepExtrema_ExtCC.hxx>
|
|
||||||
#include <GC_MakePlane.hxx>
|
|
||||||
|
|
||||||
|
|
||||||
static int VEqualDistRelation(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
static int VEqualDistRelation(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
||||||
{
|
{
|
||||||
// Declarations
|
// Declarations
|
||||||
@ -1152,11 +1176,6 @@ static int VEqualDistRelation(Draw_Interpretor& di, Standard_Integer argc, const
|
|||||||
//purpose :
|
//purpose :
|
||||||
//Draw arg : vdiameterdim Name DiameterValue
|
//Draw arg : vdiameterdim Name DiameterValue
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
#include <AIS_EqualRadiusRelation.hxx>
|
|
||||||
#include <GC_MakePlane.hxx>
|
|
||||||
#include <BRepAdaptor_Curve.hxx>
|
|
||||||
|
|
||||||
|
|
||||||
static int VEqualRadiusRelation(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
static int VEqualRadiusRelation(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
||||||
{
|
{
|
||||||
// Declarations
|
// Declarations
|
||||||
@ -1230,10 +1249,6 @@ static int VEqualRadiusRelation(Draw_Interpretor& di, Standard_Integer argc, con
|
|||||||
//purpose :
|
//purpose :
|
||||||
//Draw arg : vdiameterdim Name DiameterValue
|
//Draw arg : vdiameterdim Name DiameterValue
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
#include <AIS_FixRelation.hxx>
|
|
||||||
#include <GC_MakePlane.hxx>
|
|
||||||
#include <BRepAdaptor_Curve.hxx>
|
|
||||||
|
|
||||||
static int VFixRelation(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
static int VFixRelation(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
||||||
{
|
{
|
||||||
// Declarations
|
// Declarations
|
||||||
@ -1295,11 +1310,6 @@ static int VFixRelation(Draw_Interpretor& di, Standard_Integer argc, const char*
|
|||||||
//purpose :
|
//purpose :
|
||||||
//Draw arg : vdiameterdim Name DiameterValue
|
//Draw arg : vdiameterdim Name DiameterValue
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
#include <AIS_IdenticRelation.hxx>
|
|
||||||
#include <BRepAdaptor_Curve.hxx>
|
|
||||||
#include <TopExp_Explorer.hxx>
|
|
||||||
|
|
||||||
|
|
||||||
static int VIdenticRelation(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
static int VIdenticRelation(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
||||||
{
|
{
|
||||||
// Declarations
|
// Declarations
|
||||||
@ -1436,18 +1446,6 @@ static int VIdenticRelation(Draw_Interpretor& di, Standard_Integer argc, const c
|
|||||||
//purpose : Display the diameter dimension of a face or an edge.
|
//purpose : Display the diameter dimension of a face or an edge.
|
||||||
//Draw arg : vdiameterdim Name DiameterValue
|
//Draw arg : vdiameterdim Name DiameterValue
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
#include <AIS_LengthDimension.hxx>
|
|
||||||
#include <BRepExtrema_ExtCC.hxx>
|
|
||||||
#include <BRepExtrema_ExtPC.hxx>
|
|
||||||
#include <BRepExtrema_ExtCF.hxx>
|
|
||||||
#include <BRepExtrema_ExtPF.hxx>
|
|
||||||
#include <BRepExtrema_ExtFF.hxx>
|
|
||||||
#include <TCollection_ExtendedString.hxx>
|
|
||||||
#include <BRepExtrema_DistShapeShape.hxx>
|
|
||||||
#include <gce_MakePln.hxx>
|
|
||||||
#include <TopExp_Explorer.hxx>
|
|
||||||
#include <BRepBuilderAPI_MakeVertex.hxx>
|
|
||||||
|
|
||||||
static int VLenghtDimension(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
static int VLenghtDimension(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
||||||
{
|
{
|
||||||
// Declarations
|
// Declarations
|
||||||
@ -1738,12 +1736,6 @@ static int VLenghtDimension(Draw_Interpretor& di, Standard_Integer argc, const c
|
|||||||
//purpose : Display the radius dimension of a face or an edge.
|
//purpose : Display the radius dimension of a face or an edge.
|
||||||
//Draw arg : vradiusdim Name
|
//Draw arg : vradiusdim Name
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
#include <AIS_RadiusDimension.hxx>
|
|
||||||
#include <TCollection_ExtendedString.hxx>
|
|
||||||
#include <BRepAdaptor_Curve.hxx>
|
|
||||||
#include <gp_Circ.hxx>
|
|
||||||
|
|
||||||
|
|
||||||
static int VRadiusDimBuilder(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
static int VRadiusDimBuilder(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
||||||
{
|
{
|
||||||
// Declarations
|
// Declarations
|
||||||
@ -1831,11 +1823,6 @@ static int VRadiusDimBuilder(Draw_Interpretor& di, Standard_Integer argc, const
|
|||||||
//purpose : Display the offset dimension
|
//purpose : Display the offset dimension
|
||||||
//Draw arg : voffsetdim Name
|
//Draw arg : voffsetdim Name
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
#include <AIS_OffsetDimension.hxx>
|
|
||||||
#include <TCollection_ExtendedString.hxx>
|
|
||||||
#include <BRepExtrema_ExtFF.hxx>
|
|
||||||
|
|
||||||
|
|
||||||
static int VOffsetDimBuilder(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
static int VOffsetDimBuilder(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
||||||
{
|
{
|
||||||
// Declarations
|
// Declarations
|
||||||
@ -1924,15 +1911,6 @@ static int VOffsetDimBuilder(Draw_Interpretor& di, Standard_Integer argc, const
|
|||||||
//purpose : Display the parallel relation
|
//purpose : Display the parallel relation
|
||||||
//Draw arg : vparallel Name
|
//Draw arg : vparallel Name
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
#include <AIS_ParallelRelation.hxx>
|
|
||||||
#include <TCollection_ExtendedString.hxx>
|
|
||||||
#include <BRepExtrema_ExtFF.hxx>
|
|
||||||
#include <BRepExtrema_ExtCC.hxx>
|
|
||||||
#include <GC_MakePlane.hxx>
|
|
||||||
#include <BRepAdaptor_Curve.hxx>
|
|
||||||
#include <TopExp_Explorer.hxx>
|
|
||||||
|
|
||||||
|
|
||||||
static int VParallelBuilder(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
static int VParallelBuilder(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
||||||
{
|
{
|
||||||
// Declarations
|
// Declarations
|
||||||
@ -2081,14 +2059,6 @@ static int VParallelBuilder(Draw_Interpretor& di, Standard_Integer argc, const c
|
|||||||
//purpose : Display the Perpendicular Relation
|
//purpose : Display the Perpendicular Relation
|
||||||
//Draw arg : vperpendicular Name
|
//Draw arg : vperpendicular Name
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
#include <AIS_PerpendicularRelation.hxx>
|
|
||||||
#include <TCollection_ExtendedString.hxx>
|
|
||||||
#include <GC_MakePlane.hxx>
|
|
||||||
#include <BRepAdaptor_Curve.hxx>
|
|
||||||
#include <TopExp_Explorer.hxx>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static int VPerpendicularBuilder(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
static int VPerpendicularBuilder(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
||||||
{
|
{
|
||||||
// Declarations
|
// Declarations
|
||||||
@ -2231,9 +2201,6 @@ static int VPerpendicularBuilder(Draw_Interpretor& di, Standard_Integer argc, co
|
|||||||
//purpose : Display the tangent Relation
|
//purpose : Display the tangent Relation
|
||||||
//Draw arg : vtangent Name
|
//Draw arg : vtangent Name
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
#include <AIS_TangentRelation.hxx>
|
|
||||||
|
|
||||||
|
|
||||||
static int VTangentBuilder(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
static int VTangentBuilder(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
||||||
{
|
{
|
||||||
// Declarations
|
// Declarations
|
||||||
@ -2372,11 +2339,6 @@ static int VTangentBuilder(Draw_Interpretor& di, Standard_Integer argc, const ch
|
|||||||
//purpose : Display the Symetrical Relation
|
//purpose : Display the Symetrical Relation
|
||||||
//Draw arg : vsymetric Name
|
//Draw arg : vsymetric Name
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
#include <AIS_SymmetricRelation.hxx>
|
|
||||||
#include <AIS_InteractiveObject.hxx>
|
|
||||||
#include <AIS_Dimension.hxx>
|
|
||||||
|
|
||||||
|
|
||||||
static int VSymmetricBuilder(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
static int VSymmetricBuilder(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
||||||
{
|
{
|
||||||
// Declarations
|
// Declarations
|
||||||
|
25
tests/bugs/vis/bug26056
Normal file
25
tests/bugs/vis/bug26056
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
puts "============"
|
||||||
|
puts "CR26056"
|
||||||
|
puts "AIS_LengthDimension can not build dimension for face-edge or edge-face"
|
||||||
|
puts "============"
|
||||||
|
puts ""
|
||||||
|
puts "Tests case of edge-face and face-edge input geometry for dimension"
|
||||||
|
pload MODELING VISUALIZATION
|
||||||
|
line aLine 0 -100 0 1 0 0
|
||||||
|
mkedge anEdge aLine -100 100
|
||||||
|
|
||||||
|
plane aPlane 0 0 50 0 0 1
|
||||||
|
mkface aFace aPlane -100 100 -100 100
|
||||||
|
|
||||||
|
line aLine2 0 0 100 1 1 0
|
||||||
|
mkedge anEdge2 aLine2 -150 150
|
||||||
|
|
||||||
|
vinit View1
|
||||||
|
vclear
|
||||||
|
vaxo
|
||||||
|
vdisplay anEdge anEdge2 aFace
|
||||||
|
vdimension aDim1 -length -shapes anEdge aFace -text 15 3d sh
|
||||||
|
vdimension aDim2 -length -shapes aFace anEdge2 -text 15 3d sh
|
||||||
|
vfit
|
||||||
|
|
||||||
|
set only_screen 1
|
Loading…
x
Reference in New Issue
Block a user