|
|
|
@ -47,67 +47,53 @@ TextSet getUIStrings(Base::Type attacherType, eMapMode mmode)
|
|
|
|
|
case mmDeactivated:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher3D", "Deactivated","Attachment3D mode caption"),
|
|
|
|
|
qApp->translate("Attacher3D", "Attachment is disabled. CS can be moved by editing Placement property.","Attachment3D mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mmTranslate:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher3D", "Translate origin","Attachment3D mode caption"),
|
|
|
|
|
qApp->translate("Attacher3D", "Origin is aligned to match Vertex. Orientation is controlled by Placement property.","Attachment3D mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mmObjectXY:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher3D", "Object's X Y Z","Attachment3D mode caption"),
|
|
|
|
|
qApp->translate("Attacher3D", "Placement is made equal to Placement of linked object.","Attachment3D mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mmObjectXZ:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher3D", "Object's X Z-Y","Attachment3D mode caption"),
|
|
|
|
|
qApp->translate("Attacher3D", "X', Y', Z' axes are matched with object's local X, Z, -Y, respectively.","Attachment3D mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mmObjectYZ:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher3D", "Object's Y Z X","Attachment3D mode caption"),
|
|
|
|
|
qApp->translate("Attacher3D", "X', Y', Z' axes are matched with object's local Y, Z, X, respectively.","Attachment3D mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mmFlatFace:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher3D", "XY on plane","Attachment3D mode caption"),
|
|
|
|
|
qApp->translate("Attacher3D", "X' Y' plane is aligned to coincide planar face.","Attachment3D mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mmTangentPlane:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher3D", "XY tangent to surface","Attachment3D mode caption"),
|
|
|
|
|
qApp->translate("Attacher3D", "X' Y' plane is made tangent to surface at vertex.","Attachment3D mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mmNormalToPath:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher3D", "Z tangent to edge","Attachment3D mode caption"),
|
|
|
|
|
qApp->translate("Attacher3D", "Z' axis is aligned to be tangent to edge. Optional vertex link defines where.","Attachment3D mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mmFrenetNB:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher3D", "Frenet NBT","Attachment3D mode caption"),
|
|
|
|
|
qApp->translate("Attacher3D", "Align to Frenet-Serret coordinate system of curved edge. Optional vertex link defines where.","Attachment3D mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mmFrenetTN:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher3D", "Frenet TNB","Attachment3D mode caption"),
|
|
|
|
|
qApp->translate("Attacher3D", "Align to Frenet-Serret coordinate system of curved edge. Optional vertex link defines where.","Attachment3D mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mmFrenetTB:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher3D", "Frenet TBN","Attachment3D mode caption"),
|
|
|
|
|
qApp->translate("Attacher3D", "Align to Frenet-Serret coordinate system of curved edge. Optional vertex link defines where.","Attachment3D mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mmConcentric:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher3D", "Concentric","Attachment3D mode caption"),
|
|
|
|
|
qApp->translate("Attacher3D", "Align XY plane to osculating circle of an edge. Optional vertex link defines where.","Attachment3D mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mmRevolutionSection:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher3D", "Revolution Section","Attachment3D mode caption"),
|
|
|
|
|
qApp->translate("Attacher3D", "Align Y' axis to match axis of osculating circle of an edge. Optional vertex link defines where.","Attachment3D mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mmThreePointsPlane:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher3D", "XY plane by 3 points","Attachment3D mode caption"),
|
|
|
|
|
qApp->translate("Attacher3D", "Align XY plane to pass through three vertices.","Attachment3D mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mmThreePointsNormal:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher3D", "XZ plane by 3 points","Attachment3D mode caption"),
|
|
|
|
|
qApp->translate("Attacher3D", "Align XZ plane to pass through 3 points; X axis will pass through two first points.","Attachment3D mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mmFolding:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher3D", "Folding","Attachment3D mode caption"),
|
|
|
|
|
qApp->translate("Attacher3D", "Specialty mode for folding polyhedra. Select 4 edges in order: foldable edge, fold line, other fold line, other foldable edge. XY plane will be aligned to folding the first edge.","Attachment3D mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
} else if (attacherType.isDerivedFrom(AttachEnginePlane::getClassTypeId())){
|
|
|
|
|
//---- Plane/sketch attacher ----
|
|
|
|
@ -115,67 +101,53 @@ TextSet getUIStrings(Base::Type attacherType, eMapMode mmode)
|
|
|
|
|
case mmDeactivated:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher2D", "Deactivated","AttachmentPlane mode caption"),
|
|
|
|
|
qApp->translate("Attacher2D", "Attachment is disabled. Plane can be moved by editing Placement property.","AttachmentPlane mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mmTranslate:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher2D", "Translate origin","AttachmentPlane mode caption"),
|
|
|
|
|
qApp->translate("Attacher2D", "Origin is aligned to match Vertex. Orientation is controlled by Placement property.","AttachmentPlane mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mmObjectXY:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher2D", "Object's XY","AttachmentPlane mode caption"),
|
|
|
|
|
qApp->translate("Attacher2D", "Plane is aligned to XY local plane of linked object.","AttachmentPlane mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mmObjectXZ:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher2D", "Object's XZ","AttachmentPlane mode caption"),
|
|
|
|
|
qApp->translate("Attacher2D", "Plane is aligned to XZ local plane of linked object.","AttachmentPlane mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mmObjectYZ:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher2D", "Object's YZ","AttachmentPlane mode caption"),
|
|
|
|
|
qApp->translate("Attacher2D", "Plane is aligned to YZ local plane of linked object.","AttachmentPlane mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mmFlatFace:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher2D", "Plane face","AttachmentPlane mode caption"),
|
|
|
|
|
qApp->translate("Attacher2D", "Plane is aligned to coincide planar face.","AttachmentPlane mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mmTangentPlane:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher2D", "Tangent to surface","AttachmentPlane mode caption"),
|
|
|
|
|
qApp->translate("Attacher2D", "Plane is made tangent to surface at vertex.","AttachmentPlane mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mmNormalToPath:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher2D", "Normal to edge","AttachmentPlane mode caption"),
|
|
|
|
|
qApp->translate("Attacher2D", "Plane is made tangent to edge. Optional vertex link defines where.","AttachmentPlane mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mmFrenetNB:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher2D", "Frenet NB","AttachmentPlane mode caption"),
|
|
|
|
|
qApp->translate("Attacher2D", "Align to Frenet-Serret coordinate system of curved edge. Optional vertex link defines where.","AttachmentPlane mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mmFrenetTN:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher2D", "Frenet TN","AttachmentPlane mode caption"),
|
|
|
|
|
qApp->translate("Attacher2D", "Align to Frenet-Serret coordinate system of curved edge. Optional vertex link defines where.","AttachmentPlane mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mmFrenetTB:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher2D", "Frenet TB","AttachmentPlane mode caption"),
|
|
|
|
|
qApp->translate("Attacher2D", "Align to Frenet-Serret coordinate system of curved edge. Optional vertex link defines where.","AttachmentPlane mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mmConcentric:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher2D", "Concentric","AttachmentPlane mode caption"),
|
|
|
|
|
qApp->translate("Attacher2D", "Align to plane to osculating circle of an edge. Origin is aligned to point of curvature. Optional vertex link defines where.","AttachmentPlane mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mmRevolutionSection:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher2D", "Revolution Section","AttachmentPlane mode caption"),
|
|
|
|
|
qApp->translate("Attacher2D", "Plane is prependicular to edge, and Y axis is matched with axis of osculating circle. Optional vertex link defines where.","AttachmentPlane mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mmThreePointsPlane:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher2D", "Plane by 3 points","AttachmentPlane mode caption"),
|
|
|
|
|
qApp->translate("Attacher2D", "Align plane to pass through three vertices.","AttachmentPlane mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mmThreePointsNormal:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher2D", "Normal to 3 points","AttachmentPlane mode caption"),
|
|
|
|
|
qApp->translate("Attacher2D", "Plane will pass through first to vertices, and perpendicular to plane that passes through three vertices.","AttachmentPlane mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mmFolding:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher2D", "Folding","AttachmentPlane mode caption"),
|
|
|
|
|
qApp->translate("Attacher2D", "Specialty mode for folding polyhedra. Select 4 edges in order: foldable edge, fold line, other fold line, other foldable edge. Plane will be aligned to folding the first edge.","AttachmentPlane mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
} else if (attacherType.isDerivedFrom(AttachEngineLine::getClassTypeId())){
|
|
|
|
|
//---- Line attacher ----
|
|
|
|
@ -183,71 +155,56 @@ TextSet getUIStrings(Base::Type attacherType, eMapMode mmode)
|
|
|
|
|
case mmDeactivated:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher1D", "Deactivated","AttachmentLine mode caption"),
|
|
|
|
|
qApp->translate("Attacher1D", "Attachment is disabled. Line can be moved by editing Placement property.","AttachmentLine mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mm1AxisX:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher1D", "Object's X","AttachmentLine mode caption"),
|
|
|
|
|
qApp->translate("Attacher1D", "Line is aligned along local X axis of object. Works on objects with placements, and ellipse/parabola/hyperbola edges.","AttachmentLine mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mm1AxisY:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher1D", "Object's Y","AttachmentLine mode caption"),
|
|
|
|
|
qApp->translate("Attacher1D", "Line is aligned along local Y axis of object. Works on objects with placements, and ellipse/parabola/hyperbola edges.","AttachmentLine mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mm1AxisZ:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher1D", "Object's Z","AttachmentLine mode caption"),
|
|
|
|
|
qApp->translate("Attacher1D", "Line is aligned along local X axis of object. Works on objects with placements, and ellipse/parabola/hyperbola edges.","AttachmentLine mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mm1AxisCurv:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher1D", "Axis of curvature","AttachmentLine mode caption"),
|
|
|
|
|
qApp->translate("Attacher1D", "Line that is an axis of osculating circle of curved edge. Optional vertex defines where.","AttachmentLine mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mm1Directrix1:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher1D", "Directrix1","AttachmentLine mode caption"),
|
|
|
|
|
qApp->translate("Attacher1D", "Directrix line for ellipse, parabola, hyperbola.","AttachmentLine mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mm1Directrix2:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher1D", "Directrix2","AttachmentLine mode caption"),
|
|
|
|
|
qApp->translate("Attacher1D", "Second directrix line for ellipse and hyperbola.","AttachmentLine mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mm1Asymptote1:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher1D", "Asymptote1","AttachmentLine mode caption"),
|
|
|
|
|
qApp->translate("Attacher1D", "Asymptote of a hyperbola.","AttachmentLine mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mm1Asymptote2:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher1D", "Asymptote2","AttachmentLine mode caption"),
|
|
|
|
|
qApp->translate("Attacher1D", "Second asymptote of hyperbola.","AttachmentLine mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mm1Tangent:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher1D", "Tangent","AttachmentLine mode caption"),
|
|
|
|
|
qApp->translate("Attacher1D", "Line tangent to an edge. Optional vertex link defines where.","AttachmentLine mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mm1Normal:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher1D", "Normal","AttachmentLine mode caption"),
|
|
|
|
|
qApp->translate("Attacher1D", "Align to N vector of Frenet-Serret coordinate system of curved edge. Optional vertex link defines where.","AttachmentLine mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mm1Binormal:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher1D", "Binormal","AttachmentLine mode caption"),
|
|
|
|
|
qApp->translate("Attacher1D", "Align to B vector of Frenet-Serret coordinate system of curved edge. Optional vertex link defines where.","AttachmentLine mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mm1TangentU:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher1D", "Tangent to surface (U)","AttachmentLine mode caption"),
|
|
|
|
|
qApp->translate("Attacher1D", "Tangent to surface, along U parameter. Vertex link defines where.","AttachmentLine mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mm1TangentV:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher1D", "Tangent to surface (V)","AttachmentLine mode caption"),
|
|
|
|
|
qApp->translate("Attacher1D", "Tangent to surface, along U parameter. Vertex link defines where.","AttachmentLine mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mm1TwoPoints:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher1D", "Through two points","AttachmentLine mode caption"),
|
|
|
|
|
qApp->translate("Attacher1D", "Line that passes through two vertices.","AttachmentLine mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mm1Intersection:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher1D", "Intersection","AttachmentLine mode caption"),
|
|
|
|
|
qApp->translate("Attacher1D", "Not implemented.","AttachmentLine mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mm1Proximity:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher1D", "Proximity line","AttachmentLine mode caption"),
|
|
|
|
|
qApp->translate("Attacher1D", "Line that spans the shortest distance between shapes.","AttachmentLine mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
} else if (attacherType.isDerivedFrom(AttachEnginePoint::getClassTypeId())){
|
|
|
|
|
//---- Point attacher ----
|
|
|
|
@ -255,52 +212,43 @@ TextSet getUIStrings(Base::Type attacherType, eMapMode mmode)
|
|
|
|
|
case mmDeactivated:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher0D", "Deactivated","AttachmentPoint mode caption"),
|
|
|
|
|
qApp->translate("Attacher0D", "Attachment is disabled. Point can be moved by editing Placement property.","AttachmentPoint mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mm0Origin:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher0D", "Object's origin","AttachmentPoint mode caption"),
|
|
|
|
|
qApp->translate("Attacher0D", "Point is put at object's Placement.Position. Works on objects with placements, and ellipse/parabola/hyperbola edges.","AttachmentPoint mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mm0Focus1:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher0D", "Focus1","AttachmentPoint mode caption"),
|
|
|
|
|
qApp->translate("Attacher0D", "Focus of ellipse, parabola, hyperbola.","AttachmentPoint mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mm0Focus2:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher0D", "Focus2","AttachmentPoint mode caption"),
|
|
|
|
|
qApp->translate("Attacher0D", "Second focus of ellipse and hyperbola.","AttachmentPoint mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mm0OnEdge:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher0D", "On edge","AttachmentPoint mode caption"),
|
|
|
|
|
qApp->translate("Attacher0D", "Point is put on edge, MapPathParametr controls where. Additionally, vertex can be linked in for making a projection.","AttachmentPoint mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mm0CenterOfCurvature:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher0D", "Center of curvature","AttachmentPoint mode caption"),
|
|
|
|
|
qApp->translate("Attacher0D", "Center of osculating circle of an edge. Optinal vertex link defines where.","AttachmentPoint mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mm0CenterOfMass:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher0D", "Center of mass","AttachmentPoint mode caption"),
|
|
|
|
|
qApp->translate("Attacher0D", "Not implemented","AttachmentPoint mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mm0Intersection:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher0D", "Intersection","AttachmentPoint mode caption"),
|
|
|
|
|
qApp->translate("Attacher0D", "Not implemented","AttachmentPoint mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mm0Vertex:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher0D", "Vertex","AttachmentPoint mode caption"),
|
|
|
|
|
qApp->translate("Attacher0D", "Put Datum point coincident with another vertex.","AttachmentPoint mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mm0ProximityPoint1:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher0D", "Proximity point 1","AttachmentPoint mode caption"),
|
|
|
|
|
qApp->translate("Attacher0D", "Point on first reference that is closest to second reference.","AttachmentPoint mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case mm0ProximityPoint2:
|
|
|
|
|
return TwoStrings(qApp->translate("Attacher0D", "Proximity point 2","AttachmentPoint mode caption"),
|
|
|
|
|
qApp->translate("Attacher0D", "Point on second reference that is closest to first reference.","AttachmentPoint mode tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
assert("No user-friendly string defined for this attachment mode."=="");
|
|
|
|
|
return TwoStrings(QString::fromLatin1(AttachEngine::getModeName(mmode).c_str()),QString());
|
|
|
|
|
return TwoStrings(QString::fromStdString(AttachEngine::getModeName(mmode)), QString());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//Note: this list must be in sync with eRefType enum
|
|
|
|
|