fid = geompy.addToStudyInFather(cut, faces[fi], "Face %d" % (fi+1))
isSuccess, closedWires, openWires = geompy.GetFreeBoundary(faces[fi])
if isSuccess:
- print("Check free boudaries in face %d: OK" % (fi+1))
+ print("Check free boundaries in face %d: OK" % (fi+1))
print("-- Nb of closed boundaries = %d" % len(closedWires))
for wi in range(len(closedWires)):
wid = geompy.addToStudyInFather(faces[fi], closedWires[wi], "Closed wire %d" % (wi+1))
pass
pass
else:
- print("Check free boudaries in face %d: KO" % (fi+1))
+ print("Check free boundaries in face %d: KO" % (fi+1))
pass
pass
\page annotation_page Shape annotation
<b> Annotation </b> functionality allows showing in the viewer special user-defined text label connected to corresponding part of a CAD model with a line.
-Annotation text is always parallel to the screen and horizontal. It is is not zoomed or rotated when a 3D scene is zoomed or rotated by the user.
+Annotation text is always parallel to the screen and horizontal. It is not zoomed or rotated when a 3D scene is zoomed or rotated by the user.
The annotation text is defined using UTF-8 encoding and thus support any Unicode characters.
There are several algorithms for the annotation position calculation during the scene manipulations (panning, zooming, rotation):
\n <b>TUI Command:</b>
<em>geompy.Archimede(Shape,Weight,WaterDensity,MeshingDeflection),</em>
where \em Shape is a shape to put into the water, \em Weight is a weight of
-the shape, \em WaterDensity is density of water, \em MeshingDeflection is a
+the shape, \em WaterDensity is density of water, \em MeshingDeflection is a
deflection of the mesh, using to compute the section.
\n <b>Arguments:</b> Name + 1 shape + 3 values (Weight, Water Density
& Meshing Deflection).
\page blocks_operations_page Blocks Operations
-The solids built by blocks \ref build_by_blocks_page can be
+The solids built by blocks \ref build_by_blocks_page can be
processed with blocks transformation operations:
<ul>
The algorithm works on the face level, i.e. it computes only face-to-face intersections. No additional intersection types are computed.
This can be useful to detect all intersections between subshapes of type "surface" in an assembly.
-The result quality will depend on the tesselation quality. However, small deflection values can significantly decrease the performance of the algorithm.
+The result quality will depend on the tessellation quality. However, small deflection values can significantly decrease the performance of the algorithm.
Nevertheless, the performance of Fast Intersect algorithm is much higher than that of the topological intersection.
\image html measures13.png
In this dialog:
- \b Object - the checked object. \b Selection button allows picking it in the viewer or in the object browser.
-- <b>Deflection coefficient</b> - a linear deflection coefficient that defines the tesselation quality. If theDeflection <= 0, default deflection 0.001 is used.
+- <b>Deflection coefficient</b> - a linear deflection coefficient that defines the tessellation quality. If theDeflection <= 0, default deflection 0.001 is used.
- <b>Detect gaps with tolerance</b> specifies the distance between shapes used for detecting gaps:
- if theTolerance <= 0, the algorithm detects intersections;
- if theTolerance > 0, the algorithm detects gapss.
\n <b>TUI Command:</b> <em>geompy.CheckSelfIntersectionsFast(theShape, theDeflection, theTolerance),</em> \n
where: \n
\em theShape is the shape checked for validity. \n
-\em theDeflection that specifies the quality of tesselation.
+\em theDeflection that specifies the quality of tessellation.
\em theTolerance Specifies the distance between shapes used for detecting gaps.
See also a \ref tui_check_self_intersections_fast_page "TUI example".
\n <b>Arguments:</b> Name + 1 vertex (for the center) + 1 edge (for
the direction) + Radius.
-\note By default it is presumed that the <b>Center Point</b> is located at the Origin of the global
+\note By default it is presumed that the <b>Center Point</b> is located at the Origin of the global
coordinate system, and the \b Vector corresponds to OZ axis of the global
coordinate system.
\image html neo-obj1.png
-To create a list of sub-shapes (vertices, edges, wires etc.) of the
+To create a list of sub-shapes (vertices, edges, wires etc.) of the
given shape using the \b Explode operation, you need to define the <b>Main
Object</b>, which will be exploded and the <b>Type of Sub-shapes</b> you wish to
obtain from it.
\n Firstly, you can define the values of X, Y, and Z coordinates of origin and the directions of X and Y axes directly in the menu.
\n <b>TUI command:</b> <em>geompy.MakeMarker(OX, OY, OZ, XDX, XDY, XDZ,
YDX, YDY, YDZ)</em>, where OX, OY, OZ are coordinates of the origin of
-LCS, XDX, XDY, XDZ is a vector of OX direction of the LCS and YDX,
+LCS, XDX, XDY, XDZ is a vector of OX direction of the LCS and YDX,
YDY, YDZ is a a vector of OY direction of the LCS.
\n <b>Arguments:</b> Name + Coordinates of origin, X axis direction, Y axis direction.
The Result of each operation will be a GEOM_Object (edge).
\n Firstly you can define a \b Line by \b Point1 and \b Point2,
-which are the points through which the \b Line passes.
+which are the points through which the \b Line passes.
\n <b>TUI Command:</b> <em>geompy.MakeLineTwoPnt(Point1, Point2)</em>
\n <b>Arguments:</b> Name + 2 vertices.
\b NB! There is another way to create a line, which is currently
accessible only via \b TUI commands.
-You can define a line passing through the given \b Point and parallel
+You can define a line passing through the given \b Point and parallel
to the given \b Vector.
\n <b>TUI Command:</b> <em>geompy.MakeLine(Point, Vector)</em>
\n There are three algorithms to create a plane in the 3D space.
\n The \b Result of each operation will be a GEOM_Object (face).
-\n Firstly, you can define a \b Plane by a \b Point through which the
+\n Firstly, you can define a \b Plane by a \b Point through which the
plane passes, a \b Vector giving a normal of the plane and a <b>Size
of the Plane</b> (size of a side of quadrangle face, representing the
plane).
\image html plane1.png
\n Secondly, you can define a \b Plane by three \b Points through
-which the plane passes and a <b>Size of the Plane</b>.
+which the plane passes and a <b>Size of the Plane</b>.
\n <b>TUI Command:</b> <em>geompy.MakePlaneThreePnt(Point1, Point2, Point3, TrimSize)</em>
\n <b>Arguments:</b> Name + 3 vertices + 1 value (to define the size
of the plane).
\image html polyline_dlg.png
A polyline represents a section or a set of sections. Each section is constructed from a sequence of 2D points
-connected by either linear segments or an interpolation curve. Every section has its own attributes:
+connected by either linear segments or an interpolation curve. Every section has its own attributes:
- \b Name,
- \b Type (Polyline or Spline),
- \b Closed flag.
\page create_sketcher_page 2D Sketcher
-The 2D Sketcher allows drawing arbitrary 2D shapes.
+The 2D Sketcher allows drawing arbitrary 2D shapes.
To create a <b>2D Sketch</b> select in the main menu <b>New Entity -> Basic -> 2D Sketch</b>.
\image html 2dsketch12.png
-- \b Radius radio-button allows creating a more limited arc segment by defining a custom ark radius, which must be greater than half of the distance between the last point and the end point of the arc.
+- \b Radius radio-button allows creating a more limited arc segment by defining a custom ark radius, which must be greater than half of the distance between the last point and the end point of the arc.
\image html 2dsketch8.png
\n Secondly, you can define a \b Sphere with the center at the origin of
coordinate system by the \b Radius.
\n <b>TUI Command:</b> <em>geompy. MakeSphereR(Radius)</em>
-\n <b>Arguments:</b> Name + 1 value (Radius from the origin).
+\n <b>Arguments:</b> Name + 1 value (Radius from the origin).
\image html sphere2.png
-\n <b>NB!</b> The is another way to create a\b Sphere, which is
+\n <b>NB!</b> The is another way to create a \b Sphere, which is
currently accessible only via \b TUI commands.
\n You can define the \b Sphere by the coordinates of the <b>Center
Point</b> and its \b Radius (in this way you don't need to create it in advance).
A primitive called \b Rectangle is a rectangular face of certain dimensions and orientation
-To create a \b Rectangle in the <b>Main Menu</b> select <b>New Entity - >
+To create a \b Rectangle in the <b>Main Menu</b> select <b>New Entity - >
Primitives - > Rectangle</b>
\n There are 2 algorithms to create a \b Rectangle in the 3D space.
radio buttons (OXY, OYZ or OZX).This
means that the \b Rectangle will lie in "OXY", "OYZ" or "OZX" plane correspondingly.
\n <b>TUI Command:</b> <em>geompy.MakeFaceHW(Height, Width, Orientation)</em>
-\n <b>Arguments:</b> Name + 3 values (Dimensions at origin: heigth, width and
+\n <b>Arguments:</b> Name + 3 values (Dimensions at origin: height, width and
orientation).
\page display_mode_page Display Mode
\n This option is relevant for viewing 3D objects. Wireframe mode means
-that you can see only edges of the object, while its shells remain
+that you can see only edges of the object, while its shells remain
transparent. Shading mode means that the shells are filled with color.
\n To change the display mode right-click on this geometrical object
\n <b>TUI Command:</b> <em>geompy.MakeBlockExplode(Compound,
MinNbFaces, MaxNbFaces),</em> where \em Compound is a compound to be
exploded into the blocks, \em MinNbFaces, \em MaxNbFaces are correspondingly
-the minimal and the maximal number of faces of the resulting blocks.
+the minimal and the maximal number of faces of the resulting blocks.
\n <b>Arguments:</b> 1 compound + 2 integers (min. and max. number of
faces in the block to be extracted).
\note The result quality depends on the quality of triangulation. Changing the value of the deflection coefficient
parameter can strongly affect the result. However, small values of the deflection coefficient might lead to
-some performance loss of the algorithm, as number of triangles of the tesselation mesh depends on this parameter.
+some performance loss of the algorithm, as number of triangles of the tessellation mesh depends on this parameter.
Press <b>Apply and Close</b> or \b Apply button to store the selected sub-shapes in the study for further analysis.
The selection will be published as a compound containing intersected sub-shapes from both source objects.
\r
<b>List of Dimensions</b>\r
\r
-This dialog provides the list of dimensions shown in the view for the selected geometrical <b>Object</b>. The list items are sorted by dimension type: <b>Distance</b>, <b>Diameter</b> and <b>Angle</b>. \r
+This dialog provides the list of dimensions shown in the view for the selected geometrical <b>Object</b>. The list items are sorted by dimension type: <b>Distance</b>, <b>Diameter</b> and <b>Angle</b>. \r
\r
It is possible to show/hide a dimension in the view by checking on/off the box to the left of its name. \r
\r
</ul>\r
</li>\r
\r
-<li> <b>Diameter </b> of an an arc, a circular edge or face, a sphere, a cylinder, a cone or a torus.</li> \r
+<li> <b>Diameter </b> of an an arc, a circular edge or face, a sphere, a cylinder, a cone or a torus.</li> \r
\r
<li> <b>Angle.</b> The angle dimension can be defined in one of two possible ways : </li>\r
\r
\image html image30.png
-\n The second algorithm modifies the location of the \b Object(s) using \b Start
+\n The second algorithm modifies the location of the \b Object(s) using \b Start
and \b End \b LCS, although the final position of the object will not
-coincide with the center of either of the two systems. In this method
+coincide with the center of either of the two systems. In this method
the object is shifted from its initial position by the value of the
remainder after subtraction of the coordinates of the <b>Start LCS</b> from
the coordinates of the <b>End LCS</b>.
\image html image4.png
The third algorithm modifies the location of the \b Object(s) using the <b>Path object</b> (Wire or Edge)
-and the \b Distance parameter (ranging from 0 to 1) defining how far the object will move along the path.
+and the \b Distance parameter (ranging from 0 to 1) defining how far the object will move along the path.
\n <b>Create a copy</b> checkbox allows to keep the initial object,
otherwise it will be removed.
\n <b>Select Unpublished edges</b> checkbox allows to select sub-shape edges on
\image html restore-ss-viewer-cut.png "The resulting shape"
-Second, we examine the case when the resulting shape is composed from multiple arguments
+Second, we examine the case when the resulting shape is composed from multiple arguments
(after all Boolean operations, except for Cut, or after the partition with
several object shapes, or if the resulting shape is a compound).
*
* This function is useful for the compounds only; for simple shapes it
* exactly the same value as GetShapeType().
- * Note, that compounds are procesed recursively.
+ * Note, that compounds are processed recursively.
*
* \sa GetShapeType(), GetTopologyType(), GetMaxShapeType()
*/
*
* This function is useful for the compounds only; for simple shapes it
* exactly the same value as GetShapeType().
- * Note, that compounds are procesed recursively.
+ * Note, that compounds are processed recursively.
*
* \sa GetShapeType(), GetTopologyType(), GetMinShapeType()
*/
/*!
- * \brief Add / Remove material to / from a solid by extrusion of the base shape on the given distance.
+ * \brief Add / Remove material to / from a solid by extrusion of the base shape on the given distance.
* \param theInitShape Initial shape on which to perform the feature.It has to be a solid or
* a compound made of a single solid
* \param theBase Edge or wire defining the base shape to be extruded.
*
* The path shape can be a wire or an edge.
* the several profiles can be specified in the several locations of path.
- * \param theSeqBases - list of Bases shape to be extruded.
+ * \param theSeqBases - list of Bases shape to be extruded.
* \param theLocations - list of locations on the path corresponding
* specified list of the Bases shapes. Number of locations
* should be equal to number of bases or list of locations can be empty.
*
* The path shape can be a shell or a face.
* the several profiles can be specified in the several locations of path.
- * \param theSeqBases - list of Bases shape to be extruded.
+ * \param theSeqBases - list of Bases shape to be extruded.
* \param theSeqSubBases - list of corresponding sub-shapes of section shapes.
* \param theLocations - list of locations on the path corresponding
* specified list of the Bases shapes. Number of locations
* \param theBase Base shape to be extruded.
* \param thePath Path shape to extrude the base shape along it.
* \param theVec Vector defines a constant binormal direction to keep the
- * same angle beetween the Direction and the sections
+ * same angle between the Direction and the sections
* along the sweep surface.
* \param IsGenerateGroups flag that tells if it is necessary to
* return groups (true) or not (false).
/*!
* \brief Create a quadrangle face from four edges. Order of Edges is not
- * important. It is not necessary that edges share the same vertex.
+ * important. It is not necessary that edges share the same vertex.
* \param theEdge1,theEdge2,theEdge3,theEdge4 Edges for the face bound.
* \return New GEOM_Object, containing the created face.
*/
* \brief Create a hexahedral solid, bounded by the six given faces. Order of
* faces is not important.
*
- * It is not necessary that Faces share the same edge.
+ * It is not necessary that Faces share the same edge.
* \param theFace1,theFace2,theFace3,theFace4,theFace5,theFace6 Faces for the hexahedral solid.
* \return New GEOM_Object, containing the created solid.
*/
SALOMEDS::TMPFile GetTexture(in long theID, out long theWidth, out long theHeight);
/*!
- * \brief Get list of all avaiable texture IDs
- * \return list of all texture IDs avaiable for the current study
+ * \brief Get list of all available texture IDs
+ * \return list of all texture IDs available for the current study
*/
ListOfLong GetAllTextures();
/*!
* \brief Detect self-intersections of the given shape with algorithm based on mesh intersections.
* \param theShape Shape to check validity of.
- * \param theDeflection Linear deflection coefficient that specifies quality of tesselation.
+ * \param theDeflection Linear deflection coefficient that specifies quality of tessellation.
* \param theTolerance Specifies a distance between sub-shapes used for detecting gaps:
* - if \a theTolerance <= 0, algorithm detects intersections
* - if \a theTolerance > 0, algorithm detects gaps
out ListOfLong theIntersections);
/*!
- * \brief Check boolean and partition operations agruments.
- * \param theShape the agrument of an operation to be checked.
- * \return TRUE if the agrument is valid for a boolean or partition
+ * \brief Check boolean and partition operations arguments.
+ * \param theShape the argument of an operation to be checked.
+ * \return TRUE if the argument is valid for a boolean or partition
* operation; FALSE otherwise.
*/
boolean CheckBOPArguments (in GEOM_Object theShape);
* \param theTolerance Specifies a distance between shapes used for detecting gaps:
* - if \a theTolerance <= 0, algorithm detects intersections
* - if \a theTolerance > 0, algorithm detects gaps
- * \param theDeflection Linear deflection coefficient that specifies quality of tesselation:
+ * \param theDeflection Linear deflection coefficient that specifies quality of tessellation:
* - if \a theDeflection <= 0, default deflection 0.001 is used
* \param theIntersections1 Output: contains list of sub-shapes IDs from 1st shape that localize intersection
* \param theIntersections2 Output: contains list of sub-shapes IDs from 2nd shape that localize intersection
interface GEOM_IGroupOperations : GEOM_IOperations
{
/*!
- * \brief Creates a new group which will store sub-shapes of theMainShape
+ * \brief Creates a new group which will store sub-shapes of theMainShape
* \param theMainShape is a GEOM_Object on which the group is selected
* \param theShapeType defines a shape type of the group
* \return a newly created GEOM group
/*!
* \brief Returns a GEOM_Object defined by its IOR
- * \param theIOR a string containg an IOR of the requested GEOM_Object
+ * \param theIOR a string containing an IOR of the requested GEOM_Object
*/
GEOM_Object GetIORFromString (in string theIOR);
! FixShape.FixOrientationMode : Mode for fixing face orientation (default - -1, yes - 1 , no - 0).
! FixShape.FixMissingSeamMode : Mode for fixing face missing seam (default - -1, yes - 1 , no - 0).
! FixShape.FixSmallAreaWireMode : Mode for fixing small area wires (default - -1, yes - 1 , no - 0).
-! FixShape.ModifyTopologyMode : Mode allowing of modifing of topology (default - 0, yes - 1 , no - 0).
-! FixShape.ModifyGeometryMode : Mode allowing of modifing of geometry (default - 1, yes - 1 , no - 0).
+! FixShape.ModifyTopologyMode : Mode allowing for modifying of topology (default - 0, yes - 1 , no - 0).
+! FixShape.ModifyGeometryMode : Mode allowing for modifying of geometry (default - 1, yes - 1 , no - 0).
! FixShape.ClosedWireMode : Mode defining whether the wire is to be closed. (default - 1, yes - 1 , no - 0).
! FixShape.PreferencePCurveMode : Mode defining of preference of 2d representation (default - 1, yes - 1 , no - 0).
! FixShape.FixReorderMode : Mode for fixing of order of the edges in the wire (default - -1, yes - 1 , no - 0).
StdFail_NotDone::Raise("Cannot build cones of thickness reduction");
BRepAlgoAPI_Cut cut1 (ConeExt.Shape(), ConeInt.Shape());
if (!cut1.IsDone())
- StdFail_NotDone::Raise("Coudn't build transition part of thickness reduction");
+ StdFail_NotDone::Raise("Couldn't build transition part of thickness reduction");
TopoDS_Shape aReduction = cut1.Shape();
// Build the thin part, if required
StdFail_NotDone::Raise("Cannot build cylinders of thickness reduction");
BRepAlgoAPI_Cut cut2 (CExt.Shape(), CInt.Shape());
if (!cut2.IsDone())
- StdFail_NotDone::Raise("Coudn't build thin part of thickness reduction");
+ StdFail_NotDone::Raise("Couldn't build thin part of thickness reduction");
aThinPart = cut2.Shape();
}
// Remove small radius main pipe
BRepAlgoAPI_Cut cut1 (fuse1.Shape(), C1Int.Shape());
if (!cut1.IsDone()) {
- StdFail_NotDone::Raise("Coudn't cut cylinders");
+ StdFail_NotDone::Raise("Couldn't cut cylinders");
}
// Remove small radius incident pipe => Te
BRepAlgoAPI_Cut Te (cut1.Shape(), C2Int.Shape());
if (!Te.IsDone()) {
- StdFail_NotDone::Raise("Coudn't cut cylinders");
+ StdFail_NotDone::Raise("Couldn't cut cylinders");
}
TopoDS_Shape aShape = Te.Shape();
void AdvancedGUI_SmoothingSurfaceDlg::Init()
{
// Get setting of step value from file configuration
- SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+ //SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
initSpinBox(myDMaxSpin, 0., COORD_MAX, 0.00001, "parametric_precision" );
//=================================================================================
-// funcion : getParameter()
+// function : getParameter()
// purpose :
//=================================================================================
double BasicGUI_PointDlg::getParameter() const
//=================================================================================
-// funcion : getUParameter()
+// function : getUParameter()
// purpose :
//=================================================================================
double BasicGUI_PointDlg::getUParameter() const
//=================================================================================
-// funcion : getVParameter()
+// function : getVParameter()
// purpose :
//=================================================================================
double BasicGUI_PointDlg::getVParameter() const
{
for (TopExp_Explorer ex_f(result,TopAbs_FACE); ex_f.More(); ex_f.Next()) {
TopoDS_Shape aShape = Context->Apply(ex_f.Current().Oriented(TopAbs_FORWARD));
- // face coud not be dropped or splitted on this step
+ // face could not be dropped or split on this step
TopoDS_Face aFace = TopoDS::Face(aShape);
TopLoc_Location L;
Handle(Geom_Surface) Surf = BRep_Tool::Surface(aFace,L);
break;
}
if(NeedUnion) {
- MESSAGE ("can not make analitical union => make approximation");
+ MESSAGE ("can not make analytical union => make approximation");
TopoDS_Edge E = GlueEdgesWithPCurves(aChain, VF, VL);
aChain.SetValue(1,E);
}
#include <BRepAdaptor_HSurface.hxx>
#include <LocalAnalysis_SurfaceContinuity.hxx>
#include <GeomConvert_ApproxSurface.hxx>
+#include <Bnd_Box.hxx>
+#include <BRepBndLib.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Line.hxx>
return isSame;
}
-#if OCC_VERSION_LARGE > 0x07020001
-// for Mantis issue 0023451 by JGV
+//=======================================================================
+//function : DefineMaxTolerance
+//purpose : calculates maximum possible tolerance on edges of shape
+//=======================================================================
+static Standard_Real DefineMaxTolerance(const TopoDS_Shape& theShape)
+{
+ Standard_Real aTol = Precision::Confusion();
+
+ Standard_Real MinSize = RealLast();
+ TopExp_Explorer Explo(theShape, TopAbs_EDGE);
+ for (; Explo.More(); Explo.Next())
+ {
+ const TopoDS_Edge& anEdge = TopoDS::Edge(Explo.Current());
+ Bnd_Box aBox;
+ BRepBndLib::Add(anEdge, aBox);
+ Standard_Real Xmin, Ymin, Zmin, Xmax, Ymax, Zmax;
+ aBox.Get(Xmin, Ymin, Zmin, Xmax, Ymax, Zmax);
+ Standard_Real MaxSize = Max(Xmax - Xmin, Max(Ymax - Ymin, Zmax - Zmin));
+ if (MaxSize < MinSize)
+ MinSize = MaxSize;
+ }
+
+ if (!Precision::IsInfinite(MinSize))
+ aTol = 0.1 * MinSize;
+
+ return aTol;
+}
+
//=======================================================================
//function : IsTangentFaces
//purpose : decides: is edge on closed surface tangent or not
return Standard_False;
}
-#endif
+
//=======================================================================
//function : IsEdgeValidToMerge
//purpose : Edge is valid if it is not seam or if it is a seam and the face
// has another seam edge.
//=======================================================================
-#if OCC_VERSION_LARGE > 0x07020001
-// for Mantis issue 0023451 by JGV
static Standard_Boolean IsEdgeValidToMerge(const TopoDS_Edge& theEdge,
const TopoDS_Face& theFace,
const Handle(Geom_Surface)& theSurface,
return isValid;
}
-#else
-static Standard_Boolean IsEdgeValidToMerge(const TopoDS_Edge &theEdge,
- const TopoDS_Face &theFace)
-{
- Standard_Boolean isValid = Standard_True;
-
- if (BRep_Tool::IsClosed(theEdge, theFace)) {
- // This is a seam edge. Check if there are another seam edges on the face.
- TopExp_Explorer anExp(theFace, TopAbs_EDGE);
-
- for (; anExp.More(); anExp.Next()) {
- const TopoDS_Shape &aShEdge = anExp.Current();
-
- // Skip same edge.
- if (theEdge.IsSame(aShEdge)) {
- continue;
- }
-
- // Check if this edge is a seam.
- TopoDS_Edge anEdge = TopoDS::Edge(aShEdge);
-
- if (BRep_Tool::IsClosed(anEdge, theFace)) {
- isValid = Standard_False;
- break;
- }
- }
- }
-
- return isValid;
-}
-#endif
//=======================================================================
//function : Perform
Handle(Geom_Surface) aBaseSurface = BRep_Tool::Surface(aFace,aBaseLocation);
aBaseSurface = ClearRts(aBaseSurface);
aBaseSurface = Handle(Geom_Surface)::DownCast(aBaseSurface->Copy());
-#if OCC_VERSION_LARGE > 0x07020001
-// for Mantis issue 0023451 by JGV
Standard_Boolean ToMakeUPeriodic = Standard_False, ToMakeVPeriodic = Standard_False;
-#endif
// find adjacent faces to union
Standard_Integer i;
for (i = 1; i <= edges.Length(); i++) {
TopoDS_Edge edge = TopoDS::Edge(edges(i));
-#if OCC_VERSION_LARGE > 0x07020001
-// for Mantis issue 0023451 by JGV
Standard_Boolean IsEdgeOnSeam = Standard_False;
-#endif
if (BRep_Tool::Degenerated(edge) ||
-#if OCC_VERSION_LARGE > 0x07020001
-// for Mantis issue 0023451 by JGV
- !IsEdgeValidToMerge(edge, aFace, aBaseSurface, IsEdgeOnSeam, ToMakeUPeriodic, ToMakeVPeriodic))
-#else
- !IsEdgeValidToMerge(edge, aFace))
-#endif
+ !IsEdgeValidToMerge(edge, aFace, aBaseSurface,
+ IsEdgeOnSeam, ToMakeUPeriodic, ToMakeVPeriodic))
continue;
const TopTools_ListOfShape& aList = aMapEdgeFaces.FindFromKey(edge);
if (aProcessed.Contains(anCheckedFace))
continue;
-#if OCC_VERSION_LARGE > 0x07020001
-// for Mantis issue 0023451 by JGV
if (!IsEdgeValidToMerge(edge, anCheckedFace, aBaseSurface,
IsEdgeOnSeam, ToMakeUPeriodic, ToMakeVPeriodic)) {
-#else
- if (!IsEdgeValidToMerge(edge, anCheckedFace)) {
-#endif
// Skip seam edge.
continue;
}
continue;
}
-#if OCC_VERSION_LARGE > 0x07020001
-// for Mantis issue 0023451 by JGV
//Prevent creating a face with parametric range more than period
if (IsEdgeOnSeam &&
(HasSeamEdge(aFace) || HasSeamEdge(anCheckedFace)))
continue;
-#endif
// replacing pcurves
TopoDS_Face aMockUpFace;
NbModif++;
TopoDS_Face aResult;
BRep_Builder B;
-#if OCC_VERSION_LARGE > 0x07020001
-// for Mantis issue 0023451 by JGV
if (ToMakeUPeriodic || ToMakeVPeriodic)
{
Handle(Geom_BSplineSurface) aBSplineSurface = Handle(Geom_BSplineSurface)::DownCast(aBaseSurface);
aBaseSurface = aBSplineSurface;
}
-#endif
B.MakeFace(aResult,aBaseSurface,aBaseLocation,0);
Standard_Integer nbWires = 0;
aContext->Replace(aContext->Apply(aFace),aResult);
ShapeFix_Face sff (aResult);
- //Intializing by tolerances
+ //Initializing by tolerances
sff.SetPrecision(myTolerance);
sff.SetMinTolerance(tol);
- sff.SetMaxTolerance(Max(1.,myTolerance*1000.));
+ Standard_Real MaxTol = DefineMaxTolerance(aResult);
+ sff.SetMaxTolerance(MaxTol);
//Setting modes
sff.FixOrientationMode() = 0;
-#if OCC_VERSION_LARGE > 0x07020001
- sff.FixWireTool()->CheckMissingEdgesMode() = Standard_False;
-#endif
//sff.FixWireMode() = 0;
sff.SetContext(aContext);
// Applying the fixes
CurveCreator_ICurve* theCurve );
/**
- * Returns whethe the container has the value
+ * Returns whether the container has the value
* \param theList a container of values
* \param theValue a value
*/
}
/**
- * Returns whethe the container has the value
+ * Returns whether the container has the value
* \param theList a container of values
* \param theValue a value
*/
bool EntityGUI::OnMouseRelease( QMouseEvent* pe, SUIT_Desktop* parent, SUIT_ViewWindow* theViewWindow )
{
((OCCViewer_ViewWindow*)theViewWindow)->setSketcherStyle(false);
- QDialog* aDlg = getGeometryGUI()->GetActiveDialogBox();
#ifdef WITH_OPENCV
+ QDialog* aDlg = getGeometryGUI()->GetActiveDialogBox();
if ( aDlg && ( QString( aDlg->metaObject()->className() ).compare( "EntityGUI_FeatureDetectorDlg" ) == 0 ) &&
theViewWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() &&
pe->modifiers() != Qt::ControlModifier )
myDetector->SetPath( theImgFileName.toStdString() );
height = myDetector->GetImgHeight();
width = myDetector->GetImgWidth();
- pictureLeft = -0.5 * width; // X coordinate of the top left corner of the background image in the view
+ pictureLeft = -0.5 * width; // X coordinate of the top left corner of the background image in the view
pictureTop = 0.5 * height; // Y coordinate of both top corners
}
//=======================================================================
// name : EntityGUI_FieldDlg::StepTable::isEditable
-// Purpose : Verify wheter cell is editable
+// Purpose : Verify whether cell is editable
//=======================================================================
bool EntityGUI_FieldDlg::StepTable::isEditable (int row, int col) const
{
{
InitClick();
- // Connect the selction manager (disconnected in InitClick())
+ // Connect the selection manager (disconnected in InitClick())
connect( myGeometryGUI->getApp()->selectionMgr(),
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
QString myNewCommand = ":";
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
int aPrecision = resMgr->integerValue( "Geometry", "length_precision", 6 );
- int DigNum = qAbs(aPrecision); // options for the format of numbers in myNewCommand
+ int DigNum = qAbs(aPrecision); // options for the format of numbers in myNewCommand
char Format = 'f';
if ( aPrecision < 0 ) // f --> DigNum is the number of digits after the decimal point
Format = 'g'; // g --> DigNum is the maximum number of significant digits
MESSAGE("EntityGUI_SketcherDlg::execute")
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
int aPrecision = resMgr->integerValue( "Geometry", "length_precision", 6 );
- int DigNum = qAbs(aPrecision); // options for the format of numbers in myNewCommand
+ int DigNum = qAbs(aPrecision); // options for the format of numbers in myNewCommand
char Format = 'f';
if ( aPrecision < 0 ) // f --> DigNum is the number of digits after the decimal point
Format = 'g'; // g --> DigNum is the maximum number of significant digits
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the Field creation.
+//NOTE: This is an interface to a function for the Field creation.
//
#include "GEOM_Function.hxx"
gp_Vec& aN);
//! Computes a point <theP> inside the face <theF>. <br>
- //! <theP2D> - 2D representation of <theP> <br>
+ //! <theP2D> - 2D representation of <theP> <br>
//! on the surface of <theF> <br>
//! Returns 0 in case of success. <br>
Standard_EXPORT
break;
//
default:
- printf(" * not implememted yet\n");
+ printf(" * not implemented yet\n");
break;
}
}
const bool shapesOnly = false );
static QString GetShapeTypeString( const TopoDS_Shape& shape );
- /* Convertions */
+ /* Conversions */
static Handle(GEOM_AISShape)
ConvertIOinGEOMAISShape( const Handle(SALOME_InteractiveObject)& IO,
bool onlyInActiveView = false );
{
// Unset color of shape ( this color may be set during preview displaying )
// Default color will be used
-// getDisplayer()->UnsetColor();
+ // getDisplayer()->UnsetColor();
getDisplayer()->UnsetWidth();
-
- MESSAGE("GEOMBase_Helper::display myTexture = "<<getDisplayer()->GetTexture())
+
+ MESSAGE("GEOMBase_Helper::display myTexture = "<<getDisplayer()->GetTexture());
// Enable activisation of selection
getDisplayer()->SetToActivate( true );
{
if ( !object->_is_nil() ) {
QString entry = getEntry( object );
- getDisplayer()->Erase( new SALOME_InteractiveObject(
- entry.toLatin1().constData(),
- "GEOM", strdup( GEOMBase::GetName( object ).toLatin1().constData() ) ), true, updateView );
+ QString name = GEOMBase::GetName( object );
+ getDisplayer()->Erase ( new SALOME_InteractiveObject(entry.toLatin1().constData(),
+ "GEOM",
+ name.toLatin1().constData() ),
+ true, updateView );
}
}
getDisplayer()->SetToActivate( true );
QString entry = getEntry( object );
- getDisplayer()->Redisplay(new SALOME_InteractiveObject
- (entry.toLatin1().constData(), "GEOM", strdup(GEOMBase::GetName(object).toLatin1().constData())), false);
+ QString name = GEOMBase::GetName( object );
+ getDisplayer()->Redisplay
+ (new SALOME_InteractiveObject (entry.toLatin1().constData(),
+ "GEOM",
+ name.toLatin1().constData()),
+ false);
}
if ( withChildren ) {
if ( !CORBA::is_nil( aChild ) ) {
if ( !aChild->_is_nil() ) {
QString entry = getEntry( aChild );
- getDisplayer()->Redisplay( new SALOME_InteractiveObject(
- entry.toLatin1().constData(), "GEOM", strdup( GEOMBase::GetName( aChild ).toLatin1().constData() ) ), false );
+ QString name = GEOMBase::GetName( aChild );
+ getDisplayer()->Redisplay
+ ( new SALOME_InteractiveObject( entry.toLatin1().constData(),
+ "GEOM",
+ name.toLatin1().constData() ),
+ false );
}
}
}
erasePreview( update );
return;
}
-
+
isPreview = true;
QString msg;
if ( !isValid( msg ) )
try {
SUIT_OverrideCursor wc;
ObjectList objects;
-
+
if ( !isWaitCursorEnabled() )
wc.suspend();
-
+
if ( !execute( objects ) || !getOperation()->IsDone() ) {
wc.suspend();
}
else {
for ( ObjectList::iterator it = objects.begin(); it != objects.end(); ++it )
{
- GEOM::GEOM_Object_var obj=*it;
+ GEOM::GEOM_Object_var obj = *it;
displayPreview( obj, true, activate, false, lineWidth, displayMode, color );
if ( toRemoveFromEngine )
- obj->UnRegister();
+ obj->UnRegister();
}
}
}
const int displayMode,
const int color )
{
- SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+ SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
// Set color for preview shape
getDisplayer()->SetColor( color == -1 ? Quantity_NOC_VIOLET : color );
SALOME_Prs* aPrs = getDisplayer()->BuildPrs( object );
if ( aPrs == 0 || aPrs->IsNull() )
return;
-
+
// Make preview not clippable
aPrs->SetClippable (false);
if ( myViewWindow == 0 )
return;
-
+
// Display prs
SUIT_ViewManager* aViewManager = myViewWindow->getViewManager();
if ( aViewManager->getType() == OCCViewer_Viewer::Type() ||
aViewManager->getType() == SVTK_Viewer::Type() )
- {
- SUIT_ViewModel* aViewModel = aViewManager->getViewModel();
- SALOME_View* aView = dynamic_cast<SALOME_View*>(aViewModel);
- if (aView)
- aView->Display( getDisplayer(), prs );
- }
+ {
+ SUIT_ViewModel* aViewModel = aViewManager->getViewModel();
+ SALOME_View* aView = dynamic_cast<SALOME_View*>(aViewModel);
+ if (aView)
+ aView->Display( getDisplayer(), prs );
+ }
// Add prs to the preview list
myPreview.push_back( (SALOME_Prs*)prs );
continue;
QString anEntry = getEntry( anObj );
if ( anEntry != "" )
- aListOfIO.Append( new SALOME_InteractiveObject(
- anEntry.toLatin1().constData(), "GEOM", strdup( GEOMBase::GetName( anObj ).toLatin1().constData() ) ) );
+ {
+ QString aName = GEOMBase::GetName( anObj );
+ aListOfIO.Append( new SALOME_InteractiveObject( anEntry.toLatin1().constData(),
+ "GEOM", aName.toLatin1().constData() ));
+ }
}
getDisplayer()->LocalSelection( aListOfIO, modes );
SUIT_Application* anApp = 0;
QListIterator<SUIT_Application*> it( anAppList );
while ( it.hasNext() )
- {
- anApp = it.next();
- if ( anApp && anApp->desktop() == aDesktop )
- break;
- }
+ {
+ anApp = it.next();
+ if ( anApp && anApp->desktop() == aDesktop )
+ break;
+ }
return dynamic_cast<SalomeApp_Study*>(anApp->activeStudy());
}
if ( !getStudy() || hasCommand() )
{
MESSAGE("Getting out from openCommand()")
- return res;
+ return res;
}
GEOM::GEOM_IOperations_var anOp = GEOM::GEOM_IOperations::_narrow( getOperation() );
else
{
MESSAGE("anOp->_is_nil() = true")
- }
+ }
return res;
}
QList<SUIT_ViewWindow*> aViewWindowsList = SUIT_Session::session()->activeApplication()->desktop()->windows();
QListIterator<SUIT_ViewWindow*> it( aViewWindowsList );
while ( it.hasNext() )
- {
- if ( myViewWindow == it.next() )
- return true;
- }
+ {
+ if ( myViewWindow == it.next() )
+ return true;
+ }
}
myViewWindow = 0;
return false;
bool GEOMBase_Helper::onAccept( const bool publish, const bool useTransaction, bool erasePreviewFlag )
{
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
- if ( !appStudy )
+ if ( !appStudy )
{
MESSAGE("appStudy is empty")
- return false;
+ return false;
}
_PTR(Study) aStudy = appStudy->studyDS();
showError( msg );
return false;
}
-
+
if(erasePreviewFlag)
erasePreview( false );
QString aName = getObjectName(obj);
if (aName.isEmpty()) {
aName = getNewObjectName(currObj);
- if ( nbObjs > 1 ) {
- if (aName.isEmpty())
- aName = getPrefix(obj);
- if (nbObjs <= 30) {
- // Try to find a unique name
- aName = GEOMBase::GetDefaultName(aName, extractPrefix());
- } else {
- // Don't check name uniqueness in case of numerous objects
- aName = aName + "_" + QString::number(aNumber++);
- }
- } else {
- // PAL6521: use a prefix, if some dialog box doesn't reimplement getNewObjectName()
- if ( aName.isEmpty() )
- aName = GEOMBase::GetDefaultName( getPrefix( obj ) );
- }
+ if ( nbObjs > 1 ) {
+ if (aName.isEmpty())
+ aName = getPrefix(obj);
+ if (nbObjs <= 30) {
+ // Try to find a unique name
+ aName = GEOMBase::GetDefaultName(aName, extractPrefix());
+ } else {
+ // Don't check name uniqueness in case of numerous objects
+ aName = aName + "_" + QString::number(aNumber++);
+ }
+ } else {
+ // PAL6521: use a prefix, if some dialog box doesn't reimplement getNewObjectName()
+ if ( aName.isEmpty() )
+ aName = GEOMBase::GetDefaultName( getPrefix( obj ) );
+ }
}
anEntryList << addInStudy( obj, aName.toLatin1().constData() );
// updateView=false
SalomeApp_Tools::QtCatchCorbaException( e );
abortCommand();
MESSAGE("Exception caught")
- }
+ }
updateViewer();
MESSAGE("result ="<<result)
- return result;
+ return result;
}
//================================================================
// Function : showError
-// Purpose : Shows a message box with infromation about an error taken from getOperation()->GetErrorCode()
+// Purpose : Shows a message box with information about an error taken from getOperation()->GetErrorCode()
//================================================================
void GEOMBase_Helper::showError()
{
switch ( aType )
{
- case GEOM::VERTEX : return QObject::tr( "GEOM_VERTEX" );
- case GEOM::EDGE : return QObject::tr( "GEOM_EDGE" );
- case GEOM::WIRE : return QObject::tr( "GEOM_WIRE" );
- case GEOM::FACE : return QObject::tr( "GEOM_FACE" );
- case GEOM::SHELL : return QObject::tr( "GEOM_SHELL" );
- case GEOM::SOLID : return QObject::tr( "GEOM_SOLID" );
- case GEOM::COMPSOLID: return QObject::tr( "GEOM_COMPOUNDSOLID" );
- case GEOM::COMPOUND : return QObject::tr( "GEOM_COMPOUND" );
- default : return "";
+ case GEOM::VERTEX : return QObject::tr( "GEOM_VERTEX" );
+ case GEOM::EDGE : return QObject::tr( "GEOM_EDGE" );
+ case GEOM::WIRE : return QObject::tr( "GEOM_WIRE" );
+ case GEOM::FACE : return QObject::tr( "GEOM_FACE" );
+ case GEOM::SHELL : return QObject::tr( "GEOM_SHELL" );
+ case GEOM::SOLID : return QObject::tr( "GEOM_SOLID" );
+ case GEOM::COMPSOLID: return QObject::tr( "GEOM_COMPOUNDSOLID" );
+ case GEOM::COMPOUND : return QObject::tr( "GEOM_COMPOUND" );
+ default : return "";
}
}
}
if (inStudy)
return aReturnObject._retn();
-
+
return GEOM::GEOM_Object::_nil();
}
int theIndex )
{
GEOM::GEOM_Object_var object;
-
+
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
if ( study ) {
_PTR(Study) studyDS = study->studyDS();
}
}
}
-
+
return object._retn();
}
// Returns valid object if only one object of the specified type is selected
// (no matter global or local selection is activated). If \a type is TopAbs_SHAPE,
// geometrical object of any valid type is expected.
-//
+//
// \param type type of the object to be obtained from selection
// \return selected geometrical object or nil object if selection is not satisfactory
//================================================================
// (no matter global or local selection is activated). The list of allowed
// shape types is passed via \a types. If \a types includes TopAbs_SHAPE,
// geometrical object of any valid type is expected.
-//
+//
// \param types list of allowed shape types for the objects to be obtained from selection
// \return selected geometrical object or nil object if selection is not satisfactory
//================================================================
//
// The \a type parameter specifies allowed type of the object(s) being selected.
// The \a count parameter specifies exact number of the objects to be retrieved from selection.
-// The \a strict parameter specifies policy being applied to the selection.
+// The \a strict parameter specifies policy being applied to the selection.
// If \a count < 0, then any number of the selected objects is valid (including 0).
// In this case, if \a strict is \c true (default), all selected objects should satisfy
// the specified \a type.
// In this case, if \a strict is \c true (default), function returns empty list if total number of selected
// objects does not correspond to the \a count parameter. Otherwise (if \a strict is \c false),
// function returns valid list of objects if at least \a count objects satisfy specified \a type.
-//
+//
// \param type type of the object(s) to be obtained from selection
// \param count number of items to be retrieved from selection
// \param strict selection policy
//
// The \a types parameter specifies allowed types of the object(s) being selected.
// The \a count parameter specifies exact number of the objects to be retrieved from selection.
-// The \a strict parameter specifies policy being applied to the selection.
+// The \a strict parameter specifies policy being applied to the selection.
// If \a count < 0, then any number of the selected objects is valid (including 0).
// In this case, if \a strict is \c true (default), all selected objects should satisfy
// the specified \a type.
// In this case, if \a strict is \c true (default), function returns empty list if total number of selected
// objects does not correspond to the \a count parameter. Otherwise (if \a strict is \c false),
// function returns valid list of objects if at least \a count objects satisfy specified \a type.
-//
+//
// \param types list of allowed shape types for the objects to be obtained from selection
// \param count number of items to be retrieved from selection
// \param strict selection policy
// should be published in a study.
void showError();
- // Shows a message box with infromation about an error taken from getOperation()->GetErrorCode()
+ // Shows a message box with information about an error taken from getOperation()->GetErrorCode()
void showError( const QString& msg );
// Shows a error message followed by <msg>
/*!
* \brief Inits property fields from the passed length object.
* \param theIO [in] the interactive presentation.
- * \param theLCS [in] the local coordiante system of parent object.
+ * \param theLCS [in] the local coordinate system of parent object.
*/
void Init( const Handle(AIS_LengthDimension)& theIO, const gp_Ax3& theLCS );
/*!
* \brief Updates length object properties from the fields.
* \param theIO [in/out] the interactive presentation.
- * \param theLCS [in] the local coordiante system of parent object.
+ * \param theLCS [in] the local coordinate system of parent object.
*/
void Update( Handle(AIS_LengthDimension)& theIO, const gp_Ax3& theLCS );
void FromValues(int& theIt, const std::vector<double>& theValues);
/*!
- * \brief Overload comparsion.
+ * \brief Overload comparison.
*/
bool operator == (const Length &theOther) const;
bool operator != (const Length &theOther) const { return !(operator == (theOther)); }
/*!
* \brief Inits property fields from the passed length object.
* \param theIO [in] the interactive presentation.
- * \param theLCS [in] the local coordiante system of parent object.
+ * \param theLCS [in] the local coordinate system of parent object.
*/
void Init( const Handle(AIS_DiameterDimension)& theIO, const gp_Ax3& theLCS );
/*!
* \brief Updates length object properties from the fields.
* \param theIO [in/out] the interactive presentation.
- * \param theLCS [in] the local coordiante system of parent object.
+ * \param theLCS [in] the local coordinate system of parent object.
*/
void Update( Handle(AIS_DiameterDimension)& theIO, const gp_Ax3& theLCS );
void FromValues(int& theIt, const std::vector<double>& theValues);
/*!
- * \brief Overload comparsion.
+ * \brief Overload comparison.
*/
bool operator == (const Diameter &theOther) const;
bool operator != (const Diameter &theOther) const { return !(operator == (theOther)); }
/*!
* \brief Inits property fields from the passed length object.
* \param theIO [in] the interactive presentation.
- * \param theLCS [in] the local coordiante system of parent object.
+ * \param theLCS [in] the local coordinate system of parent object.
*/
void Init( const Handle(AIS_AngleDimension)& theIO, const gp_Ax3& theLCS );
/*!
* \brief Updates length object properties from the fields.
* \param theIO [in/out] the interactive presentation.
- * \param theLCS [in] the local coordiante system of parent object.
+ * \param theLCS [in] the local coordinate system of parent object.
*/
void Update( Handle(AIS_AngleDimension)& theIO, const gp_Ax3& theLCS );
void FromValues(int& theIt, const std::vector<double>& theValues);
/*!
- * \brief Overload comparsion.
+ * \brief Overload comparison.
*/
bool operator == (const Angle &theOther) const;
bool operator != (const Angle &theOther) const { return !(operator == (theOther)); }
operator QString() const;
/*!
- * \brief Overload comparsion.
+ * \brief Overload comparison.
*/
bool operator == (const GEOMGUI_DimensionProperty &theOther) const;
/*!
- * \brief Overload comparsion.
+ * \brief Overload comparison.
*/
bool operator != (const GEOMGUI_DimensionProperty &theOther) const
{
//=================================================================
/*!
* GEOM_Displayer::BuildPrs
- * Build presentation accordint to the current viewer type
+ * Build presentation according to the current viewer type
*/
//=================================================================
SALOME_Prs* GEOM_Displayer::BuildPrs( GEOM::GEOM_Object_ptr theObj )
//=================================================================
/*!
* GEOM_Displayer::BuildPrs
- * Build presentation accordint to the current viewer type
+ * Build presentation according to the current viewer type
*/
//=================================================================
SALOME_Prs* GEOM_Displayer::BuildPrs( const TopoDS_Shape& theShape )
/* Update visibility state */
void UpdateVisibility( SALOME_View*, const SALOME_Prs*, bool );
- /* build presentation accordint to the current viewer type*/
+ /* build presentation according to the current viewer type*/
SALOME_Prs* BuildPrs ( GEOM::GEOM_Object_ptr );
SALOME_Prs* BuildPrs ( const TopoDS_Shape& );
double volume = VOL.CalculateVolume(Zmax) * aWaterDensity;
char msg[100] = "";
- sprintf(msg, "shape sinks to the bottom : Weigth max = %.1f", volume);
+ sprintf(msg, "shape sinks to the bottom : Weight max = %.1f", volume);
StdFail_NotDone::Raise(msg);
}
}
// 1.2. Ordered vertices and edges of the second face we temporarily store
- // in arrays, to find for them rigth location in <myVertices> on the Step 2.
+ // in arrays, to find for them the right location in <myVertices> in Step 2.
// declare arrays
TopTools_Array1OfShape aVertis2(1,4); // ordered vertices of the second face
aGA.SetTolerance(theTolerance);
aGA.SetKeepNonSolids(doKeepNonSolids);
- // 2. Detect interferred shapes
+ // 2. Detect interfered shapes
aGA.Detect();
//Standard_Integer iWrnDetect = aGA.WarningStatus();
aGA.SetTolerance(theTolerance);
aGA.SetKeepNonSolids(doKeepNonSolids);
- // 2. Detect interferred shapes
+ // 2. Detect interfered shapes
aGA.Detect();
//modified by NIZNHY-PKV Tue Mar 13 14:07:12 2012f
aGA.SetTolerance(theTolerance);
aGA.SetKeepNonSolids(doKeepNonSolids);
- // 2. Detect interferred shapes
+ // 2. Detect interfered shapes
aGA.Detect();
//modified by NIZNHY-PKV Tue Mar 13 14:07:12 2012f
//=======================================================================
//function : raiseNotDoneExeption
-//purpose : global function: forms error message and raises exeption
+//purpose : global function: forms error message and raises exception
//=======================================================================
void raiseNotDoneExeption( const int theErrorStatus )
{
try {
OCC_CATCH_SIGNALS;
if (!GetSolver()->ComputeFunction(aFunction)) {
- SetErrorCode("Pipe with defferent section driver failed");
+ SetErrorCode("Pipe with different section driver failed");
return NULL;
}
}
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the Arc creation.
+//NOTE: This is an interface to a function for the Arc creation.
//
#include "GEOM_Function.hxx"
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the Archimede operation.
+//NOTE: This is an interface to a function for the Archimede operation.
//
#include "GEOM_Function.hxx"
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the Common, Cut and Fuse creation.
+//NOTE: This is an interface to a function for the Common, Cut and Fuse creation.
//
#include "GEOM_Function.hxx"
#include "TColStd_HSequenceOfTransient.hxx"
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the Box creation.
+//NOTE: This is an interface to a function for the Box creation.
//
#include "GEOM_Function.hxx"
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the Circle creation.
+//NOTE: This is an interface to a function for the Circle creation.
//
#include "GEOM_Function.hxx"
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the Cone creation.
+//NOTE: This is an interface to a function for the Cone creation.
//
#include "GEOM_Function.hxx"
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the Copy operation.
+//NOTE: This is an interface to a function for the Copy operation.
//
#include "GEOM_Function.hxx"
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the Cylinder creation.
+//NOTE: This is an interface to a function for the Cylinder creation.
//
#include "GEOM_Function.hxx"
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the Disk creation.
+//NOTE: This is an interface to a function for the Disk creation.
//
#include "GEOM_Function.hxx"
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the Ellipse creation.
+//NOTE: This is an interface to a function for the Ellipse creation.
//
#include "GEOM_Function.hxx"
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the Offset creation.
+//NOTE: This is an interface to a function for the Offset creation.
//
#include "GEOM_Function.hxx"
#include <TColStd_HArray1OfInteger.hxx>
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the Face creation.
+//NOTE: This is an interface to a function for the Face creation.
//
#include "GEOM_Function.hxx"
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the Filling operation.
+//NOTE: This is an interface to a function for the Filling operation.
//
#include "GEOM_Function.hxx"
#include <TColStd_HSequenceOfTransient.hxx>
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the Import Export operation.
+//NOTE: This is an interface to a function for the Import Export operation.
//
#include "GEOM_Function.hxx"
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the vector creation.
+//NOTE: This is an interface to a function for the vector creation.
//
#include "GEOM_Function.hxx"
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the Offset creation.
+//NOTE: This is an interface to a function for the Offset creation.
//
#include "GEOM_Function.hxx"
#include <TColStd_HArray1OfInteger.hxx>
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the Partition creation.
+//NOTE: This is an interface to a function for the Partition creation.
//
#include "GEOM_Function.hxx"
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the Pipe creation.
+//NOTE: This is an interface to a function for the Pipe creation.
//
#ifndef _GEOMImpl_IPIPE_HXX_
#define _GEOMImpl_IPIPE_HXX_
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the Pipe creation.
+//NOTE: This is an interface to a function for the Pipe creation.
#ifndef _GEOMImpl_IPIPEDIFFSECT_HXX_
#define _GEOMImpl_IPIPEDIFFSECT_HXX_
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the Pipe creation.
+//NOTE: This is an interface to a function for the Pipe creation.
#ifndef _GEOMImpl_IPIPESHELLSECT_HXX_
#define _GEOMImpl_IPIPESHELLSECT_HXX_
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the vector creation.
+//NOTE: This is an interface to a function for the vector creation.
//
#include "GEOM_Function.hxx"
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the Setting In Position.
+//NOTE: This is an interface to a function for the Setting In Position.
//
#include "GEOM_Function.hxx"
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the Prism creation.
+//NOTE: This is an interface to a function for the Prism creation.
#include "GEOM_Function.hxx"
// #include <GEOMImpl_Mode.hxx> TEST
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the Revolution creation.
+//NOTE: This is an interface to a function for the Revolution creation.
//
#include "GEOM_Function.hxx"
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the Scale creation.
+//NOTE: This is an interface to a function for the Scale creation.
//
#include "GEOM_Function.hxx"
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the extended shape creation.
+//NOTE: This is an interface to a function for the extended shape creation.
//
#include "GEOM_Function.hxx"
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the Sphere creation.
+//NOTE: This is an interface to a function for the Sphere creation.
//
#include "GEOM_Function.hxx"
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the Pipe creation.
+//NOTE: This is an interface to a function for the Pipe creation.
//
#include "GEOM_Function.hxx"
#include <TColStd_HSequenceOfTransient.hxx>
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the Torus creation.
+//NOTE: This is an interface to a function for the Torus creation.
//
#include "GEOM_Function.hxx"
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the Transfer Data functionality.
+//NOTE: This is an interface to a function for the Transfer Data functionality.
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the Transfer Data functionality.
+//NOTE: This is an interface to a function for the Transfer Data functionality.
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//NOTE: This is an intreface to a function for the Translate creation.
+//NOTE: This is an interface to a function for the Translate creation.
//
#include "GEOM_Function.hxx"
bool stat = FillForOtherEdges(F1other,E1,V1,FF);
if (!stat) {
if (aCI) delete aCI;
- Standard_ConstructionError::Raise("FindNextPairOfFaces: Can not mapping other egdes");
+ Standard_ConstructionError::Raise("FindNextPairOfFaces: Can not map other edges");
}
FindNextPairOfFaces(F1other, aMapEdgeFaces1, aMapEdgeFaces2, FF, aCI);
}
}
if (nbEdges<Edges.Length()) {
- // one of edges was splitted => we have to update WirePath
+ // one of edges was split => we have to update WirePath
BRep_Builder B;
TopoDS_Wire W;
B.MakeWire(W);
bool stat = FillForOtherEdges(FS1,E1,V11,FF);
if (!stat) {
if (aCI) delete aCI;
- Standard_ConstructionError::Raise("FindForOtherEdges: Can not mapping other egdes");
+ Standard_ConstructionError::Raise("FindForOtherEdges: Can not map other edges");
}
}
aPD << theObject << " = pl.result(";
if (myWorkingPlane.IsNull()) {
- // Add coodinates of working plane.
+ // Add coordinates of working plane.
Standard_Integer i;
aPD << "[";
//=====================================================================================
// function : inUse
-// purpose : check if the object(s) passed as the the second arguments are used
+// purpose : check if the object(s) passed as the second arguments are used
// by the other objects in the study
//=====================================================================================
static bool inUse( const QString& component, const QMap<QString,QString>& objects )
// Below macro, when uncommented, switches on simplified (more performant) algorithm
// of auto-color picking up
#define SIMPLE_AUTOCOLOR
-// Below macro, when defined, switches on automatic layouting of OCC and Dependecy views
+// Below macro, when defined, switches on automatic layouting of OCC and Dependency views
// on Show Dependencies operation
#define LAYOUT_DEPVIEW
*/
/*!
- \brief Contructor
+ \brief Constructor
*/
GEOMToolsGUI_MaterialList::GEOMToolsGUI_MaterialList( QWidget* parent )
: QListWidget( parent )
//=================================================================================
// function : SetTransparency()
// purpose : Called when value of slider change
-// : or the first time as initilisation
+// : or the first time as initialisation
//=================================================================================
void GEOMToolsGUI_TransparencyDlg::SetTransparency()
{
Standard_EXPORT bool CheckShape( TopoDS_Shape& shape, bool checkGeometry = false );
/*!
- * \brief Check boolean and partition operations agruments
+ * \brief Check boolean and partition operations arguments
*
- * \param theShape the agrument of an operation to be checked
- * \return \c true if the agrument is valid for a boolean or partition
+ * \param theShape the argument of an operation to be checked
+ * \return \c true if the argument is valid for a boolean or partition
* operation or \c false otherwise
*/
Standard_EXPORT bool CheckBOPArguments(const TopoDS_Shape &theShape);
CORBA::String_var anIORo = _orb->object_to_string(theObject);
SALOMEDS::SObject_var aSO = aStudy->FindObjectIOR(anIORo.in());
//PTv, IMP 0020001, The salome object <aSO>
- // is not obligatory in case of invokation from script
+ // is not obligatory in case of invocation from script
// if (CORBA::is_nil(aSO))
// return aParts._retn();
CORBA::String_var anIORo = _orb->object_to_string(theObject);
SALOMEDS::SObject_var aSO = getStudyServant()->FindObjectIOR(anIORo.in());
//PTv, IMP 0020001, The salome object <aSO>
- // is not obligatory in case of invokation from script
+ // is not obligatory in case of invocation from script
// if (CORBA::is_nil(aSO))
// return aParts._retn();
GEOM::ListOfGO_var aParts = new GEOM::ListOfGO;
SALOMEDS::Study_var aStudy = getStudyServant();
//PTv, IMP 0020001, The salome object <theSObject>
- // is not obligatory in case of invokation from script
+ // is not obligatory in case of invocation from script
if (CORBA::is_nil(aStudy) || CORBA::is_nil(theObject) /*|| CORBA::is_nil(theSObject)*/)
return aParts._retn();
GEOM::ListOfGO_var aParts = new GEOM::ListOfGO;
SALOMEDS::Study_var aStudy = getStudyServant();
//PTv, IMP 0020001, The salome object <theSObject>
- // is not obligatory in case of invokation from script
+ // is not obligatory in case of invocation from script
if (CORBA::is_nil(aStudy) || CORBA::is_nil(theObject) /*|| CORBA::is_nil(theSObject)*/)
return aParts._retn();
bool isGood = false;
if (!aShape.IsNull()) {
- // Check BOP agruments
+ // Check BOP arguments
isGood = GetOperations()->CheckBOPArguments(aShape);
}
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-# GEOM_SWIG : binding of C++ implementaion with Python
+# GEOM_SWIG : binding of C++ implementation with Python
# File : GEOM_TestHealing.py
# Author : Julia DOROVSKIKH
# Module : GEOM
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-# GEOM GEOM_SWIG : binding of C++ implementaion with Python
+# GEOM GEOM_SWIG : binding of C++ implementation with Python
# File : GEOM_blocks.py
# Author : Julia DOROVSKIKH
# Module : GEOM
# @param theBase Base shape to be extruded.
# @param thePath Path shape to extrude the base shape along it.
# @param theVec Vector defines a constant binormal direction to keep the
- # same angle beetween the direction and the sections
+ # same angle between the direction and the sections
# along the sweep surface.
# @param IsGenerateGroups flag that tells if it is necessary to
# create groups. It is equal to False by default.
theBase Base shape to be extruded.
thePath Path shape to extrude the base shape along it.
theVec Vector defines a constant binormal direction to keep the
- same angle beetween the direction and the sections
+ same angle between the direction and the sections
along the sweep surface.
IsGenerateGroups flag that tells if it is necessary to
create groups. It is equal to False by default.
Parameters:
theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
theBase Closed edge or wire defining the base shape to be extruded.
- theH Prism dimension along the normal to theBase
+ theH Prism dimension along the normal to theBase
theAngle Draft angle in degrees.
theInvert If true material changes the direction.
theName Object name; when specified, this parameter is used
Parameters:
theInit Shape to add material to. It must be a solid or a compound made of a single solid.
theBase Closed edge or wire defining the base shape to be extruded.
- theH Prism dimension along the normal to theBase
+ theH Prism dimension along the normal to theBase
theAngle Draft angle in degrees.
theInvert If true material changes the direction.
theName Object name; when specified, this parameter is used
## Detect self-intersections of the given shape with algorithm based on mesh intersections.
# @param theShape Shape to check.
- # @param theDeflection Linear deflection coefficient that specifies quality of tesselation:
+ # @param theDeflection Linear deflection coefficient that specifies quality of tessellation:
# - if \a theDeflection <= 0, default deflection 0.001 is used
# @param theTolerance Specifies a distance between sub-shapes used for detecting gaps:
# - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
Parameters:
theShape Shape to check.
- theDeflection Linear deflection coefficient that specifies quality of tesselation:
+ theDeflection Linear deflection coefficient that specifies quality of tessellation:
- if theDeflection <= 0, default deflection 0.001 is used
theTolerance Specifies a distance between shapes used for detecting gaps:
- if theTolerance <= 0, algorithm detects intersections (default behavior)
RaiseIfFailed("CheckSelfIntersectionsFast", self.MeasuOp)
return IsValid
- ## Check boolean and partition operations agruments.
- # @param theShape the agrument of an operation to be checked
- # @return TRUE if the agrument is valid for a boolean or partition
+ ## Check boolean and partition operations arguments.
+ # @param theShape the argument of an operation to be checked
+ # @return TRUE if the argument is valid for a boolean or partition
# operation; FALSE otherwise.
@ManageTransactions("MeasuOp")
def CheckBOPArguments(self, theShape):
"""
- Check boolean and partition operations agruments.
+ Check boolean and partition operations arguments.
Parameters:
- theShape the agrument of an operation to be checked
+ theShape the argument of an operation to be checked
Returns:
- TRUE if the agrument is valid for a boolean or partition
+ TRUE if the argument is valid for a boolean or partition
operation; FALSE otherwise.
"""
return self.MeasuOp.CheckBOPArguments(theShape)
# @param theTolerance Specifies a distance between shapes used for detecting gaps:
# - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
# - if \a theTolerance > 0, algorithm detects gaps
- # @param theDeflection Linear deflection coefficient that specifies quality of tesselation:
+ # @param theDeflection Linear deflection coefficient that specifies quality of tessellation:
# - if \a theDeflection <= 0, default deflection 0.001 is used
# @return TRUE, if there are intersections (gaps) between source shapes
# @return List of sub-shapes IDs from 1st shape that localize intersection.
theTolerance Specifies a distance between shapes used for detecting gaps:
- if theTolerance <= 0, algorithm detects intersections (default behavior)
- if theTolerance > 0, algorithm detects gaps
- theDeflection Linear deflection coefficient that specifies quality of tesselation:
+ theDeflection Linear deflection coefficient that specifies quality of tessellation:
- if theDeflection <= 0, default deflection 0.001 is used
Returns:
## @{
## Create a quadrangle face from four edges. Order of Edges is not
- # important. It is not necessary that edges share the same vertex.
+ # important. It is not necessary that edges share the same vertex.
# @param E1,E2,E3,E4 Edges for the face bound.
# @param theName Object name; when specified, this parameter is used
# for result publication in the study. Otherwise, if automatic
def MakeQuad(self, E1, E2, E3, E4, theName=None):
"""
Create a quadrangle face from four edges. Order of Edges is not
- important. It is not necessary that edges share the same vertex.
+ important. It is not necessary that edges share the same vertex.
Parameters:
E1,E2,E3,E4 Edges for the face bound.
return anObj
## Create a hexahedral solid, bounded by the six given faces. Order of
- # faces is not important. It is not necessary that Faces share the same edge.
+ # faces is not important. It is not necessary that Faces share the same edge.
# @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
# @param theName Object name; when specified, this parameter is used
# for result publication in the study. Otherwise, if automatic
def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
"""
Create a hexahedral solid, bounded by the six given faces. Order of
- faces is not important. It is not necessary that Faces share the same edge.
+ faces is not important. It is not necessary that Faces share the same edge.
Parameters:
F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
/*!
\brief Initialize GEOM module's engine
- \return \c true if initialization succeedes or \c false otherwise
+ \return \c true if initialization succeeds or \c false otherwise
*/
bool GEOM_Swig::initGeomGen()
{
QList<GEOM::GeomObjPtr> GroupGUI_BooleanDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
- for (int i = 0; i < myListShapes.length(); i++) {
+ for ( CORBA::ULong i = 0; i < myListShapes.length(); i++) {
GEOM::GeomObjPtr aGeomObjPtr(myListShapes[i]);
res << aGeomObjPtr;
}
- for (int i = 0; i < myListTools.length(); i++) {
+ for ( CORBA::ULong i = 0; i < myListTools.length(); i++) {
GEOM::GeomObjPtr aGeomObjPtr(myListTools[i]);
res << aGeomObjPtr;
}
}
/*!
- \brief Get list of avaiable materials
+ \brief Get list of available materials
\param theType material type
\param theSort if \c true (default), returns a list of materials sorted by name
- \return list of avaiable materials names
+ \return list of available materials names
*/
QStringList Material_ResourceMgr::materials( MaterialType theType, bool theSort )
{
mainFrame()->RadioButton3->close();
/***************************************************************/
- /* SIMPLE SELF-INTERSECTION constructor
+ // SIMPLE SELF-INTERSECTION constructor
/***************************************************************/
mySimpleGrp = new QGroupBox(tr("GEOM_CHECK_INFOS"));
QLabel *anObjLbl = new QLabel(tr("GEOM_OBJECT"));
aGrpLayout1->addWidget(myShapeList1, 6, 2);
/***************************************************************/
- /* FAST SELF-INTERSECTION constructor
+ // FAST SELF-INTERSECTION constructor
/***************************************************************/
myFastGrp = new QGroupBox(tr("GEOM_CHECK_INFOS"), centralWidget());
/***************************************************************/
connect(this, SIGNAL(constructorsClicked(int)),
- this, SLOT(ConstructorsClicked(int)));
+ this, SLOT(ConstructorsClicked(int)));
connect(myGeomGUI, SIGNAL(SignalDeactivateActiveDialog()),
this, SLOT(DeactivateActiveDialog()));
connect(myGeomGUI, SIGNAL(SignalCloseAllDialogs()),
if ( getConstructorId() == 0 ) {
typesLst << TopAbs_COMPOUND
- << TopAbs_COMPSOLID
- << TopAbs_SOLID
- << TopAbs_SHELL
- << TopAbs_FACE
- << TopAbs_WIRE
- << TopAbs_EDGE
- << TopAbs_VERTEX
- << TopAbs_SHAPE;
+ << TopAbs_COMPSOLID
+ << TopAbs_SOLID
+ << TopAbs_SHELL
+ << TopAbs_FACE
+ << TopAbs_WIRE
+ << TopAbs_EDGE
+ << TopAbs_VERTEX
+ << TopAbs_SHAPE;
} else {
typesLst << TopAbs_FACE
- << TopAbs_SHELL
- << TopAbs_SOLID
- << TopAbs_COMPOUND;
+ << TopAbs_SHELL
+ << TopAbs_SOLID
+ << TopAbs_COMPOUND;
}
// Clear the dialog.
foreach(int idx, aIds) {
aSubShape = anIndices.FindKey(idx);
try {
- SALOME_Prs* aPrs = !aSubShape.IsNull() ? getDisplayer()->BuildPrs(aSubShape) : 0;
- if (aPrs) displayPreview(aPrs, true);
+ SALOME_Prs* aPrs = !aSubShape.IsNull() ? getDisplayer()->BuildPrs(aSubShape) : 0;
+ if (aPrs) displayPreview(aPrs, true);
}
catch (const SALOME::SALOME_Exception& e) {
- SalomeApp_Tools::QtCatchCorbaException(e);
+ SalomeApp_Tools::QtCatchCorbaException(e);
}
}
}
myGrp->ListBox2->clear();
- if (aCurItem < aErrs.length()) {
+ if (aCurItem < (int)aErrs.length()) {
GEOM::GEOM_IMeasureOperations::ShapeError aErr = aErrs[aCurItem];
GEOM::ListOfLong aObjLst = aErr.incriminated;
QStringList aSubShapeList;
{
const gp_Pln& aPlane = aPlaneIt.Value();
- // transform bounding box to orthogonal coordiantes relative to
+ // transform bounding box to orthogonal coordinates relative to
// dimension points P1, P2 (x-axis) and plane direction (z-axis),
// where y coordinates will correspond to flyout direction against
// the dimension point line
//=================================================================================
void MeasureGUI_DistanceDlg::SolutionSelected (int i)
{
- if (i < 0 || myDbls->length() < (i+1)*6) {
+ if (i < 0 || (int)myDbls->length() < (i+1)*6) {
myGrp->LineEdit3->setText("");
myGrp->LineEdit4->setText("");
myGrp->LineEdit5->setText("");
int currSol = myGrp->ComboBox1->currentIndex();
if (!myObj1 || !myObj2 ||
- currSol == -1 || (currSol+1)*6 > myDbls->length() ||
+ currSol == -1 || (currSol+1)*6 > (int)myDbls->length() ||
vw->getViewManager()->getType() != OCCViewer_Viewer::Type())
return 0;
// class : MeasureGUI_ShapeStatisticsDlg()
//===========================================================================
MeasureGUI_ShapeStatisticsDlg::MeasureGUI_ShapeStatisticsDlg( QWidget* parent, TopoDS_Shape aShape, TopAbs_ShapeEnum aSubShapeType )
- : GEOMBase_Helper( SUIT_Session::session()->activeApplication()->desktop() ),
- QDialog( parent ),
- myHistogram ( 0 )
+: GEOMBase_Helper( SUIT_Session::session()->activeApplication()->desktop() ),
+ QDialog( parent ),
+ myHistogram ( 0 )
{
myShapes.push_back( aShape );
myCBTypes = new QtxComboBox( this );
myCBTypes->setCleared( true );
if ( aSubShapeType != TopAbs_SHAPE ) {
- fillTypes( aSubShapeType == TopAbs_EDGE,
- aSubShapeType == TopAbs_FACE,
- aSubShapeType == TopAbs_SOLID );
+ fillTypes( aSubShapeType == TopAbs_EDGE,
+ aSubShapeType == TopAbs_FACE,
+ aSubShapeType == TopAbs_SOLID );
myCBTypes->setEnabled( false );
}
QLabel* maxLabel = new QLabel( tr( "GEOM_SHAPE_STATISTICS_MAX" ), this );
myMax = new QLineEdit( this );
myMax->setValidator( aValid );
-
+
QPushButton* buttonCompute = new QPushButton( tr( "GEOM_SHAPE_STATISTICS_COMPUTE" ), this );
connect( buttonCompute, SIGNAL( clicked() ), this, SLOT( clickOnCompute() ) );
return getGeomEngine()->GetIGroupOperations();
}
-#define RETURN_WITH_MSG(a, b) \
- if (!(a)) { \
- theMessage += (b); \
- return false; \
+#define RETURN_WITH_MSG(a, b) \
+ if (!(a)) { \
+ theMessage += (b); \
+ return false; \
}
//================================================================
bool MeasureGUI_ShapeStatisticsDlg::isValid(QString& theMessage)
{
if ( myScalarRangeBox->isChecked() ) {
- RETURN_WITH_MSG( !myMin->text().isEmpty(), tr("GEOM_SHAPE_STATISTICS_MIN_ERROR") )
- RETURN_WITH_MSG( !myMax->text().isEmpty(), tr("GEOM_SHAPE_STATISTICS_MAX_ERROR") )
- RETURN_WITH_MSG( myMin->text().toDouble() <= myMax->text().toDouble(), tr("GEOM_SHAPE_STATISTICS_MIN_MAX_ERROR") )
+ RETURN_WITH_MSG( !myMin->text().isEmpty(), tr("GEOM_SHAPE_STATISTICS_MIN_ERROR") );
+ RETURN_WITH_MSG( !myMax->text().isEmpty(), tr("GEOM_SHAPE_STATISTICS_MAX_ERROR") );
+ RETURN_WITH_MSG( myMin->text().toDouble() <= myMax->text().toDouble(), tr("GEOM_SHAPE_STATISTICS_MIN_MAX_ERROR") );
}
return true;
}
aRange.max = -1.0; // flag that range is empty
}
- GEOMUtils::Distribution aShapesDistr =
+ GEOMUtils::Distribution aShapesDistr =
GEOMUtils::ComputeDistribution( myShapes, currentType(), myNbIntervals->value(), aRange );
QList<double> xVals, yVals;
//=================================================================================
// function : execute(ObjectList& objects)
-// purpose :
+// purpose :
//=================================================================================
bool MeasureGUI_ShapeStatisticsDlg::execute(ObjectList& objects)
{
QString aTypePrefix = myCBTypes->currentText().replace(' ', '_');
QString objIOR, aMin, aMax, aGroupName;
- GEOMUtils::Distribution aShapesDistr =
+ GEOMUtils::Distribution aShapesDistr =
GEOMUtils::ComputeDistribution( myShapes, currentType(), myNbIntervals->value(), aRange );
int nbGroups = 0;
int ii = 0;
std::list<long>::const_iterator id_it;
for ( id_it = idList.begin(); id_it != idList.end(); id_it++ ) {
- aNewList[ii++] = *id_it;
+ aNewList[ii++] = *id_it;
}
// Create an empty group
aGroup = anOper->CreateGroup( myMainObj.get(), currentType() );
if (CORBA::is_nil(aGroup) || !anOper->IsDone())
- return false;
+ return false;
// Add sub-shapes into group
anOper->UnionIDs(aGroup, aNewList);
if (!anOper->IsDone())
- return false;
+ return false;
// publish group
aMin = DlgRef::PrintDoubleValue( (*it).min, aPrecision );
// =======================================================================
// function : SetHilightShape
-// purpose : Sets shape (annotated shape) that will be used for hilighting.
+// purpose : Sets shape (annotated shape) that will be used for highlighting.
// =======================================================================
void GEOM_Annotation::SetHilightShape( const TopoDS_Shape& theShape )
{
//! Returns attachment point of extension line.
const gp_Pnt& GetAttachPoint() const { return myAttach; }
- //! Sets shape (annotated shape) that will be used for hilighting.
+ //! Sets shape (annotated shape) that will be used for highlighting.
Standard_EXPORT void SetHilightShape( const TopoDS_Shape& theShape );
- //! Returns the hilighting shape.
+ //! Returns the highlighting shape.
const TopoDS_Shape HilightShape() const { return myShape; }
public:
gp_Pnt myStartPosition; //!< Position before starting dragging operation.
Standard_Boolean myIsScreenFixed; //!< Flag indicating whether "screen fixed" positioning mode is turned on or off.
Standard_Boolean myIsAutoHide; //!< Flag indicating whether "auto-hiding" option is turned on.
- Standard_Boolean myIsDepthCulling; //!< Flag indiciating whether the "depth culling" is turned on.
+ Standard_Boolean myIsDepthCulling; //!< Flag indicating whether the "depth culling" is turned on.
HighlightMode myHilightMode; //!< Highlight mode for presentation.
TCollection_ExtendedString myText; //!< Text string of the label presentation.
- TopoDS_Shape myShape; //!< Hilighting shape.
+ TopoDS_Shape myShape; //!< Highlighting shape.
private:
GEOM::shape_type maxShapeType(const GEOM::ListOfGO& objs)
{
GEOM::shape_type r = GEOM::SHAPE;
- for ( int i = 0; i < objs.length(); i++ ) {
+ for ( CORBA::ULong i = 0; i < objs.length(); i++ ) {
GEOM::shape_type t = objs[i]->GetShapeType();
if ( t == GEOM::COMPOUND || t == GEOM::COMPSOLID )
t = objs[i]->GetMaxShapeType();
{
QList<GEOM::GeomObjPtr> res;
GEOM::ListOfGO aListPtr(myListShapes);
- for (int i = 0; i < aListPtr.length(); i++) {
+ for (CORBA::ULong i = 0; i < aListPtr.length(); i++) {
GEOM::GeomObjPtr aGeomObjPtr(aListPtr[i]);
res << aGeomObjPtr;
}
for ( i = 0, j = 0; i < theOperators.length(); i++ )
j += myValMap[ QString( theOperators[i].in() ) ].size();
- // set the new length of paremeters
+ // set the new length of parameters
aParams->length( j );
// fill the parameters
QWidget* getControl( const QString& );
void setValue( QWidget*, const QString& ); // initialize the given control in the proper way
- // (analize its class and convert the value string)
+ // (analyze its class and convert the value string)
QString getValue( QWidget* ) const; // retrieve value of the control in the proper way
QString getText( QWidget* ) const; // retrieve text of the control (for spin-boxes only)
/*!
\brief Add segment by relativ coordinates
- \param dx dX value specifing segment end
- \param dy dY value specifing segment end
+ \param dx dX value specifying segment end
+ \param dy dY value specifying segment end
\internal
*/
void Sketcher_Profile::ShapeFunctor::addSegmentRelative( const TCollection_AsciiString& dx,
/*!
\brief Add arc along current direction vector by specified relative coordinates
- \param dx dX value specifing arc end
- \param dy dY value specifing arc end
+ \param dx dX value specifying arc end
+ \param dy dY value specifying arc end
\internal
*/
void Sketcher_Profile::ShapeFunctor::addArcRelative( const TCollection_AsciiString& dx,
/*!
\brief Add arc with given radius by specified relative coordinates
- \param dx dX value specifing arc end
- \param dy dY value specifing arc end
+ \param dx dX value specifying arc end
+ \param dy dY value specifying arc end
\param radius arc radius
\param flag reverse direction flag
\internal
/*!
\brief Add arc with given center by specified relative coordinates
- \param dx dX value specifing arc end
- \param dy dY value specifing arc end
+ \param dx dX value specifying arc end
+ \param dy dY value specifying arc end
\param xc X coordinate of arc center
\param yc Y coordinate of arc center
\param flag1 reverse direction flag
/*!
\brief Add segment by relativ coordinates
- \param dx dX value specifing segment end
- \param dy dY value specifing segment end
+ \param dx dX value specifying segment end
+ \param dy dY value specifying segment end
\internal
*/
void Sketcher_Profile::DumpFunctor::addSegmentRelative( const TCollection_AsciiString& dx,
/*!
\brief Add arc along current direction vector by specified relative coordinates
- \param dx dX value specifing arc end
- \param dy dY value specifing arc end
+ \param dx dX value specifying arc end
+ \param dy dY value specifying arc end
\internal
*/
void Sketcher_Profile::DumpFunctor::addArcRelative( const TCollection_AsciiString& dx,
/*!
\brief Add arc with given radius by specified relative coordinates
- \param dx dX value specifing arc end
- \param dy dY value specifing arc end
+ \param dx dX value specifying arc end
+ \param dy dY value specifying arc end
\param radius arc radius
\param flag reverse direction flag
\internal
/*!
\brief Add arc with given center by specified relative coordinates
- \param dx dX value specifing arc end
- \param dy dY value specifing arc end
+ \param dx dX value specifying arc end
+ \param dy dY value specifying arc end
\param xc X coordinate of arc center
\param yc Y coordinate of arc center
\param flag1 reverse direction flag
Standard_EXPORT ShHealOper_CloseContour() : ShHealOper_Tool() {}
Standard_EXPORT ShHealOper_CloseContour (const TopoDS_Shape& theShape);
- //Initalizes by whole shape.
+ //Initializes by whole shape.
Standard_EXPORT virtual void Init(const TopoDS_Shape& theShape);
//Method for initialization by whole shape.
Standard_Real aFirst =0.,aLast=0.;
- //computation of the split values if edge should be splitted by parameter.
+ //computation of the split values if edge should be split by parameter.
if(myDivideParamMode) {
BRep_Tool::Range(myEdge,aFirst,aLast);
Handle(Geom_Curve) aCurve = BRep_Tool::Curve(myEdge,aFirst,aLast);
}
}
else {
- //computation of the split values if edge should be splitted by length.
+ //computation of the split values if edge should be split by length.
ShapeAnalysis_Edge sae;
Handle(Geom_Curve) aCurve;
Standard_Real aCurLen =0.;
const Standard_Boolean theDivideParamMode = Standard_True);
//Performs spitting of the specified edge in the accoradnce to
//specified mode and value.
- //If theDivideParamMode is equal to true edge will be splitted by parameter.
+ //If theDivideParamMode is equal to true edge will be split by parameter.
//Else edge will be spliited by length (default true).
//theValue is coefficient for splitting from 0 to 1.
/// Empty constructor
Standard_EXPORT ShHealOper_ShapeProcess();
- //Constuctor initializes by defaults parameters
+ //Constructor initializes by defaults parameters
// (name of resource file - ShHealing, prefix - ShapeProcess,
// SaveHistory = Standard_False, level = TopAbs_FACE)
Standard_EXPORT ShHealOper_ShapeProcess
(const TCollection_AsciiString& theNameResource,
const TCollection_AsciiString& thePrefix = "ShapeProcess");
- //Constuctor initializes by specified name of resource file and prefix
+ //Constructor initializes by specified name of resource file and prefix
Standard_EXPORT void Perform(const TopoDS_Shape& theOldShape,
TopoDS_Shape& theNewShape);
<item row="3" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
- <string>Big pipe height</string>
+ <string>Big pipe height</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
- <string>Small pipe radius</string>
+ <string>Small pipe radius</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
- <string>Small pipe height</string>
+ <string>Small pipe height</string>
</property>
</widget>
</item>
//=================================================================================
// class : TransformationGUI_OffsetDlg()
-// purpose : Constructs a TransformationGUI_OffsetDlg which is a child of 'parent', with the
+// purpose : Constructs a TransformationGUI_OffsetDlg which is a child of 'parent', with the
// name 'name' and widget flags set to 'f'.
// The dialog will by default be modeless, unless you set 'modal' to
// TRUE to construct a modal dialog.
// purpose : Destroys the object and frees any allocated resources
//=================================================================================
TransformationGUI_OffsetDlg::~TransformationGUI_OffsetDlg()
-{
+{
/* no need to delete child widgets, Qt does it all for us */
}
//=================================================================================
bool TransformationGUI_OffsetDlg::ClickOnApply()
{
- if ( !onAccept( GroupPoints->CheckButton1->isChecked() ) )
+ if ( !onAccept( /*copy=*/true ))
return false;
-
+
initName();
return true;
}
void TransformationGUI_OffsetDlg::SetEditCurrentArgument()
{
QPushButton* send = (QPushButton*)sender();
-
+
if ( send == GroupPoints->PushButton1 ) {
GroupPoints->PushButton1->setDown(true);
myEditCurrentArgument = GroupPoints->LineEdit1;
void TransformationGUI_OffsetDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
- connect( myGeomGUI->getApp()->selectionMgr(),
+ connect( myGeomGUI->getApp()->selectionMgr(),
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
globalSelection( GEOM_ALLSHAPES );
myEditCurrentArgument = GroupPoints->LineEdit1;
bool TransformationGUI_OffsetDlg::execute( ObjectList& objects )
{
bool res = false;
-
+
GEOM::GEOM_Object_var anObj;
-
+
GEOM::GEOM_ITransformOperations_var anOper = GEOM::GEOM_ITransformOperations::_narrow(getOperation());
if ( true /*GroupPoints->CheckButton1->isChecked() || IsPreview()*/ ) {
for ( int i = 0; i < myObjects.count(); i++ ) {
-
+
anObj = anOper->OffsetShapeCopy( myObjects[i].get(), GetOffset(), GetIsJoinByPipes() );
if ( !anObj->_is_nil() ) {
if(!IsPreview()) {
}
}
res = true;
-
+
return res;
}
//=======================================================================
//function : GetIsJoinByPipes
-//purpose :
+//purpose :
//=======================================================================
bool TransformationGUI_OffsetDlg::GetIsJoinByPipes() const