[TechDraw] Translations and grammer (#16301)

Co-authored-by: WandererFan <WandererFan@gmail.com>
This commit is contained in:
Benjamin Bræstrup Sayoc
2024-12-02 18:27:39 +01:00
committed by GitHub
parent 7df1a5d00a
commit e025b1bfe2
26 changed files with 77 additions and 76 deletions

View File

@@ -53,7 +53,7 @@ DrawViewDimExtent::DrawViewDimExtent(void)
Source.setScope(App::LinkScope::Global);
//Source3d is a candidate for deprecation as References3D contains the same information
ADD_PROPERTY_TYPE(Source3d, (nullptr, nullptr), "", (App::PropertyType)(App::Prop_Output), "3d geometry to be dimensioned");
ADD_PROPERTY_TYPE(Source3d, (nullptr, nullptr), "", (App::PropertyType)(App::Prop_Output), "3D geometry to be dimensioned");
Source3d.setScope(App::LinkScope::Global);
ADD_PROPERTY_TYPE(DirExtent ,(0), "", App::Prop_Output, "Horizontal / Vertical");

View File

@@ -1095,9 +1095,9 @@ arcPoints DrawViewDimension::arcPointsFromBaseGeom(TechDraw::BaseGeomPtr base)
else {
// fubar - can't have non-circular spline as target of Diameter dimension, but this is
// already checked, so something has gone badly wrong.
Base::Console().Error("%s: can not make a Circle from this BSpline edge\n",
Base::Console().Error("%s: can not make a Circle from this B-spline edge\n",
getNameInDocument());
throw Base::RuntimeError("Bad BSpline geometry for arc dimension");
throw Base::RuntimeError("Bad B-spline geometry for arc dimension");
}
}
else {
@@ -1173,7 +1173,7 @@ arcPoints DrawViewDimension::arcPointsFromEdge(TopoDS_Edge occEdge)
pts.isArc = isArc;
BRepAdaptor_Curve adaptCircle(circleEdge);
if (adaptCircle.GetType() != GeomAbs_Circle) {
throw Base::RuntimeError("failed to get circle from bspline");
throw Base::RuntimeError("failed to get circle from B-spline");
}
gp_Circ circle = adapt.Circle();
// TODO: same code as above. reuse opportunity.
@@ -1196,7 +1196,7 @@ arcPoints DrawViewDimension::arcPointsFromEdge(TopoDS_Edge occEdge)
}
}
else {
throw Base::RuntimeError("failed to make circle from bspline");
throw Base::RuntimeError("failed to make circle from B-spline");
}
}
else {

View File

@@ -594,7 +594,7 @@ TopoDS_Edge BaseGeom::completeEdge(const TopoDS_Edge &edge) {
// If an arc of ellipse was provided, return full ellipse
return BRepBuilderAPI_MakeEdge(curve.Ellipse());
default:
// Currently we are not extrapolating BSplines, though it is technically possible
// Currently we are not extrapolating B-splines, though it is technically possible
return BRepBuilderAPI_MakeEdge(curve.Curve().Curve());
}
}
@@ -1219,7 +1219,7 @@ BSpline::BSpline(const TopoDS_Edge &e)
}
//! Can this BSpline be represented by a straight line?
//! Can this B-spline be represented by a straight line?
// if len(first-last) == sum(len(pi - pi+1)) then it is a line
bool BSpline::isLine()
{
@@ -1232,7 +1232,7 @@ bool BSpline::isCircle()
return GeometryUtils::isCircle(occEdge);
}
// make a circular edge from BSpline
// make a circular edge from B-spline
TopoDS_Edge BSpline::asCircle(bool& arc)
{
return GeometryUtils::asCircle(occEdge, arc);
@@ -1561,7 +1561,7 @@ bool GeometryUtils::isCircle(TopoDS_Edge occEdge)
return GeometryUtils::getCircleParms(occEdge, radius, center, isArc);
}
//! tries to interpret a BSpline edge as a circle. Used by DVDim for approximate dimensions.
//! tries to interpret a B-spline edge as a circle. Used by DVDim for approximate dimensions.
//! calculates the curvature of the spline at a number of places and measures the deviation from the average
//! a true circle has constant curvature and would have no deviation from the average.
bool GeometryUtils::getCircleParms(TopoDS_Edge occEdge, double& radius, Base::Vector3d& center, bool& isArc)
@@ -1708,7 +1708,7 @@ bool GeometryUtils::isLine(TopoDS_Edge occEdge)
}
//! make a line Edge from BSpline Edge
//! make a line Edge from B-spline Edge
TopoDS_Edge GeometryUtils::asLine(TopoDS_Edge occEdge)
{
BRepAdaptor_Curve c(occEdge);