SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
SET(${PROJECT_NAME_UC}_VERSION
${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
-SET(${PROJECT_NAME_UC}_VERSION_DEV 0)
+SET(${PROJECT_NAME_UC}_VERSION_DEV 1)
# Common CMake macros
# ===================
# Prerequisites
# =============
# Find "big" prerequisites first - they reference themselves many others
-# -> this can help finding the smaller prerequisites and detect conficts.
+# -> this can help find the smaller prerequisites and detect conflicts.
# In our case KERNEL has already loaded many prereq:
##
## GEOM specifics
##
-FIND_PACKAGE(SalomeCAS REQUIRED)
+FIND_PACKAGE(SalomeOpenCASCADE REQUIRED)
IF(SALOME_GEOM_USE_VTK)
FIND_PACKAGE(SalomeVTK REQUIRED)
# Ensure the variables are always defined for the configure:
SET(KERNEL_ROOT_DIR "${KERNEL_ROOT_DIR}")
SET(GUI_ROOT_DIR "${GUI_ROOT_DIR}")
-SET(CAS_ROOT_DIR "${CAS_ROOT_DIR}")
+SET(OPENCASCADE_ROOT_DIR "${OPENCASCADE_ROOT_DIR}")
SET(VTK_ROOT_DIR "${VTK_ROOT_DIR}")
SET(OPENCV_ROOT_DIR "${OPENCV_ROOT_DIR}")
SET(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include" "${PROJECT_BINARY_DIR}/include")
# Build variables that will be expanded when configuring Salome<MODULE>Config.cmake:
-SALOME_CONFIGURE_PREPARE(OpenCV CAS VTK)
+SALOME_CONFIGURE_PREPARE(OpenCV OpenCASCADE VTK)
CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in
${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}"
PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE_LOCAL CMAKE_INSTALL_PREFIX
- KERNEL_ROOT_DIR GUI_ROOT_DIR CAS_ROOT_DIR VTK_ROOT_DIR OPENCV_ROOT_DIR)
+ KERNEL_ROOT_DIR GUI_ROOT_DIR OPENCASCADE_ROOT_DIR VTK_ROOT_DIR OPENCV_ROOT_DIR)
# - in the install tree (VSR 16/08/2013: TEMPORARILY COMMENT THIS - TO REMOVE?):
# Get the relative path of the include directory so
# ${PROJECT_BINARY_DIR}/to_install/${PROJECT_NAME}Config.cmake
# INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE}"
# PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE CMAKE_INSTALL_PREFIX
-# KERNEL_ROOT_DIR GUI_ROOT_DIR CAS_ROOT_DIR VTK_ROOT_DIR OPENCV_ROOT_DIR)
+# KERNEL_ROOT_DIR GUI_ROOT_DIR OPENCASCADE_ROOT_DIR VTK_ROOT_DIR OPENCV_ROOT_DIR)
WRITE_BASIC_PACKAGE_VERSION_FILE(${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
VERSION ${${PROJECT_NAME_UC}_VERSION}
Pre-requisites
--------------
-SALOME platform relies on a set of third-party softwares; some of them are needed
-at build time only, while other ones are needed in runtime also.
+SALOME platform relies on a set of third-party software; some of them are needed
+at build time only, while other ones are needed at runtime as well.
For more information about the pre-requisites please visit SALOME platform web
site:
# - Config file for the @PROJECT_NAME@ package
# It defines the following variables.
-# Specific to the pacakge @PROJECT_NAME@ itself:
+# Specific to the package @PROJECT_NAME@ itself:
# @PROJECT_NAME_UC@_ROOT_DIR_EXP - the root path of the installation providing this CMake file
#
# Level 1 prerequisites:
SET_AND_CHECK(KERNEL_ROOT_DIR_EXP "@PACKAGE_KERNEL_ROOT_DIR@")
-SET_AND_CHECK(CAS_ROOT_DIR_EXP "@PACKAGE_CAS_ROOT_DIR@")
+SET_AND_CHECK(OPENCASCADE_ROOT_DIR_EXP "@PACKAGE_OPENCASCADE_ROOT_DIR@")
# Optional level 1 prerequisites:
IF(SALOME_GEOM_BUILD_GUI)
#=======================================================
-# Create simple path and recieve points
+# Create simple path and receive points
# for section creation
#=======================================================
WirePath = geompy.MakeSketcher("Sketcher:F 0 0:T 60 0:T 40 0:R 0:C 100 90:",
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
ShapeListCompound.append(S)
i = i + 1
-# create a compund of the given shapes
+# create a compound of the given shapes
compound = geompy.MakeCompound(ShapeListCompound)
# add object in the study
box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
# create a new object as offset of the given object
-offset = geompy.MakeOffset(box, 70.)
+offset = geompy.MakeOffset(box, 70.)
+offset2 = geompy.MakeOffsetIntersectionJoin(box, 70.)
# add objects in the study
id_box = geompy.addToStudy(box, "Box")
id_offset = geompy.addToStudy(offset, "Offset")
+id_offset2 = geompy.addToStudy(offset2, "Offset_intersection_join")
# display the results
gg.createAndDisplayGO(id_box)
gg.setDisplayMode(id_box,1)
-gg.createAndDisplayGO(id_offset)
+gg.createAndDisplayGO(id_offset)
+gg.createAndDisplayGO(id_offset2)
\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.
<b>Arguments:</b>
- \b Radius - Radius of the disk
-- \b Orientation - Plane on wich the disk will be built
+- \b Orientation - Plane on which the disk will be built
- \b Pattern - Division pattern
\image html divided_disk_dlg.png
\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,
-YDY, YDZ is a a vector of OY direction of the LCS.
+LCS, XDX, XDY, XDZ is a vector of OX direction of the LCS and YDX,
+YDY, YDZ is a vector of OY direction of the LCS.
\n <b>Arguments:</b> Name + Coordinates of origin, X axis direction, Y axis direction.
\image html neo-localcs1.png
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).
- The \b height of extrusion. It is calculated from the <b>base profile</b> along the normal to its plane.
-And optionnaly:
+And optionally:
- A <b>draft angle</b> in degrees. Activated by clicking on \image html draft.png
- The \b height of extrusion. It's calculated from the <b>base profile</b> along the normal to its plane.
-And optionnaly:
+And optionally:
- A <b>draft angle</b> in degrees. Activated by clicking on \image html draft.png
\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.
<b> Of course, <em>from geompy import *</em> is no more possible.</b>
-\n You have to explicitely write <em>geompy.some_method()</em>.
+\n You have to explicitly write <em>geompy.some_method()</em>.
\n <b>Some variables have been transferred from the namespace <em>geompy.GEOM</em> to the namespace <em>GEOM</em>.</b>
\n All occurrences of <em>geompy.GEOM.</em> can be replaced by <em>GEOM.</em>.
\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
\n This operation translates each point of an \b Object (a set of
Objects) along a local normal by a given \b Offset distance (signed
-number, negative value meaning inner offset).
+number, negative value meaning inner offset). Gaps between translated
+adjacent surfaces are filled in either of two ways:
+- if <b>Join by pipes</b> is activated, they are filled with pipes;
+- else the surfaces are extended and intersected, so that sharp edges
+ are preserved.
+
\n \b Offset operation is applicable to faces, shells and solids.
\n \ref restore_presentation_parameters_page "Advanced options".
\n <b>Example:</b>
-\image html offsetsn.png "The box and its offset surface"
+\image html offsetsn.png "The box and its offset surface (Join by pipes activated)"
+
+\n <b>TUI Command:</b>
+- Gaps filled by pipes: <em>geompy.MakeOffset(Shape, Offset),</em>
+- Gaps filled by intersection: <em>geompy.MakeOffsetIntersectionJoin(Shape, Offset),</em>
-\n <b>TUI Command:</b> <em>geompy.MakeOffset(Shape, Offset),</em>
where Shape is a shape(s) which has to be an offset, Offset is a value of
the offset.
\n <b>Arguments:</b> Name + Object (face(s), shell(s), solid(s)) +
Some tools in GEOM allow you to create shapes, basing the design on imported pictures (engineering drawings, nautical charts ...) :
<ul>
-<li>\subpage import_picture_page, such as engeneering drawings or nautical charts as a support for shape design.
+<li>\subpage import_picture_page, such as engineering drawings or nautical charts as a support for shape design.
<li>\subpage shape_recognition_page previously imported in the OCC viewer .
</ul>
\image html restore-ss-viewer-before.png "The initial box and cylinder"
First, we examine the case when the resulting shape corresponds to one argument (after transformation,
-after the Boolean operation Cut, or after the partiton with one object shape).
+after the Boolean operation Cut, or after the partition with one object shape).
We create a Cut of Box_1 with Cylinder_1.
\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).
\image html transformation2.png
-\n Finally you can define the \b Vector explicitely. The \b Object will be translated by the length of the vector.
+\n Finally you can define the \b Vector explicitly. The \b Object will be translated by the length of the vector.
If a curve has been selected instead of the vector, only its first and last vertices will be used to get the vector direction and the dialog preview will display the vector along which the object will be translated.
\n <b>Activate Distance</b> checkbox and <b>Distance</b> field allow defining a custom distance of translation.
*
* 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 Set the operation error code
- * \param theErrorID is a string describing the error occured
+ * \param theErrorID is a string describing the error occurred
* \note This method is supposed to be used only by interfaces inheriting from IOperations.
*/
void SetErrorCode (in string theErrorID);
void StartOperation();
/*!
- * \brief Closes the previously opened trasaction
+ * \brief Closes the previously opened transaction
*/
void FinishOperation();
/*!
* C\brief reate a line, passing through the given point
- * and parrallel to the given direction
+ * and parallel to the given direction
* \param thePnt Point. The resulting line will pass through it.
* \param theDir Direction. The resulting line will be parallel to it.
* \return New GEOM_Object, containing the created line.
* \brief Replace the given object by its offset.
* \param theObject The base object for the offset.
* \param theOffset Offset value.
+ * \param theJoinByPipes To join offset surfaces by pipes or by intersection.
* \return theObject.
*/
- GEOM_Object OffsetShape (in GEOM_Object theObject, in double theOffset);
+ GEOM_Object OffsetShape (in GEOM_Object theObject,
+ in double theOffset,
+ in boolean theJoinByPipes);
/*!
* \brief Create new object as offset of the given one.
* \param theObject The base object for the offset.
* \param theOffset Offset value.
+ * \param theJoinByPipes To join offset surfaces by pipes or by intersection.
* \return New GEOM_Object, containing the offset object.
*/
- GEOM_Object OffsetShapeCopy (in GEOM_Object theObject, in double theOffset);
+ GEOM_Object OffsetShapeCopy (in GEOM_Object theObject,
+ in double theOffset,
+ in boolean theJoinByPipes);
/*!
* \brief Create new object as projection of the given one on a 2D surface.
/*!
- * \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).
* \param theShape Shape to find sub-shapes of.
* \param theShapeType Type of sub-shapes to be retrieved.
* \param theTopLeftPoint Top left quadrangle corner
- * \param theTopRigthPoint Top right quadrangle corner
+ * \param theTopRightPoint Top right quadrangle corner
* \param theBottomLeftPoint Bottom left quadrangle corner
- * \param theBottomRigthPoint Bottom right quadrangle corner
+ * \param theBottomRightPoint Bottom right quadrangle corner
* \param theState The state of the sub-shapes to find.
* \return List of all found sub-shapes.
*/
ListOfGO GetShapesOnQuadrangle (in GEOM_Object theShape,
in long theShapeType,
in GEOM_Object theTopLeftPoint,
- in GEOM_Object theTopRigthPoint,
+ in GEOM_Object theTopRightPoint,
in GEOM_Object theBottomLeftPoint,
- in GEOM_Object theBottomRigthPoint,
+ in GEOM_Object theBottomRightPoint,
in shape_state theState);
/*!
* \param theShape Shape to find sub-shapes of.
* \param theShapeType Type of sub-shapes to be retrieved.
* \param theTopLeftPoint Top left quadrangle corner
- * \param theTopRigthPoint Top right quadrangle corner
+ * \param theTopRightPoint Top right quadrangle corner
* \param theBottomLeftPoint Bottom left quadrangle corner
- * \param theBottomRigthPoint Bottom right quadrangle corner
+ * \param theBottomRightPoint Bottom right quadrangle corner
* \param theState The state of the sub-shapes to find.
* \return List of IDs of all found sub-shapes.
*/
ListOfLong GetShapesOnQuadrangleIDs (in GEOM_Object theShape,
in long theShapeType,
in GEOM_Object theTopLeftPoint,
- in GEOM_Object theTopRigthPoint,
+ in GEOM_Object theTopRightPoint,
in GEOM_Object theBottomLeftPoint,
- in GEOM_Object theBottomRigthPoint,
+ in GEOM_Object theBottomRightPoint,
in shape_state theState);
/*!
/*!
* \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.
*/
*
* Propagation group is a set of all edges, opposite to one (main)
* edge of this group directly or through other opposite edges.
- * Notion of Opposite Edge make sence only on quadrangle face.
+ * Notion of Opposite Edge make sense only on quadrangle face.
* \param theShape Shape to build propagation groups on.
* \return List of GEOM_Object, each of them is a propagation group.
*/
* \param theRemoveInside Shapes, inside which the results will be deleted.
* Each shape from theRemoveInside must belong to theShapes also.
* \param theRemoveWebs If TRUE, perform Glue 3D algorithm.
- * \param theMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
+ * \param theMaterials Material indices for each shape. Make sense, only if theRemoveWebs is TRUE.
*
* \return New GEOM_Object, containing the result shapes.
*/
/*!
* \brief Perform partition operation.
*
- * This method may be usefull if it is needed to make a partition for
+ * This method may be useful if it is needed to make a partition for
* a compound containing nonintersected shapes. Performance will be better
* since intersection between shapes from compound is not performed.
*
* \param theVertexes Global indices of vertexes to perform fillet on.
* \note Global index of sub-shape can be obtained, using method
* <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
- * \note The list of vertices coudl be empty, in this case fillet fill be done
+ * \note The list of vertices could be empty, in this case fillet fill be done
* at all vertices in given wire
* \param doIgnoreSecantVertices If FALSE, fillet radius is always limited
* by the length of the edges, nearest to the fillet vertex.
in double theD1, in double theD2,
in long theFace1, in long theFace2);
/*!
- * \brief The Same but with params theD = Chamfer Lenght
+ * \brief The Same but with params theD = Chamfer Length
* and theAngle = Chamfer Angle (Angle in radians)
*/
GEOM_Object MakeChamferEdgeAD (in GEOM_Object theShape,
in double theD1, in double theD2,
in ListOfLong theFaces);
/*!
- * The Same but with params theD = Chamfer Lenght
+ * The Same but with params theD = Chamfer Length
* and theAngle = Chamfer Angle (Angle in radians)
*/
GEOM_Object MakeChamferFacesAD (in GEOM_Object theShape,
in double theD1, in double theD2,
in ListOfLong theEdges);
/*!
- * The Same but with params theD = Chamfer Lenght
+ * The Same but with params theD = Chamfer Length
* and theAngle = Chamfer Angle (Angle in radians)
*/
GEOM_Object MakeChamferEdgesAD (in GEOM_Object theShape,
* \param theObjects Shapes to get free boundary of.
* \param theClosedWires Output. Closed wires on the free boundary of the given shape.
* \param theOpenWires Output. Open wires on the free boundary of the given shape.
- * \return FALSE, if an error(s) occured during the method execution.
+ * \return FALSE, if an error(s) occurred during the method execution.
*/
boolean GetFreeBoundary (in ListOfGO theObjects,
out ListOfGO theClosedWires,
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 Sequence of non-topological information tranfer data.
+ * \brief Sequence of non-topological information transfer data.
*/
typedef sequence<TransferDatum> ListOfTransferDatum;
* \param theResult statistics of the operation. Output parameter. It
* represents a sequence of Transfer Datum. A datum has the type
* (string code), the total number of items of this type and
- * the number of transfered items.
+ * the number of transferred items.
* \return true in case of success; otherwise false.
*/
boolean TransferData(in GEOM_Object theObjectFrom,
/*!
* \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
* in place of sub-shapes of the first argument,
* because the whole shape corresponds to the first argument.
* Mainly to be used after transformations, but it also can be
- * usefull after partition with one object shape, and some other
+ * useful after partition with one object shape, and some other
* operations, where only the first argument has to be considered.
* If theObject has only one argument shape, this flag is automatically
* considered as True, not regarding really passed value.
* in place of sub-shapes of the first argument,
* because the whole shape corresponds to the first argument.
* Mainly to be used after transformations, but it also can be
- * usefull after partition with one object shape, and some other
+ * useful after partition with one object shape, and some other
* operations, where only the first argument has to be considered.
* If theObject has only one argument shape, this flag is automatically
* considered as True, not regarding really passed value.
* in place of sub-shapes of the first argument,
* because the whole shape corresponds to the first argument.
* Mainly to be used after transformations, but it also can be
- * usefull after partition with one object shape, and some other
+ * useful after partition with one object shape, and some other
* operations, where only the first argument has to be considered.
* If theObject has only one argument shape, this flag is automatically
* considered as True, not regarding really passed value.
/*!
* \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).
# additional include directories
INCLUDE_DIRECTORIES(
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
)
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
)
# libraries to link to
-SET(_link_LIBRARIES
- ${CAS_KERNEL} ${CAS_MODELER} ${CAS_TKMesh}
+SET(_link_LIBRARIES
+ ${OpenCASCADE_FoundationClasses_LIBRARIES}
+ ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
${KERNEL_SALOMELocalTrace}
)
return false;
}
- gp_Trsf aTrsfInv = aTrsf.Inverted();
-
// int expectedGroups = 0;
// if (shapeType == TSHAPE_BASIC)
// if (Abs(theR2+theW2-theR1-theW1) <= Precision::Approximation())
if (aGroup.IsNull())
continue;
+ gp_Trsf aTrsfInv = aTrsf.Inverted();
TopoDS_Shape aGroupShape = aGroup->GetValue();
BRepBuilderAPI_Transform aTransformationShapeInv (aGroupShape, aTrsfInv, Standard_False);
TopoDS_Shape aGroupShapeTrsfInv = aTransformationShapeInv.Shape();
// Default value=3
aFinder.SetNbPntsMin(3);
// Sets the maximal number of inner points for edges or faces.
- // It is usefull for the cases when this number is very big (e.g =2000) to improve
+ // It is useful for the cases when this number is very big (e.g =2000) to improve
// the performance. If this value =0, all inner points will be taken into account.
// Default value=0
aFinder.SetNbPntsMax(100);
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();
}
// Default value=3
aFinder.SetNbPntsMin(3);
// Sets the maximal number of inner points for edges or faces.
- // It is usefull for the cases when this number is very big (e.g =2000) to improve
+ // It is useful for the cases when this number is very big (e.g =2000) to improve
// the performance. If this value =0, all inner points will be taken into account.
// Default value=0
aFinder.SetNbPntsMax(0);
gp_Pnt aP0 (0, 0, 0);
gp_Pnt aP1 (-l1, 0, 0);
- gp_Vec aVX = gp::DX(), aVY = gp::DY(), aVZ = gp::DZ();
+ gp_Vec aVX = gp::DX(), aVZ = gp::DZ();
gp_Ax2 anAxes1 (aP1, aVX, aVZ);
gp_Ax2 anAxes2 (aP0, aVZ, aVX);
// 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();
for ( int i = 1, nb = aCI.GetLength(); i <= nb; ++i )
theParams[0] << aCI.GetPntOrComp( i ) << " ";
- const Standard_Integer aNbMax = aCI.GetNbMax();
- const Standard_Integer aDegMax = aCI.GetDegMax();
- const Standard_Real aDMax = aCI.GetDMax();
-
AddParam(theParams, "Max nbr of Bezier pieces", aCI.GetNbMax());
AddParam(theParams, "Max BSpline surface degree", aCI.GetDegMax());
AddParam(theParams, "3D tolerance of initial approximation", aCI.GetDMax());
INCLUDE_DIRECTORIES(
${OMNIORB_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src/GEOMImpl
${PROJECT_SOURCE_DIR}/src/GEOM
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
)
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" );
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
# additional include directories
INCLUDE_DIRECTORIES(
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
${PROJECT_SOURCE_DIR}/src/GEOMAlgo
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
)
# libraries to link to
SET(_link_engine_LIBRARIES
- ${CAS_TKBREP}
+ ${OpenCASCADE_ModelingData_LIBRARIES}
${KERNEL_SALOMELocalTrace}
${KERNEL_OpUtil}
SalomeIDLGEOM
//=================================================================================
-// 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
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
//=======================================================================
//function : FixResult
-//purpose : auxilary
+//purpose : auxiliary
//=======================================================================
static void FixResult(const TopoDS_Shape& result,
Handle(ShapeBuild_ReShape)& Context,
{
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);
//=======================================================================
//function : ModifySurface
-//purpose : auxilary
+//purpose : auxiliary
//=======================================================================
static Standard_Boolean ModifySurface(const TopoDS_Face& aFace,
const Handle(Geom_Surface)& aSurface,
Handle(Geom_Curve) C3d = BRep_Tool::Curve ( E, LC, f, l );
Handle(Geom_Surface) S = BRep_Tool::Surface(F, LS);
- //taking into accound the orientation of the seam
+ //taking into account the orientation of the seam
C = BRep_Tool::CurveOnSurface(E,F,f,l);
Tol = BRep_Tool::Tolerance(E);
Handle(Geom_Curve) C3d = BRep_Tool::Curve ( E, LC, f, l );
Handle(Geom_Surface) S = BRep_Tool::Surface(F, LS);
- //taking into accound the orientation of the seam
+ //taking into account the orientation of the seam
C = BRep_Tool::CurveOnSurface(E,F,f,l);
Tol = BRep_Tool::Tolerance(E);
//=======================================================================
//function : MergeEdges
-//purpose : auxilary
+//purpose : auxiliary
//=======================================================================
static Standard_Boolean MergeEdges(const TopTools_SequenceOfShape& SeqEdges,
const Standard_Real Tol,
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 <BlockFix_UnionFaces.hxx>
+#include <Basics_OCCTVersion.hxx>
+
#include <ShapeAnalysis_WireOrder.hxx>
#include <ShapeAnalysis_Edge.hxx>
#include <Geom_SurfaceOfRevolution.hxx>
#include <Geom_SurfaceOfLinearExtrusion.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
+#include <BRepAdaptor_Surface.hxx>
+#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>
//=======================================================================
//function : AddOrdinaryEdges
-//purpose : auxilary
+//purpose : auxiliary
// adds edges from the shape to the sequence
// seams and equal edges are dropped
// Returns true if one of original edges dropped
//=======================================================================
//function : ClearRts
-//purpose : auxilary
+//purpose : auxiliary
//=======================================================================
static Handle(Geom_Surface) ClearRts(const Handle(Geom_Surface)& aSurface)
{
//=======================================================================
//function : IsFacesOfSameSolids
-//purpose : auxilary
+//purpose : auxiliary
//=======================================================================
static Standard_Boolean IsFacesOfSameSolids
(const TopoDS_Face &theFace1,
return isSame;
}
+//=======================================================================
+//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
+//=======================================================================
+static Standard_Boolean IsTangentFaces(const TopoDS_Edge& theEdge,
+ const TopoDS_Face& theFace)
+{
+ Standard_Real TolC0 = Max(0.001, 1.5*BRep_Tool::Tolerance(theEdge));
+
+ Standard_Real aFirst;
+ Standard_Real aLast;
+
+// Obtaining of pcurves of edge on two faces.
+ const Handle(Geom2d_Curve) aC2d1 = BRep_Tool::CurveOnSurface
+ (theEdge, theFace, aFirst, aLast);
+ TopoDS_Edge ReversedEdge = theEdge;
+ ReversedEdge.Reverse();
+ const Handle(Geom2d_Curve) aC2d2 = BRep_Tool::CurveOnSurface
+ (ReversedEdge, theFace, aFirst, aLast);
+ if (aC2d1.IsNull() || aC2d2.IsNull())
+ return Standard_False;
+
+// Obtaining of two surfaces from adjacent faces.
+ Handle(Geom_Surface) aSurf = BRep_Tool::Surface(theFace);
+
+ if (aSurf.IsNull())
+ return Standard_False;
+
+// Computation of the number of samples on the edge.
+ BRepAdaptor_Surface aBAS(theFace);
+ Handle(BRepAdaptor_HSurface) aBAHS = new BRepAdaptor_HSurface(aBAS);
+ Handle(BRepTopAdaptor_TopolTool) aTool = new BRepTopAdaptor_TopolTool(aBAHS);
+ Standard_Integer aNbSamples = aTool->NbSamples();
+ const Standard_Integer aNbSamplesMax = 23;
+ aNbSamples = Min(aNbSamplesMax, aNbSamples);
+ const Standard_Real aTolAngle = M_PI/18;
+
+
+// Computation of the continuity.
+ Standard_Real aPar;
+ Standard_Real aDelta = (aLast - aFirst)/(aNbSamples - 1);
+ Standard_Integer i, nbNotDone = 0;
+
+ for (i = 1, aPar = aFirst; i <= aNbSamples; i++, aPar += aDelta) {
+ if (i == aNbSamples) aPar = aLast;
+
+ LocalAnalysis_SurfaceContinuity aCont(aC2d1, aC2d2, aPar,
+ aSurf, aSurf, GeomAbs_G1,
+ 0.001, TolC0, aTolAngle, 0.1, 0.1);
+ if (!aCont.IsDone())
+ {
+ nbNotDone++;
+ continue;
+ }
+
+ if (!aCont.IsG1())
+ return Standard_False;
+ }
+
+ if (nbNotDone == aNbSamples)
+ return Standard_False;
+
+ return Standard_True;
+}
+
+//=======================================================================
+//function : HasSeamEdge
+//purpose : Detects if a face contains a seam edge
+//=======================================================================
+static Standard_Boolean HasSeamEdge(const TopoDS_Face& theFace)
+{
+ TopExp_Explorer Explo(theFace, TopAbs_EDGE);
+ for (; Explo.More(); Explo.Next())
+ {
+ const TopoDS_Edge& anEdge = TopoDS::Edge(Explo.Current());
+ if (BRepTools::IsReallyClosed(anEdge, theFace))
+ return Standard_True;
+ }
+
+ return Standard_False;
+}
+
+
//=======================================================================
//function : IsEdgeValidToMerge
//purpose : Edge is valid if it is not seam or if it is a seam and the face
// has another seam edge.
//=======================================================================
-static Standard_Boolean IsEdgeValidToMerge(const TopoDS_Edge &theEdge,
- const TopoDS_Face &theFace)
+static Standard_Boolean IsEdgeValidToMerge(const TopoDS_Edge& theEdge,
+ const TopoDS_Face& theFace,
+ const Handle(Geom_Surface)& theSurface,
+ Standard_Boolean& theIsEdgeOnSeam,
+ Standard_Boolean& theToMakeUPeriodic,
+ Standard_Boolean& theToMakeVPeriodic)
{
Standard_Boolean isValid = Standard_True;
- if (BRep_Tool::IsClosed(theEdge, theFace)) {
+ theIsEdgeOnSeam |= BRep_Tool::IsClosed(theEdge, theFace);
+
+ if (BRepTools::IsReallyClosed(theEdge, theFace)) {
+ // Mantis issue 0023451, now code corresponds to the comment to this method
+ isValid = Standard_False;
+
// This is a seam edge. Check if there are another seam edges on the face.
TopExp_Explorer anExp(theFace, TopAbs_EDGE);
TopoDS_Edge anEdge = TopoDS::Edge(aShEdge);
if (BRep_Tool::IsClosed(anEdge, theFace)) {
- isValid = Standard_False;
+ // Mantis issue 0023451, now code corresponds to the comment to this method
+ //isValid = Standard_False;
+ isValid = Standard_True;
break;
}
}
}
+ else if (theIsEdgeOnSeam)
+ {
+ Standard_Real fpar, lpar;
+ Handle(Geom2d_Curve) aPCurve = BRep_Tool::CurveOnSurface(theEdge, theFace, fpar, lpar);
+ gp_Pnt2d P2d1 = aPCurve->Value(fpar);
+ gp_Pnt2d P2d2 = aPCurve->Value(lpar);
+ if (!theSurface->IsUPeriodic() &&
+ theSurface->IsUClosed() &&
+ Abs(P2d1.X() - P2d2.X()) < Abs(P2d1.Y() - P2d2.Y()))
+ {
+ if (IsTangentFaces(theEdge, theFace))
+ theToMakeUPeriodic = Standard_True;
+ else
+ isValid = Standard_False;
+ }
+ if (!theSurface->IsVPeriodic() &&
+ theSurface->IsVClosed() &&
+ Abs(P2d1.Y() - P2d2.Y()) < Abs(P2d1.X() - P2d2.X()))
+ {
+ if (IsTangentFaces(theEdge, theFace))
+ theToMakeVPeriodic = Standard_True;
+ else
+ isValid = Standard_False;
+ }
+ }
return isValid;
}
Handle(Geom_Surface) aBaseSurface = BRep_Tool::Surface(aFace,aBaseLocation);
aBaseSurface = ClearRts(aBaseSurface);
aBaseSurface = Handle(Geom_Surface)::DownCast(aBaseSurface->Copy());
+ Standard_Boolean ToMakeUPeriodic = Standard_False, ToMakeVPeriodic = Standard_False;
// find adjacent faces to union
Standard_Integer i;
for (i = 1; i <= edges.Length(); i++) {
TopoDS_Edge edge = TopoDS::Edge(edges(i));
- if (BRep_Tool::Degenerated(edge) || !IsEdgeValidToMerge(edge, aFace))
+ Standard_Boolean IsEdgeOnSeam = Standard_False;
+ if (BRep_Tool::Degenerated(edge) ||
+ !IsEdgeValidToMerge(edge, aFace, aBaseSurface,
+ IsEdgeOnSeam, ToMakeUPeriodic, ToMakeVPeriodic))
continue;
const TopTools_ListOfShape& aList = aMapEdgeFaces.FindFromKey(edge);
if (aProcessed.Contains(anCheckedFace))
continue;
- if (!IsEdgeValidToMerge(edge, anCheckedFace)) {
+ if (!IsEdgeValidToMerge(edge, anCheckedFace, aBaseSurface,
+ IsEdgeOnSeam, ToMakeUPeriodic, ToMakeVPeriodic)) {
// Skip seam edge.
continue;
}
continue;
}
+ //Prevent creating a face with parametric range more than period
+ if (IsEdgeOnSeam &&
+ (HasSeamEdge(aFace) || HasSeamEdge(anCheckedFace)))
+ continue;
+
// replacing pcurves
TopoDS_Face aMockUpFace;
BRep_Builder B;
NbModif++;
TopoDS_Face aResult;
BRep_Builder B;
+ if (ToMakeUPeriodic || ToMakeVPeriodic)
+ {
+ Handle(Geom_BSplineSurface) aBSplineSurface = Handle(Geom_BSplineSurface)::DownCast(aBaseSurface);
+ if (aBSplineSurface.IsNull())
+ {
+ Standard_Real aTol = 1.e-4;
+ GeomAbs_Shape aUCont = GeomAbs_C1, aVCont = GeomAbs_C1;
+ Standard_Integer degU = 14, degV = 14;
+ Standard_Integer nmax = 16;
+ Standard_Integer aPrec = 1;
+ GeomConvert_ApproxSurface Approximator(aBaseSurface,aTol,aUCont,aVCont,degU,degV,nmax,aPrec);
+ aBSplineSurface = Approximator.Surface();
+ }
+
+ if (ToMakeUPeriodic)
+ aBSplineSurface->SetUPeriodic();
+ if (ToMakeVPeriodic)
+ aBSplineSurface->SetVPeriodic();
+
+ aBaseSurface = aBSplineSurface;
+ }
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;
//sff.FixWireMode() = 0;
sfw->SetMaxTolerance(Max(1.,myTolerance*1000.));
sfw->SetFace(aFace);
for (TopoDS_Iterator iter (aFace,Standard_False); iter.More(); iter.Next()) {
- TopoDS_Wire wire = TopoDS::Wire(iter.Value());
- sfw->Load(wire);
- sfw->FixReorder();
- sfw->FixShifted();
+ TopoDS_Shape aFaceCont = iter.Value();
+ if (!aFaceCont.IsNull() && aFaceCont.ShapeType() == TopAbs_WIRE) {
+ TopoDS_Wire wire = TopoDS::Wire(iter.Value());
+ sfw->Load(wire);
+ sfw->FixReorder();
+ sfw->FixShifted();
+ }
}
}
} // end processing each solid
# additional include directories
INCLUDE_DIRECTORIES(
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
)
# libraries to link to
SET(_link_LIBRARIES
- ${CAS_KERNEL}
- ${CAS_TKOffset} ${CAS_TKBool} ${CAS_TKBO}
- ${CAS_TKShHealing}
+ ${OpenCASCADE_FoundationClasses_LIBRARIES}
+ ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
${KERNEL_SALOMELocalTrace}
)
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
# additional include directories
INCLUDE_DIRECTORIES(
${PTHREAD_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src/GEOMUtils
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${QT_DEFINITIONS}
)
if (myPRedo->init(theType, theIntParam)) {
// Construct undo for RemoveSection command.
// If the last section is removed, one AddSection command is enough.
- // If not last section is removed, two commands are requred: AddSection
+ // If not last section is removed, two commands are required: AddSection
// and MoveSection.
const int aLastIndex = theCurve->getNbSections() - 1;
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
*/
//=================================================================================
// function : GeometryGUI::addCoordsByClick()
-// purpose : Manage mouse press events in Additon mode
+// purpose : Manage mouse press events in Addition mode
//=================================================================================
void CurveCreator_Widget::addCoordsByClick( QMouseEvent* pe )
{
}
/**
- * Returns whethe the container has the value
+ * Returns whether the container has the value
* \param theList a container of values
* \param theValue a value
*/
INCLUDE_DIRECTORIES(
${QT_INCLUDES}
${GUI_INCLUDE_DIRS}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${PROJECT_SOURCE_DIR}/src/GEOMGUI
${PROJECT_SOURCE_DIR}/src/GEOMBase
${PROJECT_SOURCE_DIR}/src/GEOM
${QT_DEFINITIONS}
${GUI_DEFINITIONS}
${OMNIORB_DEFINITIONS}
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
)
IF(WIN32)
ADD_DEFINITIONS(-DNOGDI)
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
${VTK_INCLUDE_DIRS}
${OPENCV_INCLUDE_DIR}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
${OPENCV_DEFINITIONS}
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 )
ic->UpdateCurrentViewer();
}
catch( Standard_Failure ) {
- MESSAGE( "Exception catched in EntityGUI::DisplaySimulationShape" );
+ MESSAGE( "Exception caught in EntityGUI::DisplaySimulationShape" );
}
}
gp_Vec V = Vec1.Transformed(aTransform.Inverted());
gp_Vec Vec3(V.X(),V.Y(),0.0);
- // Express the coordinates in the refernce coordinate system (OXY)
+ // Express the coordinates in the reference coordinate system (OXY)
Vec3.Transform(aTransform);
if(Abs(Vec1.CrossMagnitude(Vec3)) > Precision::Confusion())
{
aLength * sin(anAngle1 * M_PI / 180. ),
0.0);
- // Express the coordinates in the refernce coordinate system (OXY)
- gp_Trsf aTranform = toReferenceSystem(P0);
- P1.Transform(aTranform);
- P2.Transform(aTranform);
+ // Express the coordinates in the reference coordinate system (OXY)
+ gp_Trsf aTransform = toReferenceSystem(P0);
+ P1.Transform(aTransform);
+ P2.Transform(aTransform);
P1.Translate(Origin, P0);
P2.Translate(Origin, P0);
//================================================================
// Function : createAISLengthDimension()
// Purpose : Method for creation of a length dimension object
-// Returns an Handle on the AIS_LengthDimension obect
+// Returns an Handle on the AIS_LengthDimension object
//================================================================
Handle(AIS_LengthDimension) EntityGUI_3DSketcherDlg::createAISLengthDimension(double theLength,
gp_Pnt P1,
//================================================================
// Function : createAISAngleDimension()
// Purpose : Method for creation of an angle dimension object
-// Returns an Handle on the AIS_AngleDimension obect
+// Returns an Handle on the AIS_AngleDimension object
//================================================================
Handle(AIS_AngleDimension) EntityGUI_3DSketcherDlg::createAISAngleDimension(double theAngle,
gp_Pnt P0,
// about what will be considered INSIDE the zone we want to find the frontier of
// This makes the algorithm more robust against a bit inhomogeneous parts in the zone
// that we want to delimitate.
- // The drawback is if we want to delimitate a zone wich color is very similar to the zone
+ // The drawback is if we want to delimitate a zone which color is very similar to the zone
// we consider as the OUTSIDE, the result will be bad.
// The current use cases are more of the first form :
// - Strongly contrasted INSIDE and OUTSIDE zones
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
{
// local selection
if (!myShape->_is_nil() &&
!myEditCurrentArgument &&
- myShapeIDs.size() > 1 ) // shape type is already choosen by user
+ myShapeIDs.size() > 1 ) // shape type is already chosen by user
{
GEOM_Displayer* aDisplayer = getDisplayer();
CORBA::String_var aMainEntry = myShape->GetStudyEntry();
{
InitClick();
- // Connect the selction manager (disconnected in InitClick())
+ // Connect the selection manager (disconnected in InitClick())
connect( myGeometryGUI->getApp()->selectionMgr(),
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
{
InitClick();
Group3Spin->SpinBox_DX->blockSignals(true); // Block signals in order not to modify
- Group3Spin->SpinBox_DY->blockSignals(true); // defaut values
+ Group3Spin->SpinBox_DY->blockSignals(true); // default values
Group3Spin->SpinBox_DZ->blockSignals(true);
Group2Spin->SpinBox_DX->blockSignals(true);
myEditCurrentArgument = Group2Sel->LineEdit2;
/* User name of object input management */
- /* If successfull the selection is changed and signal emitted... */
+ /* If successful the selection is changed and signal emitted... */
/* so SelectionIntoArgument() is automatically called. */
const QString objectUserName = myEditCurrentArgument->text();
QWidget* thisWidget = (QWidget*)this;
void EntityGUI_SketcherDlg::OnPointSelected(Qt::KeyboardModifiers modifiers, const gp_Pnt& thePnt,
bool isStart )
{
- // NOTE Basing the autoapply functionnality on the background picture has no sense anymore
- // The import picture functionnality is now used for drawing on top of a picture
+ // NOTE Basing the autoapply functionality on the background picture has no sense anymore
+ // The import picture functionality is now used for drawing on top of a picture
// SUIT_ViewWindow* theViewWindow = getDesktop()->activeWindow();
// OCCViewer_ViewPort3d* vp = ((OCCViewer_ViewWindow*)theViewWindow)->getViewPort();
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
# additional include directories
INCLUDE_DIRECTORIES(
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src/SKETCHER
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
)
# libraries to link to
SET(_link_LIBRARIES
- ${CAS_OCAFVIS}
- ${CAS_TKLCAF}
- ${CAS_TKCDF}
- ${CAS_TKG3d}
- ${CAS_TKStdL}
- ${CAS_TKStd}
- ${CAS_TKBin}
+ ${OpenCASCADE_ApplicationFramework_LIBRARIES} ${OpenCASCADE_ModelingData_LIBRARIES}
${KERNEL_SALOMELocalTrace}
${KERNEL_OpUtil}
GEOMSketcher
aName = aNameAttr->Get();
// do not return pointer of local variable
// return aName.ToCString();
- // the following code could lead to memory leak, so take care about recieved pointer
+ // the following code could lead to memory leak, so take care about received pointer
return aName;
}
if ( aFreeLabels.empty() || aFreeLabels.back() != aLabel )
aFreeLabels.push_back(aLabel);
- // we can't explicitely delete theObject. At least prevent its functioning
+ // we can't explicitly delete theObject. At least prevent its functioning
// as an alive object when aLabel is reused for a new object
theObject->_label = aLabel.Root();
theObject->_ior.Clear();
// a map containing copies of TObjectData from theObjectData
TSting2ObjDataMap aEntry2ObjData;
// contains pointers to TObjectData of either aEntry2ObjData or theObjectData; the latter
- // occures when several StudyEntries correspond to one Entry
+ // occurs when several StudyEntries correspond to one Entry
TSting2ObjDataPtrMap aStEntry2ObjDataPtr;
//Resource_DataMapOfAsciiStringAsciiString aEntry2StEntry, aStEntry2Entry, theObjectNames;
class GEOM_Engine
{
- public:
+public:
Standard_EXPORT GEOM_Engine();
Standard_EXPORT virtual ~GEOM_Engine();
- //Retuns the engine
+ //Returns the engine
Standard_EXPORT static GEOM_Engine* GetEngine();
//Returns the OCAF document by its ID, if document doesn't exists it will be created
Standard_EXPORT bool DocumentModified(const int theDocId);
- protected:
+protected:
Standard_EXPORT static void SetEngine(GEOM_Engine* theEngine);
- private:
+private:
Handle(GEOM_Application) _OCAFApp;
TColStd_DataMapOfIntegerTransient _mapIDDocument;
{
//================================================================================
/*!
- * \brief Returns a funtion with a given type OR the 1st function
+ * \brief Returns a function with a given type OR the 1st function
*/
//================================================================================
{
Handle(GEOM_Function) fun = GetFunction(1);
if ( !fun.IsNull() )
- Standard_MultiplyDefined::Raise( "Reinitialization of GEOM_Field is forbiden" );
+ Standard_MultiplyDefined::Raise( "Reinitialization of GEOM_Field is forbidden" );
fun = AddFunction( GetFieldID(), FUN_ADD_FIELD );
GEOM_IField data( fun );
{
Handle(GEOM_Function) fun = GetFunction(1);
if ( !fun.IsNull() )
- Standard_MultiplyDefined::Raise( "Reinitialization of GEOM_FieldStep is forbiden" );
+ Standard_MultiplyDefined::Raise( "Reinitialization of GEOM_FieldStep is forbidden" );
fun = AddFunction( GEOM_Field::GetFieldID(), GEOM_Field::FUN_ADD_STEP );
GEOM_IField data( fun );
//================================================================================
/*!
- * \brief Retuns true if this function is the last one in the study
+ * \brief Returns true if this function is the last one in the study
*/
//================================================================================
//Returns true if the last method succided
Standard_EXPORT bool IsDone() { return _isDone; }
- //Retuns true if this function is the last one in the study
+ //Returns true if this function is the last one in the study
Standard_EXPORT bool IsLastFuntion();
//Returns a sequence of the external dependencies of this function
// 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"
# additional include directories
INCLUDE_DIRECTORIES(
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src/GEOMUtils
${PROJECT_SOURCE_DIR}/src/GEOM
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
)
# libraries to link to
SET(_link_LIBRARIES
- ${CAS_KERNEL} ${CAS_TKBool} ${CAS_TKBO} ${CAS_TKMesh}
+ ${OpenCASCADE_FoundationClasses_LIBRARIES}
+ ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
GEOMbasic GEOMUtils
${KERNEL_SALOMELocalTrace}
)
GEOMAlgo_BndSphere.hxx
GEOMAlgo_BndSphereTree.hxx
GEOMAlgo_BoxBndTree.hxx
- GEOMAlgo_BuilderShape.hxx
GEOMAlgo_Clsf.hxx
GEOMAlgo_ClsfBox.hxx
GEOMAlgo_ClsfQuad.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
//purpose :
//=======================================================================
void GEOMAlgo_ClsfQuad::SetCorners(const gp_Pnt &theTopLeftPoint,
- const gp_Pnt &theTopRigthPoint,
+ const gp_Pnt &theTopRightPoint,
const gp_Pnt &theBottomLeftPoint,
- const gp_Pnt &theBottomRigthPoint)
+ const gp_Pnt &theBottomRightPoint)
{
myPoints.resize(6);
myPoints[0] = theTopLeftPoint;
- myPoints[1] = theTopRigthPoint;
- myPoints[2] = theBottomRigthPoint;
+ myPoints[1] = theTopRightPoint;
+ myPoints[2] = theBottomRightPoint;
myPoints[3] = theBottomLeftPoint;
myPoints[4] = myPoints[0];
myPoints[5] = myPoints[1];
//purpose :
//=======================================================================
void GEOMAlgo_ClsfQuad::GetCorners(gp_Pnt &theTopLeftPoint,
- gp_Pnt &theTopRigthPoint,
+ gp_Pnt &theTopRightPoint,
gp_Pnt &theBottomLeftPoint,
- gp_Pnt &theBottomRigthPoint) const
+ gp_Pnt &theBottomRightPoint) const
{
if (myPoints.size() == 6) {
theTopLeftPoint = myPoints[0];
- theTopRigthPoint = myPoints[1];
+ theTopRightPoint = myPoints[1];
theBottomLeftPoint = myPoints[3];
- theBottomRigthPoint = myPoints[2];
+ theBottomRightPoint = myPoints[2];
}
}
Standard_EXPORT
void SetCorners(const gp_Pnt &theTopLeftPoint,
- const gp_Pnt &theTopRigthPoint,
+ const gp_Pnt &theTopRightPoint,
const gp_Pnt &theBottomLeftPoint,
- const gp_Pnt &theBottomRigthPoint);
+ const gp_Pnt &theBottomRightPoint);
Standard_EXPORT
void GetCorners(gp_Pnt &theTopLeftPoint,
- gp_Pnt &theTopRigthPoint,
+ gp_Pnt &theTopRightPoint,
gp_Pnt &theBottomLeftPoint,
- gp_Pnt &theBottomRigthPoint) const;
+ gp_Pnt &theBottomRightPoint) const;
Standard_EXPORT
virtual void Perform();
TopTools_ListOfShape aClosedSubShapes;
TopTools_ListOfShape aNewShapes;
TopoDS_Shape anOuterSubShape;
- TopAbs_ShapeEnum aShapeType;
+ //TopAbs_ShapeEnum aShapeType;
TopAbs_ShapeEnum aSubShapeType;
if (theFOrSo.ShapeType() == TopAbs_FACE) {
- aShapeType = TopAbs_FACE;
+ //aShapeType = TopAbs_FACE;
aSubShapeType = TopAbs_WIRE;
anOuterSubShape = BRepTools::OuterWire(TopoDS::Face(theFOrSo));
} else {
- aShapeType = TopAbs_SOLID;
+ //aShapeType = TopAbs_SOLID;
aSubShapeType = TopAbs_SHELL;
anOuterSubShape = BRepClass3d::OuterShell(TopoDS::Solid(theFOrSo));
}
TopTools_ListOfShape aNewSubShapes;
TopTools_ListOfShape aNewOtherShapes;
TopAbs_ShapeEnum aSubShapeType;
- TopAbs_ShapeEnum aSubSubShapeType;
+ //TopAbs_ShapeEnum aSubSubShapeType;
if (theShOrCS.ShapeType() == TopAbs_SHELL) {
aSubShapeType = TopAbs_FACE;
- aSubSubShapeType = TopAbs_EDGE;
+ //aSubSubShapeType = TopAbs_EDGE;
} else { // comp-solid
aSubShapeType = TopAbs_SOLID;
- aSubSubShapeType = TopAbs_FACE;
+ //aSubSubShapeType = TopAbs_FACE;
}
for (; anIter.More(); anIter.Next()) {
getModified(theShape, aListModif, theShape.ShapeType());
Standard_Boolean isModif = !aListModif.IsEmpty();
- const TopAbs_ShapeEnum aType = theShape.ShapeType();
+ //const TopAbs_ShapeEnum aType = theShape.ShapeType();
if (isModif) {
// Add the new shapes.
for (; aIt.More(); aIt.Next()) {
iCnt=aIt.Value();
if (iCnt>1) {
- // take the first having occured inner link
+ // take the first having occurred inner link
// and discretize it
const GEOMAlgo_PassKey& aPK=aIt.Key();
//
void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Face& aF,
GEOMAlgo_ListOfPnt& aLP)
{
- Standard_Integer j, j1, j2, k, n[4], aNbLinks, aNx, aNb, iCnt;//, aNbMax, *pIds;
+ Standard_Integer j, j1, j2, k, n[4], aNx, aNb, iCnt;//, aNbLinks, aNbMax, *pIds;
TopLoc_Location aLoc;
Handle(Poly_Triangulation) aTRF;
TColStd_MapOfInteger aMBN;
}
//
// boundary nodes aMBN
- aNbLinks=aMPKI.Extent();
aIt.Initialize(aMPKI);
for (; aIt.More(); aIt.Next()) {
iCnt=aIt.Value();
GEOMAlgo_FinderShapeOnQuad::GEOMAlgo_FinderShapeOnQuad(const gp_Pnt & theTopLeftPoint,
- const gp_Pnt & theTopRigthPoint,
+ const gp_Pnt & theTopRightPoint,
const gp_Pnt & theBottomLeftPoint,
- const gp_Pnt & theBottomRigthPoint)
+ const gp_Pnt & theBottomRightPoint)
{
myPoints.resize(6);
myPoints[0] = theTopLeftPoint ;
- myPoints[1] = theTopRigthPoint ;
- myPoints[2] = theBottomRigthPoint;
+ myPoints[1] = theTopRightPoint ;
+ myPoints[2] = theBottomRightPoint;
myPoints[3] = theBottomLeftPoint ;
myPoints[4] = myPoints[0];
myPoints[5] = myPoints[1];
Standard_EXPORT
GEOMAlgo_FinderShapeOnQuad(const gp_Pnt & theTopLeftPoint,
- const gp_Pnt & theTopRigthPoint,
+ const gp_Pnt & theTopRightPoint,
const gp_Pnt & theBottomLeftPoint,
- const gp_Pnt & theBottomRigthPoint);
+ const gp_Pnt & theBottomRightPoint);
protected:
if (aWhereDistance.IsDone() && aWhatDistance.IsDone() &&
fabs(aWhereDistance.Value() - aWhatDistance.Value()) <= aTolConf)
{
- // 0020162: "EDF 961 GEOM : Getinplace is getting additionnal orthogonal faces"
+ // 0020162: "EDF 961 GEOM : Getinplace is getting additional orthogonal faces"
// aVertex must be projected to the same point on Where and on What
gp_Pnt pOnWhat = aWhatDistance.PointOnShape2(1);
gp_Pnt pOnWhere = aWhereDistance.PointOnShape2(1);
}
// try to find in history
- TDF_Label aHistoryLabel = theWhereFunction->GetHistoryEntry(Standard_False);
+ //TDF_Label aHistoryLabel = theWhereFunction->GetHistoryEntry(Standard_False);
// search in history for all argument shapes
Standard_Boolean isFound = Standard_False;
GEOMAlgo_GetInPlace &theGIP);
/*!
- * \brief Old implementation of GetInPlace algoritm.
+ * \brief Old implementation of GetInPlace algorithm.
* This method searches among sub shapes of the shape theWhere parts that are
* coincident with the shape theWhat. The result list of shape is returned as
* an output parameter. It returns the error code with the following possible
{
Standard_Boolean bOk;
Standard_Integer iErr;
- Standard_Real aTol2;
+ //Standard_Real aTol2;
TopAbs_ShapeEnum aType1, aType2;
TopAbs_State aState;
gp_Pnt aP1, aP2;
//
iErr=0;
bOk=Standard_False;
- aTol2=myTolerance*myTolerance;
+ //aTol2=myTolerance*myTolerance;
aType1=aS1.ShapeType();
aType2=aS2.ShapeType();
//
//
aNbVSD=aBBTree.Select(aSelector);
if (!aNbVSD) {
- continue; // it shoild not be so [at least IP itself]
+ continue; // it should not be so [at least IP itself]
}
//
const TColStd_ListOfInteger& aLI=aSelector.Indices();
//
#include <GEOMAlgo_Gluer.hxx>
+#include <Basics_OCCTVersion.hxx>
+
#include <NCollection_UBTreeFiller.hxx>
#include <TColStd_MapIteratorOfMapOfInteger.hxx>
myResult=aCmp;
//
if (aMS.Extent()) {
+#if OCC_VERSION_LARGE > 0x07020001
+ TopTools_IndexedMapOfShape aMapToAvoid;
+ BOPTools_AlgoTools::CorrectCurveOnSurface(myResult, aMapToAvoid, 0.0001);
+#else
BOPTools_AlgoTools::CorrectCurveOnSurface(myResult, 0.0001);
+#endif
}
}
//=======================================================================
Standard_Real aTol;
BRep_Builder aBB;
TopoDS_Edge E;
- TopAbs_Orientation anOrE;
+ //TopAbs_Orientation anOrE;
//
- anOrE=aE.Orientation();
+ //anOrE=aE.Orientation();
aTol=BRep_Tool::Tolerance(aE);
//
E=aEx;
void GEOMAlgo_Gluer2::Detect()
{
Standard_Boolean bCheckGeometry;
- Standard_Integer iErr, aNbSD;
+ Standard_Integer iErr;
TopTools_ListIteratorOfListOfShape aItLS;
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMSLS;
//GEOMAlgo_GlueDetector aDetector;
for (; aItDMSLS.More(); aItDMSLS.Next()) {
const TopoDS_Shape& aSkey=aItDMSLS.Key();
const TopTools_ListOfShape& aLSD=aItDMSLS.Value();
- aNbSD=aLSD.Extent();
myImagesDetected.Bind(aSkey, aLSD);
}
//
#include <BOPAlgo_BuilderSolid.hxx>
-#include <BOPTools.hxx>
#include <BOPTools_AlgoTools.hxx>
-#include <BOPCol_MapOfShape.hxx>
+#include <TopTools_MapOfShape.hxx>
//=======================================================================
//function :
TopoDS_Iterator aIt1, aIt2;
TopoDS_Shape aShape;
BRep_Builder aBB;
- BOPCol_MapOfShape aMFence;
- BOPCol_IndexedMapOfShape aMSI;
- BOPCol_IndexedDataMapOfShapeListOfShape aMFS;
- BOPCol_ListOfShape aSFS;
- BOPCol_ListIteratorOfListOfShape aItLS;
+ TopTools_MapOfShape aMFence;
+ TopTools_IndexedMapOfShape aMSI;
+ TopTools_IndexedDataMapOfShapeListOfShape aMFS;
+ TopTools_ListOfShape aSFS;
+ TopTools_ListIteratorOfListOfShape aItLS;
BOPAlgo_BuilderSolid aSB;
//
//modified by NIZNHY-PKV Thu Jul 11 06:54:51 2013f
//
aNbR=aMFence.Extent();
if (aNbS!=aNbR) {
- BOPCol_MapIteratorOfMapOfShape aItMS;
+ TopTools_MapIteratorOfMapOfShape aItMS;
//
BOPTools_AlgoTools::MakeContainer(TopAbs_COMPOUND, aShape);
//
aNbF2=0;
//
// 1. aSFS: Faces
- BOPTools::MapShapesAndAncestors(aShape, TopAbs_FACE, TopAbs_SOLID, aMFS);
+ TopExp::MapShapesAndAncestors(aShape, TopAbs_FACE, TopAbs_SOLID, aMFS);
//
aNbF=aMFS.Extent();
for (i=1; i<=aNbF; ++i) {
aSFS.Append(aFi);
}
else {
- const BOPCol_ListOfShape& aLSx=aMFS(i);
+ const TopTools_ListOfShape& aLSx=aMFS(i);
aNbSx=aLSx.Extent();
if (aNbSx==1) {
aSFS.Append(aFx);
return;
}
//
- const BOPCol_ListOfShape& aLSR=aSB.Areas();
+ const TopTools_ListOfShape& aLSR=aSB.Areas();
//
// 4 Add the internals
if (aNbSI) {
//function : AddInternalShapes
//purpose :
//=======================================================================
-void GEOMAlgo_RemoverWebs::AddInternalShapes(const BOPCol_ListOfShape& aLSR,
- const BOPCol_IndexedMapOfShape& aMSI)
+void GEOMAlgo_RemoverWebs::AddInternalShapes(const TopTools_ListOfShape& aLSR,
+ const TopTools_IndexedMapOfShape& aMSI)
{
Standard_Integer i, aNbSI;
TopAbs_State aState;
TopoDS_Solid aSd;
BRep_Builder aBB;
- BOPCol_ListIteratorOfListOfShape aItLS;
+ TopTools_ListIteratorOfListOfShape aItLS;
Handle(IntTools_Context) aCtx=new IntTools_Context;
//
aNbSI=aMSI.Extent();
#include <Standard_Macro.hxx>
//
#include <GEOMAlgo_ShapeAlgo.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#include <BOPCol_IndexedMapOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
//=======================================================================
//function : GEOMAlgo_RemoverWebs
void BuildSolid() ;
Standard_EXPORT
- static void AddInternalShapes(const BOPCol_ListOfShape& ,
- const BOPCol_IndexedMapOfShape& );
+ static void AddInternalShapes(const TopTools_ListOfShape& ,
+ const TopTools_IndexedMapOfShape& );
//
};
break;
//
default:
- printf(" * not implememted yet\n");
+ printf(" * not implemented yet\n");
break;
}
}
const gp_Cylinder& aCyl)
{
- Standard_Integer i, aNbV, aNbE, aNbCE, aNbSE;
+ Standard_Integer aNbV, aNbE, aNbCE, aNbSE;
Standard_Real aT0, aT1, aHeight;
gp_Pnt aPC[3], aPc;
TopoDS_Edge aE;
const gp_Dir& aDir=aAx1.Direction();
const gp_Pnt& aPLoc=aAx1.Location();
//
- i=0;
aNbCE=0;
aNbSE=0;
aExp.Init(aF, TopAbs_EDGE);
{
Standard_Boolean bRet, bIsAllowedType, bOnlyClosed, bIsEqual;
Standard_Integer j;
- Standard_Real aTolAng, aTol;
+ Standard_Real aTol;
Standard_Real aVolume, aVolumeS, dV, aArea, aAreaS, dA;
gp_Sphere aSphere[2];
GeomAbs_SurfaceType aST;
//
bRet=Standard_False;
aTol=Precision::Confusion();
- aTolAng=Precision::Angular();
//
aExp.Init(aSd, TopAbs_FACE);
for (j=0; aExp.More(); aExp.Next(), ++j) {
#include <BOPTools_AlgoTools.hxx>
-#include <BOPCol_DataMapOfShapeListOfShape.hxx>
-#include <BOPCol_ListOfShape.hxx>
+#include <TopTools_DataMapOfShapeListOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
#include <IntTools_Context.hxx>
#include <BOPDS_DS.hxx>
#include <BOPAlgo_Builder.hxx>
//
const BOPDS_DS& aDS=myDSFiller->DS();
BOPDS_DS* pDS=(BOPDS_DS*)&aDS;
- const BOPCol_ListOfShape& aLS=pDS->Arguments();
+ const TopTools_ListOfShape& aLS=pDS->Arguments();
//
aNbArgs=aLS.Extent();
if (aNbArgs!=2) {
return;
}
//
- const BOPCol_DataMapOfShapeListOfShape& aImages=aSSB.Images();
+ const TopTools_DataMapOfShapeListOfShape& aImages=aSSB.Images();
//
//-------------------------------
for (i=iBeg; i<=iEnd; ++i) {
aState=BOPTools_AlgoTools::ComputeState(aP, aSolid, aTol, aCtx);
}
else {
- const BOPCol_ListOfShape& aLSp=aImages.Find(aS);
+ const TopTools_ListOfShape& aLSp=aImages.Find(aS);
aNbSp=aLSp.Extent();
if (aNbSp>0) {
continue;
#include <BRep_Builder.hxx>
-#include <BOPCol_MapOfShape.hxx>
-#include <BOPCol_ListOfShape.hxx>
+#include <TopTools_MapOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
-#include <BOPTools.hxx>
+#include <TopExp.hxx>
static
void TreatCompound(const TopoDS_Shape& aC,
- BOPCol_ListOfShape& aLSX);
+ TopTools_ListOfShape& aLSX);
//=======================================================================
//function :
//function : Tools
//purpose :
//=======================================================================
-const BOPCol_ListOfShape& GEOMAlgo_Splitter::Tools()const
+const TopTools_ListOfShape& GEOMAlgo_Splitter::Tools()const
{
return myTools;
}
{
TopAbs_ShapeEnum aType;
BRep_Builder aBB;
- BOPCol_MapOfShape aM;
- BOPCol_ListIteratorOfListOfShape aIt, aItIm;
+ TopTools_MapOfShape aM;
+ TopTools_ListIteratorOfListOfShape aIt, aItIm;
//
aIt.Initialize(myArguments);
for (; aIt.More(); aIt.Next()) {
aType=aS.ShapeType();
if (aType==theType && !myMapTools.Contains(aS)) {
if (myImages.IsBound(aS)) {
- const BOPCol_ListOfShape& aLSIm=myImages.Find(aS);
+ const TopTools_ListOfShape& aLSIm=myImages.Find(aS);
aItIm.Initialize(aLSIm);
for (; aItIm.More(); aItIm.Next()) {
const TopoDS_Shape& aSIm=aItIm.Value();
Standard_Integer i, aNbS;
BRep_Builder aBB;
TopoDS_Compound aC;
- BOPCol_IndexedMapOfShape aMx;
+ TopTools_IndexedMapOfShape aMx;
//
aBB.MakeCompound(aC);
//
- BOPTools::MapShapes(myShape, myLimit, aMx);
+ TopExp::MapShapes(myShape, myLimit, aMx);
aNbS=aMx.Extent();
for (i=1; i<=aNbS; ++i) {
const TopoDS_Shape& aS=aMx(i);
if (myLimitMode) {
Standard_Integer iType, iLimit, iTypeX;
TopAbs_ShapeEnum aType, aTypeX;
- BOPCol_ListOfShape aLSP, aLSX;
- BOPCol_ListIteratorOfListOfShape aIt, aItX, aItIm;
- BOPCol_MapOfShape aM;
+ TopTools_ListOfShape aLSP, aLSX;
+ TopTools_ListIteratorOfListOfShape aIt, aItX, aItIm;
+ TopTools_MapOfShape aM;
//
iLimit=(Standard_Integer)myLimit;
//
}// for (; aIt.More(); aIt.Next()) {
//
aMx.Clear();
- BOPTools::MapShapes(aC, aMx);
+ TopExp::MapShapes(aC, aMx);
// 2. Add them to aC
aIt.Initialize(aLSP);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aS=aIt.Value();
if (myImages.IsBound(aS)) {
- const BOPCol_ListOfShape& aLSIm=myImages.Find(aS);
+ const TopTools_ListOfShape& aLSIm=myImages.Find(aS);
aItIm.Initialize(aLSIm);
for (; aItIm.More(); aItIm.Next()) {
const TopoDS_Shape& aSIm=aItIm.Value();
//
Standard_Integer aNbS;
TopoDS_Iterator aIt;
- BOPCol_ListOfShape aLS;
+ TopTools_ListOfShape aLS;
//
aIt.Initialize(myShape);
for (; aIt.More(); aIt.Next()) {
//purpose :
//=======================================================================
void TreatCompound(const TopoDS_Shape& aC1,
- BOPCol_ListOfShape& aLSX)
+ TopTools_ListOfShape& aLSX)
{
Standard_Integer aNbC1;
TopAbs_ShapeEnum aType;
- BOPCol_ListOfShape aLC, aLC1;
- BOPCol_ListIteratorOfListOfShape aIt, aIt1;
+ TopTools_ListOfShape aLC, aLC1;
+ TopTools_ListIteratorOfListOfShape aIt, aIt1;
TopoDS_Iterator aItC;
//
aLC.Append (aC1);
#include <TopoDS_Shape.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#include <BOPCol_MapOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_MapOfShape.hxx>
#include <BOPAlgo_Builder.hxx>
void AddTool(const TopoDS_Shape& theShape);
Standard_EXPORT
- const BOPCol_ListOfShape& Tools()const;
+ const TopTools_ListOfShape& Tools()const;
Standard_EXPORT
void SetLimit(const TopAbs_ShapeEnum aLimit);
virtual void PostTreat();
protected:
- BOPCol_ListOfShape myTools;
- BOPCol_MapOfShape myMapTools;
+ TopTools_ListOfShape myTools;
+ TopTools_MapOfShape myMapTools;
TopAbs_ShapeEnum myLimit;
Standard_Integer myLimitMode;
};
if (fabs(aRadius1 - aRadius2) <= aTol) {
// Check the deflection of the middle point.
- gp_XYZ aMidP = 0.5*(aDP1 + aDP2);
+ //gp_XYZ aMidP = 0.5*(aDP1 + aDP2);
//Standard_Real aMidRadius1 = aMidP.Modulus();
if (fabs(aRadius1 - aRadius2) <= aTol) {
#include <BRep_Tool.hxx>
#include <BRepClass3d_SolidClassifier.hxx>
//
-#include <BOPCol_ListOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
#include <IntTools_Context.hxx>
//
#include <BOPDS_DS.hxx>
TopTools_IndexedMapOfShape aM;
//
const BOPDS_DS& aDS=myDSFiller->DS();
- const BOPCol_ListOfShape& aLS=aDS.Arguments();
+ const TopTools_ListOfShape& aLS=aDS.Arguments();
aNbArgs=aLS.Extent();
if (aNbArgs!=2) {
myErrorStatus=14;
//=======================================================================
void GEOMAlgo_VertexSolid::BuildResult()
{
- Standard_Integer i, iBeg, iEnd, aNbVV, aNbVE, aNbVF, j, iFound, aNbRanges;
+ Standard_Integer i, iBeg, iEnd, aNbVV, aNbVE, aNbVF, j, iFound;//, aNbRanges;
Standard_Real aTol;
TopAbs_State aSt;
TopAbs_ShapeEnum aType;
BOPDS_VectorOfInterfVE& aVEs=pDS->InterfVE();
BOPDS_VectorOfInterfVF& aVFs=pDS->InterfVF();
//
- const BOPCol_ListOfShape& aLS=aDS.Arguments();
+ const TopTools_ListOfShape& aLS=aDS.Arguments();
const TopoDS_Shape& aObj=aLS.First();
//
const TopoDS_Shape& aTool=aLS.Last();
Handle(IntTools_Context) aCtx=myDSFiller->Context();
BRepClass3d_SolidClassifier& aSC=aCtx->SolidClassifier(aSolid);
//
- aNbRanges=aDS.NbRanges();
+ //aNbRanges=aDS.NbRanges();
const BOPDS_IndexRange& aRange=aDS.Range(myRank);
aRange.Indices(iBeg, iEnd);
//
iFound=0;
//
// 1
- aNbVV=aVVs.Extent();
+ aNbVV=aVVs.Length();
for (j=0; j<aNbVV; ++j) {
BOPDS_InterfVV& aVV=aVVs(j);
if (aVV.Contains(i)) {
- myLSON.Append(aV);
- iFound=1;
- break;
+ myLSON.Append(aV);
+ iFound=1;
+ break;
}
}
if (iFound) {
continue;
}
// 2
- aNbVE=aVEs.Extent();
+ aNbVE=aVEs.Length();
for (j=0; j<aNbVE; ++j) {
BOPDS_InterfVE& aVE=aVEs(j);
if (aVE.Contains(i)) {
- myLSON.Append(aV);
- iFound=1;
- break;
+ myLSON.Append(aV);
+ iFound=1;
+ break;
}
}
if (iFound) {
continue;
}
// 3
- aNbVF=aVFs.Extent();
+ aNbVF=aVFs.Length();
for (j=0; j<aNbVF; ++j) {
BOPDS_InterfVF& aVF=aVFs(j);
if (aVF.Contains(i)) {
- myLSON.Append(aV);
- iFound=1;
- break;
+ myLSON.Append(aV);
+ iFound=1;
+ break;
}
}
if (iFound) {
Standard_Integer aNbArgs;
//
const BOPDS_DS& aDS=myDSFiller->DS();
- const BOPCol_ListOfShape& aLS=aDS.Arguments();
+ const TopTools_ListOfShape& aLS=aDS.Arguments();
aNbArgs=aLS.Extent();
if (!aNbArgs) {
myErrorStatus=13;
const BOPDS_DS& aDS=myDSFiller->DS();
BOPDS_DS* pDS=(BOPDS_DS*)&aDS;
//
- const BOPCol_ListOfShape& aLS=pDS->Arguments();
+ const TopTools_ListOfShape& aLS=pDS->Arguments();
aNbArgs=aLS.Extent();
if (aNbArgs!=2) {
myErrorStatus=14;
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
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;
//================================================================
// Function : onAccept
// Purpose : This method should be called from dialog's slots onOk() and onApply()
-// It perfroms user input validation, then it
+// It performs user input validation, then it
// performs a proper operation and manages transactions, etc.
//================================================================
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
catch( const SALOME::SALOME_Exception& e ) {
SalomeApp_Tools::QtCatchCorbaException( e );
abortCommand();
- MESSAGE("Exception catched")
- }
+ 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>
return;
/* User name of object input management */
- /* If successfull the selection is changed and signal emitted... */
+ /* If successful the selection is changed and signal emitted... */
/* so SelectionIntoArgument() is automatically called. */
const QString objectUserName = myEditCurrentArgument->text();
QWidget* thisWidget = (QWidget*)this;
object that should be removed by the caller as soon as the object is no more required.
For example, function GetSubShape() of the GEOM_IShapesOperation interface always creates
new servant object and returns new object reference to it. If the object is not published
- in the study, it has to be destroyed and the coresponding servant should be deleted.
+ in the study, it has to be destroyed and the corresponding servant should be deleted.
Examples:
\code
# additional include directories
INCLUDE_DIRECTORIES(
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
)
# libraries to link to
SET(_link_LIBRARIES
SalomeIDLGEOM
- ${CAS_TKBRep}
+ ${OpenCASCADE_ModelingData_LIBRARIES}
${KERNEL_SALOMELocalTrace}
)
INCLUDE_DIRECTORIES(
${OMNIORB_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
SET(_link_LIBRARIES
SalomeIDLGEOM
GEOMClient
- ${CAS_TKBRep}
+ ${OpenCASCADE_ModelingData_LIBRARIES}
${KERNEL_SALOMELocalTrace}
${GUI_SalomeApp}
)
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
${OPENCV_DEFINITIONS}
aStringValues.remove("\\");
- int it = 0;
+ size_t it = 0;
for ( ; it < aPacked.size(); ++it )
{
int aNextPos = aStringValues.indexOf("(.*)");
/*!
* \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
{
study->setObjectProperty( aMgrId, entry, GEOM::propertyName( GEOM::Texture ), QString( GetTexture().c_str() ) );
study->setObjectProperty( aMgrId, entry, GEOM::propertyName( GEOM::DisplayMode ), 3 );
- // Update propeties map
+ // Update properties map
propMap = getObjectProperties( study, entry, myViewFrame );
}
}
//=================================================================
/*!
* 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 )
if ( !GeomObject->_is_nil() )
{
- theIO->setName( GeomObject->GetName() );
+ CORBA::String_var name = GeomObject->GetName();
+ theIO->setName( name );
// finally set shape
setShape( GEOM_Client::get_client().GetShape( GeometryGUI::GetGeomGen(), GeomObject ) );
}
/* 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& );
virtual void BeforeErase ( SALOME_View*, const SALOME_OCCPrs* );
virtual void AfterErase ( SALOME_View*, const SALOME_OCCPrs* );
- /* This methos is used for activisation/deactivisation of objects to be displayed*/
+ /* This methods is used for activisation/deactivisation of objects to be displayed*/
void SetToActivate( const bool );
bool ToActivate() const;
</message>
<message>
<source>GEOM_INERTIA_TITLE</source>
- <translation>Calculs Of Inertia</translation>
+ <translation>Calculus Of Inertia</translation>
</message>
<message>
<source>GEOM_INF_LOADED</source>
</message>
<message>
<source>GEOM_MINDIST_TITLE</source>
- <translation>Minimun Distance Between Two Objects</translation>
+ <translation>Minimum Distance Between Two Objects</translation>
</message>
<message>
<source>GEOM_MIRROR</source>
</message>
<message>
<source>GEOM_SKETCHER_ADD_PARAMS</source>
- <translation>Additionnal Parameters</translation>
+ <translation>Additional Parameters</translation>
</message>
<message>
<source>GEOM_SKETCHER_ANGLE</source>
</message>
<message>
<source>GEOM_CLOSEDUNCLOSED</source>
- <translation>Not defined, Closed or Opened. Possibly, error occured.</translation>
+ <translation>Not defined, Closed or Opened. Possibly, error occurred.</translation>
</message>
<message>
<source>GEOM_DISK_CIRCLE</source>
<translation>Rotation angle</translation>
</message>
</context>
+<context>
+ <name>TransformationGUI_OffsetDlg</name>
+ <message>
+ <source>GEOM_JOIN_BY_PIPES</source>
+ <translation>Join by pipes</translation>
+ </message>
+</context>
<context>
<name>OperationGUI_ExtractionDlg</name>
<message>
anObj = anORB->string_to_object(aValue.c_str());
}
} catch(...) {
- INFOS("ClientSObjectToObject - Unknown exception was occured!!!");
+ INFOS("ClientSObjectToObject - Unknown exception has occurred!!!");
}
return anObj._retn();
}
case GEOMOp::OpFace: // MENU BUILD - FACE
case GEOMOp::OpShell: // MENU BUILD - SHELL
case GEOMOp::OpSolid: // MENU BUILD - SOLID
- case GEOMOp::OpCompound: // MENU BUILD - COMPUND
+ case GEOMOp::OpCompound: // MENU BUILD - COMPOUND
libName = "BuildGUI";
break;
case GEOMOp::OpFuse: // MENU BOOLEAN - FUSE
param == QString("scalar_bar_height") ||
param == QString("scalar_bar_text_height") ||
param == QString("scalar_bar_nb_intervals")) {
- if( SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( getApp()->activeStudy() ) )
+ if( /*SalomeApp_Study* aStudy = */dynamic_cast<SalomeApp_Study*>( getApp()->activeStudy() ) )
{
updateFieldColorScale();
}
_PTR(SObject) obj( studyDS->FindObjectID( o_it.key().toLatin1().data() ) );
if ( !obj || !(aProps.count() > 0))
continue;
- // entry is "encoded" = it does NOT contain component adress, since it is a
+ // entry is "encoded" = it does NOT contain component address, since it is a
// subject to change on next component loading
std::string entry = ip->encodeEntry(o_it.key().toLatin1().data(), componentName);
for (std::vector<std::string>::iterator entIt = entries.begin(); entIt != entries.end(); ++entIt)
{
- // entry is a normal entry - it should be "decoded" (setting base adress of component)
+ // entry is a normal entry - it should be "decoded" (setting base address of component)
QString entry (ip->decodeEntry(*entIt).c_str());
// Check that the entry corresponds to a real object in the Study
# additional include directories
INCLUDE_DIRECTORIES(
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${PYTHON_INCLUDE_DIRS}
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${PYTHON_DEFINITIONS}
)
# libraries to link to
SET(_link_LIBRARIES
- ${CAS_TKFeat}
- ${CAS_TKFillet}
+ ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
${PYTHON_LIBRARIES}
ShHealOper GEOMbasic BlockFix GEOMAlgo GEOMUtils GEOMSketcher GEOMArchimede XAO
${KERNEL_SALOMELocalTrace}
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
if (isCheckSelfInte) {
BOPAlgo_CheckerSI aCSI; // checker of self-interferences
aCSI.SetLevelOfCheck(BOP_SELF_INTERSECTIONS_LEVEL);
- BOPCol_ListOfShape aList1, aList2;
+ TopTools_ListOfShape aList1, aList2;
aList1.Append(aShape1);
aList2.Append(aShape2);
aCSI.SetArguments(aList1);
if (isCheckSelfInte) {
aCSI.SetLevelOfCheck(BOP_SELF_INTERSECTIONS_LEVEL);
- BOPCol_ListOfShape aList1;
+ TopTools_ListOfShape aList1;
aList1.Append(aShape);
aCSI.SetArguments(aList1);
aCSI.Perform();
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is not valid");
if (isCheckSelfInte) {
- BOPCol_ListOfShape aList2;
+ TopTools_ListOfShape aList2;
aList2.Append(aShape2);
aCSI.SetArguments(aList2);
aCSI.Perform();
if (isCheckSelfInte) {
aCSI.SetLevelOfCheck(BOP_SELF_INTERSECTIONS_LEVEL);
- BOPCol_ListOfShape aList1;
+ TopTools_ListOfShape aList1;
aList1.Append(aShape);
aCSI.SetArguments(aList1);
aCSI.Perform();
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is not valid");
if (isCheckSelfInte) {
- BOPCol_ListOfShape aList2;
+ TopTools_ListOfShape aList2;
aList2.Append(aTool);
aCSI.SetArguments(aList2);
aCSI.Perform();
}
}
- BOPCol_ListOfShape aListShapes;
+ TopTools_ListOfShape aListShapes;
BOPTools_AlgoTools::MakeConnexityBlocks(aFaces, TopAbs_EDGE, TopAbs_FACE, aListShapes);
if (aListShapes.IsEmpty())
TopoDS_Compound aResult;
B.MakeCompound(aResult);
- BOPCol_ListIteratorOfListOfShape anIter(aListShapes);
+ TopTools_ListIteratorOfListOfShape anIter(aListShapes);
for (; anIter.More(); anIter.Next()) {
TopoDS_Shell aShell;
TopoDS_Shape aStepResult = BO.Shape();
// check result of this step: if it is a compound (boolean operations
- // allways return a compound), we add all sub-shapes of it.
+ // always return a compound), we add all sub-shapes of it.
// This allows to avoid adding empty compounds,
// resulting from COMMON on two non-intersecting shapes.
if (aStepResult.ShapeType() == TopAbs_COMPOUND) {
}
if (isCompound) {
// check result of this step: if it is a compound (boolean operations
- // allways return a compound), we add all sub-shapes of it.
+ // always return a compound), we add all sub-shapes of it.
// This allows to avoid adding empty compounds,
// resulting from CUT of parts
if (aCut.ShapeType() == TopAbs_COMPOUND) {
TopoDS_Shape aStepResult = BO.Shape();
// check result of this step: if it is a compound (boolean operations
- // allways return a compound), we add all sub-shapes of it.
+ // always return a compound), we add all sub-shapes of it.
// This allows to avoid adding empty compounds,
// resulting from SECTION on two non-intersecting shapes.
if (aStepResult.ShapeType() == TopAbs_COMPOUND) {
}
else if (aType == CHAMFER_SHAPE_EDGES || aType == CHAMFER_SHAPE_EDGES_AD)
{
- // chamfer on selected edges with lenght param D1 & D2.
+ // chamfer on selected edges with length param D1 & D2.
int aLen = aCI.GetLength();
int ind = 1;
Handle(TColStd_HSequenceOfTransient) aConstraints = IF.GetShapes();
- for ( unsigned int ind = 1; ind <= aConstraints->Length(); ind++ ) {
+ for ( int ind = 1; ind <= aConstraints->Length(); ind++ ) {
TopoDS_Edge E;
TopoDS_Face F;
Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast( aConstraints->Value(ind) );
}
case FILLING_ON_CONSTRAINTS:
{
- theOperationName = "FACE";
+ theOperationName = "FACE";
AddParam( theParams, "Edges/Faces", aCI.GetShapes() );
break;
}
Standard_Failure::Raise(MSG_BAD_ARG_SHAPE);
break;
case 200:
- Standard_Failure::Raise("Error occured during check of geometric coincidence");
+ Standard_Failure::Raise("Error occurred during check of geometric coincidence");
break;
default:
{
Standard_Failure::Raise("Result shape is Null");
break;
case 200:
- Standard_Failure::Raise("Error occured during check of geometric coincidence");
+ Standard_Failure::Raise("Error occurred during check of geometric coincidence");
break;
default:
{
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"
std::list<std::string>::const_iterator it;
for (it = lines.begin(); it != lines.end(); ++it) {
std::string line = *it;
- int lenline = (line.size()/8 + (line.size()%8 ? 1 : 0)) * 8;
- for (int i = 0; i < lenline/8; i++) {
+ size_t lenline = (line.size()/8 + (line.size()%8 ? 1 : 0)) * 8;
+ for (size_t i = 0; i < lenline/8; i++) {
unsigned char byte = 0;
for (int j = 0; j < 8; j++)
byte = (byte << 1) + ( i*8+j < line.size() && line[i*8+j] != '0' ? 1 : 0 );
// 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"
// OCCT Includes
#include <Bnd_Box.hxx>
#include <BOPAlgo_CheckerSI.hxx>
-#include <BOPCol_ListOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
#include <BOPDS_DS.hxx>
-#include <BOPDS_MapOfPassKey.hxx>
#include <BOPDS_MapOfPair.hxx>
#include <BOPDS_Pair.hxx>
#include <BRepBndLib.hxx>
}
const GEOMAlgo_ShapeInfo& anInfo = aSF.Info();
- // specific processing for some "advandced" objects
+ // specific processing for some "advanced" objects
switch ( geom_type ) {
case GEOM_MARKER:
- // local coordinate systen
+ // local coordinate system
// (+) geompy.kind.LCS xc yc zc xx xy xz yx yy yz zx zy zz
TopoDS_Face aFace = TopoDS::Face( aShape );
theDoubles->Append(aP.Z());
}
break;
+ default:;
}
SetErrorCode(OK);
TopTools_IndexedMapOfShape anIndices;
TopExp::MapShapes(aScopy, anIndices);
- BOPCol_ListOfShape aLCS;
+ TopTools_ListOfShape aLCS;
aLCS.Append(aScopy);
//
BOPAlgo_CheckerSI aCSI; // checker of self-interferences
//=============================================================================
bool GEOMImpl_IMeasureOperations::CheckSelfIntersectionsFast
(Handle(GEOM_Object) theShape,
- float theDeflection, double theTolerance,
+ float theDeflection, double theTolerance,
Handle(TColStd_HSequenceOfInteger)& theIntersections)
{
SetErrorCode(KO);
TopExp::MapShapes(aScopy1, anIndices1);
TopExp::MapShapes(aScopy2, anIndices2);
- BOPCol_ListOfShape aLCS1, aLCS2;
+ TopTools_ListOfShape aLCS1, aLCS2;
aLCS1.Append(aScopy1); aLCS2.Append(aScopy2);
//
BRepExtrema_ShapeProximity aBSP; // checker of fast interferences
aListOfShape.Append(s);
nbTypes[s.ShapeType()]++;
if ((sp.ShapeType() == TopAbs_COMPOUND) || (sp.ShapeType() == TopAbs_COMPSOLID)) {
- nbFlatType[s.ShapeType()]++;
+ nbFlatType[s.ShapeType()]++;
}
}
}
if ((aShape.ShapeType() == TopAbs_COMPOUND) || (aShape.ShapeType() == TopAbs_COMPSOLID)){
Astr = Astr + " --------------------- \n Flat content : \n";
if (nbFlatType[TopAbs_VERTEX] > 0)
- Astr = Astr + " VERTEX : " + TCollection_AsciiString(nbFlatType[TopAbs_VERTEX]) + "\n";
+ Astr = Astr + " VERTEX : " + TCollection_AsciiString(nbFlatType[TopAbs_VERTEX]) + "\n";
if (nbFlatType[TopAbs_EDGE] > 0)
- Astr = Astr + " EDGE : " + TCollection_AsciiString(nbFlatType[TopAbs_EDGE]) + "\n";
+ Astr = Astr + " EDGE : " + TCollection_AsciiString(nbFlatType[TopAbs_EDGE]) + "\n";
if (nbFlatType[TopAbs_WIRE] > 0)
- Astr = Astr + " WIRE : " + TCollection_AsciiString(nbFlatType[TopAbs_WIRE]) + "\n";
+ Astr = Astr + " WIRE : " + TCollection_AsciiString(nbFlatType[TopAbs_WIRE]) + "\n";
if (nbFlatType[TopAbs_FACE] > 0)
- Astr = Astr + " FACE : " + TCollection_AsciiString(nbFlatType[TopAbs_FACE]) + "\n";
+ Astr = Astr + " FACE : " + TCollection_AsciiString(nbFlatType[TopAbs_FACE]) + "\n";
if (nbFlatType[TopAbs_SHELL] > 0)
- Astr = Astr + " SHELL : " + TCollection_AsciiString(nbFlatType[TopAbs_SHELL]) + "\n";
+ Astr = Astr + " SHELL : " + TCollection_AsciiString(nbFlatType[TopAbs_SHELL]) + "\n";
if (nbFlatType[TopAbs_SOLID] > 0)
- Astr = Astr + " SOLID : " + TCollection_AsciiString(nbFlatType[TopAbs_SOLID]) + "\n";
+ Astr = Astr + " SOLID : " + TCollection_AsciiString(nbFlatType[TopAbs_SOLID]) + "\n";
}
}
catch (Standard_Failure& aFail) {
Standard_EXPORT Standard_Real GetAngleBtwVectors (Handle(GEOM_Object) theVec1, Handle(GEOM_Object) theVec2);
- // Methods for recieving radiuses of curvature of curves and surfaces
+ // Methods for receiving radiuses of curvature of curves and surfaces
// in the given point
Standard_EXPORT Standard_Real CurveCurvatureByParam (Handle(GEOM_Object) theCurve,
Standard_Real& theParam);
// 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>
#define OFF_ARG_VALUE 2
#define OFF_ARG_IDS 3
#define OFF_ARG_PARAM 4
+#define OFF_ARG_JOIN 5
class GEOMImpl_IOffset
{
Standard_Boolean GetParam() { return _func->GetInteger(OFF_ARG_PARAM); }
+ void SetJoinByPipes(Standard_Boolean theValue) { _func->SetInteger(OFF_ARG_JOIN, theValue); }
+
+ Standard_Boolean GetJoinByPipes() { return _func->GetInteger(OFF_ARG_JOIN); }
+
void SetFaceIDs(const Handle(TColStd_HArray1OfInteger)& theFaceIDs)
{ _func->SetIntegerArray(OFF_ARG_IDS, theFaceIDs); }
// 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"
else {
TopoDS_Iterator It(S, Standard_True, Standard_True);
for (; It.More(); It.Next()) {
- TopoDS_Shape SS = It.Value();
- if (M.Add(SS))
- AddFlatSubShapes(SS, L, M);
+ TopoDS_Shape SS = It.Value();
+ if (M.Add(SS))
+ AddFlatSubShapes(SS, L, M);
}
}
}
bool isGroup = anObj->IsKind(STANDARD_TYPE(GEOM_Object)) && anObj->GetType() == GEOM_GROUP;
bool isSubShape = anObj->IsKind(STANDARD_TYPE(GEOM_Object)) && anObj->GetType() != GEOM_GROUP;
bool isField = anObj->IsKind(STANDARD_TYPE(GEOM_Field));
- if (theTypes & Groups && isGroup ||
- theTypes & SubShapes && isSubShape ||
- theTypes & Fields && isField) {
+ if ((theTypes & Groups && isGroup ) ||
+ (theTypes & SubShapes && isSubShape ) ||
+ (theTypes & Fields && isField ))
aSeq->Append(anObj);
- }
}
delete [] anEntryStr;
}
for (; It.More(); It.Next()) {
TopoDS_Shape SS = It.Value();
if (mapShape.Add(SS)) {
- if (theShapeType == TopAbs_FLAT) {
+ if (theShapeType == TopAbs_FLAT) {
AddFlatSubShapes(SS, listShape, mapShape);
- }
+ }
else if (theShapeType == TopAbs_SHAPE || theShapeType == SS.ShapeType()) {
- listShape.Append(SS);
+ listShape.Append(SS);
}
// VSR: for EXPLODE_NEW_INCLUDE_MAIN and EXPLODE_OLD_INCLUDE_MAIN:
// it seems it is necessary to add top-level shape if theShapeType == TopAbs_COMPOUND
for (; It.More(); It.Next()) {
TopoDS_Shape SS = It.Value();
if (mapShape.Add(SS)) {
- if (theShapeType == TopAbs_FLAT) {
+ if (theShapeType == TopAbs_FLAT) {
AddFlatSubShapes(SS, listShape, mapShape);
- }
+ }
else if (theShapeType == TopAbs_SHAPE || theShapeType == SS.ShapeType()) {
listShape.Append(SS);
}
for (; itSel.More(); itSel.Next()) {
const TopoDS_Shape& aSS = itSel.Value();
if (mapShape.Add(aSS) )
- aShared.Append(aSS);
+ aShared.Append(aSS);
}
}
}
// Default value=3
aFinder.SetNbPntsMin(3);
// Sets the maximal number of inner points for edges or faces.
- // It is usefull for the cases when this number is very big (e.g =2000) to improve
+ // It is useful for the cases when this number is very big (e.g =2000) to improve
// the performance. If this value =0, all inner points will be taken into account.
// Default value=0
aFinder.SetNbPntsMax(100);
* \param theShape - the shape to explore
* \param theShapeType - type of sub-shape of theShape
* \param theTopLeftPoint - top left quadrangle corner
- * \param theTopRigthPoint - top right quadrangle corner
+ * \param theTopRightPoint - top right quadrangle corner
* \param theBottomLeftPoint - bottom left quadrangle corner
- * \param theBottomRigthPoint - bottom right quadrangle corner
+ * \param theBottomRightPoint - bottom right quadrangle corner
* \param theState - required state
* \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
*/
GEOMImpl_IShapesOperations::getShapesOnQuadrangleIDs (const Handle(GEOM_Object)& theShape,
const Standard_Integer theShapeType,
const Handle(GEOM_Object)& theTopLeftPoint,
- const Handle(GEOM_Object)& theTopRigthPoint,
+ const Handle(GEOM_Object)& theTopRightPoint,
const Handle(GEOM_Object)& theBottomLeftPoint,
- const Handle(GEOM_Object)& theBottomRigthPoint,
+ const Handle(GEOM_Object)& theBottomRightPoint,
const GEOMAlgo_State theState)
{
SetErrorCode(KO);
if ( theShape.IsNull() ||
theTopLeftPoint.IsNull() ||
- theTopRigthPoint.IsNull() ||
+ theTopRightPoint.IsNull() ||
theBottomLeftPoint.IsNull() ||
- theBottomRigthPoint.IsNull() )
+ theBottomRightPoint.IsNull() )
return NULL;
TopoDS_Shape aShape = theShape->GetValue();
TopoDS_Shape aTL = theTopLeftPoint->GetValue();
- TopoDS_Shape aTR = theTopRigthPoint->GetValue();
+ TopoDS_Shape aTR = theTopRightPoint->GetValue();
TopoDS_Shape aBL = theBottomLeftPoint->GetValue();
- TopoDS_Shape aBR = theBottomRigthPoint->GetValue();
+ TopoDS_Shape aBR = theBottomRightPoint->GetValue();
if (aShape.IsNull() ||
aTL.IsNull() ||
// Default value=3
aFinder.SetNbPntsMin(3);
// Sets the maximal number of inner points for edges or faces.
- // It is usefull for the cases when this number is very big (e.g =2000) to improve
+ // It is useful for the cases when this number is very big (e.g =2000) to improve
// the performance. If this value =0, all inner points will be taken into account.
// Default value=0
aFinder.SetNbPntsMax(100);
* \param theShape - the shape to explore
* \param theShapeType - type of sub-shape of theShape
* \param theTopLeftPoint - top left quadrangle corner
- * \param theTopRigthPoint - top right quadrangle corner
+ * \param theTopRightPoint - top right quadrangle corner
* \param theBottomLeftPoint - bottom left quadrangle corner
- * \param theBottomRigthPoint - bottom right quadrangle corner
+ * \param theBottomRightPoint - bottom right quadrangle corner
* \param theState - required state
* \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
*/
GEOMImpl_IShapesOperations::GetShapesOnQuadrangle (const Handle(GEOM_Object)& theShape,
const Standard_Integer theShapeType,
const Handle(GEOM_Object)& theTopLeftPoint,
- const Handle(GEOM_Object)& theTopRigthPoint,
+ const Handle(GEOM_Object)& theTopRightPoint,
const Handle(GEOM_Object)& theBottomLeftPoint,
- const Handle(GEOM_Object)& theBottomRigthPoint,
+ const Handle(GEOM_Object)& theBottomRightPoint,
const GEOMAlgo_State theState)
{
// Find indices
getShapesOnQuadrangleIDs( theShape,
theShapeType,
theTopLeftPoint,
- theTopRigthPoint,
+ theTopRightPoint,
theBottomLeftPoint,
- theBottomRigthPoint,
+ theBottomRightPoint,
theState);
if ( aSeqOfIDs.IsNull() || aSeqOfIDs->IsEmpty() )
return NULL;
<< theShape << ", "
<< TopAbs_ShapeEnum(theShapeType) << ", "
<< theTopLeftPoint << ", "
- << theTopRigthPoint << ", "
+ << theTopRightPoint << ", "
<< theBottomLeftPoint << ", "
- << theBottomRigthPoint << ", "
+ << theBottomRightPoint << ", "
<< theState << ")";
SetErrorCode(OK);
* \param theShape - the shape to explore
* \param theShapeType - type of sub-shape of theShape
* \param theTopLeftPoint - top left quadrangle corner
- * \param theTopRigthPoint - top right quadrangle corner
+ * \param theTopRightPoint - top right quadrangle corner
* \param theBottomLeftPoint - bottom left quadrangle corner
- * \param theBottomRigthPoint - bottom right quadrangle corner
+ * \param theBottomRightPoint - bottom right quadrangle corner
* \param theState - required state
* \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
*/
GEOMImpl_IShapesOperations::GetShapesOnQuadrangleIDs (const Handle(GEOM_Object)& theShape,
const Standard_Integer theShapeType,
const Handle(GEOM_Object)& theTopLeftPoint,
- const Handle(GEOM_Object)& theTopRigthPoint,
+ const Handle(GEOM_Object)& theTopRightPoint,
const Handle(GEOM_Object)& theBottomLeftPoint,
- const Handle(GEOM_Object)& theBottomRigthPoint,
+ const Handle(GEOM_Object)& theBottomRightPoint,
const GEOMAlgo_State theState)
{
// Find indices
getShapesOnQuadrangleIDs( theShape,
theShapeType,
theTopLeftPoint,
- theTopRigthPoint,
+ theTopRightPoint,
theBottomLeftPoint,
- theBottomRigthPoint,
+ theBottomRightPoint,
theState);
if ( aSeqOfIDs.IsNull() || aSeqOfIDs->IsEmpty() )
return NULL;
// The GetShapesOnCylinder() doesn't change object so no new function is required.
Handle(GEOM_BaseObject) lastObj = GEOM::GetCreatedLast(theShape,theTopLeftPoint);
- lastObj = GEOM::GetCreatedLast(lastObj,theTopRigthPoint);
- lastObj = GEOM::GetCreatedLast(lastObj,theBottomRigthPoint);
+ lastObj = GEOM::GetCreatedLast(lastObj,theTopRightPoint);
+ lastObj = GEOM::GetCreatedLast(lastObj,theBottomRightPoint);
lastObj = GEOM::GetCreatedLast(lastObj,theBottomLeftPoint);
Handle(GEOM_Function) aFunction = lastObj->GetLastFunction();
<< theShape << ", "
<< TopAbs_ShapeEnum(theShapeType) << ", "
<< theTopLeftPoint << ", "
- << theTopRigthPoint << ", "
+ << theTopRightPoint << ", "
<< theBottomLeftPoint << ", "
- << theBottomRigthPoint << ", "
+ << theBottomRightPoint << ", "
<< theState << ")";
#endif // DUMP_SUBSHAPE_IDS
if (aShapeResult.IsNull() == Standard_False) {
TopoDS_Iterator anIt(aShapeResult);
- Standard_Boolean isFirst = Standard_True;
for (; anIt.More(); anIt.Next()) {
const TopoDS_Shape &aPart = anIt.Value();
* \param theShape - the shape to explore
* \param theShapeType - type of sub-shape of theShape
* \param theTopLeftPoint - top left quadrangle corner
- * \param theTopRigthPoint - top right quadrangle corner
+ * \param theTopRightPoint - top right quadrangle corner
* \param theBottomLeftPoint - bottom left quadrangle corner
- * \param theBottomRigthPoint - bottom right quadrangle corner
+ * \param theBottomRightPoint - bottom right quadrangle corner
* \param theState - required state
* \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
*/
GetShapesOnQuadrangle (const Handle(GEOM_Object)& theShape,
const Standard_Integer theShapeType,
const Handle(GEOM_Object)& theTopLeftPoint,
- const Handle(GEOM_Object)& theTopRigthPoint,
+ const Handle(GEOM_Object)& theTopRightPoint,
const Handle(GEOM_Object)& theBottomLeftPoint,
- const Handle(GEOM_Object)& theBottomRigthPoint,
+ const Handle(GEOM_Object)& theBottomRightPoint,
const GEOMAlgo_State theState);
/*!
* \param theShape - the shape to explore
* \param theShapeType - type of sub-shape of theShape
* \param theTopLeftPoint - top left quadrangle corner
- * \param theTopRigthPoint - top right quadrangle corner
+ * \param theTopRightPoint - top right quadrangle corner
* \param theBottomLeftPoint - bottom left quadrangle corner
- * \param theBottomRigthPoint - bottom right quadrangle corner
+ * \param theBottomRightPoint - bottom right quadrangle corner
* \param theState - required state
* \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
*/
GetShapesOnQuadrangleIDs (const Handle(GEOM_Object)& theShape,
const Standard_Integer theShapeType,
const Handle(GEOM_Object)& theTopLeftPoint,
- const Handle(GEOM_Object)& theTopRigthPoint,
+ const Handle(GEOM_Object)& theTopRightPoint,
const Handle(GEOM_Object)& theBottomLeftPoint,
- const Handle(GEOM_Object)& theBottomRigthPoint,
+ const Handle(GEOM_Object)& theBottomRightPoint,
const GEOMAlgo_State theState);
Standard_EXPORT Handle(GEOM_Object) GetShapesOnCylinderOld (Handle(GEOM_Object) theShape,
* \param theShape - the shape to explore
* \param theShapeType - type of sub-shape of theShape
* \param theTopLeftPoint - top left quadrangle corner
- * \param theTopRigthPoint - top right quadrangle corner
+ * \param theTopRightPoint - top right quadrangle corner
* \param theBottomLeftPoint - bottom left quadrangle corner
- * \param theBottomRigthPoint - bottom right quadrangle corner
+ * \param theBottomRightPoint - bottom right quadrangle corner
* \param theState - required state
* \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
*/
getShapesOnQuadrangleIDs (const Handle(GEOM_Object)& theShape,
const Standard_Integer theShapeType,
const Handle(GEOM_Object)& theTopLeftPoint,
- const Handle(GEOM_Object)& theTopRigthPoint,
+ const Handle(GEOM_Object)& theTopRightPoint,
const Handle(GEOM_Object)& theBottomLeftPoint,
- const Handle(GEOM_Object)& theBottomRigthPoint,
+ const Handle(GEOM_Object)& theBottomRightPoint,
const GEOMAlgo_State theState);
/*!
// 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.
//
* OffsetShape
*/
//=============================================================================
-Handle(GEOM_Object) GEOMImpl_ITransformOperations::OffsetShape
- (Handle(GEOM_Object) theObject, double theOffset)
+Handle(GEOM_Object)
+GEOMImpl_ITransformOperations::OffsetShape (Handle(GEOM_Object) theObject,
+ double theOffset,
+ bool theJoinByPipes)
{
SetErrorCode(KO);
if (aFunction->GetDriverGUID() != GEOMImpl_OffsetDriver::GetID()) return NULL;
GEOMImpl_IOffset aTI (aFunction);
- aTI.SetShape(anOriginal);
- aTI.SetValue(theOffset);
+ aTI.SetShape( anOriginal );
+ aTI.SetValue( theOffset );
+ aTI.SetJoinByPipes( theJoinByPipes );
//Compute the offset
try {
* OffsetShapeCopy
*/
//=============================================================================
-Handle(GEOM_Object) GEOMImpl_ITransformOperations::OffsetShapeCopy
- (Handle(GEOM_Object) theObject, double theOffset)
+Handle(GEOM_Object)
+GEOMImpl_ITransformOperations::OffsetShapeCopy( Handle(GEOM_Object) theObject,
+ double theOffset,
+ bool theJoinByPipes)
{
SetErrorCode(KO);
if (aFunction->GetDriverGUID() != GEOMImpl_OffsetDriver::GetID()) return NULL;
GEOMImpl_IOffset aTI (aFunction);
- aTI.SetShape(anOriginal);
- aTI.SetValue(theOffset);
+ aTI.SetShape( anOriginal );
+ aTI.SetValue( theOffset );
+ aTI.SetJoinByPipes( theJoinByPipes );
//Compute the offset
try {
Handle(GEOM_Object) thePoint);
Standard_EXPORT Handle(GEOM_Object) OffsetShape (Handle(GEOM_Object) theObject,
- double theOffset);
+ double theOffset,
+ bool theJoinByPipes);
Standard_EXPORT Handle(GEOM_Object) OffsetShapeCopy (Handle(GEOM_Object) theObject,
- double theOffset);
+ double theOffset,
+ bool theJoinByPipes);
Standard_EXPORT Handle(GEOM_Object) ProjectShapeCopy (Handle(GEOM_Object) theSource,
Handle(GEOM_Object) theTarget);
// 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"
StdFail_NotDone::Raise(aMsg.ToCString());
}
- if (aType == OFFSET_SHAPE || aType == OFFSET_SHAPE_COPY) {
- BRepOffsetAPI_MakeOffsetShape MO (aShapeBase,
- aCI.GetValue(),
- aTol);
- if (MO.IsDone()) {
+ if ( aType == OFFSET_SHAPE || aType == OFFSET_SHAPE_COPY )
+ {
+ BRepOffsetAPI_MakeOffsetShape MO;
+ BRepOffset_Mode aMode = BRepOffset_Skin;
+ Standard_Boolean anIntersection = Standard_False, aSelfInter = Standard_False;
+ MO.PerformByJoin( aShapeBase,
+ aCI.GetValue(),
+ aTol,
+ aMode,
+ anIntersection,
+ aSelfInter,
+ aCI.GetJoinByPipes() ? GeomAbs_Arc : GeomAbs_Intersection );
+
+ if ( MO.IsDone() ) {
aShape = MO.Shape();
if ( !GEOMUtils::CheckShape(aShape, true) && !GEOMUtils::FixShapeTolerance(aShape) )
Standard_ConstructionError::Raise("Boolean operation aborted : non valid shape result");
}
// Create a hollowed solid.
- BRepOffsetAPI_MakeThickSolid aMkSolid
- (aShapeBase, aFacesToRm, anOffset, aTol, BRepOffset_Skin,
- Standard_False, Standard_False, GeomAbs_Intersection);
+ BRepOffsetAPI_MakeThickSolid aMkSolid;
+ aMkSolid.MakeThickSolidByJoin (aShapeBase, aFacesToRm, anOffset, aTol, BRepOffset_Skin,
+ Standard_False, Standard_False, GeomAbs_Intersection);
if (aMkSolid.IsDone()) {
aShape = aMkSolid.Shape();
#include <StdFail_NotDone.hxx>
#include <BOPAlgo_CheckerSI.hxx>
#include <BOPAlgo_Alerts.hxx>
-#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
-#include <BOPCol_ListOfShape.hxx>
+#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
#include <BOPDS_DS.hxx>
// Depth of self-intersection check (see BOPAlgo_CheckerSI::SetLevelOfCheck() for more details)
static void CheckSelfIntersection(const TopoDS_Shape &theShape)
{
BOPAlgo_CheckerSI aCSI; // checker of self-interferences
- BOPCol_ListOfShape aList;
+ TopTools_ListOfShape aList;
aList.Append(theShape);
aCSI.SetLevelOfCheck(BOP_SELF_INTERSECTIONS_LEVEL);
TopExp::MapShapes(aShape, aResIndices);
// Map: source_shape/images of source_shape in Result
- const BOPCol_IndexedDataMapOfShapeListOfShape& aMR = PS.ImagesResult();
+ const TopTools_IndexedDataMapOfShapeListOfShape& aMR = PS.ImagesResult();
//const TopTools_IndexedDataMapOfShapeListOfShape& aMR = PS.ImagesResult();
// history for all argument shapes
//
if (!aMR.Contains(anEntity)) continue;
- const BOPCol_ListOfShape& aModified = aMR.FindFromKey(anEntity);
+ const TopTools_ListOfShape& aModified = aMR.FindFromKey(anEntity);
//const TopTools_ListOfShape& aModified = aMR.FindFromKey(anEntity);
Standard_Integer nbModified = aModified.Extent();
if (nbModified > 0) { // Mantis issue 0021182
int ih = 1;
- BOPCol_ListIteratorOfListOfShape itM (aModified);
+ TopTools_ListIteratorOfListOfShape itM (aModified);
for (; itM.More() && nbModified > 0; itM.Next(), ++ih) {
if (!aResIndices.Contains(itM.Value())) {
nbModified = 0;
TDataStd_IntegerArray::Set(aWhatHistoryLabel, 1, nbModified);
int ih = 1;
- BOPCol_ListIteratorOfListOfShape itM (aModified);
+ TopTools_ListIteratorOfListOfShape itM (aModified);
//TopTools_ListIteratorOfListOfShape itM (aModified);
for (; itM.More(); itM.Next(), ++ih) {
int id = aResIndices.FindIndex(itM.Value());
// after OCCT improvement
static bool DoGroups1(const TopoDS_Shape &theProfile,
- BRepOffsetAPI_MakePipeShell &theSweep,
- TopTools_SequenceOfShape *theGroups);
+ BRepOffsetAPI_MakePipeShell &theSweep,
+ TopTools_SequenceOfShape *theGroups);
static bool CreateGroups1(const TopoDS_Shape &theProfile,
- BRepOffsetAPI_MakePipeShell &theSweep,
- GEOMImpl_IPipe *theCI);
+ BRepOffsetAPI_MakePipeShell &theSweep,
+ GEOMImpl_IPipe *theCI);
//=======================================================================
//function : GetID
//=======================================================================
//function : EvaluateBestSweepMode
-//purpose : auxilary for right call of MakePipe and MakePipeShell
+//purpose : auxiliary for right call of MakePipe and MakePipeShell
//=======================================================================
static GeomFill_Trihedron EvaluateBestSweepMode(const TopoDS_Shape& Spine)
{
//=======================================================================
//function : FillForOtherEdges
-//purpose : auxilary for CreatePipeForShellSections()
+//purpose : auxiliary for CreatePipeForShellSections()
//=======================================================================
static bool FillForOtherEdges(const TopoDS_Shape& F1,
const TopoDS_Shape& E1,
const TopoDS_Shape& V1,
TopTools_IndexedDataMapOfShapeShape& FF)
{
- //cout<<"FillForOtherEdges"<<endl;
// find other pairs for vertexes and edges
// creating map of vertex edges for both faces
TopTools_IndexedDataMapOfShapeListOfShape aMapVertEdge1;
TopExp::MapShapesAndAncestors(F1, TopAbs_VERTEX, TopAbs_EDGE, aMapVertEdge1);
- if (!FF.Contains(F1))
- MESSAGE(" FillForOtherEdges: map FF not contains key F1");
- if (!FF.Contains(E1))
- MESSAGE(" FillForOtherEdges: map FF not contains key E1");
- if (!FF.Contains(V1))
- MESSAGE(" FillForOtherEdges: map FF not contains key V1");
+ if (!FF.Contains(F1)) MESSAGE(" FillForOtherEdges: map FF not contains key F1");
+ if (!FF.Contains(E1)) MESSAGE(" FillForOtherEdges: map FF not contains key E1");
+ if (!FF.Contains(V1)) MESSAGE(" FillForOtherEdges: map FF not contains key V1");
const TopoDS_Shape& F2 = FF.FindFromKey(F1);
const TopoDS_Shape& E2 = FF.FindFromKey(E1);
const TopoDS_Shape& V2 = FF.FindFromKey(V1);
ShapeAnalysis_Edge sae;
while(1) {
- if (!aMapVertEdge1.Contains(VS1))
- MESSAGE (" FillForOtherEdges: map aMapVertEdge1 not contains key VS1");
+ if (!aMapVertEdge1.Contains(VS1)) MESSAGE (" FillForOtherEdges: map aMapVertEdge1 not contains key VS1");
const TopTools_ListOfShape& aList1 = aMapVertEdge1.FindFromKey(VS1);
- //TopoDS_Shape E1next;
TopTools_ListIteratorOfListOfShape anIter1(aList1);
if (anIter1.Value().IsSame(ES1)) {
anIter1.Next();
}
- //E1next = anIter1.Value();
- if (!aMapVertEdge2.Contains(VS2))
- MESSAGE (" FillForOtherEdges: map aMapVertEdge2 not contains key VS2");
+ if (!aMapVertEdge2.Contains(VS2)) MESSAGE (" FillForOtherEdges: map aMapVertEdge2 not contains key VS2");
const TopTools_ListOfShape& aList2 = aMapVertEdge2.FindFromKey(VS2);
- //TopoDS_Shape E2next;
TopTools_ListIteratorOfListOfShape anIter2(aList2);
if (anIter2.Value().IsSame(ES2)) {
anIter2.Next();
}
- //E2next = anIter2.Value();
- //ES1 = TopoDS::Edge(E1next);
- //ES2 = TopoDS::Edge(E2next);
ES1 = TopoDS::Edge(anIter1.Value());
ES2 = TopoDS::Edge(anIter2.Value());
if (!FF.Contains(ES1)) {
//=======================================================================
//function : FillCorrespondingEdges
-//purpose : auxilary for CreatePipeForShellSections()
+//purpose : auxiliary for CreatePipeForShellSections()
//=======================================================================
static bool FillCorrespondingEdges(const TopoDS_Shape& FS1,
const TopoDS_Shape& FS2,
const TopoDS_Wire& aWirePath,
TopTools_IndexedDataMapOfShapeShape& FF)
{
- //cout<<"FillCorrespondingEdges"<<endl;
// find corresponding edges
TopExp_Explorer expw1(FS1,TopAbs_WIRE);
TopoDS_Wire aWire1 = TopoDS::Wire(expw1.Current());
TopoDS_Vertex V21 = sae.LastVertex(E1);
gp_Pnt P11 = BRep_Tool::Pnt(V11);
gp_Pnt P21 = BRep_Tool::Pnt(V21);
- //cout<<"P11("<<P11.X()<<","<<P11.Y()<<","<<P11.Z()<<")"<<endl;
- //cout<<"P21("<<P21.X()<<","<<P21.Y()<<","<<P21.Z()<<")"<<endl;
// find corresponding vertexes from created shape
TopoDS_Vertex VN11,VN21;
for (exp.Init(aShape, TopAbs_VERTEX); exp.More(); exp.Next()) {
TopoDS_Vertex V12,V22;
gp_Pnt PN12 = BRep_Tool::Pnt(VN12);
gp_Pnt PN22 = BRep_Tool::Pnt(VN22);
- //cout<<"PN12("<<PN12.X()<<","<<PN12.Y()<<","<<PN12.Z()<<")"<<endl;
- //cout<<"PN22("<<PN22.X()<<","<<PN22.Y()<<","<<PN22.Z()<<")"<<endl;
TopoDS_Edge E2;
TopExp_Explorer expe;
for (expe.Init(FS2, TopAbs_EDGE); expe.More(); expe.Next()) {
//=======================================================================
//function : FillCorrespondingEdges
-//purpose : auxilary for CreatePipeShellsWithoutPath()
+//purpose : auxiliary for CreatePipeShellsWithoutPath()
//=======================================================================
static bool FillCorrespondingEdges(const TopoDS_Shape& FS1,
const TopoDS_Shape& FS2,
const TopoDS_Vertex& aLoc2,
TopTools_IndexedDataMapOfShapeShape& FF)
{
- //cout<<"FillCorrespondingEdges"<<endl;
-
gp_Pnt P1 = BRep_Tool::Pnt(aLoc1);
gp_Pnt P2 = BRep_Tool::Pnt(aLoc2);
gp_Vec aDir(P1,P2);
TopoDS_Vertex V2 = sae.LastVertex(E1);
gp_Pnt Ptmp1 = BRep_Tool::Pnt(V1);
gp_Pnt Ptmp2 = BRep_Tool::Pnt(V2);
- //cout<<"P11("<<P11.X()<<","<<P11.Y()<<","<<P11.Z()<<")"<<endl;
- //cout<<"P21("<<P21.X()<<","<<P21.Y()<<","<<P21.Z()<<")"<<endl;
if (P1.Distance(Ptmp1)<tol) {
V21 = V2;
break;
//=======================================================================
//function : FindNextPairOfFaces
-//purpose : auxilary for CreatePipeForShellSections()
+//purpose : auxiliary for CreatePipeForShellSections()
//=======================================================================
static void FindNextPairOfFaces(const TopoDS_Shape& aCurFace,
TopTools_IndexedDataMapOfShapeListOfShape& aMapEdgeFaces1,
TopTools_IndexedDataMapOfShapeShape& FF,
GEOMImpl_IPipe* aCI)
{
- //cout<<"FindNextPairOfFaces"<<endl;
TopExp_Explorer anExp;
for (anExp.Init(aCurFace, TopAbs_EDGE); anExp.More(); anExp.Next()) {
TopoDS_Shape E1 = anExp.Current();
if (aCI) delete aCI;
Standard_ConstructionError::Raise("FindNextPairOfFaces: Can not find edge in map");
}
- if (!FF.Contains(E1))
- MESSAGE (" FindNextPairOfFaces: map FF not contains key E1");
+ if (!FF.Contains(E1)) MESSAGE (" FindNextPairOfFaces: map FF not contains key E1");
const TopoDS_Shape& E2 = FF.FindFromKey(E1);
TopExp_Explorer anExpV;
anExpV.Init(E1, TopAbs_VERTEX);
Standard_ConstructionError::Raise("FindNextPairOfFaces: Can not find vertex in map");
}
- if (!aMapEdgeFaces1.Contains(E1))
- MESSAGE (" FindNextPairOfFaces: map aMapEdgeFaces1 not contains key E1");
+ if (!aMapEdgeFaces1.Contains(E1)) MESSAGE (" FindNextPairOfFaces: map aMapEdgeFaces1 not contains key E1");
const TopTools_ListOfShape& aList1 = aMapEdgeFaces1.FindFromKey(E1);
if (aList1.Extent()<2)
continue;
if (FF.Contains(F1other))
continue;
- if (!FF.Contains(aCurFace))
- MESSAGE (" FindNextPairOfFaces: map FF not contains key aCurFace");
+ if (!FF.Contains(aCurFace)) MESSAGE (" FindNextPairOfFaces: map FF not contains key aCurFace");
const TopoDS_Shape& F2 = FF.FindFromKey(aCurFace);
- if (!aMapEdgeFaces2.Contains(E2))
- MESSAGE (" FindNextPairOfFaces: map aMapEdgeFaces2 not contains key E2");
+ if (!aMapEdgeFaces2.Contains(E2)) MESSAGE (" FindNextPairOfFaces: map aMapEdgeFaces2 not contains key E2");
const TopTools_ListOfShape& aList2 = aMapEdgeFaces2.FindFromKey(E2);
if (aList2.Extent()<2) {
if (aCI) delete aCI;
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);
//=======================================================================
//function : FindFirstPairFaces
-//purpose : auxilary for Execute()
+//purpose : auxiliary for Execute()
//=======================================================================
static void FindFirstPairFaces(const TopoDS_Shape& S1, const TopoDS_Shape& S2,
TopoDS_Vertex& V1, TopoDS_Vertex& V2,
TopoDS_Shape& FS1, TopoDS_Shape& FS2)
{
- //cout<<"FindFirstPairFaces"<<endl;
-
// check if vertexes are sub-shapes of sections
gp_Pnt P1 = BRep_Tool::Pnt(V1);
gp_Pnt P2 = BRep_Tool::Pnt(V2);
}
}
- //gp_Pnt P1new = BRep_Tool::Pnt(V1new);
- //gp_Pnt P2new = BRep_Tool::Pnt(V2new);
- //cout<<" P1("<<P1.X()<<","<<P1.Y()<<","<<P1.Z()<<")"<<endl;
- //cout<<" P2("<<P2.X()<<","<<P2.Y()<<","<<P2.Z()<<")"<<endl;
- //cout<<" P1new("<<P1new.X()<<","<<P1new.Y()<<","<<P1new.Z()<<")"<<endl;
- //cout<<" P2new("<<P2new.X()<<","<<P2new.Y()<<","<<P2new.Z()<<")"<<endl;
-
// replace vertexes if it is needed
if (!V1.IsSame(V1new)) {
V1 = V1new;
//function : RemoveFaces
//purpose : This function returns theShapeFrom without faces of the shape
// theFacesToRm. It returns a shell if theShapeFrom is a solid or
-// a compound otherwise. Auxilary for CreatePipeWithDifferentSections
+// a compound otherwise. Auxiliary for CreatePipeWithDifferentSections
// method.
//=======================================================================
static TopoDS_Shape RemoveFaces(const TopoDS_Shape &theShapeFrom,
return aResult;
}
+//=======================================================================
+//function : makeSolid
+//purpose : auxilary for CreatePipeWithDifferentSections
+//=======================================================================
+Standard_Boolean makeSolid(
+ BRepOffsetAPI_MakePipeShell aBuilder,
+ const TopoDS_Shape& aSh1,
+ const TopoDS_Shape& aSh2,
+ TopoDS_Shape& aShape)
+{
+ Standard_Boolean isDone = Standard_True;
+ Standard_Integer nbPlanar = 0;
+ if (aSh1.ShapeType() == TopAbs_FACE && aSh2.ShapeType() == TopAbs_FACE)
+ {
+ Handle(Geom_Surface) aS = BRep_Tool::Surface(TopoDS::Face(aSh1));
+ if (aS->IsKind(STANDARD_TYPE(Geom_Plane))) {
+ nbPlanar++;
+ }
+ else if (aS->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) {
+ Handle(Geom_RectangularTrimmedSurface) aTS = Handle(Geom_RectangularTrimmedSurface)::DownCast(aS);
+ if (aTS->BasisSurface()->IsKind(STANDARD_TYPE(Geom_Plane))) {
+ nbPlanar++;
+ }
+ }
+ aS = BRep_Tool::Surface(TopoDS::Face(aSh2));
+ if (aS->IsKind(STANDARD_TYPE(Geom_Plane))) {
+ nbPlanar++;
+ }
+ else if (aS->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) {
+ Handle(Geom_RectangularTrimmedSurface) aTS = Handle(Geom_RectangularTrimmedSurface)::DownCast(aS);
+ if (aTS->BasisSurface()->IsKind(STANDARD_TYPE(Geom_Plane))) {
+ nbPlanar++;
+ }
+ }
+ }
+ if (nbPlanar < 2) {
+ TopoDS_Shape aPipe = aBuilder.Shape();
+ // make sewing for result
+ Handle(BRepBuilderAPI_Sewing) aSewing = new BRepBuilderAPI_Sewing;
+ Standard_Real aTol = Precision::Confusion();
+ aSewing->SetTolerance(aTol);
+ aSewing->SetFaceMode(Standard_True);
+ aSewing->SetFloatingEdgesMode(Standard_False);
+ aSewing->SetNonManifoldMode(Standard_False);
+ TopExp_Explorer anExp;
+ for (anExp.Init(aPipe, TopAbs_FACE); anExp.More(); anExp.Next()) {
+ aSewing->Add(anExp.Current());
+ }
+ aSewing->Add(aSh1);
+ aSewing->Add(aSh2);
+ aSewing->Perform();
+ aShape = aSewing->SewedShape();
+ if (aShape.ShapeType() == TopAbs_SHELL) {
+ // Build a solid.
+ BRepBuilderAPI_MakeSolid aMkSolid;
+ aMkSolid.Add(TopoDS::Shell(aShape));
+ if (!aMkSolid.IsDone()) {
+ isDone = Standard_False;
+ }
+ else {
+ TopoDS_Solid aSolid = aMkSolid.Solid();
+ BRepClass3d_SolidClassifier aSC(aSolid);
+ aSC.PerformInfinitePoint(Precision::Confusion());
+ if (aSC.State() == TopAbs_IN) {
+ aShape = aSolid.Reversed();
+ }
+ else {
+ aShape = aSolid;
+ }
+ }
+ }
+ else {
+ isDone = Standard_False;
+ }
+ }
+ else {
+ isDone = Standard_False;
+ }
+ if (!isDone) {
+ isDone = aBuilder.MakeSolid();
+ if (isDone) {
+ aShape = aBuilder.Shape();
+ }
+ }
+ return isDone;
+}
+
//=======================================================================
//function : CreatePipeWithDifferentSections
//purpose :
double tol = BRep_Tool::Tolerance(edge);
TopoDS_Vertex VF = sae.FirstVertex(edge);
gp_Pnt PF = BRep_Tool::Pnt(VF);
- //cout<<"PF("<<PF.X()<<","<<PF.Y()<<","<<PF.Z()<<")"<<endl;
if (PF.Distance(PLocs.First()) > tol) {
Standard_ConstructionError::Raise
("First location shapes is not coincided with first vertex of aWirePath");
}
}
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);
P1 = P2;
}
int LastLoc = 1;
- //cout<<"Edges.Length()="<<Edges.Length()<<endl;
for (i=2; i<=Edges.Length(); i++) {
TopoDS_Edge edge = TopoDS::Edge(Edges.Value(i));
double tol = BRep_Tool::Tolerance(edge);
// Make groups.
TopTools_SequenceOfShape aGroups[5];
- TopoDS_Shape aProfile = aTmpSeqBases.Value(1);
+ TopoDS_Shape aProfile = aTmpSeqBases.Value(1);
if (!DoGroups1(aProfile, aBuilder, aGroups)) {
Standard_ConstructionError::Raise("Generate groups failure");
}
// Make groups.
TopTools_SequenceOfShape aGroups[5];
- TopoDS_Shape aProfile = aTmpSeqBases.Value(1);
+ TopoDS_Shape aProfile = aTmpSeqBases.Value(1);
if (!DoGroups1(aProfile, aBuilder, aGroups)) {
Standard_ConstructionError::Raise("Generate groups failure");
}
Standard_Boolean isDone = BuildPipeShell(aBuilder);
- if (isDone && NeedCreateSolid) {
- isDone = aBuilder.MakeSolid();
+ if (isDone) {
+ if (NeedCreateSolid) {
+ TopoDS_Shape aSh1 = aSeqFaces.Value(1);
+ TopoDS_Shape aSh2 = aSeqFaces.Value(aSeqFaces.Length());
+ isDone = makeSolid(aBuilder, aSh1, aSh2, aShape);
+ }
+ else {
+ aShape = aBuilder.Shape();
+ }
}
if (!isDone) {
Standard_ConstructionError::Raise("Pipe construction failure");
}
- aShape = aBuilder.Shape();
if (isCreateGroups) {
// Make groups.
TopTools_SequenceOfShape aSeqGroups[5];
- TopoDS_Shape aProfile = usedBases.Value(1);
+ TopoDS_Shape aProfile = usedBases.Value(1);
if (!DoGroups1(aProfile, aBuilder, aSeqGroups)) {
Standard_ConstructionError::Raise("Generate groups failure");
}
// Fill the groups.
- Handle(TColStd_HArray1OfInteger) aGroupIds[5];
+ //Handle(TColStd_HArray1OfInteger) aGroupIds[5];
TopTools_IndexedMapOfShape anIndices;
const TopoDS_Shape aResult = aBuilder.Shape();
//=======================================================================
//function : CreatePipeForShellSections
-//purpose : auxilary for Execute()
+//purpose : auxiliary for Execute()
//=======================================================================
static TopoDS_Shape CreatePipeForShellSections(const TopoDS_Wire& aWirePath,
GEOMImpl_IPipe* aCI)
double tol = BRep_Tool::Tolerance(edge);
TopoDS_Vertex VF = sae.FirstVertex(edge);
gp_Pnt PF = BRep_Tool::Pnt(VF);
- //cout<<"PF("<<PF.X()<<","<<PF.Y()<<","<<PF.Z()<<")"<<endl;
if (PF.Distance(PLocs.First()) > tol) {
if (aCI) delete aCI;
Standard_ConstructionError::Raise
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");
}
}
aShell = TopoDS::Shell(aSewShape);
GProp_GProps aSystem;
BRepGProp::VolumeProperties(aShell, aSystem);
- if (aSystem.Mass()<0) {
- //cout<<"aSewShape is reversed"<<endl;
+ if (aSystem.Mass() < 0) {
aShell.Reverse();
}
if (BRep_Tool::IsClosed(aShell)) {
//=======================================================================
//function : CreatePipeShellsWithoutPath
-//purpose : auxilary for Execute()
+//purpose : auxiliary for Execute()
//=======================================================================
static TopoDS_Shape CreatePipeShellsWithoutPath(GEOMImpl_IPipe* aCI)
{
- //cout<<"CreatePipeShellsWithoutPath"<<endl;
int i,j;
BRep_Builder B;
for (anExp.Init(aShBase2, TopAbs_FACE); anExp.More(); anExp.Next()) {
nbf2++;
}
- //cout<<"nbf1="<<nbf1<<" nbf2="<<nbf2<<endl;
if (nbf1!=nbf2) {
if (aCI) delete aCI;
Standard_ConstructionError::Raise("Different number of faces in the sections");
if (aCI) delete aCI;
Standard_ConstructionError::Raise("Can not create correct pipe");
}
- MESSAGE (" correspondences for sub-shapes of first pair of faces is found");
+ MESSAGE (" correspondences for sub-shapes of first pair of faces found");
FindNextPairOfFaces(FS1, aMapEdgeFaces1, aMapEdgeFaces2, FF, aCI);
- MESSAGE (" other correspondences is found, make pipe for all pairs of faces");
+ MESSAGE (" other correspondences found, make pipe for all pairs of faces");
// make pipe for each pair of faces
- // auxilary map vertex->edge for created pipe edges
+ // auxiliary map vertex->edge for created pipe edges
TopTools_IndexedDataMapOfShapeShape VPE;
ShapeAnalysis_Edge sae;
- //cout<<"FF.Extent()="<<FF.Extent()<<endl;
int nbff = 0;
for (j=1; j<=FF.Extent(); j++) {
TopoDS_Shape F1 = FF.FindKey(j);
if (VPE.Contains(E1)) {
aNewFs.Append(VPE.FindFromKey(E1));
#ifdef _DEBUG_
- MESSAGE (" using existed face");
+ MESSAGE (" using existing face");
#endif
continue;
}
double fp,lp;
Handle(Geom_Curve) C1 = BRep_Tool::Curve(E1,fp,lp);
- //bool IsConicC1 = false;
- //if (C1->IsKind(STANDARD_TYPE(Geom_Conic))) {
- // IsConicC1 = true;
- // cout<<"C1 - Geom_Conic"<<endl;
- //}
if (C1->IsKind(STANDARD_TYPE(Geom_Line)) || C1->IsKind(STANDARD_TYPE(Geom_Conic))) {
C1 = new Geom_TrimmedCurve(C1,fp,lp);
}
- //if (IsConicC1) {
- // double tol = BRep_Tool::Tolerance(E1);
- // GeomConvert_ApproxCurve ApxC1(C1,tol,GeomAbs_C1,10,5);
- // C1 = ApxC1.Curve();
- //}
Handle(Geom_Curve) C3 = BRep_Tool::Curve(E3,fp,lp);
if (C3->IsKind(STANDARD_TYPE(Geom_Line)) || C3->IsKind(STANDARD_TYPE(Geom_Conic))) {
C3 = new Geom_TrimmedCurve(C3,fp,lp);
}
- //filebuf fic;
- //ostream os(&fic);
- //os.precision(15);
Handle(Geom_BSplineCurve) CE1 =
GeomConvert::CurveToBSplineCurve(C1,Convert_RationalC1);
if (CE1->Degree()<3)
aShell = TopoDS::Shell(aSewShape);
GProp_GProps aSystem;
BRepGProp::VolumeProperties(aShell, aSystem);
- if (aSystem.Mass()<0) {
- //cout<<"aSewShape is reversed"<<endl;
+ if (aSystem.Mass() < 0) {
aShell.Reverse();
}
if (BRep_Tool::IsClosed(aShell)) {
//=======================================================================
//function : CreatePipeBiNormalAlongVector
-//purpose : auxilary for Execute()
+//purpose : auxiliary for Execute()
//=======================================================================
static TopoDS_Shape CreatePipeBiNormalAlongVector(const TopoDS_Wire& aWirePath,
GEOMImpl_IPipe* aCI)
//=======================================================================
//function : FillGroups
-//purpose : auxilary for DoGroups()
+//purpose : auxiliary for DoGroups()
//=======================================================================
bool FillGroups(const TopTools_SequenceOfShape *theGroups,
const TopTools_IndexedMapOfShape &theIndices,
//=======================================================================
//function : StoreGroups
-//purpose : auxilary for CreateGroups()
+//purpose : auxiliary for CreateGroups()
//=======================================================================
void StoreGroups(GEOMImpl_IPipe *theCI,
Handle(TColStd_HArray1OfInteger) *theGroups)
//=======================================================================
//function : CreateDownUpGroups
-//purpose : auxilary for DoGroups()
+//purpose : auxiliary for DoGroups()
//=======================================================================
static bool CreateDownUpGroups(BRepPrimAPI_MakeSweep *theSweep,
TopTools_SequenceOfShape *theGroups,
//=======================================================================
//function : DoGroups1
-//purpose : auxilary for CreateGroups1()
+//purpose : auxiliary for CreateGroups1()
//=======================================================================
bool DoGroups1 (const TopoDS_Shape &theProfile,
- BRepOffsetAPI_MakePipeShell &theSweep,
- TopTools_SequenceOfShape *theGroups)
+ BRepOffsetAPI_MakePipeShell &theSweep,
+ TopTools_SequenceOfShape *theGroups)
{
Standard_Boolean isDoSides = Standard_False;
}
} else if (aSideShape.ShapeType() == TopAbs_WIRE) {
if (aMapFence.Add(aSideShape)) {
- TopExp_Explorer anExpWE (aSideShape, TopAbs_EDGE);
- for (; anExpWE.More(); anExpWE.Next()) {
- theGroups[anIdSide].Append(anExpWE.Current());
- }
- }
+ TopExp_Explorer anExpWE (aSideShape, TopAbs_EDGE);
+ for (; anExpWE.More(); anExpWE.Next()) {
+ theGroups[anIdSide].Append(anExpWE.Current());
+ }
+ }
} else {
// Only edges can be in Side1 and Side2 groups.
return false;
}
} else if (anOtherShape.ShapeType() == TopAbs_SHELL) {
if (aMapFence.Add(anOtherShape)) {
- TopExp_Explorer anExpSHF (anOtherShape, TopAbs_FACE);
- for (; anExpSHF.More(); anExpSHF.Next()) {
- theGroups[GROUP_OTHER].Append(anExpSHF.Current());
- }
+ TopExp_Explorer anExpSHF (anOtherShape, TopAbs_FACE);
+ for (; anExpSHF.More(); anExpSHF.Next()) {
+ theGroups[GROUP_OTHER].Append(anExpSHF.Current());
+ }
}
} else {
// Only faces can be in Other group.
//=======================================================================
//function : CreateGroups1
-//purpose : auxilary for Execute()
+//purpose : auxiliary for Execute()
//=======================================================================
bool CreateGroups1 (const TopoDS_Shape &theProfile,
- BRepOffsetAPI_MakePipeShell &theSweep,
- GEOMImpl_IPipe *theCI)
+ BRepOffsetAPI_MakePipeShell &theSweep,
+ GEOMImpl_IPipe *theCI)
{
if (!theCI->GetGenerateGroups()) {
// Nothing to do.
//=======================================================================
//function : DoGroups2
-//purpose : auxilary for CreateGroups()
+//purpose : auxiliary for CreateGroups()
//=======================================================================
static bool DoGroups2(const TopoDS_Shape &theProfile,
- const TopoDS_Shape &thePath,
- BRepOffsetAPI_MakePipe &theSweep,
+ const TopoDS_Shape &thePath,
+ BRepOffsetAPI_MakePipe &theSweep,
TopTools_SequenceOfShape *theGroups)
{
Standard_Boolean isDoSides = Standard_False;
//=======================================================================
//function : CreateGroups
-//purpose : auxilary for Execute()
+//purpose : auxiliary for Execute()
//=======================================================================
static bool CreateGroups2(const TopoDS_Shape &theProfile,
- const TopoDS_Shape &thePath,
- BRepOffsetAPI_MakePipe &theSweep,
- GEOMImpl_IPipe *theCI)
+ const TopoDS_Shape &thePath,
+ BRepOffsetAPI_MakePipe &theSweep,
+ GEOMImpl_IPipe *theCI)
{
if (!theCI->GetGenerateGroups()) {
// Nothing to do.
aPD << theObject << " = pl.result(";
if (myWorkingPlane.IsNull()) {
- // Add coodinates of working plane.
+ // Add coordinates of working plane.
Standard_Integer i;
aPD << "[";
Standard_Real anAngle = aCI.GetDraftAngle(); // Draft angle
Standard_Boolean isProtrusion = (aCI.GetFuseFlag()==1);
Standard_Boolean isInvert = aCI.GetInvertFlag();
- // Flag to know wether the feature is a protrusion (fuse) or a depression (cut)
+ // Flag to know whether the feature is a protrusion (fuse) or a depression (cut)
// history of the Base wire (RefBase)
Handle(GEOM_Object) aSuppObj;
unsigned int ind, nbshapes = aShapes->Length();
// add faces
- BOPCol_ListOfShape aLS;
+ TopTools_ListOfShape aLS;
for (ind = 1; ind <= nbshapes; ind++) {
Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast(aShapes->Value(ind));
TopoDS_Shape aShape_i = aRefShape->GetValue();
{
Handle(TColStd_HArray1OfReal) coords = aCI.GetCoordinates();
GEOM_Param& pntParam = AddParam( theParams, "Points");
- pntParam << ( coords->Length() ) / 3 << " points: ";
- for ( int i = coords->Lower(), nb = coords->Upper(); i <= nb; )
- pntParam << "( " << coords->Value( i++ )
- << ", " << coords->Value( i++ )
- << ", " << coords->Value( i++ ) << " ) ";
+ pntParam << ( coords->Length() / 3 ) << " points: ";
+ for ( int i = coords->Lower(), nb = coords->Upper(); i <= nb; i += 3 )
+ pntParam << "( " << coords->Value( i+0 )
+ << ", " << coords->Value( i+1 )
+ << ", " << coords->Value( i+2 ) << " ) ";
}
else
{
}
if ( !GEOMUtils::CheckShape(aShape) && !GEOMUtils::FixShapeTolerance(aShape) ) {
- //algoritm thru section creats on the arcs invalid shapes gka
- // Standard_ConstructionError::Raise("Algorithm have produced an invalid shape result");
+ //algorithm through section creates on the arcs invalid shapes gka
+ // Standard_ConstructionError::Raise("Algorithm has produced an invalid shape result");
}
aFunction->SetValue(aShape);
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
//=====================================================================================
// 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( _PTR(Study) study, 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()
{
# additional include directories
INCLUDE_DIRECTORIES(
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIR}
${LIBXML2_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${LIBXML2_DEFINITIONS}
)
# libraries to link to
SET(_link_LIBRARIES
- ${CAS_TKBRep} ${CAS_TKShHealing} ${CAS_TKMesh} ${CAS_TKGeomAlgo}
- ${CAS_TKTopAlgo}
- ${CAS_TKG2d}
- ${CAS_TKG3d}
- ${CAS_TKV3d}
- ${CAS_TKGeomBase}
- ${CAS_TKBO}
+ ${OpenCASCADE_ModelingData_LIBRARIES}
+ ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
+ ${OpenCASCADE_Visualization_LIBRARIES}
${LIBXML2_LIBRARIES}
${KERNEL_SALOMELocalTrace}
)
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);
/*!
* \brief Extract single SOLID from COMPSOLID or COMPOUND.
*
- * If the argument shape is a COMPUND or COMPSOLID and there's
+ * If the argument shape is a COMPOUND or COMPSOLID and there's
* only single simple-shape type inside, this sub-shape is returned as a result;
* otherwise, the shape is not changed.
*
INCLUDE_DIRECTORIES(
${OMNIORB_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src/GEOMImpl
${PROJECT_SOURCE_DIR}/src/GEOM
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
)
anAttrStr = SALOMEDS::AttributeString::_narrow(anAttr);
SALOMEDS::ListOfListOfStrings_var aSections = aStudy->ParseVariables(anAttrStr->Value());
ObjectStates* aStates = new ObjectStates();
- for(int i = 0; i < aSections->length(); i++) {
+ for( CORBA::ULong i = 0; i < aSections->length(); i++) {
TState aState;
SALOMEDS::ListOfStrings aListOfVars = aSections[i];
- for(int j = 0; j < aListOfVars.length(); j++) {
+ for( CORBA::ULong j = 0; j < aListOfVars.length(); j++) {
bool isVar = aStudy->IsVariable(aListOfVars[j].in());
TVariable aVar = TVariable( (char*)aListOfVars[j].in(), isVar );
aState.push_back(aVar);
{
const char* name = _impl->GetDumpName( theStudyEntry );
if ( name && strlen( name ) > 0 )
- return strdup( name );
+ return CORBA::string_dup( name );
return NULL;
}
GEOM::GEOM_BaseObject_var anObject =
GEOM::GEOM_BaseObject::_narrow(_orb->string_to_object(IORString));
if (!CORBA::is_nil(anObject)) {
- return CORBA::string_dup(anObject->GetEntry());
+ return anObject->GetEntry();
}
return 0;
}
// BEGIN: try to find existed name for current shape
if ( !aShape->_is_nil() && mytype != GEOM_GROUP)
{
- // recieve current TopoDS shape
+ // receive current TopoDS shape
CORBA::String_var entry = aShape->GetEntry();
Handle(::GEOM_Object) aGShape = Handle(::GEOM_Object)::DownCast
( _impl->GetObject( aShape->GetStudyID(), entry ));
aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_GROUP_SOLID");
aNamePrefix = "Group_Of_Solids_";
break;
+ default:
+ aNamePrefix = "Group_";
}
} else if ( mytype == GEOM_MARKER ) {
aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_LCS");
//============================================================================
// function : CreateAndPublishGroup
-// purpose : auxilary for PublishNamedShapesInStudy
+// purpose : auxiliary for PublishNamedShapesInStudy
//============================================================================
void GEOM_Gen_i::CreateAndPublishGroup(SALOMEDS::Study_ptr theStudy,
GEOM::GEOM_Object_var theMainShape,
CORBA::String_var anIORo = _orb->object_to_string(theObject);
SALOMEDS::SObject_var aSO = theStudy->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 = theStudy->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;
//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(theStudy) || CORBA::is_nil(theObject) /*|| CORBA::is_nil(theSObject)*/)
return aParts._retn();
{
GEOM::ListOfGO_var aParts = new GEOM::ListOfGO;
//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(theStudy) || CORBA::is_nil(theObject) /*|| CORBA::is_nil(theSObject)*/)
return aParts._retn();
// load plugin library
LibHandle libHandle = LoadLib( aPlatformLibName.c_str() );
if (!libHandle) {
- // report any error, if occured
+ // report any error, if occurred
#ifndef WIN32
throw(SALOME_Exception(dlerror()));
#else
if (aMainShape.IsNull()) return GEOM::GEOM_Object::_nil();
Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger(1, theIndices.length());
- for(Standard_Integer i = 0; i<theIndices.length(); i++) anArray->SetValue(i+1, theIndices[i]);
+ for(CORBA::ULong i = 0; i<theIndices.length(); i++) anArray->SetValue(i+1, theIndices[i]);
Handle(::GEOM_Object) anObject = _impl->AddSubShape(aMainShape, anArray, true);
if(anObject.IsNull()) return GEOM::GEOM_Object::_nil();
}
}
- for ( int i = 0; i < what.length(); i++ ) {
+ for ( CORBA::ULong i = 0; i < what.length(); i++ ) {
SALOMEDS::SObject_var sobj = what[i];
if ( CORBA::is_nil( sobj ) ) continue; // skip bad object
// insert the object to the use case tree
GEOMUtils::TreeModel tree;
std::string entry;
- for ( int i = 0; i < theObjectEntries.length(); i++ ) {
+ for ( CORBA::ULong i = 0; i < theObjectEntries.length(); i++ ) {
// process objects one-by-one
entry = theObjectEntries[i].in();
GEOM::GEOM_BaseObject_var anObj = GetObject( theStudy->StudyId(), entry.c_str() );
GEOMUtils::NodeLinks anEntries;
GEOMUtils::LevelInfo aLevelMap;
if ( level > 0 ) {
- if ( level-1 >= upLevelList.size() ) {
+ if ( level-1 >= (int)upLevelList.size() ) {
// create a new map
upLevelList.push_back( aLevelMap );
} else {
// get objects on that the current one depends
GEOM::ListOfGBO_var depList = gbo->GetDependency();
std::string aDepEntry;
- for( int j = 0; j < depList->length(); j++ ) {
+ for( CORBA::ULong j = 0; j < depList->length(); j++ ) {
if ( depList[j]->_is_nil() )
continue;
aDepEntry = depList[j]->GetEntry();
continue;
std::string aGoEntry = geomObj->GetEntry();
// go through dependencies of current object to check whether it depends on the given object
- for( int i = 0; i < depList->length(); i++ ) {
+ for( CORBA::ULong i = 0; i < depList->length(); i++ ) {
if ( depList[i]->_is_nil() )
continue;
if ( depList[i]->_is_equivalent( gbo ) ) {
GEOMUtils::NodeLinks anEntries;
GEOMUtils::LevelInfo aLevelMap;
anEntries.push_back( aGboEntry );
- if ( level >= downLevelList.size() ) {
+ if ( level >= (int)downLevelList.size() ) {
downLevelList.push_back( aLevelMap );
} else {
aLevelMap = downLevelList.at(level);
// purpose : Fills 3 lists that is used to clean study of redundant objects
//==============================================================================
void GEOM_Gen_i::GetEntriesToReduceStudy(SALOMEDS::Study_ptr theStudy,
- GEOM::string_array& theSelectedEntries,
- GEOM::string_array& theParentEntries,
- GEOM::string_array& theSubEntries,
- GEOM::string_array& theOtherEntries)
+ GEOM::string_array& theSelectedEntries,
+ GEOM::string_array& theParentEntries,
+ GEOM::string_array& theSubEntries,
+ GEOM::string_array& theOtherEntries)
{
std::set<std::string> aSelected, aParents, aChildren, anOthers;
- for ( int i = 0; i < theSelectedEntries.length(); i++ ) {
+ for ( CORBA::ULong i = 0; i < theSelectedEntries.length(); i++ ) {
aSelected.insert( CORBA::string_dup( theSelectedEntries[i] ) );
}
return;
// go through dependencies of current object to check whether it depends on the given object
std::string aDepEntry;
- for( int i = 0; i < depList->length(); i++ ) {
+ for( CORBA::ULong i = 0; i < depList->length(); i++ ) {
aDepEntry = depList[i]->GetEntry();
if ( depList[i]->_is_nil() ||
aDepEntry == anEntry || // skip self-depending
//=====================================================================
class GEOM_I_EXPORT GEOM_GenericOperationsCreator
{
-public:
+ public:
// Create operations
virtual GEOM_IOperations_i* Create (PortableServer::POA_ptr thePOA,
int theStudyId,
::GEOMImpl_Gen* theGenImpl) = 0;
// return the name of IDL module
//virtual std::string GetModuleName() = 0;
+ virtual ~GEOM_GenericOperationsCreator() {}
};
//=====================================================================
GEOM::find_shape_method theFindMethod,
CORBA::Boolean theAddPrefix);
- // auxilary for PublishNamedShapesInStudy
+ // auxiliary for PublishNamedShapesInStudy
void CreateAndPublishGroup(SALOMEDS::Study_ptr theStudy,
GEOM::GEOM_Object_var theMainShape,
const TopTools_IndexedMapOfShape& anIndices,
if ( theTexture.length() > 0 ) {
aTexture = new TColStd_HArray1OfByte (1, theTexture.length());
- for ( int i = 0; i < theTexture.length(); i++ )
+ for ( CORBA::ULong i = 0; i < theTexture.length(); i++ )
aTexture->SetValue( i+1, (Standard_Byte)theTexture[i] );
}
return GetOperations()->AddTexture( theWidth, theHeight, aTexture );
bool isGood = false;
if (!aShape.IsNull()) {
- // Check BOP agruments
+ // Check BOP arguments
isGood = GetOperations()->CheckBOPArguments(aShape);
}
//Set a not done flag
GetOperations()->SetNotDone();
- unsigned int nb_points = theCoords.length()/3;
+ int nb_points = theCoords.length()/3;
GEOM::ListOfBool_var aResults = new GEOM::ListOfBool;
aResults->length(nb_points);
for (int i = 0; i < 3*nb_points; i++)
tmp[i] = theCoords[i];
std::vector<bool> res = GetOperations()->AreCoordsInside(aShape, tmp, tolerance);
- for (int i = 0; i < nb_points; i++)
- aResults[i] = i < res.size() ? res[i] : false;
+ for (int i = 0, resSize = res.size(); i < nb_points; i++)
+ aResults[i] = i < resSize ? res[i] : false;
return aResults._retn();
}
CORBA::Double GetAngleBtwVectors (GEOM::GEOM_Object_ptr theShape1,
GEOM::GEOM_Object_ptr theShape2);
- // Methods for recieving radiuses of curvature of curves and surfaces
+ // Methods for receiving radiuses of curvature of curves and surfaces
// in the given point
CORBA::Double CurveCurvatureByParam (GEOM::GEOM_Object_ptr theCurve,
CORBA::Double theParam);
//Get the shapes
std::list<Handle(::GEOM_Object)> aConstraints;
- for( int ind = 0; ind < theConstraints.length(); ind++ ) {
+ for( CORBA::ULong ind = 0; ind < theConstraints.length(); ind++ ) {
Handle(::GEOM_Object) anObject = GetObjectImpl( theConstraints[ind] );
aConstraints.push_back(anObject);
}
const GEOM::ListOfLong& theIndices)
{
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
- Standard_Integer i;
//Set a not done flag
GetOperations()->SetNotDone();
if (aShape.IsNull()) return aSeq._retn();
Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger (1, theIndices.length());
- for (i = 0; i < theIndices.length(); i++)
+ for (CORBA::ULong i = 0; i < theIndices.length(); i++)
anArray->SetValue(i+1, theIndices[i]);
Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->MakeSubShapes(aShape, anArray);
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
- for (i = 0; i < aLength; i++)
+ for (int i = 0; i < aLength; i++)
aSeq[i] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i+1)));
return aSeq._retn();
(GEOM::GEOM_Object_ptr theShape,
CORBA::Long theShapeType,
GEOM::GEOM_Object_ptr theTopLeftPoint,
- GEOM::GEOM_Object_ptr theTopRigthPoint,
+ GEOM::GEOM_Object_ptr theTopRightPoint,
GEOM::GEOM_Object_ptr theBottomLeftPoint,
- GEOM::GEOM_Object_ptr theBottomRigthPoint,
+ GEOM::GEOM_Object_ptr theBottomRightPoint,
GEOM::shape_state theState)
{
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
//Get the reference objects
Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
Handle(::GEOM_Object) aTopLeftPoint = GetObjectImpl(theTopLeftPoint);
- Handle(::GEOM_Object) aTopRigthPoint = GetObjectImpl(theTopRigthPoint);
+ Handle(::GEOM_Object) aTopRightPoint = GetObjectImpl(theTopRightPoint);
Handle(::GEOM_Object) aBottomLeftPoint = GetObjectImpl(theBottomLeftPoint);
- Handle(::GEOM_Object) aBottomRigthPoint = GetObjectImpl(theBottomRigthPoint);
+ Handle(::GEOM_Object) aBottomRightPoint = GetObjectImpl(theBottomRightPoint);
if (aShape.IsNull() ||
aTopLeftPoint.IsNull() ||
- aTopRigthPoint.IsNull() ||
+ aTopRightPoint.IsNull() ||
aBottomLeftPoint.IsNull() ||
- aBottomRigthPoint.IsNull())
+ aBottomRightPoint.IsNull())
return aSeq._retn();
//Get Shapes On Quadrangle
Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->GetShapesOnQuadrangle
(aShape, theShapeType,
- aTopLeftPoint, aTopRigthPoint, aBottomLeftPoint, aBottomRigthPoint,
+ aTopLeftPoint, aTopRightPoint, aBottomLeftPoint, aBottomRightPoint,
ShapeState(theState));
if (!GetOperations()->IsDone() || aHSeq.IsNull())
return aSeq._retn();
(GEOM::GEOM_Object_ptr theShape,
CORBA::Long theShapeType,
GEOM::GEOM_Object_ptr theTopLeftPoint,
- GEOM::GEOM_Object_ptr theTopRigthPoint,
+ GEOM::GEOM_Object_ptr theTopRightPoint,
GEOM::GEOM_Object_ptr theBottomLeftPoint,
- GEOM::GEOM_Object_ptr theBottomRigthPoint,
+ GEOM::GEOM_Object_ptr theBottomRightPoint,
GEOM::shape_state theState)
{
GEOM::ListOfLong_var aSeq = new GEOM::ListOfLong;
//Get the reference objects
Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
Handle(::GEOM_Object) aTopLeftPoint = GetObjectImpl(theTopLeftPoint);
- Handle(::GEOM_Object) aTopRigthPoint = GetObjectImpl(theTopRigthPoint);
+ Handle(::GEOM_Object) aTopRightPoint = GetObjectImpl(theTopRightPoint);
Handle(::GEOM_Object) aBottomLeftPoint = GetObjectImpl(theBottomLeftPoint);
- Handle(::GEOM_Object) aBottomRigthPoint = GetObjectImpl(theBottomRigthPoint);
+ Handle(::GEOM_Object) aBottomRightPoint = GetObjectImpl(theBottomRightPoint);
if (aShape.IsNull() ||
aTopLeftPoint.IsNull() ||
- aTopRigthPoint.IsNull() ||
+ aTopRightPoint.IsNull() ||
aBottomLeftPoint.IsNull() ||
- aBottomRigthPoint.IsNull() )
+ aBottomRightPoint.IsNull() )
return aSeq._retn();
//Get Shapes On Quadrangle
Handle(TColStd_HSequenceOfInteger) aHSeq = GetOperations()->GetShapesOnQuadrangleIDs
(aShape, theShapeType,
- aTopLeftPoint, aTopRigthPoint, aBottomLeftPoint, aBottomRigthPoint,
+ aTopLeftPoint, aTopRightPoint, aBottomLeftPoint, aBottomRightPoint,
ShapeState(theState));
if (!GetOperations()->IsDone() || aHSeq.IsNull())
return aSeq._retn();
GEOM::ListOfGO* GetShapesOnQuadrangle (GEOM::GEOM_Object_ptr theShape,
CORBA::Long theShapeType,
GEOM::GEOM_Object_ptr theTopLeftPoint,
- GEOM::GEOM_Object_ptr theTopRigthPoint,
+ GEOM::GEOM_Object_ptr theTopRightPoint,
GEOM::GEOM_Object_ptr theBottomLeftPoint,
- GEOM::GEOM_Object_ptr theBottomRigthPoint,
+ GEOM::GEOM_Object_ptr theBottomRightPoint,
GEOM::shape_state theState);
GEOM::ListOfLong* GetShapesOnPlaneIDs (GEOM::GEOM_Object_ptr theShape,
GEOM::ListOfLong* GetShapesOnQuadrangleIDs (GEOM::GEOM_Object_ptr theShape,
CORBA::Long theShapeType,
GEOM::GEOM_Object_ptr theTopLeftPoint,
- GEOM::GEOM_Object_ptr theTopRigthPoint,
+ GEOM::GEOM_Object_ptr theTopRightPoint,
GEOM::GEOM_Object_ptr theBottomLeftPoint,
- GEOM::GEOM_Object_ptr theBottomRigthPoint,
+ GEOM::GEOM_Object_ptr theBottomRightPoint,
GEOM::shape_state theState);
GEOM::ListOfGO* GetShapesOnBox (GEOM::GEOM_Object_ptr theBox,
* OffsetShape
*/
//=============================================================================
-GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::OffsetShape
- (GEOM::GEOM_Object_ptr theObject,
- CORBA::Double theOffset)
+GEOM::GEOM_Object_ptr
+GEOM_ITransformOperations_i::OffsetShape (GEOM::GEOM_Object_ptr theObject,
+ CORBA::Double theOffset,
+ CORBA::Boolean theJoinByPipes)
{
GEOM::GEOM_Object_var aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
if (aBasicObject.IsNull()) return aGEOMObject._retn();
//Create the offset shape
- GetOperations()->OffsetShape(aBasicObject, theOffset);
+ GetOperations()->OffsetShape( aBasicObject, theOffset, theJoinByPipes );
// Update GUI.
UpdateGUIForObject(theObject);
* OffsetShapeCopy
*/
//=============================================================================
-GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::OffsetShapeCopy
- (GEOM::GEOM_Object_ptr theObject,
- CORBA::Double theOffset)
+GEOM::GEOM_Object_ptr
+GEOM_ITransformOperations_i::OffsetShapeCopy (GEOM::GEOM_Object_ptr theObject,
+ CORBA::Double theOffset,
+ CORBA::Boolean theJoinByPipes)
{
GEOM::GEOM_Object_var aGEOMObject;
if (aBasicObject.IsNull()) return aGEOMObject._retn();
//Create the offset shape
- Handle(::GEOM_Object) anObject = GetOperations()->OffsetShapeCopy(aBasicObject, theOffset);
+ Handle(::GEOM_Object) anObject =
+ GetOperations()->OffsetShapeCopy(aBasicObject, theOffset, theJoinByPipes);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GEOM::GEOM_Object_ptr thePoint);
GEOM::GEOM_Object_ptr OffsetShape (GEOM::GEOM_Object_ptr theObject,
- CORBA::Double theOffset);
+ CORBA::Double theOffset,
+ CORBA::Boolean theJoinByPipes);
GEOM::GEOM_Object_ptr OffsetShapeCopy (GEOM::GEOM_Object_ptr theObject,
- CORBA::Double theOffset);
+ CORBA::Double theOffset,
+ CORBA::Boolean theJoinByPipes);
GEOM::GEOM_Object_ptr ProjectShapeCopy (GEOM::GEOM_Object_ptr theSource,
GEOM::GEOM_Object_ptr theTarget);
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
)
beginService( " GEOM_Superv_i::OffsetShape" );
MESSAGE("GEOM_Superv_i::OffsetShape");
getTransfOp();
- GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShape(theObject, theOffset);
+ GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShape(theObject, theOffset, true);
endService( " GEOM_Superv_i::OffsetShape" );
return anObj;
}
beginService( " GEOM_Superv_i::OffsetShapeCopy" );
MESSAGE("GEOM_Superv_i::OffsetShapeCopy");
getTransfOp();
- GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShapeCopy(theObject, theOffset);
+ GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShapeCopy(theObject, theOffset, true);
endService( " GEOM_Superv_i::OffsetShapeCopy" );
return anObj;
}
## Display the geometrical shape whose entry is given by \em entry.
# You should prefer use this function instead of the
- # displayShapeByName() which can have an unpredictible behavior in
+ # displayShapeByName() which can have an unpredictable behavior in
# the case where several objects exist with the same name in the study.
def displayShapeByEntry(self, shapeStudyEntry, color = None, fit=True):
"""
Display the geometrical shape whose entry is given by
`entry`. You should prefer use this function instead of the
- displayShapeByName which can have an unpredictible behavior in
+ displayShapeByName which can have an unpredictable behavior in
the case where several objects exist with the same name in the
study.
"""
# Helper functions for a complete suppression of a shape from the
# SALOME session.
# ======================================================================
- ## This completly deletes a geom shape.
+ ## This completely deletes a geom shape.
# \warning Please be aware that to delete a geom object,
# you have three operations to perform:
#
# 3. destroy the underlying geom object
def deleteShape(self,shapeStudyEntry):
"""
- This completly deletes a geom shape.
+ This completely deletes a geom shape.
WARNING: please be aware that to delete a geom object, you have
three operations to perform:
gst.eraseShapeByEntry(sphereStudyEntry)
# --------------------------------------------------
- # In this last example, we completly delete an object from the
+ # In this last example, we completely delete an object from the
# SALOME session (erase from viewer, remove from study and finnaly
# destroy the object). This is done by a simple call to
# deleteShape().
geompy = geomBuilder.New(salome.myStudy)
geompy.addToStudy( wire, 'mysketch' )
-Additionnal examples can be found as unit tests in the source code.
+Additional examples can be found as unit tests in the source code.
"""
geompyEnable = True
MultiRot2Dt = geompy.MultiRotate2DNbTimes(Chamfer, vx, nbtimes1, step1, nbtimes2)
MultiRot2Ds = geompy.MultiRotate2DByStep(Chamfer, vx, angle1, nbtimes1, step1, nbtimes2)
- #Create Informations objects
+ #Create Information objects
CDG = geompy.MakeCDG(Prism) #(GEOM_Object)->GEOM_Object
Archimede = geompy.Archimede(Box, weight, waterdensity,
meshingdeflection) #(GEOM_Object, 3 Doubles)->GEOM_Object
# 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
for aface in afaces:
ssname = "Reflection of face " + `ifa` + " of box " + `ibb` + " (by history)"
if ibb == 6 and (ifa == 2 or ifa == 4):
- # use IDL interface directly to avoid error message appearence in Python console
+ # use IDL interface directly to avoid error message appearance in Python console
refl_box_face = geompy.ShapesOp.GetInPlaceByHistory(part, aface)
if refl_box_face is not None:
geompy.addToStudyInFather(part, refl_box_face, ssname)
# 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
def MakeMirrorByPoint(s, point):
"""
- Creates a symmetric object by point symetry
+ Creates a symmetric object by point symmetry
"""
return fkl
def MakeMirrorByLine(s, line):
"""
- Creates a symmetric object by line symetry
+ Creates a symmetric object by line symmetry
"""
return fkl
def MakeMirrorByPlane(s, pt, ve):
"""
- Creates a symmetric object by plane symetry defined by a point and a normal vector
+ Creates a symmetric object by plane symmetry defined by a point and a normal vector
"""
p = plane(pt, ve)
r = geompy.MakeMirrorByplane(s, p)
"""
return fkl
-# Acces operators
+# Access operators
# ---------------
def getCoords(v):
## vertices = geompy.SubShapeAll(box, geomBuilder.ShapeType['VERTEX'])
## # only 5 first vertices will be published, with default names
## print len(vertices)
-## # note, that result value still containes all 8 vertices
+## # note, that result value still contains all 8 vertices
## geompy.addToStudyAuto(-1) # disable automatic publication
## @endcode
##
# in place of sub-shapes of the first argument,
# because the whole shape corresponds to the first argument.
# Mainly to be used after transformations, but it also can be
- # usefull after partition with one object shape, and some other
+ # useful after partition with one object shape, and some other
# operations, where only the first argument has to be considered.
# If theObject has only one argument shape, this flag is automatically
# considered as True, not regarding really passed value.
in place of sub-shapes of the first argument,
because the whole shape corresponds to the first argument.
Mainly to be used after transformations, but it also can be
- usefull after partition with one object shape, and some other
+ useful after partition with one object shape, and some other
operations, where only the first argument has to be considered.
If theObject has only one argument shape, this flag is automatically
considered as True, not regarding really passed value.
# in place of sub-shapes of the first argument,
# because the whole shape corresponds to the first argument.
# Mainly to be used after transformations, but it also can be
- # usefull after partition with one object shape, and some other
+ # useful after partition with one object shape, and some other
# operations, where only the first argument has to be considered.
# If theObject has only one argument shape, this flag is automatically
# considered as True, not regarding really passed value.
in place of sub-shapes of the first argument,
because the whole shape corresponds to the first argument.
Mainly to be used after transformations, but it also can be
- usefull after partition with one object shape, and some other
+ useful after partition with one object shape, and some other
operations, where only the first argument has to be considered.
If theObject has only one argument shape, this flag is automatically
considered as True, not regarding really passed value.
return anObj
## Create a line, passing through the given point
- # and parrallel to the given direction
+ # and parallel to the given direction
# @param thePnt Point. The resulting line will pass through it.
# @param theDir Direction. The resulting line will be parallel to it.
# @param theName Object name; when specified, this parameter is used
def MakeLine(self, thePnt, theDir, theName=None):
"""
Create a line, passing through the given point
- and parrallel to the given direction
+ and parallel to the given direction
Parameters:
thePnt Point. The resulting line will pass through it.
# possible to generate groups along with the result by means of
# setting the flag \a IsGenerateGroups.<BR>
# If \a thePath is a closed edge or wire and \a IsGenerateGroups is
- # set, an error is occured. If \a thePath is not closed edge/wire,
+ # set, an error is occurred. If \a thePath is not closed edge/wire,
# the following groups are returned:
# - If \a theBase is unclosed edge or wire: "Down", "Up", "Side1",
# "Side2";
possible to generate groups along with the result by means of
setting the flag IsGenerateGroups.
If thePath is a closed edge or wire and IsGenerateGroups is
- set, an error is occured. If thePath is not closed edge/wire,
+ set, an error is occurred. If thePath is not closed edge/wire,
the following groups are returned:
- If theBase is unclosed edge or wire: "Down", "Up", "Side1",
"Side2";
## Create a shape by extrusion of the profile shape along
# the path shape. This function is used only for debug pipe
# functionality - it is a version of function MakePipeWithShellSections()
- # which give a possibility to recieve information about
+ # which give a possibility to receive information about
# creating pipe between each pair of sections step by step.
@ManageTransactions("PrimOp")
def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
the path shape. This function is used only for debug pipe
functionality - it is a version of previous function
geompy.MakePipeWithShellSections() which give a possibility to
- recieve information about creating pipe between each pair of
+ receive information about creating pipe between each pair of
sections step by step.
"""
res = []
# @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.
# @param theShape Shape to find sub-shapes of.
# @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
# @param theTopLeftPoint Point, specifying top left corner of a quadrangle
- # @param theTopRigthPoint Point, specifying top right corner of a quadrangle
+ # @param theTopRightPoint Point, specifying top right corner of a quadrangle
# @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
- # @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
+ # @param theBottomRightPoint Point, specifying bottom right corner of a quadrangle
# @param theState The state of the sub-shapes to find (see GEOM::shape_state)
# @param theName Object name; when specified, this parameter is used
# for result publication in the study. Otherwise, if automatic
# @ref swig_GetShapesOnQuadrangle "Example"
@ManageTransactions("ShapesOp")
def GetShapesOnQuadrangle(self, theShape, theShapeType,
- theTopLeftPoint, theTopRigthPoint,
- theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
+ theTopLeftPoint, theTopRightPoint,
+ theBottomLeftPoint, theBottomRightPoint, theState, theName=None):
"""
Find in theShape all sub-shapes of type theShapeType, situated relatively
the specified quadrangle by the certain way, defined through theState parameter.
theShape Shape to find sub-shapes of.
theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
theTopLeftPoint Point, specifying top left corner of a quadrangle
- theTopRigthPoint Point, specifying top right corner of a quadrangle
+ theTopRightPoint Point, specifying top right corner of a quadrangle
theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
- theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
+ theBottomRightPoint Point, specifying bottom right corner of a quadrangle
theState The state of the sub-shapes to find (see GEOM::shape_state)
theName Object name; when specified, this parameter is used
for result publication in the study. Otherwise, if automatic
"""
# Example: see GEOM_TestOthers.py
aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
- theTopLeftPoint, theTopRigthPoint,
- theBottomLeftPoint, theBottomRigthPoint, theState)
+ theTopLeftPoint, theTopRightPoint,
+ theBottomLeftPoint, theBottomRightPoint, theState)
RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
self._autoPublish(aList, theName, "shapeOnQuadrangle")
return aList
# @param theShape Shape to find sub-shapes of.
# @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
# @param theTopLeftPoint Point, specifying top left corner of a quadrangle
- # @param theTopRigthPoint Point, specifying top right corner of a quadrangle
+ # @param theTopRightPoint Point, specifying top right corner of a quadrangle
# @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
- # @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
+ # @param theBottomRightPoint Point, specifying bottom right corner of a quadrangle
# @param theState The state of the sub-shapes to find (see GEOM::shape_state)
#
# @return List of all found sub-shapes indices.
# @ref swig_GetShapesOnQuadrangleIDs "Example"
@ManageTransactions("ShapesOp")
def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
- theTopLeftPoint, theTopRigthPoint,
- theBottomLeftPoint, theBottomRigthPoint, theState):
+ theTopLeftPoint, theTopRightPoint,
+ theBottomLeftPoint, theBottomRightPoint, theState):
"""
Find in theShape all sub-shapes of type theShapeType, situated relatively
the specified quadrangle by the certain way, defined through theState parameter.
theShape Shape to find sub-shapes of.
theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
theTopLeftPoint Point, specifying top left corner of a quadrangle
- theTopRigthPoint Point, specifying top right corner of a quadrangle
+ theTopRightPoint Point, specifying top right corner of a quadrangle
theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
- theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
+ theBottomRightPoint Point, specifying bottom right corner of a quadrangle
theState The state of the sub-shapes to find (see GEOM::shape_state)
Returns:
# Example: see GEOM_TestOthers.py
aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
- theTopLeftPoint, theTopRigthPoint,
- theBottomLeftPoint, theBottomRigthPoint, theState)
+ theTopLeftPoint, theTopRightPoint,
+ theBottomLeftPoint, theBottomRightPoint, theState)
RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
return aList
# publication is switched on, default value is used for result name.
#
# @return [\a status, \a theClosedWires, \a theOpenWires]
- # \n \a status: FALSE, if an error(s) occured during the method execution.
+ # \n \a status: FALSE, if an error(s) occurred during the method execution.
# \n \a theClosedWires: Closed wires on the free boundary of the given shape.
# \n \a theOpenWires: Open wires on the free boundary of the given shape.
#
Returns:
[status, theClosedWires, theOpenWires]
- status: FALSE, if an error(s) occured during the method execution.
+ status: FALSE, if an error(s) occurred during the method execution.
theClosedWires: Closed wires on the free boundary of the given shape.
theOpenWires: Open wires on the free boundary of the given shape.
"""
# @param ListRemoveInside Shapes, inside which the results will be deleted.
# Each shape from theRemoveInside must belong to theShapes also.
# @param RemoveWebs If TRUE, perform Glue 3D algorithm.
- # @param ListMaterials Material indices for each shape. Make sence,
+ # @param ListMaterials Material indices for each shape. Make sense,
# only if theRemoveWebs is TRUE.
#
# @return New GEOM.GEOM_Object, containing the result shapes.
ListRemoveInside Shapes, inside which the results will be deleted.
Each shape from theRemoveInside must belong to theShapes also.
RemoveWebs If TRUE, perform Glue 3D algorithm.
- ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
+ ListMaterials Material indices for each shape. Make sense, only if theRemoveWebs is TRUE.
Returns:
New GEOM.GEOM_Object, containing the result shapes.
"""
theOffset, Parameters = ParseParameters(theOffset)
if theCopy:
- anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
+ anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset, True)
else:
- anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
+ anObj = self.TrsfOp.OffsetShape(theObject, theOffset, True)
RaiseIfFailed("Offset", self.TrsfOp)
anObj.SetParameters(Parameters)
return anObj
- ## Create new object as offset of the given one.
+ ## Create new object as offset of the given one. Gap between two adjacent
+ # offset surfaces is filled by a pipe.
# @param theObject The base object for the offset.
# @param theOffset Offset value.
# @param theName Object name; when specified, this parameter is used
#
# @return New GEOM.GEOM_Object, containing the offset object.
#
+ # @sa MakeOffsetIntersectionJoin
# @ref tui_offset "Example"
@ManageTransactions("TrsfOp")
def MakeOffset(self, theObject, theOffset, theName=None):
"""
- Create new object as offset of the given one.
+ Create new object as offset of the given one. Gap between adjacent
+ offset surfaces is filled by a pipe.
Parameters:
theObject The base object for the offset.
"""
# Example: see GEOM_TestAll.py
theOffset, Parameters = ParseParameters(theOffset)
- anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
+ anObj = self.TrsfOp.OffsetShapeCopy( theObject, theOffset, True )
+ RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
+ anObj.SetParameters(Parameters)
+ self._autoPublish(anObj, theName, "offset")
+ return anObj
+
+ ## Create new object as offset of the given one. Gap between adjacent
+ # offset surfaces is filled by extending and intersecting them.
+ # @param theObject The base object for the offset.
+ # @param theOffset Offset value.
+ # @param theName Object name; when specified, this parameter is used
+ # for result publication in the study. Otherwise, if automatic
+ # publication is switched on, default value is used for result name.
+ #
+ # @return New GEOM.GEOM_Object, containing the offset object.
+ #
+ # @sa MakeOffset
+ # @ref tui_offset "Example"
+ @ManageTransactions("TrsfOp")
+ def MakeOffsetIntersectionJoin(self, theObject, theOffset, theName=None):
+ """
+ Create new object as offset of the given one. Gap between adjacent
+ offset surfaces is filled by extending and intersecting them.
+
+ Parameters:
+ theObject The base object for the offset.
+ theOffset Offset value.
+ theName Object name; when specified, this parameter is used
+ for result publication in the study. Otherwise, if automatic
+ publication is switched on, default value is used for result name.
+
+ Returns:
+ New GEOM.GEOM_Object, containing the offset object.
+
+ Example of usage:
+ box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
+ # create a new box extended by 70
+ offset = geompy.MakeOffsetIntersectionJoin(box, 70.)
+ """
+ # Example: see GEOM_TestAll.py
+ theOffset, Parameters = ParseParameters( theOffset )
+ anObj = self.TrsfOp.OffsetShapeCopy( theObject, theOffset, False )
RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
anObj.SetParameters(Parameters)
self._autoPublish(anObj, theName, "offset")
self._autoPublish(anObj, theName, "chamfer")
return anObj
- ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
+ ## The Same that MakeChamferFaces() but with params theD is chamfer length and
# theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
#
# @ref swig_FilletChamfer "Example"
@ManageTransactions("LocalOp")
def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
"""
- The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
+ The Same that geompy.MakeChamferFaces but with params theD is chamfer length and
theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
"""
flag = False
self._autoPublish(anObj, theName, "chamfer")
return anObj
- ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
+ ## The Same that MakeChamferEdges() but with params theD is chamfer length and
# theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
@ManageTransactions("LocalOp")
def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
"""
- The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
+ The Same that geompy.MakeChamferEdges but with params theD is chamfer length and
theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
"""
flag = False
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.
## Build all possible propagation groups.
# Propagation group is a set of all edges, opposite to one (main)
# edge of this group directly or through other opposite edges.
- # Notion of Opposite Edge make sence only on quadrangle face.
+ # Notion of Opposite Edge make sense only on quadrangle face.
# @param theShape Shape to build propagation groups on.
# @param theName Object name; when specified, this parameter is used
# for result publication in the study. Otherwise, if automatic
Build all possible propagation groups.
Propagation group is a set of all edges, opposite to one (main)
edge of this group directly or through other opposite edges.
- Notion of Opposite Edge make sence only on quadrangle face.
+ Notion of Opposite Edge make sense only on quadrangle face.
Parameters:
theShape Shape to build propagation groups on.
return aType
## Convert a type of geom object from id to string value
- # @param theId is a GEOM obect type id.
+ # @param theId is a GEOM object type id.
# @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
# @ref swig_GetType "Example"
def ShapeIdToType(self, theId):
Convert a type of geom object from id to string value
Parameters:
- theId is a GEOM obect type id.
+ theId is a GEOM object type id.
Returns:
type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
# # update object browser
# salome.sg.updateObjBrowser(True)
# @endcode
-# @n Additionnal examples can be found as unit tests in the source code.
+# @n Additional examples can be found as unit tests in the source code.
# @}
"""
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
/*!
\brief Set number of iso-lines to the presentation
\param theEntry geometry object's entry
- \param theNbU number of iso-lines along U axis (interger value >= 0)
- \param theNbV number of iso-lines along V axis (interger value >= 0)
+ \param theNbU number of iso-lines along U axis (integer value >= 0)
+ \param theNbV number of iso-lines along V axis (integer value >= 0)
\param theUpdateViewer \c true to update active view's contents
*/
void GEOM_Swig::setIsos( const char* theEntry, int theNbU, int theNbV, bool theUpdateViewer )
/*!
\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()
{
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
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;
}
// local selection
if (!myMainObj->_is_nil() &&
!myEditCurrentArgument &&
- myIsShapeType) // check if shape type is already choosen by user
+ myIsShapeType) // check if shape type is already chosen by user
{
GEOM_Displayer* aDisplayer = getDisplayer();
# additional include directories
INCLUDE_DIRECTORIES(
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
${PROJECT_SOURCE_DIR}/src/GEOMAlgo
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
)
# libraries to link to
SET(_link_engine_LIBRARIES
- ${CAS_TKIGES}
+ ${OpenCASCADE_DataExchange_LIBRARIES}
${KERNEL_SALOMELocalTrace}
${KERNEL_OpUtil}
SalomeIDLGEOM
getGeometryGUI()->getApp()->putInfo( tr("GEOM_PRP_COMMAND").arg( theCommandID ) );
}
- return true;
+ return true; // ?????????????
}
//=======================================================================
${QT_INCLUDE_DIRS}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
SET(_link_LIBRARIES
GEOMObject
GEOMClient
- ${CAS_TKBRep}
+ ${OpenCASCADE_ModelingData_LIBRARIES}
${KERNEL_SALOMELocalTrace}
${GUI_SalomeApp}
)
}
/*!
- \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 )
{
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
/*!
* \class MeasureGUI_AnnotationInteractor
* \brief Class implementing logical layer for interactive dragging of annotation
- * labels. It includes two components: listener for GUI events occuring
+ * labels. It includes two components: listener for GUI events occurring
* inside of OCCT 3D viewer and processor for hooked events to perform
* interactive modification of the selected annotation within current
* AIS context.
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;
Handle(AIS_DiameterDimension) aDimension = new AIS_DiameterDimension( aRuledCirc, aPln );
// if flyout is extended in tangent direction to circle, the default flyout value is used
- // if flyout is extended in plane of circle, the zero flyout value is choosen initially
+ // if flyout is extended in plane of circle, the zero flyout value is chosen initially
Standard_Real aFlyout = aCircN.IsParallel( aPln.Axis().Direction(), Precision::Angular() ) ? 0.0 : Settings.DefaultFlyout;
aDimension->SetFlyout(aFlyout);
// flyout plane to best match the current view projection (if any)
// The points are aligned to XOY, YOZ, ZOX planes.
// The flyout takes into account bounding box of main shape of face normal
-// vector. The flyouts tangetial to the circle plane are directed in
+// vector. The flyouts tangential to the circle plane are directed in
// accordance with the face normal (if not-null), otherwise the flyouts
// are turned to direct to the closest border of bounding box.
//=================================================================================
{
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;
// function : OnGaps()
// purpose :
//=================================================================================
-void MeasureGUI_FastCheckIntersectionsDlg::OnGaps(bool cheked)
+void MeasureGUI_FastCheckIntersectionsDlg::OnGaps(bool checked)
{
clear();
- myTolerance->setEnabled(cheked);
+ myTolerance->setEnabled(checked);
}
//=================================================================================
// function : SelectionIntoArgument
//=================================================================================
void MeasureGUI_ManageDimensionsDlg::OnShowAll()
{
- // read propety data
+ // read property data
SalomeApp_Application* anApp = myGeomGUI->getApp();
if ( !anApp )
{
//=================================================================================
void MeasureGUI_ManageDimensionsDlg::OnHideAll()
{
- // read propety data
+ // read property data
SalomeApp_Application* anApp = myGeomGUI->getApp();
if ( !anApp )
{
// 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(getStudyId());
}
-#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)
{
int aPrecision = resMgr->integerValue( "Geometry", "length_precision", 6 );
QString aTypePrefix = myCBTypes->currentText().replace(' ', '_');
QString objIOR, aMin, aMax, aGroupName;
- SalomeApp_Study* study = getStudy();
+ //SalomeApp_Study* study = getStudy();
- 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 );
void MeasureGUI_Skeleton::LineEditReturnPressed()
{
/* User name of object input management */
- /* If successfull the selection is changed and signal emitted... */
+ /* If successful the selection is changed and signal emitted... */
/* so SelectionIntoArgument() is automatically called. */
if ( mySelEdit ) {
${VTK_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
SET(_link_LIBRARIES
OCC2VTK
SalomeIDLGEOM
- ${CAS_TKBRep}
- ${CAS_TKOpenGl}
+ ${OpenCASCADE_ModelingData_LIBRARIES}
+ ${OpenCASCADE_Visualization_LIBRARIES}
${KERNEL_SALOMELocalTrace}
${GUI_SalomeObject}
${GUI_SVTK}
myShadingFaceSource(GEOM_ShadingFace::New(),true),
myHighlightActor(GEOM_DeviceActor::New(),true),
- myAppendFilter(vtkAppendPolyData::New(),true),
- // Use mapper as an instance of GEOM_PainterPolyDataMapper class
- // to prevent drawing of mappers' content (due to an empty definition
- // of GEOM_PainterPolyDataMapper::RenderPiece(...)).
- // !!! Presentation of GEOM_Actor is drawing only with help of actors
- // defined in this class !!!
- myPolyDataMapper(GEOM_PainterPolyDataMapper::New(),true),
myTextActor( vtkTextActor::New() ),
myHighlightProp(vtkProperty::New()),
myPreHighlightProp(vtkProperty::New()),
myShadingFaceProp(vtkProperty::New()),
- myShadingBackFaceProp(vtkProperty::New())
+ myShadingBackFaceProp(vtkProperty::New()),
+
+ myAppendFilter(vtkAppendPolyData::New(),true),
+ // Use mapper as an instance of GEOM_PainterPolyDataMapper class
+ // to prevent drawing of mappers' content (due to an empty definition
+ // of GEOM_PainterPolyDataMapper::RenderPiece(...)).
+ // !!! Presentation of GEOM_Actor is drawing only with help of actors
+ // defined in this class !!!
+ myPolyDataMapper(GEOM_PainterPolyDataMapper::New(),true)
{
#ifdef MYDEBUG
MESSAGE (this<< " GEOM_Actor::GEOM_Actor");
// =======================================================================
// 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 )
{
//! screen, while its position is a 3D point defined in world's coordinate system.
Standard_EXPORT void SetIsScreenFixed( const Standard_Boolean theIsFixed );
- //! Retuns value of "screen fixed" positioning mode.
+ //! Returns value of "screen fixed" positioning mode.
Standard_Boolean GetIsScreenFixed() const { return myIsScreenFixed; }
//! Converts annotation position to screen fixed coordinates and
//! 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:
case GeomAbs_Hyperbola :
case GeomAbs_BezierCurve :
case GeomAbs_BSplineCurve :
+ case GeomAbs_OffsetCurve:
case GeomAbs_OtherCurve :
for (j = 1; j <= myDiscret/2; j++) {
void GEOM_OCCReader::TransferEdgeWData(const TopoDS_Edge& aEdge,
vtkPoints* Pts,
- vtkCellArray* Cells) {
-
-
+ vtkCellArray* Cells)
+{
Handle(Poly_PolygonOnTriangulation) aEdgePoly;
Standard_Integer i = 1;
Handle(Poly_Triangulation) T;
//=======================================================================
void GEOM_OCCReader::TransferVertexWData(const TopoDS_Vertex& aVertex,
- vtkPoints* Pts,
- vtkCellArray* Cells) {
-#define ZERO_COORD coord[0] = 0.0; coord[1] = 0.0; coord[2] = 0.0
+ vtkPoints* Pts,
+ vtkCellArray* Cells)
+{
+#define ZERO_COORD coord[0] = coord[1] = coord[2] = 0.0
- gp_Pnt P = BRep_Tool::Pnt( aVertex );
+ // gp_Pnt P = BRep_Tool::Pnt( aVertex ); ??????????????????????????
float delta = 1, coord[3];
vtkIdType pts[2];
// insert pt
# additional include directories
INCLUDE_DIRECTORIES(
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${VTK_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
)
# libraries to link to
SET(_link_LIBRARIES
vtkFiltersCore
- ${CAS_KERNEL}
- ${CAS_TKMesh} ${CAS_TKTopAlgo}
- ${CAS_MODELER}
+ ${OpenCASCADE_FoundationClasses_LIBRARIES}
+ ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
${KERNEL_SALOMELocalTrace}
GEOMUtils
)
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
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;
}
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
#include "RepairGUI_ShapeProcessDlg.h" // Method PROCESS SHAPE
#include "RepairGUI_CloseContourDlg.h" // Method CLOSE CONTOUR
#include "RepairGUI_RemoveIntWiresDlg.h"// Method REMOVE INTERNAL WIRES
-#include "RepairGUI_DivideEdgeDlg.h" // Method DEVIDE EDGE
+#include "RepairGUI_DivideEdgeDlg.h" // Method DIVIDE EDGE
#include "RepairGUI_FreeBoundDlg.h" // Method FREE BOUNDARIES
#include "RepairGUI_FreeFacesDlg.h" // Method FREE FACES
#include "RepairGUI_GlueDlg.h" // Method GLUE FACES
//================================================================
// Function : onAccept
// Purpose : This method should be called from dialog's slots onOk() and onApply()
-// It perfroms user input validation, then it
+// It performs user input validation, then it
// performs a proper operation and manages transactions, etc.
//================================================================
bool RepairGUI_GlueDlg::onAcceptLocal()
//================================================================
// Function : onAccept
// Purpose : This method should be called from dialog's slots onOk() and onApply()
-// It perfroms user input validation, then it
+// It performs user input validation, then it
// performs a proper operation and manages transactions, etc.
//================================================================
bool RepairGUI_LimitToleranceDlg::onAcceptLocal()
}
if ( !anErrorObjNames.empty() )
- MESSAGE( "ERRORS occured while processing the following objects: " << anErrorObjNames.join( " " ).toLatin1().data() );
+ MESSAGE( "ERRORS occurred while processing the following objects: " << anErrorObjNames.join( " " ).toLatin1().data() );
return anErrorObjNames.size() < myObjects->length(); // true if at least one object was OK, false if ALL objects were nil after Healing.
}
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)
# additional include directories
INCLUDE_DIRECTORIES(
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
)
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
)
# libraries to link to
SET(_link_LIBRARIES
- ${CAS_KERNEL}
- ${CAS_TKGeomAlgo} ${CAS_TKTopAlgo}
- ${CAS_TKBRep}
- ${CAS_TKG2d}
+ ${OpenCASCADE_FoundationClasses_LIBRARIES}
+ ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
+ ${OpenCASCADE_ModelingData_LIBRARIES}
${KERNEL_SALOMELocalTrace}
)
/*!
\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
# additional include directories
INCLUDE_DIRECTORIES(
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
${PROJECT_SOURCE_DIR}/src/GEOMAlgo
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
)
# libraries to link to
SET(_link_engine_LIBRARIES
- ${CAS_TKSTEP}
- ${CAS_TKSTEPBase}
+ ${OpenCASCADE_DataExchange_LIBRARIES}
${KERNEL_SALOMELocalTrace}
${KERNEL_OpUtil}
SalomeIDLGEOM
}
catch (Standard_Failure)
{
- //THROW_SALOME_CORBA_EXCEPTION("Exception catched in STEPExport", SALOME::BAD_PARAM);
+ //THROW_SALOME_CORBA_EXCEPTION("Exception caught in STEPExport", SALOME::BAD_PARAM);
}
return 0;
}
# additional include directories
INCLUDE_DIRECTORIES(
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
${PROJECT_SOURCE_DIR}/src/GEOMAlgo
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
)
# libraries to link to
SET(_link_engine_LIBRARIES
- ${CAS_TKSTL}
+ ${OpenCASCADE_DataExchange_LIBRARIES}
${KERNEL_SALOMELocalTrace}
${KERNEL_OpUtil}
SalomeIDLGEOM
}
catch( Standard_Failure )
{
- //THROW_SALOME_CORBA_EXCEPTION("Exception catched in ExportSTL", SALOME::BAD_PARAM);
+ //THROW_SALOME_CORBA_EXCEPTION("Exception caught in ExportSTL", SALOME::BAD_PARAM);
}
return 0;
}
getGeometryGUI()->getApp()->putInfo( tr("GEOM_PRP_COMMAND").arg( theCommandID ) );
}
- return true;
+ return true; // ?????????
}
//=======================================================================
# additional include directories
INCLUDE_DIRECTORIES(
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
)
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
)
# libraries to link to
SET(_link_LIBRARIES
- ${CAS_TKCAF} ${CAS_TKShHealing} ${CAS_TKBool}
+ ${OpenCASCADE_ApplicationFramework_LIBRARIES} ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
${KERNEL_SALOMELocalTrace}
)
/// Copy constructor
Standard_EXPORT ShHealOper_ChangeOrientation (const TopoDS_Shape& theShape);
- //Method for initalization by whole shape.
+ //Method for initialization by whole shape.
Standard_EXPORT virtual void Init(const TopoDS_Shape& theShape);
- //Method for initalization by whole shape.
+ //Method for initialization by whole shape.
Standard_EXPORT Standard_Boolean Perform();
//Change orientation
//checks that all specified edges belong the one face or not.
Standard_Boolean isOneFace = checkOneFace(theSewd,aCommonFaces);
- //add edge or increase max tolerance in dependance on specified VertexMode.
+ //add edge or increase max tolerance in dependence on specified VertexMode.
//if all edges belong the one face that gap will be closed in the 2D by line
//else gap will be closed in the 3D by line.
myDone = fixGaps(theSewd,aCommonFaces);
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 initalization by whole shape.
+ //Method for initialization by whole shape.
Standard_EXPORT Standard_Boolean Perform(const TopTools_SequenceOfShape& theSeqEdges,
const Standard_Boolean theModeVertex = Standard_False,
has2d = Standard_False,
hasPCurves = Standard_False;
- //computation of the split values in dependance from specified mode and values.
+ //computation of the split values in dependence from specified mode and values.
if(!computeValues(theValues, has3d,has2d,hasPCurves)) {
myErrorStatus = ShHealOper_InvalidParameters;
return Standard_False;
return Standard_False;
}
- //split 3d curve and pcurve for each face reffering to edge.
+ //split 3d curve and pcurve for each face referring to edge.
Standard_Boolean isDone = Standard_True;
if(hasPCurves) {
const TopTools_ListOfShape& lfaces = myMapEdgesFace.FindFromKey(myEdge);
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.;
/// Constructor initializes by shape.
Standard_EXPORT virtual void Init(const TopoDS_Shape& theShape);
- //Method for initalization by whole shape.
+ //Method for initialization by whole shape.
Standard_EXPORT Standard_Boolean Perform(const TopoDS_Shape& theEdge,
const Standard_Real theValue,
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.
aB.Range (anEdge, aFace, aF, aL);
// Set orientation of the edge: orientation should be changed
- // if its orientation does not make sence with curve orientation
+ // if its orientation does not make sense with curve orientation
// recommended by GeomPlate
if ((anEdge.Orientation() == TopAbs_FORWARD) ==
(theSenses->Value (theOrders->Value (aInd)) == 1)) {
Standard_EXPORT ShHealOper_FillHoles (const TopoDS_Shape& theShape);
Standard_EXPORT virtual void Init(const TopoDS_Shape& theShape);
- //Method for initalization by whole shape.
+ //Method for initialization by whole shape.
Standard_EXPORT void InitParameters(Standard_Integer theDegree = 3,//3(2)
Standard_Integer theNbPtsOnCur =5,//3,
Standard_EXPORT ShHealOper_RemoveFace (const TopoDS_Shape& theShape);
// Constructor initialized by shape from which faces will be removed.
Standard_EXPORT virtual void Init(const TopoDS_Shape& theShape);
- //Method for initalization by whole shape.
+ //Method for initialization by whole shape.
Standard_EXPORT Standard_Boolean Perform();
//Removes all faces from specified shape.
/// Copy constructor
Standard_EXPORT ShHealOper_RemoveInternalWires (const TopoDS_Shape& theShape);
- //Method for initalization by whole shape.
+ //Method for initialization by whole shape.
Standard_EXPORT virtual void Init(const TopoDS_Shape& theShape);
- //Method for initalization by whole shape.
+ //Method for initialization by whole shape.
Standard_EXPORT Standard_Boolean Remove();
//Removes all internal wires from all faces of the shape
Standard_EXPORT ShHealOper_Sewing (const TopoDS_Shape& theShape,
const Standard_Real theTolerance);
- //Constructor for initalization by shape and tolerance.
+ //Constructor for initialization by shape and tolerance.
Standard_EXPORT virtual void Init(const TopoDS_Shape& theShape);
- //Method for initalization by whole shape.
+ //Method for initialization by whole shape.
Standard_EXPORT Standard_Boolean Perform();
//Performs sewing specified whole shape.
/// 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);
// Constructor initialized by shape from which faces will be removed.
Standard_EXPORT virtual void Init(const TopoDS_Shape& theShape);
- //Method for initalization by whole shape.
+ //Method for initialization by whole shape.
inline const TopoDS_Shape& GetResultShape() const
{
# additional include directories
INCLUDE_DIRECTORIES(
- #${CAS_INCLUDE_DIRS}
${KERNEL_INCLUDE_DIRS}
${OPENCV_INCLUDE_DIR}
${QT_INCLUDES}
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- #${CAS_DEFINITIONS}
${QT_DEFINITIONS}
)
IF(NOT SALOME_GUI_BUILD_WITH_QT5)
detected_edges = cv::Mat(binary_backproject);
}
- // else if ( detection_method == RIDGE_DETECTOR ) // Method adapted for engineering drawings (e.g. watershed functionnality could be used here cf.OpenCV documentation and samples)
+ // else if ( detection_method == RIDGE_DETECTOR ) // Method adapted for engineering drawings (e.g. watershed functionality could be used here cf.OpenCV documentation and samples)
// {
// // TODO
// return false;
// Author : Renaud NEDELEC, Open CASCADE S.A.S.
// OpenCV includes
-#include <cv.h>
-#include <highgui.h>
-#include <opencv2/imgproc/imgproc.hpp>
-#include <opencv2/highgui/highgui.hpp>
+// RNV: Workaround: HAVE_TBB definition from OCCT conflicts with OPENCV, undef it.
+// This workaround will be removed after correction of the
+// https://tracker.dev.opencascade.org/view.php?id=28457 issue.
+#ifdef HAVE_TBB
+ #undef HAVE_TBB
+ #include <cv.h>
+ #include <highgui.h>
+ #include <opencv2/imgproc/imgproc.hpp>
+ #include <opencv2/highgui/highgui.hpp>
+ #define HAVE_TBB
+#else
+ #include <cv.h>
+ #include <highgui.h>
+ #include <opencv2/imgproc/imgproc.hpp>
+ #include <opencv2/highgui/highgui.hpp>
+#endif
// Qt
#include <QRect>
<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>
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${QT_DEFINITIONS}
)
//=================================================================================
// 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.
mainFrame()->RadioButton2->close();
mainFrame()->RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
mainFrame()->RadioButton3->close();
-
+
GroupPoints = new DlgRef_1Sel1Spin1Check( centralWidget() );
GroupPoints->GroupBox1->setTitle( tr( "GEOM_ARGUMENTS" ) );
GroupPoints->TextLabel1->setText( tr( "GEOM_OBJECTS" ) );
GroupPoints->TextLabel2->setText( tr( "GEOM_OFFSET" ) );
- GroupPoints->CheckButton1->setText( tr( "GEOM_CREATE_COPY" ) );
-
- // san -- modification of an exisitng object by offset is not allowed
- GroupPoints->CheckButton1->hide();
+ GroupPoints->CheckButton1->setText( tr( "GEOM_JOIN_BY_PIPES" ) );
+ GroupPoints->CheckButton1->setChecked( true );
GroupPoints->PushButton1->setIcon( image1 );
-
+
QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
layout->setMargin( 0 ); layout->setSpacing( 6 );
layout->addWidget( GroupPoints );
-
+
/***************************************************************/
setHelpFileName( "offset_operation_page.html" );
-
+
Init();
}
// 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 */
}
// purpose :
//=================================================================================
void TransformationGUI_OffsetDlg::Init()
-{
+{
/* init variables */
myEditCurrentArgument = GroupPoints->LineEdit1;
GroupPoints->LineEdit1->setReadOnly( true );
myObjects.clear();
-
+
/* Get setting of step value from file configuration */
double step = 1;
-
+
/* min, max, step and decimals for spin boxes & initial values */
initSpinBox( GroupPoints->SpinBox_DX, COORD_MIN, COORD_MAX, step, "length_precision" );
GroupPoints->SpinBox_DX->setValue( 1e-05 );
-
- // Activate Create a Copy mode
- GroupPoints->CheckButton1->setChecked( true );
- CreateCopyModeChanged();
mainFrame()->GroupBoxPublish->show();
/* signals and slots connections */
connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
-
+
connect( GroupPoints->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
- connect( myGeomGUI->getApp()->selectionMgr(),
+ connect( myGeomGUI->getApp()->selectionMgr(),
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
connect( GroupPoints->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox() ) );
- connect( GroupPoints->CheckButton1, SIGNAL( toggled( bool ) ), this, SLOT( CreateCopyModeChanged() ) );
-
+ connect( GroupPoints->CheckButton1, SIGNAL( toggled( bool ) ), this, SLOT( JoinModeChanged() ) );
+
initName( tr( "GEOM_OFFSET" ) );
globalSelection( GEOM_ALLSHAPES );
//=================================================================================
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 ( GroupPoints->CheckButton1->isChecked() || IsPreview() ) {
+ if ( true /*GroupPoints->CheckButton1->isChecked() || IsPreview()*/ ) {
for ( int i = 0; i < myObjects.count(); i++ ) {
-
- anObj = anOper->OffsetShapeCopy( myObjects[i].get(), GetOffset() );
+
+ anObj = anOper->OffsetShapeCopy( myObjects[i].get(), GetOffset(), GetIsJoinByPipes() );
if ( !anObj->_is_nil() ) {
if(!IsPreview()) {
anObj->SetParameters(GroupPoints->SpinBox_DX->text().toLatin1().constData());
}
else {
for ( int i = 0; i < myObjects.count(); i++ ) {
- anObj = anOper->OffsetShape( myObjects[i].get(), GetOffset() );
+ anObj = anOper->OffsetShape( myObjects[i].get(), GetOffset(), GetIsJoinByPipes() );
if ( !anObj->_is_nil() )
objects.push_back( anObj._retn() );
}
}
res = true;
-
+
return res;
}
return GroupPoints->SpinBox_DX->value();
}
+//=======================================================================
+//function : GetIsJoinByPipes
+//purpose :
+//=======================================================================
+
+bool TransformationGUI_OffsetDlg::GetIsJoinByPipes() const
+{
+ return GroupPoints->CheckButton1->isChecked();
+}
+
//=================================================================================
-// function : CreateCopyModeChanged()
+// function : JoinModeChanged()
// purpose :
//=================================================================================
-void TransformationGUI_OffsetDlg::CreateCopyModeChanged()
+void TransformationGUI_OffsetDlg::JoinModeChanged()
{
- mainFrame()->GroupBoxName->setEnabled( GroupPoints->CheckButton1->isChecked() );
+ processPreview();
+ //mainFrame()->GroupBoxName->setEnabled( GroupPoints->CheckButton1->isChecked() );
}
//=================================================================================
void Init();
void enterEvent( QEvent* );
double GetOffset() const;
+ bool GetIsJoinByPipes() const;
private:
QList<GEOM::GeomObjPtr> myObjects;
void SelectionIntoArgument();
void SetEditCurrentArgument();
void ValueChangedInSpinBox();
- void CreateCopyModeChanged();
+ void JoinModeChanged();
};
#endif // TRANSFORMATIONGUI_OFFSETDLG_H
# additional include directories
INCLUDE_DIRECTORIES(
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${KERNEL_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
)
# libraries to link to
SET(_link_engine_LIBRARIES
- ${CAS_TKVTK}
${KERNEL_SALOMELocalTrace}
${KERNEL_OpUtil}
SalomeIDLGEOM
aWriter->SetFileName( aFileName.ToCString() );
aWriter->Write();
aWriter->Delete();
- pd->Delete(); //instanciated by the GEOM::GetData(...) method
+ pd->Delete(); //instantiated by the GEOM::GetData(...) method
return 1;
}
catch( Standard_Failure )
{
- //THROW_SALOME_CORBA_EXCEPTION("Exception catched in ExportVTK", SALOME::BAD_PARAM);
+ //THROW_SALOME_CORBA_EXCEPTION("Exception caught in ExportVTK", SALOME::BAD_PARAM);
}
return 0;
}
getGeometryGUI()->getApp()->putInfo( tr("GEOM_PRP_COMMAND").arg( theCommandID ) );
}
- return true;
+ return true; // ???????????
}
//=======================================================================
double deflection = 0.;
QString fileName = VTKPlugin_ExportDlg::getFileName( io,
- tr( "VTK_FILES" ),
- tr( "EXPORT_TITLE" ),
- parent,
- deflection );
+ tr( "VTK_FILES" ),
+ tr( "EXPORT_TITLE" ),
+ parent,
+ deflection );
if ( fileName.isEmpty() )
return false;
if ( vtkOp->IsDone() )
{
- transaction.commit();
+ transaction.commit();
}
else
{
- transaction.abort();
- SUIT_MessageBox::critical( parent,
- tr( "GEOM_ERROR" ),
- tr( "GEOM_PRP_ABORT" ) + "\n" + tr( vtkOp->GetErrorCode() ) );
- return false;
+ transaction.abort();
+ SUIT_MessageBox::critical( parent,
+ tr( "GEOM_ERROR" ),
+ tr( "GEOM_PRP_ABORT" ) + "\n" + tr( vtkOp->GetErrorCode() ) );
+ return false;
}
}
catch ( const SALOME::SALOME_Exception& e )
if ( !ok )
{
SUIT_MessageBox::warning( parent,
- tr( "WRN_WARNING" ),
- tr( "GEOM_WRN_NO_APPROPRIATE_SELECTION" ) );
+ tr( "WRN_WARNING" ),
+ tr( "GEOM_WRN_NO_APPROPRIATE_SELECTION" ) );
}
return ok;
}
INCLUDE_DIRECTORIES(
${PTHREAD_INCLUDE_DIR}
${LIBXML2_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
)
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
${LIBXML2_DEFINITIONS}
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
)
# libraries to link to
SET(_link_LIBRARIES
${PTHREAD_LIBRARIES}
${LIBXML2_LIBRARIES}
- ${CAS_TKBRep} ${CAS_TKTopAlgo} ${CAS_TKG2d}
+ ${OpenCASCADE_ModelingData_LIBRARIES}
+ ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
)
# --- headers ---
void BrepGeometry::initIds()
{
- // intialization of Ids
+ // initialization of Ids
initListIds(TopAbs_VERTEX, m_vertices);
initListIds(TopAbs_EDGE, m_edges);
initListIds(TopAbs_FACE, m_faces);
protected:
/**
* Constructor.
- * @param dimension the dimension ot the field.
+ * @param dimension the dimension of the field.
* @param nbElements the number of elements.
* @param nbComponents the number of components.
* @param name the name of the field.
# additional include directories
INCLUDE_DIRECTORIES(
${PTHREAD_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${CPPUNIT_INCLUDE_DIRS}
)
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${CPPUNIT_DEFINITIONS}
)
# additional include directories
INCLUDE_DIRECTORIES(
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${KERNEL_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/idl
${PROJECT_SOURCE_DIR}/src/GEOMAlgo
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
${OMNIORB_DEFINITIONS}
)
# libraries to link to
SET(_link_engine_LIBRARIES
- ${CAS_TKXAO}
${KERNEL_SALOMELocalTrace}
${KERNEL_OpUtil}
SalomeIDLGEOM
Handle(GEOM_Object) reference = GetObjectImpl( shape );
// Get the reference groups
- int ind = 0;
+ CORBA::ULong ind = 0;
std::list<Handle(GEOM_Object)> groupsObj;
for (; ind < groups.length(); ind++)
{
INCLUDE_DIRECTORIES(
${PYTHON_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
- ${CAS_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
${PROJECT_SOURCE_DIR}/src/XAO
)
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
${PYTHON_DEFINITIONS}
- ${CAS_DEFINITIONS}
+ ${OpenCASCADE_DEFINITIONS}
)
# libraries to link to