mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-26 09:20:35 +05:00
Merge master branch into V9_dev.
This commit is contained in:
commit
40d76807e9
@ -33,7 +33,7 @@ ENDIF(WIN32)
|
|||||||
STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
|
STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
|
||||||
|
|
||||||
SET(${PROJECT_NAME_UC}_MAJOR_VERSION 8)
|
SET(${PROJECT_NAME_UC}_MAJOR_VERSION 8)
|
||||||
SET(${PROJECT_NAME_UC}_MINOR_VERSION 3)
|
SET(${PROJECT_NAME_UC}_MINOR_VERSION 4)
|
||||||
SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
|
SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
|
||||||
SET(${PROJECT_NAME_UC}_VERSION
|
SET(${PROJECT_NAME_UC}_VERSION
|
||||||
${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
|
${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
|
||||||
@ -86,7 +86,7 @@ MARK_AS_ADVANCED(SALOME_BUILD_GUI SALOME_GEOM_USE_OPENCV SALOME_GEOM_USE_VTK)
|
|||||||
# Prerequisites
|
# Prerequisites
|
||||||
# =============
|
# =============
|
||||||
# Find "big" prerequisites first - they reference themselves many others
|
# 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:
|
# In our case KERNEL has already loaded many prereq:
|
||||||
|
|
||||||
##
|
##
|
||||||
|
4
README
4
README
@ -34,8 +34,8 @@ Installation
|
|||||||
Pre-requisites
|
Pre-requisites
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
SALOME platform relies on a set of third-party softwares; some of them are needed
|
SALOME platform relies on a set of third-party software; some of them are needed
|
||||||
at build time only, while other ones are needed in runtime also.
|
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
|
For more information about the pre-requisites please visit SALOME platform web
|
||||||
site:
|
site:
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
# - Config file for the @PROJECT_NAME@ package
|
# - Config file for the @PROJECT_NAME@ package
|
||||||
# It defines the following variables.
|
# 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
|
# @PROJECT_NAME_UC@_ROOT_DIR_EXP - the root path of the installation providing this CMake file
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ def MakeComplexSect(pnt,vec,rmax,rmin,nb):
|
|||||||
|
|
||||||
|
|
||||||
#=======================================================
|
#=======================================================
|
||||||
# Create simple path and recieve points
|
# Create simple path and receive points
|
||||||
# for section creation
|
# for section creation
|
||||||
#=======================================================
|
#=======================================================
|
||||||
WirePath = geompy.MakeSketcher("Sketcher:F 0 0:T 60 0:T 40 0:R 0:C 100 90:",
|
WirePath = geompy.MakeSketcher("Sketcher:F 0 0:T 60 0:T 40 0:R 0:C 100 90:",
|
||||||
|
@ -21,7 +21,7 @@ while i <= 3 :
|
|||||||
ShapeListCompound.append(S)
|
ShapeListCompound.append(S)
|
||||||
i = i + 1
|
i = i + 1
|
||||||
|
|
||||||
# create a compund of the given shapes
|
# create a compound of the given shapes
|
||||||
compound = geompy.MakeCompound(ShapeListCompound)
|
compound = geompy.MakeCompound(ShapeListCompound)
|
||||||
|
|
||||||
# add object in the study
|
# add object in the study
|
||||||
|
@ -11,13 +11,16 @@ gg = salome.ImportComponentGUI("GEOM")
|
|||||||
box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
|
box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
|
||||||
|
|
||||||
# create a new object as offset of the given object
|
# 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
|
# add objects in the study
|
||||||
id_box = geompy.addToStudy(box, "Box")
|
id_box = geompy.addToStudy(box, "Box")
|
||||||
id_offset = geompy.addToStudy(offset, "Offset")
|
id_offset = geompy.addToStudy(offset, "Offset")
|
||||||
|
id_offset2 = geompy.addToStudy(offset2, "Offset_intersection_join")
|
||||||
|
|
||||||
# display the results
|
# display the results
|
||||||
gg.createAndDisplayGO(id_box)
|
gg.createAndDisplayGO(id_box)
|
||||||
gg.setDisplayMode(id_box,1)
|
gg.setDisplayMode(id_box,1)
|
||||||
gg.createAndDisplayGO(id_offset)
|
gg.createAndDisplayGO(id_offset)
|
||||||
|
gg.createAndDisplayGO(id_offset2)
|
||||||
|
BIN
doc/salome/gui/GEOM/images/transformation11.png
Executable file → Normal file
BIN
doc/salome/gui/GEOM/images/transformation11.png
Executable file → Normal file
Binary file not shown.
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 17 KiB |
@ -33,7 +33,7 @@ The result of each operation will be a GEOM_Object.
|
|||||||
|
|
||||||
<b>Arguments:</b>
|
<b>Arguments:</b>
|
||||||
- \b Radius - Radius of the disk
|
- \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
|
- \b Pattern - Division pattern
|
||||||
|
|
||||||
\image html divided_disk_dlg.png
|
\image html divided_disk_dlg.png
|
||||||
|
@ -37,7 +37,7 @@ The input arguments are:
|
|||||||
|
|
||||||
- The \b height of extrusion. It is calculated from the <b>base profile</b> along the normal to its plane.
|
- 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
|
- A <b>draft angle</b> in degrees. Activated by clicking on \image html draft.png
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ The input arguments are:
|
|||||||
|
|
||||||
- The \b height of extrusion. It's calculated from the <b>base profile</b> along the normal to its plane.
|
- 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
|
- A <b>draft angle</b> in degrees. Activated by clicking on \image html draft.png
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ geompy = geomBuilder.New()
|
|||||||
|
|
||||||
|
|
||||||
<b> Of course, <em>from geompy import *</em> is no more possible.</b>
|
<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 <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>.
|
\n All occurrences of <em>geompy.GEOM.</em> can be replaced by <em>GEOM.</em>.
|
||||||
|
@ -7,7 +7,12 @@
|
|||||||
|
|
||||||
\n This operation translates each point of an \b Object (a set of
|
\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
|
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 \b Offset operation is applicable to faces, shells and solids.
|
||||||
\n \ref restore_presentation_parameters_page "Advanced options".
|
\n \ref restore_presentation_parameters_page "Advanced options".
|
||||||
|
|
||||||
@ -16,9 +21,12 @@ number, negative value meaning inner offset).
|
|||||||
|
|
||||||
\n <b>Example:</b>
|
\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
|
where Shape is a shape(s) which has to be an offset, Offset is a value of
|
||||||
the offset.
|
the offset.
|
||||||
\n <b>Arguments:</b> Name + Object (face(s), shell(s), solid(s)) +
|
\n <b>Arguments:</b> Name + Object (face(s), shell(s), solid(s)) +
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
Some tools in GEOM allow you to create shapes, basing the design on imported pictures (engineering drawings, nautical charts ...) :
|
Some tools in GEOM allow you to create shapes, basing the design on imported pictures (engineering drawings, nautical charts ...) :
|
||||||
|
|
||||||
<ul>
|
<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 .
|
<li>\subpage shape_recognition_page previously imported in the OCC viewer .
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ faces and Cylinder_1 with free published edges.
|
|||||||
\image html restore-ss-viewer-before.png "The initial box and cylinder"
|
\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,
|
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.
|
We create a Cut of Box_1 with Cylinder_1.
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ components of translation vector.
|
|||||||
|
|
||||||
\image html transformation2.png
|
\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.
|
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.
|
\n <b>Activate Distance</b> checkbox and <b>Distance</b> field allow defining a custom distance of translation.
|
||||||
|
|
||||||
|
@ -677,7 +677,7 @@ module GEOM
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set the operation error code
|
* \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.
|
* \note This method is supposed to be used only by interfaces inheriting from IOperations.
|
||||||
*/
|
*/
|
||||||
void SetErrorCode (in string theErrorID);
|
void SetErrorCode (in string theErrorID);
|
||||||
@ -693,7 +693,7 @@ module GEOM
|
|||||||
void StartOperation();
|
void StartOperation();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Closes the previously opened trasaction
|
* \brief Closes the previously opened transaction
|
||||||
*/
|
*/
|
||||||
void FinishOperation();
|
void FinishOperation();
|
||||||
|
|
||||||
@ -845,7 +845,7 @@ module GEOM
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
* C\brief reate a line, passing through the given point
|
* 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 thePnt Point. The resulting line will pass through it.
|
||||||
* \param theDir Direction. The resulting line will be parallel to it.
|
* \param theDir Direction. The resulting line will be parallel to it.
|
||||||
* \return New GEOM_Object, containing the created line.
|
* \return New GEOM_Object, containing the created line.
|
||||||
@ -1290,17 +1290,23 @@ module GEOM
|
|||||||
* \brief Replace the given object by its offset.
|
* \brief Replace the given object by its offset.
|
||||||
* \param theObject The base object for the offset.
|
* \param theObject The base object for the offset.
|
||||||
* \param theOffset Offset value.
|
* \param theOffset Offset value.
|
||||||
|
* \param theJoinByPipes To join offset surfaces by pipes or by intersection.
|
||||||
* \return theObject.
|
* \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.
|
* \brief Create new object as offset of the given one.
|
||||||
* \param theObject The base object for the offset.
|
* \param theObject The base object for the offset.
|
||||||
* \param theOffset Offset value.
|
* \param theOffset Offset value.
|
||||||
|
* \param theJoinByPipes To join offset surfaces by pipes or by intersection.
|
||||||
* \return New GEOM_Object, containing the offset object.
|
* \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 Create new object as projection of the given one on a 2D surface.
|
||||||
@ -3207,7 +3213,7 @@ module GEOM
|
|||||||
*
|
*
|
||||||
* Propagation group is a set of all edges, opposite to one (main)
|
* Propagation group is a set of all edges, opposite to one (main)
|
||||||
* edge of this group directly or through other opposite edges.
|
* 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 theShape Shape to build propagation groups on.
|
||||||
* \return List of GEOM_Object, each of them is a propagation group.
|
* \return List of GEOM_Object, each of them is a propagation group.
|
||||||
*/
|
*/
|
||||||
@ -3306,7 +3312,7 @@ module GEOM
|
|||||||
* \param theRemoveInside Shapes, inside which the results will be deleted.
|
* \param theRemoveInside Shapes, inside which the results will be deleted.
|
||||||
* Each shape from theRemoveInside must belong to theShapes also.
|
* Each shape from theRemoveInside must belong to theShapes also.
|
||||||
* \param theRemoveWebs If TRUE, perform Glue 3D algorithm.
|
* \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.
|
* \return New GEOM_Object, containing the result shapes.
|
||||||
*/
|
*/
|
||||||
@ -3322,7 +3328,7 @@ module GEOM
|
|||||||
/*!
|
/*!
|
||||||
* \brief Perform partition operation.
|
* \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
|
* a compound containing nonintersected shapes. Performance will be better
|
||||||
* since intersection between shapes from compound is not performed.
|
* since intersection between shapes from compound is not performed.
|
||||||
*
|
*
|
||||||
@ -3785,7 +3791,7 @@ module GEOM
|
|||||||
* \param theVertexes Global indices of vertexes to perform fillet on.
|
* \param theVertexes Global indices of vertexes to perform fillet on.
|
||||||
* \note Global index of sub-shape can be obtained, using method
|
* \note Global index of sub-shape can be obtained, using method
|
||||||
* <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
|
* <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
|
* at all vertices in given wire
|
||||||
* \param doIgnoreSecantVertices If FALSE, fillet radius is always limited
|
* \param doIgnoreSecantVertices If FALSE, fillet radius is always limited
|
||||||
* by the length of the edges, nearest to the fillet vertex.
|
* by the length of the edges, nearest to the fillet vertex.
|
||||||
@ -3824,7 +3830,7 @@ module GEOM
|
|||||||
in double theD1, in double theD2,
|
in double theD1, in double theD2,
|
||||||
in long theFace1, in long theFace2);
|
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)
|
* and theAngle = Chamfer Angle (Angle in radians)
|
||||||
*/
|
*/
|
||||||
GEOM_Object MakeChamferEdgeAD (in GEOM_Object theShape,
|
GEOM_Object MakeChamferEdgeAD (in GEOM_Object theShape,
|
||||||
@ -3848,7 +3854,7 @@ module GEOM
|
|||||||
in double theD1, in double theD2,
|
in double theD1, in double theD2,
|
||||||
in ListOfLong theFaces);
|
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)
|
* and theAngle = Chamfer Angle (Angle in radians)
|
||||||
*/
|
*/
|
||||||
GEOM_Object MakeChamferFacesAD (in GEOM_Object theShape,
|
GEOM_Object MakeChamferFacesAD (in GEOM_Object theShape,
|
||||||
@ -3867,7 +3873,7 @@ module GEOM
|
|||||||
in double theD1, in double theD2,
|
in double theD1, in double theD2,
|
||||||
in ListOfLong theEdges);
|
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)
|
* and theAngle = Chamfer Angle (Angle in radians)
|
||||||
*/
|
*/
|
||||||
GEOM_Object MakeChamferEdgesAD (in GEOM_Object theShape,
|
GEOM_Object MakeChamferEdgesAD (in GEOM_Object theShape,
|
||||||
@ -4054,7 +4060,7 @@ module GEOM
|
|||||||
* \param theObjects Shapes to get free boundary of.
|
* \param theObjects Shapes to get free boundary of.
|
||||||
* \param theClosedWires Output. Closed wires on the free boundary of the given shape.
|
* \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.
|
* \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,
|
boolean GetFreeBoundary (in ListOfGO theObjects,
|
||||||
out ListOfGO theClosedWires,
|
out ListOfGO theClosedWires,
|
||||||
@ -4184,7 +4190,7 @@ module GEOM
|
|||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Sequence of non-topological information tranfer data.
|
* \brief Sequence of non-topological information transfer data.
|
||||||
*/
|
*/
|
||||||
typedef sequence<TransferDatum> ListOfTransferDatum;
|
typedef sequence<TransferDatum> ListOfTransferDatum;
|
||||||
|
|
||||||
@ -4199,7 +4205,7 @@ module GEOM
|
|||||||
* \param theResult statistics of the operation. Output parameter. It
|
* \param theResult statistics of the operation. Output parameter. It
|
||||||
* represents a sequence of Transfer Datum. A datum has the type
|
* represents a sequence of Transfer Datum. A datum has the type
|
||||||
* (string code), the total number of items of this type and
|
* (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.
|
* \return true in case of success; otherwise false.
|
||||||
*/
|
*/
|
||||||
boolean TransferData(in GEOM_Object theObjectFrom,
|
boolean TransferData(in GEOM_Object theObjectFrom,
|
||||||
@ -4899,7 +4905,7 @@ module GEOM
|
|||||||
* in place of sub-shapes of the first argument,
|
* in place of sub-shapes of the first argument,
|
||||||
* because the whole shape corresponds to the first argument.
|
* because the whole shape corresponds to the first argument.
|
||||||
* Mainly to be used after transformations, but it also can be
|
* 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.
|
* operations, where only the first argument has to be considered.
|
||||||
* If theObject has only one argument shape, this flag is automatically
|
* If theObject has only one argument shape, this flag is automatically
|
||||||
* considered as True, not regarding really passed value.
|
* considered as True, not regarding really passed value.
|
||||||
@ -4927,7 +4933,7 @@ module GEOM
|
|||||||
* in place of sub-shapes of the first argument,
|
* in place of sub-shapes of the first argument,
|
||||||
* because the whole shape corresponds to the first argument.
|
* because the whole shape corresponds to the first argument.
|
||||||
* Mainly to be used after transformations, but it also can be
|
* 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.
|
* operations, where only the first argument has to be considered.
|
||||||
* If theObject has only one argument shape, this flag is automatically
|
* If theObject has only one argument shape, this flag is automatically
|
||||||
* considered as True, not regarding really passed value.
|
* considered as True, not regarding really passed value.
|
||||||
@ -4956,7 +4962,7 @@ module GEOM
|
|||||||
* in place of sub-shapes of the first argument,
|
* in place of sub-shapes of the first argument,
|
||||||
* because the whole shape corresponds to the first argument.
|
* because the whole shape corresponds to the first argument.
|
||||||
* Mainly to be used after transformations, but it also can be
|
* 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.
|
* operations, where only the first argument has to be considered.
|
||||||
* If theObject has only one argument shape, this flag is automatically
|
* If theObject has only one argument shape, this flag is automatically
|
||||||
* considered as True, not regarding really passed value.
|
* considered as True, not regarding really passed value.
|
||||||
|
@ -83,7 +83,7 @@ AdvancedEngine_DividedDiskDriver::AdvancedEngine_DividedDiskDriver()
|
|||||||
//function : Execute
|
//function : Execute
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Integer AdvancedEngine_DividedDiskDriver::Execute(LOGBOOK& log) const
|
Standard_Integer AdvancedEngine_DividedDiskDriver::Execute(Handle(TFunction_Logbook)& log) const
|
||||||
{
|
{
|
||||||
if (Label().IsNull()) return 0;
|
if (Label().IsNull()) return 0;
|
||||||
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
|
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
|
||||||
@ -138,11 +138,7 @@ Standard_Integer AdvancedEngine_DividedDiskDriver::Execute(LOGBOOK& log) const
|
|||||||
|
|
||||||
aFunction->SetValue(aShape);
|
aFunction->SetValue(aShape);
|
||||||
|
|
||||||
#if OCC_VERSION_MAJOR < 7
|
|
||||||
log.SetTouched(Label());
|
|
||||||
#else
|
|
||||||
log->SetTouched(Label());
|
log->SetTouched(Label());
|
||||||
#endif
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -527,4 +523,4 @@ GetCreationInformation(std::string& theOperationName,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
OCCT_IMPLEMENT_STANDARD_RTTIEXT (AdvancedEngine_DividedDiskDriver,GEOM_BaseDriver);
|
IMPLEMENT_STANDARD_RTTIEXT (AdvancedEngine_DividedDiskDriver,GEOM_BaseDriver);
|
||||||
|
@ -41,9 +41,9 @@ public:
|
|||||||
// Methods PUBLIC
|
// Methods PUBLIC
|
||||||
//
|
//
|
||||||
AdvancedEngine_DividedDiskDriver();
|
AdvancedEngine_DividedDiskDriver();
|
||||||
virtual Standard_Integer Execute(LOGBOOK& log) const;
|
virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
|
||||||
virtual void Validate(LOGBOOK&) const {}
|
virtual void Validate(Handle(TFunction_Logbook)&) const {}
|
||||||
Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
|
Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
|
||||||
static const Standard_GUID& GetID();
|
static const Standard_GUID& GetID();
|
||||||
~AdvancedEngine_DividedDiskDriver() {};
|
~AdvancedEngine_DividedDiskDriver() {};
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ private:
|
|||||||
TopoDS_Shell MakeDiskHexagon (double R, double Ratio) const;
|
TopoDS_Shell MakeDiskHexagon (double R, double Ratio) const;
|
||||||
TopoDS_Shape MakeDiskSquare (double R, double Ratio) const;
|
TopoDS_Shape MakeDiskSquare (double R, double Ratio) const;
|
||||||
|
|
||||||
OCCT_DEFINE_STANDARD_RTTIEXT(AdvancedEngine_DividedDiskDriver,GEOM_BaseDriver)
|
DEFINE_STANDARD_RTTIEXT(AdvancedEngine_DividedDiskDriver,GEOM_BaseDriver)
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _AdvancedEngine_DividedDiskDriver_HXX
|
#endif // _AdvancedEngine_DividedDiskDriver_HXX
|
||||||
|
@ -27,8 +27,6 @@
|
|||||||
#include "AdvancedEngine_SmoothingSurfaceDriver.hxx"
|
#include "AdvancedEngine_SmoothingSurfaceDriver.hxx"
|
||||||
#include "AdvancedEngine_ISmoothingSurface.hxx"
|
#include "AdvancedEngine_ISmoothingSurface.hxx"
|
||||||
|
|
||||||
#include <Basics_OCCTVersion.hxx>
|
|
||||||
|
|
||||||
#include <utilities.h>
|
#include <utilities.h>
|
||||||
#include <OpUtil.hxx>
|
#include <OpUtil.hxx>
|
||||||
#include <Utils_ExceptHandlers.hxx>
|
#include <Utils_ExceptHandlers.hxx>
|
||||||
@ -286,8 +284,6 @@ bool AdvancedEngine_IOperations::MakeGroups(Handle(GEOM_Object) theShape, int sh
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
gp_Trsf aTrsfInv = aTrsf.Inverted();
|
|
||||||
|
|
||||||
// int expectedGroups = 0;
|
// int expectedGroups = 0;
|
||||||
// if (shapeType == TSHAPE_BASIC)
|
// if (shapeType == TSHAPE_BASIC)
|
||||||
// if (Abs(theR2+theW2-theR1-theW1) <= Precision::Approximation())
|
// if (Abs(theR2+theW2-theR1-theW1) <= Precision::Approximation())
|
||||||
@ -622,6 +618,7 @@ bool AdvancedEngine_IOperations::MakeGroups(Handle(GEOM_Object) theShape, int sh
|
|||||||
if (aGroup.IsNull())
|
if (aGroup.IsNull())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
gp_Trsf aTrsfInv = aTrsf.Inverted();
|
||||||
TopoDS_Shape aGroupShape = aGroup->GetValue();
|
TopoDS_Shape aGroupShape = aGroup->GetValue();
|
||||||
BRepBuilderAPI_Transform aTransformationShapeInv (aGroupShape, aTrsfInv, Standard_False);
|
BRepBuilderAPI_Transform aTransformationShapeInv (aGroupShape, aTrsfInv, Standard_False);
|
||||||
TopoDS_Shape aGroupShapeTrsfInv = aTransformationShapeInv.Shape();
|
TopoDS_Shape aGroupShapeTrsfInv = aTransformationShapeInv.Shape();
|
||||||
@ -830,7 +827,7 @@ bool AdvancedEngine_IOperations::GetFacesOnSurf
|
|||||||
// Default value=3
|
// Default value=3
|
||||||
aFinder.SetNbPntsMin(3);
|
aFinder.SetNbPntsMin(3);
|
||||||
// Sets the maximal number of inner points for edges or faces.
|
// 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.
|
// the performance. If this value =0, all inner points will be taken into account.
|
||||||
// Default value=0
|
// Default value=0
|
||||||
aFinder.SetNbPntsMax(100);
|
aFinder.SetNbPntsMax(100);
|
||||||
@ -1554,9 +1551,8 @@ bool AdvancedEngine_IOperations::MakePipeTShapePartition(Handle(GEOM_Object) the
|
|||||||
TopoDS_Shape aShape = Te3->GetValue();
|
TopoDS_Shape aShape = Te3->GetValue();
|
||||||
theShape->GetLastFunction()->SetValue(aShape);
|
theShape->GetLastFunction()->SetValue(aShape);
|
||||||
}
|
}
|
||||||
catch (Standard_Failure) {
|
catch (Standard_Failure& aFail) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
SetErrorCode(aFail.GetMessageString());
|
||||||
SetErrorCode(aFail->GetMessageString());
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1965,9 +1961,8 @@ Handle(TColStd_HSequenceOfTransient)
|
|||||||
aFunction->SetValue(aResShape);
|
aFunction->SetValue(aResShape);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Standard_Failure) {
|
catch (Standard_Failure& aFail) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
SetErrorCode(aFail.GetMessageString());
|
||||||
SetErrorCode(aFail->GetMessageString());
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1989,9 +1984,8 @@ Handle(TColStd_HSequenceOfTransient)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Standard_Failure) {
|
catch (Standard_Failure& aFail) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
SetErrorCode(aFail.GetMessageString());
|
||||||
SetErrorCode(aFail->GetMessageString());
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2127,9 +2121,8 @@ AdvancedEngine_IOperations::MakePipeTShapeWithPosition
|
|||||||
aFunction->SetValue(aResShape);
|
aFunction->SetValue(aResShape);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Standard_Failure) {
|
catch (Standard_Failure& aFail) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
SetErrorCode(aFail.GetMessageString());
|
||||||
SetErrorCode(aFail->GetMessageString());
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2160,9 +2153,8 @@ AdvancedEngine_IOperations::MakePipeTShapeWithPosition
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Standard_Failure) {
|
catch (Standard_Failure& aFail) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
SetErrorCode(aFail.GetMessageString());
|
||||||
SetErrorCode(aFail->GetMessageString());
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2270,9 +2262,8 @@ AdvancedEngine_IOperations::MakePipeTShapeChamfer
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Standard_Failure) {
|
catch (Standard_Failure& aFail) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
SetErrorCode(aFail.GetMessageString());
|
||||||
SetErrorCode(aFail->GetMessageString());
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2323,9 +2314,8 @@ AdvancedEngine_IOperations::MakePipeTShapeChamfer
|
|||||||
try {
|
try {
|
||||||
aChamfer = myLocalOperations->MakeChamferEdges(aShape, theW, theH, theEdges);
|
aChamfer = myLocalOperations->MakeChamferEdges(aShape, theW, theH, theEdges);
|
||||||
}
|
}
|
||||||
catch (Standard_Failure) {
|
catch (Standard_Failure& aFail) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
SetErrorCode(aFail.GetMessageString());
|
||||||
SetErrorCode(aFail->GetMessageString());
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (aChamfer.IsNull()) {
|
if (aChamfer.IsNull()) {
|
||||||
@ -2359,9 +2349,8 @@ AdvancedEngine_IOperations::MakePipeTShapeChamfer
|
|||||||
aFunction->SetValue(aResShape);
|
aFunction->SetValue(aResShape);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Standard_Failure) {
|
catch (Standard_Failure& aFail) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
SetErrorCode(aFail.GetMessageString());
|
||||||
SetErrorCode(aFail->GetMessageString());
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2383,9 +2372,8 @@ AdvancedEngine_IOperations::MakePipeTShapeChamfer
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Standard_Failure) {
|
catch (Standard_Failure& aFail) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
SetErrorCode(aFail.GetMessageString());
|
||||||
SetErrorCode(aFail->GetMessageString());
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2505,9 +2493,8 @@ AdvancedEngine_IOperations::MakePipeTShapeChamferWithPosition
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Standard_Failure) {
|
catch (Standard_Failure& aFail) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
SetErrorCode(aFail.GetMessageString());
|
||||||
SetErrorCode(aFail->GetMessageString());
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2556,9 +2543,8 @@ AdvancedEngine_IOperations::MakePipeTShapeChamferWithPosition
|
|||||||
try {
|
try {
|
||||||
aChamfer = myLocalOperations->MakeChamferEdges(aShape, theW, theH, theEdges);
|
aChamfer = myLocalOperations->MakeChamferEdges(aShape, theW, theH, theEdges);
|
||||||
}
|
}
|
||||||
catch (Standard_Failure) {
|
catch (Standard_Failure& aFail) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
SetErrorCode(aFail.GetMessageString());
|
||||||
SetErrorCode(aFail->GetMessageString());
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (aChamfer.IsNull()) {
|
if (aChamfer.IsNull()) {
|
||||||
@ -2592,9 +2578,8 @@ AdvancedEngine_IOperations::MakePipeTShapeChamferWithPosition
|
|||||||
aFunction->SetValue(aResShape);
|
aFunction->SetValue(aResShape);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Standard_Failure) {
|
catch (Standard_Failure& aFail) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
SetErrorCode(aFail.GetMessageString());
|
||||||
SetErrorCode(aFail->GetMessageString());
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2622,9 +2607,8 @@ AdvancedEngine_IOperations::MakePipeTShapeChamferWithPosition
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Standard_Failure) {
|
catch (Standard_Failure& aFail) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
SetErrorCode(aFail.GetMessageString());
|
||||||
SetErrorCode(aFail->GetMessageString());
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2730,9 +2714,8 @@ AdvancedEngine_IOperations::MakePipeTShapeFillet
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Standard_Failure) {
|
catch (Standard_Failure& aFail) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
SetErrorCode(aFail.GetMessageString());
|
||||||
SetErrorCode(aFail->GetMessageString());
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2782,9 +2765,8 @@ AdvancedEngine_IOperations::MakePipeTShapeFillet
|
|||||||
try {
|
try {
|
||||||
aFillet = myLocalOperations->MakeFilletEdges(aShape, theRF, theEdges);
|
aFillet = myLocalOperations->MakeFilletEdges(aShape, theRF, theEdges);
|
||||||
}
|
}
|
||||||
catch (Standard_Failure) {
|
catch (Standard_Failure& aFail) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
SetErrorCode(aFail.GetMessageString());
|
||||||
SetErrorCode(aFail->GetMessageString());
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (aFillet.IsNull()) {
|
if (aFillet.IsNull()) {
|
||||||
@ -2844,9 +2826,8 @@ AdvancedEngine_IOperations::MakePipeTShapeFillet
|
|||||||
aFunction->SetValue(aResShape);
|
aFunction->SetValue(aResShape);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Standard_Failure) {
|
catch (Standard_Failure& aFail) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
SetErrorCode(aFail.GetMessageString());
|
||||||
SetErrorCode(aFail->GetMessageString());
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2868,9 +2849,8 @@ AdvancedEngine_IOperations::MakePipeTShapeFillet
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Standard_Failure) {
|
catch (Standard_Failure& aFail) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
SetErrorCode(aFail.GetMessageString());
|
||||||
SetErrorCode(aFail->GetMessageString());
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2987,9 +2967,8 @@ AdvancedEngine_IOperations::MakePipeTShapeFilletWithPosition
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Standard_Failure) {
|
catch (Standard_Failure& aFail) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
SetErrorCode(aFail.GetMessageString());
|
||||||
SetErrorCode(aFail->GetMessageString());
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3039,9 +3018,8 @@ AdvancedEngine_IOperations::MakePipeTShapeFilletWithPosition
|
|||||||
try {
|
try {
|
||||||
aFillet = myLocalOperations->MakeFilletEdges(aShape, theRF, theEdges);
|
aFillet = myLocalOperations->MakeFilletEdges(aShape, theRF, theEdges);
|
||||||
}
|
}
|
||||||
catch (Standard_Failure) {
|
catch (Standard_Failure& aFail) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
SetErrorCode(aFail.GetMessageString());
|
||||||
SetErrorCode(aFail->GetMessageString());
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (aFillet.IsNull()) {
|
if (aFillet.IsNull()) {
|
||||||
@ -3100,9 +3078,8 @@ AdvancedEngine_IOperations::MakePipeTShapeFilletWithPosition
|
|||||||
aFunction->SetValue(aResShape);
|
aFunction->SetValue(aResShape);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Standard_Failure) {
|
catch (Standard_Failure& aFail) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
SetErrorCode(aFail.GetMessageString());
|
||||||
SetErrorCode(aFail->GetMessageString());
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3130,9 +3107,8 @@ AdvancedEngine_IOperations::MakePipeTShapeFilletWithPosition
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Standard_Failure) {
|
catch (Standard_Failure& aFail) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
SetErrorCode(aFail.GetMessageString());
|
||||||
SetErrorCode(aFail->GetMessageString());
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3226,9 +3202,8 @@ Handle(GEOM_Object) AdvancedEngine_IOperations::MakeDividedDisk (double theR, do
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Standard_Failure) {
|
catch (Standard_Failure& aFail) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
SetErrorCode(aFail.GetMessageString());
|
||||||
SetErrorCode(aFail->GetMessageString());
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3301,9 +3276,8 @@ Handle(GEOM_Object) AdvancedEngine_IOperations::MakeDividedDiskPntVecR (Handle(G
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Standard_Failure) {
|
catch (Standard_Failure& aFail) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
SetErrorCode(aFail.GetMessageString());
|
||||||
SetErrorCode(aFail->GetMessageString());
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3427,9 +3401,8 @@ Handle(GEOM_Object) AdvancedEngine_IOperations::MakeSmoothingSurface (std::list<
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Standard_Failure) {
|
catch (Standard_Failure& aFail) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
SetErrorCode(aFail.GetMessageString());
|
||||||
SetErrorCode(aFail->GetMessageString());
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,7 +200,7 @@ Handle(TColStd_HSequenceOfInteger)
|
|||||||
// Default value=3
|
// Default value=3
|
||||||
aFinder.SetNbPntsMin(3);
|
aFinder.SetNbPntsMin(3);
|
||||||
// Sets the maximal number of inner points for edges or faces.
|
// 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.
|
// the performance. If this value =0, all inner points will be taken into account.
|
||||||
// Default value=0
|
// Default value=0
|
||||||
aFinder.SetNbPntsMax(0);
|
aFinder.SetNbPntsMax(0);
|
||||||
@ -312,7 +312,7 @@ TopoDS_Shape AdvancedEngine_PipeTShapeDriver::MakePipeTShape (const double r1, c
|
|||||||
|
|
||||||
gp_Pnt aP0 (0, 0, 0);
|
gp_Pnt aP0 (0, 0, 0);
|
||||||
gp_Pnt aP1 (-l1, 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 anAxes1 (aP1, aVX, aVZ);
|
||||||
gp_Ax2 anAxes2 (aP0, aVZ, aVX);
|
gp_Ax2 anAxes2 (aP0, aVZ, aVX);
|
||||||
|
|
||||||
@ -400,7 +400,7 @@ TopoDS_Shape AdvancedEngine_PipeTShapeDriver::MakeQuarterPipeTShape (const doubl
|
|||||||
//function : Execute
|
//function : Execute
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Integer AdvancedEngine_PipeTShapeDriver::Execute(LOGBOOK& log) const
|
Standard_Integer AdvancedEngine_PipeTShapeDriver::Execute(Handle(TFunction_Logbook)& log) const
|
||||||
{
|
{
|
||||||
if (Label().IsNull()) return 0;
|
if (Label().IsNull()) return 0;
|
||||||
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
|
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
|
||||||
@ -623,11 +623,7 @@ Standard_Integer AdvancedEngine_PipeTShapeDriver::Execute(LOGBOOK& log) const
|
|||||||
|
|
||||||
aFunction->SetValue(aShape);
|
aFunction->SetValue(aShape);
|
||||||
|
|
||||||
#if OCC_VERSION_MAJOR < 7
|
|
||||||
log.SetTouched(Label());
|
|
||||||
#else
|
|
||||||
log->SetTouched(Label());
|
log->SetTouched(Label());
|
||||||
#endif
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -688,4 +684,4 @@ GetCreationInformation(std::string& theOperationName,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
OCCT_IMPLEMENT_STANDARD_RTTIEXT (AdvancedEngine_PipeTShapeDriver,GEOM_BaseDriver);
|
IMPLEMENT_STANDARD_RTTIEXT (AdvancedEngine_PipeTShapeDriver,GEOM_BaseDriver);
|
||||||
|
@ -36,9 +36,9 @@ public:
|
|||||||
// Methods PUBLIC
|
// Methods PUBLIC
|
||||||
//
|
//
|
||||||
AdvancedEngine_PipeTShapeDriver();
|
AdvancedEngine_PipeTShapeDriver();
|
||||||
virtual Standard_Integer Execute(LOGBOOK& log) const;
|
virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
|
||||||
virtual void Validate(LOGBOOK&) const {}
|
virtual void Validate(Handle(TFunction_Logbook)&) const {}
|
||||||
Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
|
Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
|
||||||
|
|
||||||
static const Standard_GUID& GetID();
|
static const Standard_GUID& GetID();
|
||||||
~AdvancedEngine_PipeTShapeDriver() {};
|
~AdvancedEngine_PipeTShapeDriver() {};
|
||||||
@ -47,7 +47,7 @@ public:
|
|||||||
std::vector<GEOM_Param>& params);
|
std::vector<GEOM_Param>& params);
|
||||||
// Type management
|
// Type management
|
||||||
//
|
//
|
||||||
OCCT_DEFINE_STANDARD_RTTIEXT(AdvancedEngine_PipeTShapeDriver,GEOM_BaseDriver)
|
DEFINE_STANDARD_RTTIEXT(AdvancedEngine_PipeTShapeDriver,GEOM_BaseDriver)
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -164,7 +164,7 @@ TopoDS_Shape AdvancedEngine_SmoothingSurfaceDriver::MakeSmoothingSurfaceUnClosed
|
|||||||
//function : Execute
|
//function : Execute
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Integer AdvancedEngine_SmoothingSurfaceDriver::Execute(LOGBOOK& log) const
|
Standard_Integer AdvancedEngine_SmoothingSurfaceDriver::Execute(Handle(TFunction_Logbook)& log) const
|
||||||
{
|
{
|
||||||
if (Label().IsNull()) return 0;
|
if (Label().IsNull()) return 0;
|
||||||
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
|
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
|
||||||
@ -222,11 +222,7 @@ Standard_Integer AdvancedEngine_SmoothingSurfaceDriver::Execute(LOGBOOK& log) co
|
|||||||
|
|
||||||
aFunction->SetValue(aShape);
|
aFunction->SetValue(aShape);
|
||||||
|
|
||||||
#if OCC_VERSION_MAJOR < 7
|
|
||||||
log.SetTouched(Label());
|
|
||||||
#else
|
|
||||||
log->SetTouched(Label());
|
log->SetTouched(Label());
|
||||||
#endif
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -258,10 +254,6 @@ GetCreationInformation(std::string& theOperationName,
|
|||||||
for ( int i = 1, nb = aCI.GetLength(); i <= nb; ++i )
|
for ( int i = 1, nb = aCI.GetLength(); i <= nb; ++i )
|
||||||
theParams[0] << aCI.GetPntOrComp( 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 nbr of Bezier pieces", aCI.GetNbMax());
|
||||||
AddParam(theParams, "Max BSpline surface degree", aCI.GetDegMax());
|
AddParam(theParams, "Max BSpline surface degree", aCI.GetDegMax());
|
||||||
AddParam(theParams, "3D tolerance of initial approximation", aCI.GetDMax());
|
AddParam(theParams, "3D tolerance of initial approximation", aCI.GetDMax());
|
||||||
@ -274,4 +266,4 @@ GetCreationInformation(std::string& theOperationName,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
OCCT_IMPLEMENT_STANDARD_RTTIEXT (AdvancedEngine_SmoothingSurfaceDriver,GEOM_BaseDriver);
|
IMPLEMENT_STANDARD_RTTIEXT (AdvancedEngine_SmoothingSurfaceDriver,GEOM_BaseDriver);
|
||||||
|
@ -33,9 +33,9 @@ public:
|
|||||||
// Methods PUBLIC
|
// Methods PUBLIC
|
||||||
//
|
//
|
||||||
AdvancedEngine_SmoothingSurfaceDriver();
|
AdvancedEngine_SmoothingSurfaceDriver();
|
||||||
virtual Standard_Integer Execute(LOGBOOK& log) const;
|
virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
|
||||||
virtual void Validate(LOGBOOK&) const {}
|
virtual void Validate(Handle(TFunction_Logbook)&) const {}
|
||||||
Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
|
Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
|
||||||
|
|
||||||
static const Standard_GUID& GetID();
|
static const Standard_GUID& GetID();
|
||||||
~AdvancedEngine_SmoothingSurfaceDriver() {};
|
~AdvancedEngine_SmoothingSurfaceDriver() {};
|
||||||
@ -44,7 +44,7 @@ public:
|
|||||||
std::vector<GEOM_Param>& params);
|
std::vector<GEOM_Param>& params);
|
||||||
// Type management
|
// Type management
|
||||||
//
|
//
|
||||||
OCCT_DEFINE_STANDARD_RTTIEXT(AdvancedEngine_SmoothingSurfaceDriver,GEOM_BaseDriver)
|
DEFINE_STANDARD_RTTIEXT(AdvancedEngine_SmoothingSurfaceDriver,GEOM_BaseDriver)
|
||||||
private:
|
private:
|
||||||
TopoDS_Shape MakeSmoothingSurfaceUnClosed
|
TopoDS_Shape MakeSmoothingSurfaceUnClosed
|
||||||
(const Handle(TColgp_HArray1OfPnt) &theListOfPoints,
|
(const Handle(TColgp_HArray1OfPnt) &theListOfPoints,
|
||||||
|
@ -54,7 +54,7 @@ BREPPlugin_ExportDriver::BREPPlugin_ExportDriver()
|
|||||||
//function : Execute
|
//function : Execute
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Integer BREPPlugin_ExportDriver::Execute(LOGBOOK& log) const
|
Standard_Integer BREPPlugin_ExportDriver::Execute(Handle(TFunction_Logbook)& log) const
|
||||||
{
|
{
|
||||||
if (Label().IsNull()) return 0;
|
if (Label().IsNull()) return 0;
|
||||||
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() );
|
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() );
|
||||||
@ -95,4 +95,4 @@ GetCreationInformation( std::string& theOperationName,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
OCCT_IMPLEMENT_STANDARD_RTTIEXT( BREPPlugin_ExportDriver,GEOM_BaseDriver );
|
IMPLEMENT_STANDARD_RTTIEXT( BREPPlugin_ExportDriver,GEOM_BaseDriver );
|
||||||
|
@ -32,14 +32,14 @@ public:
|
|||||||
~BREPPlugin_ExportDriver() {};
|
~BREPPlugin_ExportDriver() {};
|
||||||
|
|
||||||
static const Standard_GUID& GetID();
|
static const Standard_GUID& GetID();
|
||||||
virtual Standard_Integer Execute(LOGBOOK& log) const;
|
virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
|
||||||
virtual void Validate(LOGBOOK&) const {}
|
virtual void Validate(Handle(TFunction_Logbook)&) const {}
|
||||||
Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
|
Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
|
||||||
|
|
||||||
virtual bool GetCreationInformation( std::string& theOperationName,
|
virtual bool GetCreationInformation( std::string& theOperationName,
|
||||||
std::vector<GEOM_Param>& params );
|
std::vector<GEOM_Param>& params );
|
||||||
|
|
||||||
OCCT_DEFINE_STANDARD_RTTIEXT(BREPPlugin_ExportDriver,GEOM_BaseDriver)
|
DEFINE_STANDARD_RTTIEXT(BREPPlugin_ExportDriver,GEOM_BaseDriver)
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _BREPPlugin_ExportDriver_HXX
|
#endif // _BREPPlugin_ExportDriver_HXX
|
||||||
|
@ -96,9 +96,8 @@ void BREPPlugin_IOperations::ExportBREP( const Handle(GEOM_Object) theOrigi
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch( Standard_Failure ) {
|
catch( Standard_Failure& aFail ) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
SetErrorCode( aFail.GetMessageString() );
|
||||||
SetErrorCode( aFail->GetMessageString() );
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,9 +151,8 @@ BREPPlugin_IOperations::ImportBREP( const TCollection_AsciiString& theFileName )
|
|||||||
// Greate material groups.
|
// Greate material groups.
|
||||||
// MakeMaterialGroups( anImported, aSeq );
|
// MakeMaterialGroups( anImported, aSeq );
|
||||||
}
|
}
|
||||||
catch( Standard_Failure ) {
|
catch( Standard_Failure& aFail ) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
SetErrorCode( aFail.GetMessageString() );
|
||||||
SetErrorCode( aFail->GetMessageString() );
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ BREPPlugin_ImportDriver::BREPPlugin_ImportDriver()
|
|||||||
//function : Execute
|
//function : Execute
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Integer BREPPlugin_ImportDriver::Execute(LOGBOOK& log) const
|
Standard_Integer BREPPlugin_ImportDriver::Execute(Handle(TFunction_Logbook)& log) const
|
||||||
{
|
{
|
||||||
if( Label().IsNull() ) return 0;
|
if( Label().IsNull() ) return 0;
|
||||||
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() );
|
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() );
|
||||||
@ -76,11 +76,7 @@ Standard_Integer BREPPlugin_ImportDriver::Execute(LOGBOOK& log) const
|
|||||||
|
|
||||||
aFunction->SetValue( aShape );
|
aFunction->SetValue( aShape );
|
||||||
|
|
||||||
#if OCC_VERSION_MAJOR < 7
|
|
||||||
log.SetTouched(Label());
|
|
||||||
#else
|
|
||||||
log->SetTouched(Label());
|
log->SetTouched(Label());
|
||||||
#endif
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -113,4 +109,4 @@ GetCreationInformation( std::string& theOperationName,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
OCCT_IMPLEMENT_STANDARD_RTTIEXT( BREPPlugin_ImportDriver, GEOM_BaseDriver );
|
IMPLEMENT_STANDARD_RTTIEXT( BREPPlugin_ImportDriver, GEOM_BaseDriver );
|
||||||
|
@ -32,14 +32,14 @@ public:
|
|||||||
~BREPPlugin_ImportDriver() {};
|
~BREPPlugin_ImportDriver() {};
|
||||||
|
|
||||||
static const Standard_GUID& GetID();
|
static const Standard_GUID& GetID();
|
||||||
virtual Standard_Integer Execute(LOGBOOK& log) const;
|
virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
|
||||||
Standard_Boolean MustExecute( const LOGBOOK& ) const { return Standard_True; }
|
Standard_Boolean MustExecute( const Handle(TFunction_Logbook)& ) const { return Standard_True; }
|
||||||
virtual void Validate( LOGBOOK& ) const {}
|
virtual void Validate( Handle(TFunction_Logbook)& ) const {}
|
||||||
|
|
||||||
virtual bool GetCreationInformation( std::string& theOperationName,
|
virtual bool GetCreationInformation( std::string& theOperationName,
|
||||||
std::vector<GEOM_Param>& params );
|
std::vector<GEOM_Param>& params );
|
||||||
|
|
||||||
OCCT_DEFINE_STANDARD_RTTIEXT(BREPPlugin_ImportDriver,GEOM_BaseDriver)
|
DEFINE_STANDARD_RTTIEXT(BREPPlugin_ImportDriver,GEOM_BaseDriver)
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _BREPPlugin_ImportDriver_HXX
|
#endif // _BREPPlugin_ImportDriver_HXX
|
||||||
|
@ -87,7 +87,7 @@
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : FixResult
|
//function : FixResult
|
||||||
//purpose : auxilary
|
//purpose : auxiliary
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
static void FixResult(const TopoDS_Shape& result,
|
static void FixResult(const TopoDS_Shape& result,
|
||||||
Handle(ShapeBuild_ReShape)& Context,
|
Handle(ShapeBuild_ReShape)& Context,
|
||||||
|
@ -30,13 +30,11 @@
|
|||||||
#include <BlockFix_UnionFaces.hxx>
|
#include <BlockFix_UnionFaces.hxx>
|
||||||
#include <BlockFix_UnionEdges.hxx>
|
#include <BlockFix_UnionEdges.hxx>
|
||||||
|
|
||||||
#include <Basics_OCCTVersion.hxx>
|
|
||||||
|
|
||||||
#include <ShapeUpgrade_RemoveLocations.hxx>
|
#include <ShapeUpgrade_RemoveLocations.hxx>
|
||||||
|
|
||||||
#include <Precision.hxx>
|
#include <Precision.hxx>
|
||||||
|
|
||||||
OCCT_IMPLEMENT_STANDARD_RTTIEXT(BlockFix_BlockFixAPI, MMgt_TShared);
|
IMPLEMENT_STANDARD_RTTIEXT(BlockFix_BlockFixAPI, Standard_Transient);
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : BlockFix_BlockFixAPI
|
//function : BlockFix_BlockFixAPI
|
||||||
|
@ -25,17 +25,15 @@
|
|||||||
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#include <Standard_DefineHandle.hxx>
|
#include <Standard_DefineHandle.hxx>
|
||||||
|
#include <Standard_Transient.hxx>
|
||||||
|
|
||||||
#include <ShapeBuild_ReShape.hxx>
|
#include <ShapeBuild_ReShape.hxx>
|
||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
#include <Standard_Real.hxx>
|
#include <Standard_Real.hxx>
|
||||||
#include <MMgt_TShared.hxx>
|
|
||||||
|
|
||||||
#include <Basics_OCCTVersion.hxx>
|
DEFINE_STANDARD_HANDLE(BlockFix_BlockFixAPI, Standard_Transient);
|
||||||
|
|
||||||
DEFINE_STANDARD_HANDLE(BlockFix_BlockFixAPI, MMgt_TShared);
|
class BlockFix_BlockFixAPI : public Standard_Transient
|
||||||
|
|
||||||
class BlockFix_BlockFixAPI : public MMgt_TShared
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Standard_EXPORT BlockFix_BlockFixAPI();
|
Standard_EXPORT BlockFix_BlockFixAPI();
|
||||||
@ -48,7 +46,7 @@ public:
|
|||||||
Standard_Integer& OptimumNbFaces();
|
Standard_Integer& OptimumNbFaces();
|
||||||
Standard_EXPORT void Perform();
|
Standard_EXPORT void Perform();
|
||||||
|
|
||||||
OCCT_DEFINE_STANDARD_RTTIEXT(BlockFix_BlockFixAPI,MMgt_TShared)
|
DEFINE_STANDARD_RTTIEXT(BlockFix_BlockFixAPI, Standard_Transient)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Handle(ShapeBuild_ReShape) myContext;
|
Handle(ShapeBuild_ReShape) myContext;
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
|
|
||||||
OCCT_IMPLEMENT_STANDARD_RTTIEXT(BlockFix_PeriodicSurfaceModifier, BRepTools_Modification);
|
IMPLEMENT_STANDARD_RTTIEXT(BlockFix_PeriodicSurfaceModifier, BRepTools_Modification);
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : BlockFix_PeriodicSurfaceModifier()
|
//function : BlockFix_PeriodicSurfaceModifier()
|
||||||
@ -81,7 +81,7 @@ void BlockFix_PeriodicSurfaceModifier::SetTolerance(const Standard_Real Tol)
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : ModifySurface
|
//function : ModifySurface
|
||||||
//purpose : auxilary
|
//purpose : auxiliary
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
static Standard_Boolean ModifySurface(const TopoDS_Face& aFace,
|
static Standard_Boolean ModifySurface(const TopoDS_Face& aFace,
|
||||||
const Handle(Geom_Surface)& aSurface,
|
const Handle(Geom_Surface)& aSurface,
|
||||||
|
@ -35,8 +35,6 @@
|
|||||||
#include <Standard_Boolean.hxx>
|
#include <Standard_Boolean.hxx>
|
||||||
#include <GeomAbs_Shape.hxx>
|
#include <GeomAbs_Shape.hxx>
|
||||||
|
|
||||||
#include <Basics_OCCTVersion.hxx>
|
|
||||||
|
|
||||||
class TopoDS_Vertex;
|
class TopoDS_Vertex;
|
||||||
class TopoDS_Edge;
|
class TopoDS_Edge;
|
||||||
class TopoDS_Face;
|
class TopoDS_Face;
|
||||||
@ -83,7 +81,7 @@ public:
|
|||||||
const TopoDS_Face& NewF1,
|
const TopoDS_Face& NewF1,
|
||||||
const TopoDS_Face& NewF2);
|
const TopoDS_Face& NewF2);
|
||||||
|
|
||||||
OCCT_DEFINE_STANDARD_RTTIEXT(BlockFix_PeriodicSurfaceModifier,BRepTools_Modification)
|
DEFINE_STANDARD_RTTIEXT(BlockFix_PeriodicSurfaceModifier,BRepTools_Modification)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Standard_Real myTolerance;
|
Standard_Real myTolerance;
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
#include <gp_Sphere.hxx>
|
#include <gp_Sphere.hxx>
|
||||||
|
|
||||||
OCCT_IMPLEMENT_STANDARD_RTTIEXT(BlockFix_SphereSpaceModifier, BRepTools_Modification);
|
IMPLEMENT_STANDARD_RTTIEXT(BlockFix_SphereSpaceModifier, BRepTools_Modification);
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : BlockFix_SphereSpaceModifier
|
//function : BlockFix_SphereSpaceModifier
|
||||||
|
@ -33,8 +33,6 @@
|
|||||||
#include <Standard_Boolean.hxx>
|
#include <Standard_Boolean.hxx>
|
||||||
#include <GeomAbs_Shape.hxx>
|
#include <GeomAbs_Shape.hxx>
|
||||||
|
|
||||||
#include <Basics_OCCTVersion.hxx>
|
|
||||||
|
|
||||||
class TopoDS_Vertex;
|
class TopoDS_Vertex;
|
||||||
class TopoDS_Edge;
|
class TopoDS_Edge;
|
||||||
class TopoDS_Face;
|
class TopoDS_Face;
|
||||||
@ -70,7 +68,7 @@ public:
|
|||||||
const TopoDS_Face& NewF1, const TopoDS_Face& NewF2);
|
const TopoDS_Face& NewF1, const TopoDS_Face& NewF2);
|
||||||
Standard_EXPORT Standard_Boolean ForRotation (const TopoDS_Face& F);
|
Standard_EXPORT Standard_Boolean ForRotation (const TopoDS_Face& F);
|
||||||
|
|
||||||
OCCT_DEFINE_STANDARD_RTTIEXT(BlockFix_SphereSpaceModifier,BRepTools_Modification)
|
DEFINE_STANDARD_RTTIEXT(BlockFix_SphereSpaceModifier,BRepTools_Modification)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Standard_Real myTolerance;
|
Standard_Real myTolerance;
|
||||||
|
@ -463,7 +463,7 @@ static TopoDS_Edge GlueEdgesWithPCurves(const TopTools_SequenceOfShape& aChain,
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : MergeEdges
|
//function : MergeEdges
|
||||||
//purpose : auxilary
|
//purpose : auxiliary
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
static Standard_Boolean MergeEdges(const TopTools_SequenceOfShape& SeqEdges,
|
static Standard_Boolean MergeEdges(const TopTools_SequenceOfShape& SeqEdges,
|
||||||
const Standard_Real Tol,
|
const Standard_Real Tol,
|
||||||
|
@ -84,6 +84,10 @@
|
|||||||
#include <Geom_SurfaceOfRevolution.hxx>
|
#include <Geom_SurfaceOfRevolution.hxx>
|
||||||
#include <Geom_SurfaceOfLinearExtrusion.hxx>
|
#include <Geom_SurfaceOfLinearExtrusion.hxx>
|
||||||
#include <Geom_RectangularTrimmedSurface.hxx>
|
#include <Geom_RectangularTrimmedSurface.hxx>
|
||||||
|
#include <BRepAdaptor_Surface.hxx>
|
||||||
|
#include <BRepAdaptor_HSurface.hxx>
|
||||||
|
#include <LocalAnalysis_SurfaceContinuity.hxx>
|
||||||
|
#include <GeomConvert_ApproxSurface.hxx>
|
||||||
|
|
||||||
#include <Geom_Curve.hxx>
|
#include <Geom_Curve.hxx>
|
||||||
#include <Geom_Line.hxx>
|
#include <Geom_Line.hxx>
|
||||||
@ -127,7 +131,7 @@ Standard_Integer& BlockFix_UnionFaces::GetOptimumNbFaces()
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : AddOrdinaryEdges
|
//function : AddOrdinaryEdges
|
||||||
//purpose : auxilary
|
//purpose : auxiliary
|
||||||
// adds edges from the shape to the sequence
|
// adds edges from the shape to the sequence
|
||||||
// seams and equal edges are dropped
|
// seams and equal edges are dropped
|
||||||
// Returns true if one of original edges dropped
|
// Returns true if one of original edges dropped
|
||||||
@ -179,7 +183,7 @@ static Standard_Boolean AddOrdinaryEdges(TopTools_SequenceOfShape& edges,
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : ClearRts
|
//function : ClearRts
|
||||||
//purpose : auxilary
|
//purpose : auxiliary
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
static Handle(Geom_Surface) ClearRts(const Handle(Geom_Surface)& aSurface)
|
static Handle(Geom_Surface) ClearRts(const Handle(Geom_Surface)& aSurface)
|
||||||
{
|
{
|
||||||
@ -193,7 +197,7 @@ static Handle(Geom_Surface) ClearRts(const Handle(Geom_Surface)& aSurface)
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : IsFacesOfSameSolids
|
//function : IsFacesOfSameSolids
|
||||||
//purpose : auxilary
|
//purpose : auxiliary
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
static Standard_Boolean IsFacesOfSameSolids
|
static Standard_Boolean IsFacesOfSameSolids
|
||||||
(const TopoDS_Face &theFace1,
|
(const TopoDS_Face &theFace1,
|
||||||
@ -235,17 +239,110 @@ static Standard_Boolean IsFacesOfSameSolids
|
|||||||
return isSame;
|
return isSame;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if OCC_VERSION_LARGE > 0x07020001
|
||||||
|
// for Mantis issue 0023451 by JGV
|
||||||
|
//=======================================================================
|
||||||
|
//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;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : IsEdgeValidToMerge
|
//function : IsEdgeValidToMerge
|
||||||
//purpose : Edge is valid if it is not seam or if it is a seam and the face
|
//purpose : Edge is valid if it is not seam or if it is a seam and the face
|
||||||
// has another seam edge.
|
// has another seam edge.
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
static Standard_Boolean IsEdgeValidToMerge(const TopoDS_Edge &theEdge,
|
#if OCC_VERSION_LARGE > 0x07020001
|
||||||
const TopoDS_Face &theFace)
|
// for Mantis issue 0023451 by JGV
|
||||||
|
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;
|
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
|
// Mantis issue 0023451, now code corresponds to the comment to this method
|
||||||
isValid = Standard_False;
|
isValid = Standard_False;
|
||||||
|
|
||||||
@ -271,9 +368,65 @@ static Standard_Boolean IsEdgeValidToMerge(const TopoDS_Edge &theEdge,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
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;
|
return isValid;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
static Standard_Boolean IsEdgeValidToMerge(const TopoDS_Edge &theEdge,
|
||||||
|
const TopoDS_Face &theFace)
|
||||||
|
{
|
||||||
|
Standard_Boolean isValid = Standard_True;
|
||||||
|
|
||||||
|
if (BRep_Tool::IsClosed(theEdge, theFace)) {
|
||||||
|
// This is a seam edge. Check if there are another seam edges on the face.
|
||||||
|
TopExp_Explorer anExp(theFace, TopAbs_EDGE);
|
||||||
|
|
||||||
|
for (; anExp.More(); anExp.Next()) {
|
||||||
|
const TopoDS_Shape &aShEdge = anExp.Current();
|
||||||
|
|
||||||
|
// Skip same edge.
|
||||||
|
if (theEdge.IsSame(aShEdge)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if this edge is a seam.
|
||||||
|
TopoDS_Edge anEdge = TopoDS::Edge(aShEdge);
|
||||||
|
|
||||||
|
if (BRep_Tool::IsClosed(anEdge, theFace)) {
|
||||||
|
isValid = Standard_False;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return isValid;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Perform
|
//function : Perform
|
||||||
@ -341,12 +494,26 @@ TopoDS_Shape BlockFix_UnionFaces::Perform(const TopoDS_Shape& Shape)
|
|||||||
Handle(Geom_Surface) aBaseSurface = BRep_Tool::Surface(aFace,aBaseLocation);
|
Handle(Geom_Surface) aBaseSurface = BRep_Tool::Surface(aFace,aBaseLocation);
|
||||||
aBaseSurface = ClearRts(aBaseSurface);
|
aBaseSurface = ClearRts(aBaseSurface);
|
||||||
aBaseSurface = Handle(Geom_Surface)::DownCast(aBaseSurface->Copy());
|
aBaseSurface = Handle(Geom_Surface)::DownCast(aBaseSurface->Copy());
|
||||||
|
#if OCC_VERSION_LARGE > 0x07020001
|
||||||
|
// for Mantis issue 0023451 by JGV
|
||||||
|
Standard_Boolean ToMakeUPeriodic = Standard_False, ToMakeVPeriodic = Standard_False;
|
||||||
|
#endif
|
||||||
|
|
||||||
// find adjacent faces to union
|
// find adjacent faces to union
|
||||||
Standard_Integer i;
|
Standard_Integer i;
|
||||||
for (i = 1; i <= edges.Length(); i++) {
|
for (i = 1; i <= edges.Length(); i++) {
|
||||||
TopoDS_Edge edge = TopoDS::Edge(edges(i));
|
TopoDS_Edge edge = TopoDS::Edge(edges(i));
|
||||||
if (BRep_Tool::Degenerated(edge) || !IsEdgeValidToMerge(edge, aFace))
|
#if OCC_VERSION_LARGE > 0x07020001
|
||||||
|
// for Mantis issue 0023451 by JGV
|
||||||
|
Standard_Boolean IsEdgeOnSeam = Standard_False;
|
||||||
|
#endif
|
||||||
|
if (BRep_Tool::Degenerated(edge) ||
|
||||||
|
#if OCC_VERSION_LARGE > 0x07020001
|
||||||
|
// for Mantis issue 0023451 by JGV
|
||||||
|
!IsEdgeValidToMerge(edge, aFace, aBaseSurface, IsEdgeOnSeam, ToMakeUPeriodic, ToMakeVPeriodic))
|
||||||
|
#else
|
||||||
|
!IsEdgeValidToMerge(edge, aFace))
|
||||||
|
#endif
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const TopTools_ListOfShape& aList = aMapEdgeFaces.FindFromKey(edge);
|
const TopTools_ListOfShape& aList = aMapEdgeFaces.FindFromKey(edge);
|
||||||
@ -359,7 +526,13 @@ TopoDS_Shape BlockFix_UnionFaces::Perform(const TopoDS_Shape& Shape)
|
|||||||
if (aProcessed.Contains(anCheckedFace))
|
if (aProcessed.Contains(anCheckedFace))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
#if OCC_VERSION_LARGE > 0x07020001
|
||||||
|
// for Mantis issue 0023451 by JGV
|
||||||
|
if (!IsEdgeValidToMerge(edge, anCheckedFace, aBaseSurface,
|
||||||
|
IsEdgeOnSeam, ToMakeUPeriodic, ToMakeVPeriodic)) {
|
||||||
|
#else
|
||||||
if (!IsEdgeValidToMerge(edge, anCheckedFace)) {
|
if (!IsEdgeValidToMerge(edge, anCheckedFace)) {
|
||||||
|
#endif
|
||||||
// Skip seam edge.
|
// Skip seam edge.
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -376,6 +549,14 @@ TopoDS_Shape BlockFix_UnionFaces::Perform(const TopoDS_Shape& Shape)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if OCC_VERSION_LARGE > 0x07020001
|
||||||
|
// for Mantis issue 0023451 by JGV
|
||||||
|
//Prevent creating a face with parametric range more than period
|
||||||
|
if (IsEdgeOnSeam &&
|
||||||
|
(HasSeamEdge(aFace) || HasSeamEdge(anCheckedFace)))
|
||||||
|
continue;
|
||||||
|
#endif
|
||||||
|
|
||||||
// replacing pcurves
|
// replacing pcurves
|
||||||
TopoDS_Face aMockUpFace;
|
TopoDS_Face aMockUpFace;
|
||||||
BRep_Builder B;
|
BRep_Builder B;
|
||||||
@ -399,6 +580,30 @@ TopoDS_Shape BlockFix_UnionFaces::Perform(const TopoDS_Shape& Shape)
|
|||||||
NbModif++;
|
NbModif++;
|
||||||
TopoDS_Face aResult;
|
TopoDS_Face aResult;
|
||||||
BRep_Builder B;
|
BRep_Builder B;
|
||||||
|
#if OCC_VERSION_LARGE > 0x07020001
|
||||||
|
// for Mantis issue 0023451 by JGV
|
||||||
|
if (ToMakeUPeriodic || ToMakeVPeriodic)
|
||||||
|
{
|
||||||
|
Handle(Geom_BSplineSurface) aBSplineSurface = Handle(Geom_BSplineSurface)::DownCast(aBaseSurface);
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
B.MakeFace(aResult,aBaseSurface,aBaseLocation,0);
|
B.MakeFace(aResult,aBaseSurface,aBaseLocation,0);
|
||||||
Standard_Integer nbWires = 0;
|
Standard_Integer nbWires = 0;
|
||||||
|
|
||||||
@ -523,6 +728,9 @@ TopoDS_Shape BlockFix_UnionFaces::Perform(const TopoDS_Shape& Shape)
|
|||||||
sff.SetMaxTolerance(Max(1.,myTolerance*1000.));
|
sff.SetMaxTolerance(Max(1.,myTolerance*1000.));
|
||||||
//Setting modes
|
//Setting modes
|
||||||
sff.FixOrientationMode() = 0;
|
sff.FixOrientationMode() = 0;
|
||||||
|
#if OCC_VERSION_LARGE > 0x07020001
|
||||||
|
sff.FixWireTool()->CheckMissingEdgesMode() = Standard_False;
|
||||||
|
#endif
|
||||||
//sff.FixWireMode() = 0;
|
//sff.FixWireMode() = 0;
|
||||||
sff.SetContext(aContext);
|
sff.SetContext(aContext);
|
||||||
// Applying the fixes
|
// Applying the fixes
|
||||||
@ -598,10 +806,13 @@ TopoDS_Shape BlockFix_UnionFaces::Perform(const TopoDS_Shape& Shape)
|
|||||||
sfw->SetMaxTolerance(Max(1.,myTolerance*1000.));
|
sfw->SetMaxTolerance(Max(1.,myTolerance*1000.));
|
||||||
sfw->SetFace(aFace);
|
sfw->SetFace(aFace);
|
||||||
for (TopoDS_Iterator iter (aFace,Standard_False); iter.More(); iter.Next()) {
|
for (TopoDS_Iterator iter (aFace,Standard_False); iter.More(); iter.Next()) {
|
||||||
TopoDS_Wire wire = TopoDS::Wire(iter.Value());
|
TopoDS_Shape aFaceCont = iter.Value();
|
||||||
sfw->Load(wire);
|
if (!aFaceCont.IsNull() && aFaceCont.ShapeType() == TopAbs_WIRE) {
|
||||||
sfw->FixReorder();
|
TopoDS_Wire wire = TopoDS::Wire(iter.Value());
|
||||||
sfw->FixShifted();
|
sfw->Load(wire);
|
||||||
|
sfw->FixReorder();
|
||||||
|
sfw->FixShifted();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // end processing each solid
|
} // end processing each solid
|
||||||
|
@ -103,7 +103,7 @@ bool CurveCreator_Diff::init(const CurveCreator_Curve *theCurve,
|
|||||||
if (myPRedo->init(theType, theIntParam)) {
|
if (myPRedo->init(theType, theIntParam)) {
|
||||||
// Construct undo for RemoveSection command.
|
// Construct undo for RemoveSection command.
|
||||||
// If the last section is removed, one AddSection command is enough.
|
// 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.
|
// and MoveSection.
|
||||||
const int aLastIndex = theCurve->getNbSections() - 1;
|
const int aLastIndex = theCurve->getNbSections() - 1;
|
||||||
|
|
||||||
|
@ -23,8 +23,6 @@
|
|||||||
#include "CurveCreator_Section.hxx"
|
#include "CurveCreator_Section.hxx"
|
||||||
#include "CurveCreator_UtilsICurve.hxx"
|
#include "CurveCreator_UtilsICurve.hxx"
|
||||||
|
|
||||||
#include <Basics_OCCTVersion.hxx>
|
|
||||||
|
|
||||||
#include <GEOMUtils.hxx>
|
#include <GEOMUtils.hxx>
|
||||||
|
|
||||||
#include <gp_Pln.hxx>
|
#include <gp_Pln.hxx>
|
||||||
@ -621,14 +619,10 @@ void CurveCreator_Utils::setSelectedPoints( Handle(AIS_InteractiveContext) theCo
|
|||||||
Handle(SelectMgr_Selection) aSelection = anAISShape->Selection( AIS_Shape::SelectionMode( TopAbs_VERTEX ) );
|
Handle(SelectMgr_Selection) aSelection = anAISShape->Selection( AIS_Shape::SelectionMode( TopAbs_VERTEX ) );
|
||||||
for( aSelection->Init(); aSelection->More(); aSelection->Next() )
|
for( aSelection->Init(); aSelection->More(); aSelection->Next() )
|
||||||
{
|
{
|
||||||
#if OCC_VERSION_LARGE > 0x06080100
|
|
||||||
const Handle(SelectMgr_SensitiveEntity) aHSenEntity = aSelection->Sensitive();
|
const Handle(SelectMgr_SensitiveEntity) aHSenEntity = aSelection->Sensitive();
|
||||||
if( aHSenEntity.IsNull() )
|
if( aHSenEntity.IsNull() )
|
||||||
continue;
|
continue;
|
||||||
Handle(SelectBasics_SensitiveEntity) aSenEntity = aHSenEntity->BaseSensitive();
|
Handle(SelectBasics_SensitiveEntity) aSenEntity = aHSenEntity->BaseSensitive();
|
||||||
#else
|
|
||||||
Handle(SelectBasics_SensitiveEntity) aSenEntity = aSelection->Sensitive();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Handle(Select3D_SensitivePoint) aSenPnt = Handle(Select3D_SensitivePoint)::DownCast( aSenEntity );
|
Handle(Select3D_SensitivePoint) aSenPnt = Handle(Select3D_SensitivePoint)::DownCast( aSenEntity );
|
||||||
|
|
||||||
|
@ -954,7 +954,7 @@ void CurveCreator_Widget::SetViewer2DMode(const bool To2D)
|
|||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// function : GeometryGUI::addCoordsByClick()
|
// 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 )
|
void CurveCreator_Widget::addCoordsByClick( QMouseEvent* pe )
|
||||||
{
|
{
|
||||||
|
@ -390,7 +390,7 @@ void EntityGUI::DisplaySimulationShape( const TopoDS_Shape& S1, const TopoDS_Sha
|
|||||||
ic->UpdateCurrentViewer();
|
ic->UpdateCurrentViewer();
|
||||||
}
|
}
|
||||||
catch( Standard_Failure ) {
|
catch( Standard_Failure ) {
|
||||||
MESSAGE( "Exception catched in EntityGUI::DisplaySimulationShape" );
|
MESSAGE( "Exception caught in EntityGUI::DisplaySimulationShape" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,8 +28,6 @@
|
|||||||
#include "EntityGUI_3DSketcherDlg.h"
|
#include "EntityGUI_3DSketcherDlg.h"
|
||||||
#include "EntityGUI_Widgets.h"
|
#include "EntityGUI_Widgets.h"
|
||||||
|
|
||||||
#include <Basics_OCCTVersion.hxx>
|
|
||||||
|
|
||||||
#include <GEOMBase.h>
|
#include <GEOMBase.h>
|
||||||
#include <GeometryGUI.h>
|
#include <GeometryGUI.h>
|
||||||
#include <Precision.hxx>
|
#include <Precision.hxx>
|
||||||
@ -105,7 +103,7 @@ DEFINE_STANDARD_HANDLE(AIS_Text, AIS_InteractiveObject)
|
|||||||
class AIS_Text:public AIS_InteractiveObject
|
class AIS_Text:public AIS_InteractiveObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
OCCT_DEFINE_STANDARD_RTTIEXT(AIS_Text,AIS_InteractiveObject)
|
DEFINE_STANDARD_RTTIEXT(AIS_Text,AIS_InteractiveObject)
|
||||||
|
|
||||||
AIS_Text(){};
|
AIS_Text(){};
|
||||||
|
|
||||||
@ -147,7 +145,7 @@ protected:
|
|||||||
Graphic3d_VerticalTextAlignment aVJustification;
|
Graphic3d_VerticalTextAlignment aVJustification;
|
||||||
};
|
};
|
||||||
|
|
||||||
OCCT_IMPLEMENT_STANDARD_RTTIEXT(AIS_Text, AIS_InteractiveObject)
|
IMPLEMENT_STANDARD_RTTIEXT(AIS_Text, AIS_InteractiveObject)
|
||||||
|
|
||||||
AIS_Text::AIS_Text( const TCollection_ExtendedString& text, const gp_Pnt& position,
|
AIS_Text::AIS_Text( const TCollection_ExtendedString& text, const gp_Pnt& position,
|
||||||
Quantity_Color color = Quantity_NOC_YELLOW,
|
Quantity_Color color = Quantity_NOC_YELLOW,
|
||||||
@ -1285,7 +1283,7 @@ gp_Dir EntityGUI_3DSketcherDlg::getPresentationPlane() const
|
|||||||
gp_Vec V = Vec1.Transformed(aTransform.Inverted());
|
gp_Vec V = Vec1.Transformed(aTransform.Inverted());
|
||||||
gp_Vec Vec3(V.X(),V.Y(),0.0);
|
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);
|
Vec3.Transform(aTransform);
|
||||||
if(Abs(Vec1.CrossMagnitude(Vec3)) > Precision::Confusion())
|
if(Abs(Vec1.CrossMagnitude(Vec3)) > Precision::Confusion())
|
||||||
{
|
{
|
||||||
@ -1482,7 +1480,7 @@ void EntityGUI_3DSketcherDlg::displayDimensions (bool store)
|
|||||||
aLength * sin(anAngle1 * M_PI / 180. ),
|
aLength * sin(anAngle1 * M_PI / 180. ),
|
||||||
0.0);
|
0.0);
|
||||||
|
|
||||||
// Express the coordinates in the refernce coordinate system (OXY)
|
// Express the coordinates in the reference coordinate system (OXY)
|
||||||
gp_Trsf aTranform = toReferenceSystem(P0);
|
gp_Trsf aTranform = toReferenceSystem(P0);
|
||||||
P1.Transform(aTranform);
|
P1.Transform(aTranform);
|
||||||
P2.Transform(aTranform);
|
P2.Transform(aTranform);
|
||||||
@ -1656,7 +1654,7 @@ void EntityGUI_3DSketcherDlg::displayText ( std::string theText,
|
|||||||
//================================================================
|
//================================================================
|
||||||
// Function : createAISLengthDimension()
|
// Function : createAISLengthDimension()
|
||||||
// Purpose : Method for creation of a length dimension object
|
// 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,
|
Handle(AIS_LengthDimension) EntityGUI_3DSketcherDlg::createAISLengthDimension(double theLength,
|
||||||
gp_Pnt P1,
|
gp_Pnt P1,
|
||||||
@ -1694,7 +1692,7 @@ Handle(AIS_LengthDimension) EntityGUI_3DSketcherDlg::createAISLengthDimension(do
|
|||||||
//================================================================
|
//================================================================
|
||||||
// Function : createAISAngleDimension()
|
// Function : createAISAngleDimension()
|
||||||
// Purpose : Method for creation of an angle dimension object
|
// 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,
|
Handle(AIS_AngleDimension) EntityGUI_3DSketcherDlg::createAISAngleDimension(double theAngle,
|
||||||
gp_Pnt P0,
|
gp_Pnt P0,
|
||||||
|
@ -64,7 +64,8 @@
|
|||||||
#include <BRepBuilderAPI_MakePolygon.hxx>
|
#include <BRepBuilderAPI_MakePolygon.hxx>
|
||||||
#include <BRepBuilderAPI_Transform.hxx>
|
#include <BRepBuilderAPI_Transform.hxx>
|
||||||
|
|
||||||
#include <AIS_TexturedShape.hxx>
|
#include <AIS_Shape.hxx>
|
||||||
|
|
||||||
#include <TCollection_AsciiString.hxx>
|
#include <TCollection_AsciiString.hxx>
|
||||||
#include <StdSelect_DisplayMode.hxx>
|
#include <StdSelect_DisplayMode.hxx>
|
||||||
|
|
||||||
@ -281,7 +282,7 @@ EntityGUI_FeatureDetectorDlg::EntityGUI_FeatureDetectorDlg( GeometryGUI* theGeom
|
|||||||
// about what will be considered INSIDE the zone we want to find the frontier of
|
// 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
|
// This makes the algorithm more robust against a bit inhomogeneous parts in the zone
|
||||||
// that we want to delimitate.
|
// 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.
|
// we consider as the OUTSIDE, the result will be bad.
|
||||||
// The current use cases are more of the first form :
|
// The current use cases are more of the first form :
|
||||||
// - Strongly contrasted INSIDE and OUTSIDE zones
|
// - Strongly contrasted INSIDE and OUTSIDE zones
|
||||||
|
@ -1634,7 +1634,7 @@ void EntityGUI_FieldDlg::activateSelection()
|
|||||||
// local selection
|
// local selection
|
||||||
if (!myShape->_is_nil() &&
|
if (!myShape->_is_nil() &&
|
||||||
!myEditCurrentArgument &&
|
!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();
|
GEOM_Displayer* aDisplayer = getDisplayer();
|
||||||
CORBA::String_var aMainEntry = myShape->GetStudyEntry();
|
CORBA::String_var aMainEntry = myShape->GetStudyEntry();
|
||||||
|
@ -908,7 +908,7 @@ void EntityGUI_SketcherDlg::Dir2Clicked( int constructorId )
|
|||||||
{
|
{
|
||||||
InitClick();
|
InitClick();
|
||||||
Group3Spin->SpinBox_DX->blockSignals(true); // Block signals in order not to modify
|
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);
|
Group3Spin->SpinBox_DZ->blockSignals(true);
|
||||||
|
|
||||||
Group2Spin->SpinBox_DX->blockSignals(true);
|
Group2Spin->SpinBox_DX->blockSignals(true);
|
||||||
@ -1591,7 +1591,7 @@ void EntityGUI_SketcherDlg::LineEditReturnPressed()
|
|||||||
myEditCurrentArgument = Group2Sel->LineEdit2;
|
myEditCurrentArgument = Group2Sel->LineEdit2;
|
||||||
|
|
||||||
/* User name of object input management */
|
/* 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. */
|
/* so SelectionIntoArgument() is automatically called. */
|
||||||
const QString objectUserName = myEditCurrentArgument->text();
|
const QString objectUserName = myEditCurrentArgument->text();
|
||||||
QWidget* thisWidget = (QWidget*)this;
|
QWidget* thisWidget = (QWidget*)this;
|
||||||
@ -1692,8 +1692,8 @@ void EntityGUI_SketcherDlg::closeEvent( QCloseEvent* e )
|
|||||||
void EntityGUI_SketcherDlg::OnPointSelected(Qt::KeyboardModifiers modifiers, const gp_Pnt& thePnt,
|
void EntityGUI_SketcherDlg::OnPointSelected(Qt::KeyboardModifiers modifiers, const gp_Pnt& thePnt,
|
||||||
bool isStart )
|
bool isStart )
|
||||||
{
|
{
|
||||||
// NOTE Basing the autoapply functionnality on the background picture has no sense anymore
|
// NOTE Basing the autoapply functionality on the background picture has no sense anymore
|
||||||
// The import picture functionnality is now used for drawing on top of a picture
|
// The import picture functionality is now used for drawing on top of a picture
|
||||||
|
|
||||||
// SUIT_ViewWindow* theViewWindow = getDesktop()->activeWindow();
|
// SUIT_ViewWindow* theViewWindow = getDesktop()->activeWindow();
|
||||||
// OCCViewer_ViewPort3d* vp = ((OCCViewer_ViewWindow*)theViewWindow)->getViewPort();
|
// OCCViewer_ViewPort3d* vp = ((OCCViewer_ViewWindow*)theViewWindow)->getViewPort();
|
||||||
|
@ -40,15 +40,13 @@ SET(_link_LIBRARIES
|
|||||||
${CAS_TKCDF}
|
${CAS_TKCDF}
|
||||||
${CAS_TKG3d}
|
${CAS_TKG3d}
|
||||||
${CAS_TKStdL}
|
${CAS_TKStdL}
|
||||||
|
${CAS_TKStd}
|
||||||
|
${CAS_TKBin}
|
||||||
${KERNEL_SALOMELocalTrace}
|
${KERNEL_SALOMELocalTrace}
|
||||||
${KERNEL_OpUtil}
|
${KERNEL_OpUtil}
|
||||||
GEOMSketcher
|
GEOMSketcher
|
||||||
)
|
)
|
||||||
|
|
||||||
IF(CAS_VERSION_STR VERSION_GREATER "7.0.0")
|
|
||||||
LIST(APPEND _link_LIBRARIES ${CAS_TKStd} ${CAS_TKBin})
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
# --- headers ---
|
# --- headers ---
|
||||||
|
|
||||||
SET(GEOM_HEADERS
|
SET(GEOM_HEADERS
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include <GEOM_Application.hxx>
|
#include <GEOM_Application.hxx>
|
||||||
|
|
||||||
OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_Application, TDocStd_Application)
|
IMPLEMENT_STANDARD_RTTIEXT(GEOM_Application, TDocStd_Application)
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : GEOM_Application
|
//function : GEOM_Application
|
||||||
@ -42,22 +42,6 @@ GEOM_Application::~GEOM_Application()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#if OCC_VERSION_LARGE <= 0x07000000
|
|
||||||
//=======================================================================
|
|
||||||
//function : Formats
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
|
|
||||||
void GEOM_Application::Formats(TColStd_SequenceOfExtendedString& Formats)
|
|
||||||
{
|
|
||||||
Formats.Append(TCollection_ExtendedString ("SALOME_GEOM"));
|
|
||||||
#if OCC_VERSION_MAJOR > 6
|
|
||||||
Formats.Append(TCollection_ExtendedString ("BinOcaf"));
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : ResourcesName
|
//function : ResourcesName
|
||||||
//purpose :
|
//purpose :
|
||||||
|
@ -28,21 +28,16 @@
|
|||||||
#include <Standard_DefineHandle.hxx>
|
#include <Standard_DefineHandle.hxx>
|
||||||
#include <TColStd_SequenceOfExtendedString.hxx>
|
#include <TColStd_SequenceOfExtendedString.hxx>
|
||||||
|
|
||||||
#include <Basics_OCCTVersion.hxx>
|
|
||||||
|
|
||||||
class GEOM_Application : public TDocStd_Application
|
class GEOM_Application : public TDocStd_Application
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Standard_EXPORT GEOM_Application();
|
Standard_EXPORT GEOM_Application();
|
||||||
Standard_EXPORT ~GEOM_Application();
|
Standard_EXPORT ~GEOM_Application();
|
||||||
|
|
||||||
#if OCC_VERSION_LARGE <= 0x07000000
|
|
||||||
Standard_EXPORT virtual void Formats(TColStd_SequenceOfExtendedString& Formats);
|
|
||||||
#endif
|
|
||||||
Standard_EXPORT Standard_CString ResourcesName();
|
Standard_EXPORT Standard_CString ResourcesName();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_Application,TDocStd_Application)
|
DEFINE_STANDARD_RTTIEXT(GEOM_Application,TDocStd_Application)
|
||||||
};
|
};
|
||||||
|
|
||||||
DEFINE_STANDARD_HANDLE(GEOM_Application, TDocStd_Application)
|
DEFINE_STANDARD_HANDLE(GEOM_Application, TDocStd_Application)
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
#include <TDataStd_Name.hxx>
|
#include <TDataStd_Name.hxx>
|
||||||
#include <TDocStd_Owner.hxx>
|
#include <TDocStd_Owner.hxx>
|
||||||
|
|
||||||
OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_BaseDriver,TFunction_Driver);
|
IMPLEMENT_STANDARD_RTTIEXT(GEOM_BaseDriver,TFunction_Driver);
|
||||||
|
|
||||||
//================================================================================
|
//================================================================================
|
||||||
/*!
|
/*!
|
||||||
|
@ -36,18 +36,10 @@
|
|||||||
#include <TColStd_HSequenceOfTransient.hxx>
|
#include <TColStd_HSequenceOfTransient.hxx>
|
||||||
#include <TColStd_HArray1OfInteger.hxx>
|
#include <TColStd_HArray1OfInteger.hxx>
|
||||||
|
|
||||||
#include <Basics_OCCTVersion.hxx>
|
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#if OCC_VERSION_MAJOR < 7
|
|
||||||
#define LOGBOOK TFunction_Logbook
|
|
||||||
#else
|
|
||||||
#define LOGBOOK Handle(TFunction_Logbook)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct GEOM_Param
|
struct GEOM_Param
|
||||||
{
|
{
|
||||||
std::string name;
|
std::string name;
|
||||||
@ -105,7 +97,7 @@ public:
|
|||||||
return params.back();
|
return params.back();
|
||||||
}
|
}
|
||||||
|
|
||||||
OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_BaseDriver,TFunction_Driver)
|
DEFINE_STANDARD_RTTIEXT(GEOM_BaseDriver,TFunction_Driver)
|
||||||
};
|
};
|
||||||
|
|
||||||
DEFINE_STANDARD_HANDLE (GEOM_BaseDriver,TFunction_Driver);
|
DEFINE_STANDARD_HANDLE (GEOM_BaseDriver,TFunction_Driver);
|
||||||
|
@ -293,7 +293,7 @@ TCollection_AsciiString GEOM_BaseObject::GetName()
|
|||||||
aName = aNameAttr->Get();
|
aName = aNameAttr->Get();
|
||||||
// do not return pointer of local variable
|
// do not return pointer of local variable
|
||||||
// return aName.ToCString();
|
// 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;
|
return aName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -486,4 +486,4 @@ TDF_Label GEOM_BaseObject::GetFreeLabel()
|
|||||||
return _label.FindChild(FREE_LABEL);
|
return _label.FindChild(FREE_LABEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_BaseObject, Standard_Transient );
|
IMPLEMENT_STANDARD_RTTIEXT(GEOM_BaseObject, Standard_Transient );
|
||||||
|
@ -162,7 +162,7 @@ public:
|
|||||||
TCollection_AsciiString _parameters;
|
TCollection_AsciiString _parameters;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_BaseObject,Standard_Transient)
|
DEFINE_STANDARD_RTTIEXT(GEOM_BaseObject,Standard_Transient)
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -34,8 +34,6 @@
|
|||||||
#include "GEOM_SubShapeDriver.hxx"
|
#include "GEOM_SubShapeDriver.hxx"
|
||||||
#include "Sketcher_Profile.hxx"
|
#include "Sketcher_Profile.hxx"
|
||||||
|
|
||||||
#include <Basics_OCCTVersion.hxx>
|
|
||||||
|
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
|
|
||||||
#include <Basics_Utils.hxx>
|
#include <Basics_Utils.hxx>
|
||||||
@ -66,11 +64,9 @@
|
|||||||
|
|
||||||
#include <Resource_DataMapIteratorOfDataMapOfAsciiStringAsciiString.hxx>
|
#include <Resource_DataMapIteratorOfDataMapOfAsciiStringAsciiString.hxx>
|
||||||
|
|
||||||
#if OCC_VERSION_LARGE > 0x07000000
|
|
||||||
#include <BinDrivers.hxx>
|
#include <BinDrivers.hxx>
|
||||||
#include <StdDrivers_DocumentRetrievalDriver.hxx>
|
#include <StdDrivers_DocumentRetrievalDriver.hxx>
|
||||||
#include <PCDM_StorageDriver.hxx>
|
#include <PCDM_StorageDriver.hxx>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
@ -90,6 +86,14 @@ static int MYDEBUG = 0;
|
|||||||
static int MYDEBUG = 0;
|
static int MYDEBUG = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// VSR 29/08/2017: 0023327, 0023428: eliminate unnecessary lines in Python dump
|
||||||
|
// Next macro, when defined, causes appearing of SubShapeAllIDs(), SubShapeAllSortedIDs(), GetSameIDs()
|
||||||
|
// and other such commands in Python dump.
|
||||||
|
// See also GEOMImpl_IShapesOperations.cxx.
|
||||||
|
// ---------------------------------------
|
||||||
|
// #define DUMP_SUBSHAPE_IDS
|
||||||
|
// ---------------------------------------
|
||||||
|
|
||||||
typedef std::map< TCollection_AsciiString, TCollection_AsciiString > TSting2StringMap;
|
typedef std::map< TCollection_AsciiString, TCollection_AsciiString > TSting2StringMap;
|
||||||
typedef std::map< TCollection_AsciiString, TObjectData > TSting2ObjDataMap;
|
typedef std::map< TCollection_AsciiString, TObjectData > TSting2ObjDataMap;
|
||||||
typedef std::map< TCollection_AsciiString, TObjectData* > TSting2ObjDataPtrMap;
|
typedef std::map< TCollection_AsciiString, TObjectData* > TSting2ObjDataPtrMap;
|
||||||
@ -149,6 +153,8 @@ static TCollection_AsciiString GetPublishCommands
|
|||||||
const TIntToListIntMap &theMapRefs,
|
const TIntToListIntMap &theMapRefs,
|
||||||
std::set< int > &thePublished);
|
std::set< int > &thePublished);
|
||||||
|
|
||||||
|
void Prettify(TCollection_AsciiString& theScript);
|
||||||
|
|
||||||
//================================================================================
|
//================================================================================
|
||||||
/*!
|
/*!
|
||||||
* \brief Fix up the name of python variable
|
* \brief Fix up the name of python variable
|
||||||
@ -215,11 +221,9 @@ GEOM_Engine::GEOM_Engine()
|
|||||||
TFunction_DriverTable::Get()->AddDriver(GEOM_Object::GetSubShapeID(), new GEOM_SubShapeDriver());
|
TFunction_DriverTable::Get()->AddDriver(GEOM_Object::GetSubShapeID(), new GEOM_SubShapeDriver());
|
||||||
|
|
||||||
_OCAFApp = new GEOM_Application();
|
_OCAFApp = new GEOM_Application();
|
||||||
#if OCC_VERSION_LARGE > 0x07000000
|
|
||||||
_OCAFApp->DefineFormat("SALOME_GEOM", "GEOM Document Version 1.0", "sgd",
|
_OCAFApp->DefineFormat("SALOME_GEOM", "GEOM Document Version 1.0", "sgd",
|
||||||
new StdDrivers_DocumentRetrievalDriver, 0);
|
new StdDrivers_DocumentRetrievalDriver, 0);
|
||||||
BinDrivers::DefineFormat(_OCAFApp);
|
BinDrivers::DefineFormat(_OCAFApp);
|
||||||
#endif
|
|
||||||
_UndoLimit = 0;
|
_UndoLimit = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -253,11 +257,7 @@ Handle(TDocStd_Document) GEOM_Engine::GetDocument(bool force)
|
|||||||
aDoc = _document;
|
aDoc = _document;
|
||||||
}
|
}
|
||||||
else if (force) {
|
else if (force) {
|
||||||
#if OCC_VERSION_MAJOR > 6
|
|
||||||
_OCAFApp->NewDocument("BinOcaf", aDoc);
|
_OCAFApp->NewDocument("BinOcaf", aDoc);
|
||||||
#else
|
|
||||||
_OCAFApp->NewDocument("SALOME_GEOM", aDoc);
|
|
||||||
#endif
|
|
||||||
aDoc->SetUndoLimit(_UndoLimit);
|
aDoc->SetUndoLimit(_UndoLimit);
|
||||||
_document = aDoc;
|
_document = aDoc;
|
||||||
}
|
}
|
||||||
@ -393,9 +393,8 @@ Handle(GEOM_Object) GEOM_Engine::AddSubShape(Handle(GEOM_Object) th
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Standard_Failure) {
|
catch (Standard_Failure& aFail) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
MESSAGE("GEOM_Engine::AddSubShape Error: " << aFail.GetMessageString());
|
||||||
MESSAGE("GEOM_Engine::AddSubShape Error: " << aFail->GetMessageString());
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -470,7 +469,7 @@ bool GEOM_Engine::RemoveObject(Handle(GEOM_BaseObject)& theObject)
|
|||||||
if ( _freeLabels.empty() || _freeLabels.back() != aLabel )
|
if ( _freeLabels.empty() || _freeLabels.back() != aLabel )
|
||||||
_freeLabels.push_back(aLabel);
|
_freeLabels.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
|
// as an alive object when aLabel is reused for a new object
|
||||||
theObject->_label = aLabel.Root();
|
theObject->_label = aLabel.Root();
|
||||||
theObject->_ior.Clear();
|
theObject->_ior.Clear();
|
||||||
@ -527,12 +526,10 @@ bool GEOM_Engine::Load(const char* theFileName)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if OCC_VERSION_MAJOR > 6
|
|
||||||
// Replace old document format by the new one.
|
// Replace old document format by the new one.
|
||||||
if (aDoc->StorageFormat().IsEqual("SALOME_GEOM")) {
|
if (aDoc->StorageFormat().IsEqual("SALOME_GEOM")) {
|
||||||
aDoc->ChangeStorageFormat("BinOcaf");
|
aDoc->ChangeStorageFormat("BinOcaf");
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
aDoc->SetUndoLimit(_UndoLimit);
|
aDoc->SetUndoLimit(_UndoLimit);
|
||||||
|
|
||||||
@ -611,7 +608,7 @@ TCollection_AsciiString GEOM_Engine::DumpPython(std::vector<TObjectData>& theObj
|
|||||||
// a map containing copies of TObjectData from theObjectData
|
// a map containing copies of TObjectData from theObjectData
|
||||||
TSting2ObjDataMap aEntry2ObjData;
|
TSting2ObjDataMap aEntry2ObjData;
|
||||||
// contains pointers to TObjectData of either aEntry2ObjData or theObjectData; the latter
|
// 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;
|
TSting2ObjDataPtrMap aStEntry2ObjDataPtr;
|
||||||
|
|
||||||
//Resource_DataMapOfAsciiStringAsciiString aEntry2StEntry, aStEntry2Entry, theObjectNames;
|
//Resource_DataMapOfAsciiStringAsciiString aEntry2StEntry, aStEntry2Entry, theObjectNames;
|
||||||
@ -811,6 +808,11 @@ TCollection_AsciiString GEOM_Engine::DumpPython(std::vector<TObjectData>& theObj
|
|||||||
aScript.Insert( posToInsertGlobalVars, globalVars );
|
aScript.Insert( posToInsertGlobalVars, globalVars );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// VSR 29/08/2017: 0023327, 0023428: eliminate unnecessary lines in Python dump
|
||||||
|
#ifndef DUMP_SUBSHAPE_IDS
|
||||||
|
Prettify(aScript);
|
||||||
|
#endif
|
||||||
|
|
||||||
return aScript;
|
return aScript;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1780,7 +1782,7 @@ void PublishObject (TObjectData& theObjectData,
|
|||||||
|
|
||||||
// store aCreationCommand before publishing commands
|
// store aCreationCommand before publishing commands
|
||||||
int tag = GetTag(theObjectData._entry);
|
int tag = GetTag(theObjectData._entry);
|
||||||
theEntryToCmdMap.insert( std::make_pair( tag + 2*theEntry2ObjData.size(), aCreationCommand ));
|
theEntryToCmdMap.insert( std::make_pair( tag + -2*theEntry2ObjData.size(), aCreationCommand ));
|
||||||
}
|
}
|
||||||
|
|
||||||
// make a command
|
// make a command
|
||||||
@ -1845,6 +1847,43 @@ TCollection_AsciiString GetPublishCommands
|
|||||||
return aResult;
|
return aResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Prettify(TCollection_AsciiString& theScript)
|
||||||
|
{
|
||||||
|
TCollection_AsciiString output;
|
||||||
|
static std::list<TCollection_AsciiString> ToRemove;
|
||||||
|
if (ToRemove.empty()) {
|
||||||
|
ToRemove.push_back("geompy.SubShapeAllIDs");
|
||||||
|
ToRemove.push_back("geompy.SubShapeAllSortedCentresIDs");
|
||||||
|
ToRemove.push_back("geompy.SubShapeAllSortedIDs");
|
||||||
|
ToRemove.push_back("geompy.GetFreeFacesIDs");
|
||||||
|
ToRemove.push_back("geompy.GetShapesOnBoxIDs");
|
||||||
|
ToRemove.push_back("geompy.GetShapesOnShapeIDs");
|
||||||
|
ToRemove.push_back("geompy.GetShapesOnPlaneIDs");
|
||||||
|
ToRemove.push_back("geompy.GetShapesOnPlaneWithLocationIDs");
|
||||||
|
ToRemove.push_back("geompy.GetShapesOnCylinderIDs");
|
||||||
|
ToRemove.push_back("geompy.GetShapesOnCylinderWithLocationIDs");
|
||||||
|
ToRemove.push_back("geompy.GetShapesOnSphereIDs");
|
||||||
|
ToRemove.push_back("geompy.GetShapesOnQuadrangleIDs");
|
||||||
|
ToRemove.push_back("geompy.GetSameIDs");
|
||||||
|
}
|
||||||
|
|
||||||
|
int start = 1;
|
||||||
|
while (start <= theScript.Length()) {
|
||||||
|
int end = theScript.Location("\n", start, theScript.Length());
|
||||||
|
if (end == -1) end = theScript.Length();
|
||||||
|
TCollection_AsciiString line = theScript.SubString(start, end);
|
||||||
|
bool found = false;
|
||||||
|
for (std::list<TCollection_AsciiString>::const_iterator it = ToRemove.begin(); it != ToRemove.end() && !found; ++it)
|
||||||
|
found = line.Search( *it ) != -1;
|
||||||
|
if (!found)
|
||||||
|
output += line;
|
||||||
|
start = end + 1;
|
||||||
|
}
|
||||||
|
theScript = output;
|
||||||
|
|
||||||
|
//OK @@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
}
|
||||||
|
|
||||||
//================================================================================
|
//================================================================================
|
||||||
/*!
|
/*!
|
||||||
* \brief Constructor
|
* \brief Constructor
|
||||||
|
@ -27,8 +27,6 @@
|
|||||||
#include "GEOM_Object.hxx"
|
#include "GEOM_Object.hxx"
|
||||||
#include "GEOM_DataMapOfAsciiStringTransient.hxx"
|
#include "GEOM_DataMapOfAsciiStringTransient.hxx"
|
||||||
|
|
||||||
#include <Basics_OCCTVersion.hxx>
|
|
||||||
|
|
||||||
#include <TColStd_DataMapOfIntegerTransient.hxx>
|
#include <TColStd_DataMapOfIntegerTransient.hxx>
|
||||||
|
|
||||||
#include <Resource_DataMapOfAsciiStringAsciiString.hxx>
|
#include <Resource_DataMapOfAsciiStringAsciiString.hxx>
|
||||||
@ -91,11 +89,11 @@ typedef std::map<int, std::list<TDF_Label> > TFreeLabelsList;
|
|||||||
|
|
||||||
class GEOM_Engine
|
class GEOM_Engine
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Standard_EXPORT GEOM_Engine();
|
Standard_EXPORT GEOM_Engine();
|
||||||
Standard_EXPORT virtual ~GEOM_Engine();
|
Standard_EXPORT virtual ~GEOM_Engine();
|
||||||
|
|
||||||
//Retuns the engine
|
//Returns the engine
|
||||||
Standard_EXPORT static GEOM_Engine* GetEngine();
|
Standard_EXPORT static GEOM_Engine* GetEngine();
|
||||||
|
|
||||||
//Returns the OCAF document by its ID, if document doesn't exists it will be created
|
//Returns the OCAF document by its ID, if document doesn't exists it will be created
|
||||||
@ -166,10 +164,10 @@ class GEOM_Engine
|
|||||||
const TCollection_AsciiString& anEntry,
|
const TCollection_AsciiString& anEntry,
|
||||||
Resource_DataMapOfAsciiStringAsciiString& aNameToEntry);
|
Resource_DataMapOfAsciiStringAsciiString& aNameToEntry);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Standard_EXPORT static void SetEngine(GEOM_Engine* theEngine);
|
Standard_EXPORT static void SetEngine(GEOM_Engine* theEngine);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
Handle(GEOM_Application) _OCAFApp;
|
Handle(GEOM_Application) _OCAFApp;
|
||||||
Handle(TDocStd_Document) _document;
|
Handle(TDocStd_Document) _document;
|
||||||
|
@ -46,7 +46,7 @@ namespace
|
|||||||
{
|
{
|
||||||
//================================================================================
|
//================================================================================
|
||||||
/*!
|
/*!
|
||||||
* \brief Returns a funtion with a given type OR the 1st function
|
* \brief Returns a function with a given type OR the 1st function
|
||||||
*/
|
*/
|
||||||
//================================================================================
|
//================================================================================
|
||||||
|
|
||||||
@ -101,7 +101,7 @@ void GEOM_Field::Init(const Handle(GEOM_Object)& theShape,
|
|||||||
{
|
{
|
||||||
Handle(GEOM_Function) fun = GetFunction(1);
|
Handle(GEOM_Function) fun = GetFunction(1);
|
||||||
if ( !fun.IsNull() )
|
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 );
|
fun = AddFunction( GetFieldID(), FUN_ADD_FIELD );
|
||||||
|
|
||||||
GEOM_IField data( fun );
|
GEOM_IField data( fun );
|
||||||
@ -498,7 +498,7 @@ void GEOM_FieldStep::Init(const Handle(GEOM_Field)& theField,
|
|||||||
{
|
{
|
||||||
Handle(GEOM_Function) fun = GetFunction(1);
|
Handle(GEOM_Function) fun = GetFunction(1);
|
||||||
if ( !fun.IsNull() )
|
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 );
|
fun = AddFunction( GEOM_Field::GetFieldID(), GEOM_Field::FUN_ADD_STEP );
|
||||||
|
|
||||||
GEOM_IField data( fun );
|
GEOM_IField data( fun );
|
||||||
@ -756,5 +756,5 @@ const Standard_GUID& GEOM_FieldStep::GetDataID()
|
|||||||
return TDataStd_ExtStringArray::GetID();
|
return TDataStd_ExtStringArray::GetID();
|
||||||
}
|
}
|
||||||
|
|
||||||
OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_Field, GEOM_BaseObject );
|
IMPLEMENT_STANDARD_RTTIEXT(GEOM_Field, GEOM_BaseObject );
|
||||||
OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_FieldStep, GEOM_BaseObject );
|
IMPLEMENT_STANDARD_RTTIEXT(GEOM_FieldStep, GEOM_BaseObject );
|
||||||
|
@ -123,7 +123,7 @@ class GEOM_Field : public GEOM_BaseObject
|
|||||||
// Returns all steps
|
// Returns all steps
|
||||||
Standard_EXPORT std::list< Handle(GEOM_FieldStep)> GetSteps();
|
Standard_EXPORT std::list< Handle(GEOM_FieldStep)> GetSteps();
|
||||||
|
|
||||||
OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_Field,GEOM_BaseObject)
|
DEFINE_STANDARD_RTTIEXT(GEOM_Field,GEOM_BaseObject)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@ -185,7 +185,7 @@ public:
|
|||||||
// Returns GUID of CAF data array
|
// Returns GUID of CAF data array
|
||||||
const Standard_GUID& GetDataID();
|
const Standard_GUID& GetDataID();
|
||||||
|
|
||||||
OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_FieldStep,GEOM_BaseObject)
|
DEFINE_STANDARD_RTTIEXT(GEOM_FieldStep,GEOM_BaseObject)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -27,8 +27,6 @@
|
|||||||
#include <GEOM_Solver.hxx>
|
#include <GEOM_Solver.hxx>
|
||||||
#include <GEOM_ISubShape.hxx>
|
#include <GEOM_ISubShape.hxx>
|
||||||
|
|
||||||
#include <Basics_OCCTVersion.hxx>
|
|
||||||
|
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
|
|
||||||
#include <TDF.hxx>
|
#include <TDF.hxx>
|
||||||
@ -155,7 +153,7 @@ GEOM_Function::~GEOM_Function()
|
|||||||
|
|
||||||
//================================================================================
|
//================================================================================
|
||||||
/*!
|
/*!
|
||||||
* \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
|
||||||
*/
|
*/
|
||||||
//================================================================================
|
//================================================================================
|
||||||
|
|
||||||
@ -250,9 +248,8 @@ TopoDS_Shape GEOM_Function::GetValue()
|
|||||||
return aShape;
|
return aShape;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Standard_Failure) {
|
catch (Standard_Failure& aFail) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
MESSAGE("GEOM_Function::GetValue Error: " << aFail.GetMessageString());
|
||||||
MESSAGE("GEOM_Function::GetValue Error: " << aFail->GetMessageString());
|
|
||||||
return aShape;
|
return aShape;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -980,4 +977,4 @@ void* GEOM_Function::GetCallBackData()
|
|||||||
return reinterpret_cast<void*> ( address );
|
return reinterpret_cast<void*> ( address );
|
||||||
}
|
}
|
||||||
|
|
||||||
OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_Function, Standard_Transient );
|
IMPLEMENT_STANDARD_RTTIEXT(GEOM_Function, Standard_Transient );
|
||||||
|
@ -36,8 +36,6 @@
|
|||||||
#include <TDataStd_ListOfExtendedString.hxx>
|
#include <TDataStd_ListOfExtendedString.hxx>
|
||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
|
|
||||||
#include <Basics_OCCTVersion.hxx>
|
|
||||||
|
|
||||||
class GEOM_Function;
|
class GEOM_Function;
|
||||||
DEFINE_STANDARD_HANDLE (GEOM_Function, Standard_Transient);
|
DEFINE_STANDARD_HANDLE (GEOM_Function, Standard_Transient);
|
||||||
|
|
||||||
@ -174,7 +172,7 @@ public:
|
|||||||
//Returns true if the last method succided
|
//Returns true if the last method succided
|
||||||
Standard_EXPORT bool IsDone() { return _isDone; }
|
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();
|
Standard_EXPORT bool IsLastFuntion();
|
||||||
|
|
||||||
//Returns a sequence of the external dependencies of this function
|
//Returns a sequence of the external dependencies of this function
|
||||||
@ -197,7 +195,7 @@ public:
|
|||||||
//Returns top label of this function's naming tree
|
//Returns top label of this function's naming tree
|
||||||
Standard_EXPORT TDF_Label GetNamingEntry (const Standard_Boolean create = Standard_True);
|
Standard_EXPORT TDF_Label GetNamingEntry (const Standard_Boolean create = Standard_True);
|
||||||
|
|
||||||
OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_Function,Standard_Transient)
|
DEFINE_STANDARD_RTTIEXT(GEOM_Function,Standard_Transient)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -296,5 +296,5 @@ GEOM_Object::GetLastFunctions( const std::list< Handle(GEOM_Object) >& theObject
|
|||||||
return funs;
|
return funs;
|
||||||
}
|
}
|
||||||
|
|
||||||
OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_Object, GEOM_BaseObject );
|
IMPLEMENT_STANDARD_RTTIEXT(GEOM_Object, GEOM_BaseObject );
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ class GEOM_Object : public GEOM_BaseObject
|
|||||||
GetLastFunctions( const std::list< Handle(GEOM_Object) >& theObjects );
|
GetLastFunctions( const std::list< Handle(GEOM_Object) >& theObjects );
|
||||||
|
|
||||||
public:
|
public:
|
||||||
OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_Object,GEOM_BaseObject)
|
DEFINE_STANDARD_RTTIEXT(GEOM_Object,GEOM_BaseObject)
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -170,41 +170,43 @@ namespace GEOM
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
Handle(GEOM_Object) GetCreatedLast(const Handle(GEOM_Object)& theObj1,
|
Handle(GEOM_BaseObject) GetCreatedLast(const Handle(Standard_Transient)& theObj1,
|
||||||
const Handle(GEOM_Object)& theObj2)
|
const Handle(Standard_Transient)& theObj2)
|
||||||
{
|
{
|
||||||
if (theObj1.IsNull()) return theObj2;
|
Handle(GEOM_BaseObject) bo1 = Handle(GEOM_Object)::DownCast(theObj1);
|
||||||
if (theObj2.IsNull()) return theObj1;
|
Handle(GEOM_BaseObject) bo2 = Handle(GEOM_Object)::DownCast(theObj2);
|
||||||
|
if (bo1.IsNull()) return bo2;
|
||||||
|
if (bo2.IsNull()) return bo1;
|
||||||
|
|
||||||
TColStd_ListOfInteger aTags1, aTags2;
|
TColStd_ListOfInteger aTags1, aTags2;
|
||||||
TDF_Tool::TagList(theObj1->GetEntry(), aTags1);
|
TDF_Tool::TagList(bo1->GetEntry(), aTags1);
|
||||||
TDF_Tool::TagList(theObj2->GetEntry(), aTags2);
|
TDF_Tool::TagList(bo2->GetEntry(), aTags2);
|
||||||
TColStd_ListIteratorOfListOfInteger aListIter1(aTags1), aListIter2(aTags2);
|
TColStd_ListIteratorOfListOfInteger aListIter1(aTags1), aListIter2(aTags2);
|
||||||
for (; aListIter1.More(); aListIter1.Next(), aListIter2.Next()) {
|
for (; aListIter1.More(); aListIter1.Next(), aListIter2.Next()) {
|
||||||
if (!aListIter2.More())
|
if (!aListIter2.More())
|
||||||
return theObj1; // anObj1 is stored under anObj2
|
return bo1; // anObj1 is stored under anObj2
|
||||||
|
|
||||||
if (aListIter1.Value() > aListIter2.Value())
|
if (aListIter1.Value() > aListIter2.Value())
|
||||||
return theObj1;
|
return bo1;
|
||||||
else if (aListIter1.Value() < aListIter2.Value())
|
else if (aListIter1.Value() < aListIter2.Value())
|
||||||
return theObj2;
|
return bo2;
|
||||||
}
|
}
|
||||||
return theObj1;
|
return bo1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Handle(GEOM_Object) GetCreatedLast(const Handle(TColStd_HSequenceOfTransient)& theObjects)
|
Handle(GEOM_BaseObject) GetCreatedLast(const Handle(TColStd_HSequenceOfTransient)& theObjects)
|
||||||
{
|
{
|
||||||
Handle(GEOM_Object) anObject, aLatest;
|
Handle(GEOM_BaseObject) anObject, aLatest;
|
||||||
int i, aLen = theObjects->Length();
|
int i, aLen = theObjects->Length();
|
||||||
if (aLen < 1)
|
if (aLen < 1)
|
||||||
return aLatest;
|
return aLatest;
|
||||||
|
|
||||||
for (i = 1; i <= aLen; i++) {
|
for (i = 1; i <= aLen; i++) {
|
||||||
anObject = Handle(GEOM_Object)::DownCast(theObjects->Value(i));
|
anObject = Handle(GEOM_BaseObject)::DownCast(theObjects->Value(i));
|
||||||
if ( anObject.IsNull() ) {
|
if ( anObject.IsNull() ) {
|
||||||
Handle(GEOM_Function) fun = Handle(GEOM_Function)::DownCast(theObjects->Value(i));
|
Handle(GEOM_Function) fun = Handle(GEOM_Function)::DownCast(theObjects->Value(i));
|
||||||
if ( !fun.IsNull() )
|
if ( !fun.IsNull() )
|
||||||
anObject = GEOM_Object::GetObject( fun->GetOwnerEntry() );
|
anObject = GEOM_BaseObject::GetObject( fun->GetOwnerEntry() );
|
||||||
}
|
}
|
||||||
aLatest = GetCreatedLast(aLatest, anObject);
|
aLatest = GetCreatedLast(aLatest, anObject);
|
||||||
}
|
}
|
||||||
|
@ -48,10 +48,8 @@ namespace GEOM
|
|||||||
|
|
||||||
//operator TCollection_AsciiString () const;
|
//operator TCollection_AsciiString () const;
|
||||||
|
|
||||||
#if OCC_VERSION_MAJOR >= 7
|
|
||||||
template <class T>
|
template <class T>
|
||||||
Standard_EXPORT TPythonDump& operator<< (const Handle(T)& theObject) { return *this << theObject.get(); }
|
Standard_EXPORT TPythonDump& operator<< (const Handle(T)& theObject) { return *this << theObject.get(); }
|
||||||
#endif
|
|
||||||
Standard_EXPORT TPythonDump& operator<< (bool theArg);
|
Standard_EXPORT TPythonDump& operator<< (bool theArg);
|
||||||
Standard_EXPORT TPythonDump& operator<< (long int theArg);
|
Standard_EXPORT TPythonDump& operator<< (long int theArg);
|
||||||
Standard_EXPORT TPythonDump& operator<< (int theArg);
|
Standard_EXPORT TPythonDump& operator<< (int theArg);
|
||||||
@ -69,12 +67,12 @@ namespace GEOM
|
|||||||
|
|
||||||
/*! Returns an object from two given, which has the latest entry
|
/*! Returns an object from two given, which has the latest entry
|
||||||
*/
|
*/
|
||||||
Standard_EXPORT Handle(::GEOM_Object) GetCreatedLast (const Handle(::GEOM_Object)& theObj1,
|
Standard_EXPORT Handle(::GEOM_BaseObject) GetCreatedLast (const Handle(Standard_Transient)& theObj1,
|
||||||
const Handle(::GEOM_Object)& theObj2);
|
const Handle(Standard_Transient)& theObj2);
|
||||||
|
|
||||||
/*! Returns an object from \a theObjects, which has the latest entry
|
/*! Returns an object from \a theObjects, which has the latest entry
|
||||||
*/
|
*/
|
||||||
Standard_EXPORT Handle(::GEOM_Object) GetCreatedLast (const Handle(TColStd_HSequenceOfTransient)& theObjects);
|
Standard_EXPORT Handle(::GEOM_BaseObject) GetCreatedLast (const Handle(TColStd_HSequenceOfTransient)& theObjects);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -64,11 +64,7 @@ bool GEOM_Solver::ComputeFunction(Handle(GEOM_Function) theFunction)
|
|||||||
|
|
||||||
aDriver->Init(theFunction->GetEntry());
|
aDriver->Init(theFunction->GetEntry());
|
||||||
|
|
||||||
#if OCC_VERSION_MAJOR < 7
|
|
||||||
TFunction_Logbook aLog;
|
|
||||||
#else
|
|
||||||
Handle(TFunction_Logbook) aLog = TFunction_Logbook::Set( aDriver->Label() );
|
Handle(TFunction_Logbook) aLog = TFunction_Logbook::Set( aDriver->Label() );
|
||||||
#endif
|
|
||||||
if(aDriver->Execute(aLog) == 0) return false;
|
if(aDriver->Execute(aLog) == 0) return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -48,7 +48,7 @@ GEOM_SubShapeDriver::GEOM_SubShapeDriver()
|
|||||||
//function : Execute
|
//function : Execute
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Integer GEOM_SubShapeDriver::Execute(LOGBOOK& log) const
|
Standard_Integer GEOM_SubShapeDriver::Execute(Handle(TFunction_Logbook)& log) const
|
||||||
{
|
{
|
||||||
if (Label().IsNull()) return 0;
|
if (Label().IsNull()) return 0;
|
||||||
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
|
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
|
||||||
@ -101,11 +101,7 @@ Standard_Integer GEOM_SubShapeDriver::Execute(LOGBOOK& log) const
|
|||||||
if (aShape.IsNull()) return 0;
|
if (aShape.IsNull()) return 0;
|
||||||
|
|
||||||
aFunction->SetValue(aShape);
|
aFunction->SetValue(aShape);
|
||||||
#if OCC_VERSION_MAJOR < 7
|
|
||||||
log.SetTouched(Label());
|
|
||||||
#else
|
|
||||||
log->SetTouched(Label());
|
log->SetTouched(Label());
|
||||||
#endif
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -159,4 +155,4 @@ GetCreationInformation(std::string& theOperationName,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOM_SubShapeDriver,GEOM_BaseDriver);
|
IMPLEMENT_STANDARD_RTTIEXT (GEOM_SubShapeDriver,GEOM_BaseDriver);
|
||||||
|
@ -35,9 +35,9 @@ class GEOM_SubShapeDriver : public GEOM_BaseDriver {
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
Standard_EXPORT GEOM_SubShapeDriver();
|
Standard_EXPORT GEOM_SubShapeDriver();
|
||||||
Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
|
Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
|
||||||
Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
|
Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
|
||||||
Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
|
Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
|
||||||
|
|
||||||
Standard_EXPORT static const Standard_GUID& GetID();
|
Standard_EXPORT static const Standard_GUID& GetID();
|
||||||
Standard_EXPORT ~GEOM_SubShapeDriver() {};
|
Standard_EXPORT ~GEOM_SubShapeDriver() {};
|
||||||
@ -46,7 +46,7 @@ public:
|
|||||||
bool GetCreationInformation(std::string& theOperationName,
|
bool GetCreationInformation(std::string& theOperationName,
|
||||||
std::vector<GEOM_Param>& params);
|
std::vector<GEOM_Param>& params);
|
||||||
|
|
||||||
OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_SubShapeDriver,GEOM_BaseDriver)
|
DEFINE_STANDARD_RTTIEXT(GEOM_SubShapeDriver,GEOM_BaseDriver)
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -106,6 +106,4 @@ GEOMAlgo_ShapeInfo.hxx
|
|||||||
GEOMAlgo_ShapeInfo.cxx
|
GEOMAlgo_ShapeInfo.cxx
|
||||||
GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx
|
GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx
|
||||||
|
|
||||||
Basics_OCCTVersion.hxx
|
|
||||||
|
|
||||||
GEOMAlgo_KindOfDef.hxx
|
GEOMAlgo_KindOfDef.hxx
|
||||||
|
@ -25,8 +25,6 @@
|
|||||||
|
|
||||||
#include <GEOMAlgo_AlgoTools.hxx>
|
#include <GEOMAlgo_AlgoTools.hxx>
|
||||||
|
|
||||||
#include <Basics_OCCTVersion.hxx>
|
|
||||||
|
|
||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
#include <gp_Pnt2d.hxx>
|
#include <gp_Pnt2d.hxx>
|
||||||
#include <gp_Dir2d.hxx>
|
#include <gp_Dir2d.hxx>
|
||||||
@ -197,12 +195,7 @@ Standard_Integer GEOMAlgo_AlgoTools::BuildPCurveForEdgeOnFace
|
|||||||
(const TopoDS_Edge& aEold,
|
(const TopoDS_Edge& aEold,
|
||||||
const TopoDS_Edge& aEnew,
|
const TopoDS_Edge& aEnew,
|
||||||
const TopoDS_Face& aF,
|
const TopoDS_Face& aF,
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
const Handle(IntTools_Context)& aCtx)
|
||||||
const Handle(IntTools_Context)& aCtx
|
|
||||||
#else
|
|
||||||
const Handle(BOPInt_Context)& aCtx
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Standard_Boolean bIsClosed, bUClosed, bHasOld;
|
Standard_Boolean bIsClosed, bUClosed, bHasOld;
|
||||||
Standard_Integer iRet, aNbPoints;
|
Standard_Integer iRet, aNbPoints;
|
||||||
@ -222,7 +215,6 @@ Standard_Integer GEOMAlgo_AlgoTools::BuildPCurveForEdgeOnFace
|
|||||||
return iRet;
|
return iRet;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
#if OCC_VERSION_LARGE > 0x06080000
|
|
||||||
// Try to copy PCurve from old edge to the new one.
|
// Try to copy PCurve from old edge to the new one.
|
||||||
iRet = BOPTools_AlgoTools2D::AttachExistingPCurve(aEold, aEnew, aF, aCtx);
|
iRet = BOPTools_AlgoTools2D::AttachExistingPCurve(aEold, aEnew, aF, aCtx);
|
||||||
|
|
||||||
@ -233,7 +225,6 @@ Standard_Integer GEOMAlgo_AlgoTools::BuildPCurveForEdgeOnFace
|
|||||||
// The PCurve is attached successfully.
|
// The PCurve is attached successfully.
|
||||||
return iRet;
|
return iRet;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
//
|
//
|
||||||
BOPTools_AlgoTools2D::BuildPCurveForEdgeOnFace(aEnew, aF);
|
BOPTools_AlgoTools2D::BuildPCurveForEdgeOnFace(aEnew, aF);
|
||||||
aC2D=BRep_Tool::CurveOnSurface(aEnew, aF, aT1, aT2);
|
aC2D=BRep_Tool::CurveOnSurface(aEnew, aF, aT1, aT2);
|
||||||
@ -446,12 +437,7 @@ void GEOMAlgo_AlgoTools::RefinePCurveForEdgeOnFace(const TopoDS_Edge& aE,
|
|||||||
Standard_Boolean GEOMAlgo_AlgoTools::IsSplitToReverse
|
Standard_Boolean GEOMAlgo_AlgoTools::IsSplitToReverse
|
||||||
(const TopoDS_Edge& aEF1,
|
(const TopoDS_Edge& aEF1,
|
||||||
const TopoDS_Edge& aEF2,
|
const TopoDS_Edge& aEF2,
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
const Handle(IntTools_Context)& aContext)
|
||||||
const Handle(IntTools_Context)& aContext
|
|
||||||
#else
|
|
||||||
const Handle(BOPInt_Context)& aContext
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Standard_Boolean aFlag;
|
Standard_Boolean aFlag;
|
||||||
Standard_Real aT1, aT2, aScPr, a, b;
|
Standard_Real aT1, aT2, aScPr, a, b;
|
||||||
@ -496,12 +482,7 @@ Standard_Boolean GEOMAlgo_AlgoTools::ProjectPointOnShape
|
|||||||
(const gp_Pnt& aP1,
|
(const gp_Pnt& aP1,
|
||||||
const TopoDS_Shape& aS,
|
const TopoDS_Shape& aS,
|
||||||
gp_Pnt& aP2,
|
gp_Pnt& aP2,
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
const Handle(IntTools_Context)& aCtx)
|
||||||
const Handle(IntTools_Context)& aCtx
|
|
||||||
#else
|
|
||||||
const Handle(BOPInt_Context)& aCtx
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Standard_Boolean bIsDone = Standard_False;
|
Standard_Boolean bIsDone = Standard_False;
|
||||||
Standard_Real aT2;
|
Standard_Real aT2;
|
||||||
@ -648,12 +629,7 @@ Standard_Integer GEOMAlgo_AlgoTools::FindSDShapes
|
|||||||
const TopTools_ListOfShape& aLE,
|
const TopTools_ListOfShape& aLE,
|
||||||
const Standard_Real aTol,
|
const Standard_Real aTol,
|
||||||
TopTools_ListOfShape& aLESD,
|
TopTools_ListOfShape& aLESD,
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
const Handle(IntTools_Context)& aCtx)
|
||||||
const Handle(IntTools_Context)& aCtx
|
|
||||||
#else
|
|
||||||
const Handle(BOPInt_Context)& aCtx
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Standard_Boolean bIsDone;
|
Standard_Boolean bIsDone;
|
||||||
Standard_Real aTol2, aD2;
|
Standard_Real aTol2, aD2;
|
||||||
@ -692,12 +668,7 @@ Standard_Integer GEOMAlgo_AlgoTools::FindSDShapes
|
|||||||
(const TopTools_ListOfShape& aLE,
|
(const TopTools_ListOfShape& aLE,
|
||||||
const Standard_Real aTol,
|
const Standard_Real aTol,
|
||||||
TopTools_IndexedDataMapOfShapeListOfShape& aMEE,
|
TopTools_IndexedDataMapOfShapeListOfShape& aMEE,
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
const Handle(IntTools_Context)& aCtx)
|
||||||
const Handle(IntTools_Context)& aCtx
|
|
||||||
#else
|
|
||||||
const Handle(BOPInt_Context)& aCtx
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Standard_Integer aNbE, aNbEProcessed, aNbESD, iErr;
|
Standard_Integer aNbE, aNbEProcessed, aNbESD, iErr;
|
||||||
TopTools_ListOfShape aLESD;
|
TopTools_ListOfShape aLESD;
|
||||||
@ -765,12 +736,7 @@ Standard_Integer GEOMAlgo_AlgoTools::FindSDShapes
|
|||||||
Standard_Integer GEOMAlgo_AlgoTools::RefineSDShapes
|
Standard_Integer GEOMAlgo_AlgoTools::RefineSDShapes
|
||||||
(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMPKLE,
|
(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMPKLE,
|
||||||
const Standard_Real aTol,
|
const Standard_Real aTol,
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
const Handle(IntTools_Context)& aCtx)
|
||||||
const Handle(IntTools_Context)& aCtx
|
|
||||||
#else
|
|
||||||
const Handle(BOPInt_Context)& aCtx
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Standard_Integer i, aNbE, iErr, j, aNbEE, aNbToAdd;
|
Standard_Integer i, aNbE, iErr, j, aNbEE, aNbToAdd;
|
||||||
TopTools_IndexedDataMapOfShapeListOfShape aMEE, aMSDE, aMEToAdd;
|
TopTools_IndexedDataMapOfShapeListOfShape aMEE, aMSDE, aMEToAdd;
|
||||||
|
@ -26,16 +26,10 @@
|
|||||||
#ifndef _GEOMAlgo_AlgoTools_HeaderFile
|
#ifndef _GEOMAlgo_AlgoTools_HeaderFile
|
||||||
#define _GEOMAlgo_AlgoTools_HeaderFile
|
#define _GEOMAlgo_AlgoTools_HeaderFile
|
||||||
|
|
||||||
#include <Basics_OCCTVersion.hxx>
|
|
||||||
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#include <Standard_Macro.hxx>
|
#include <Standard_Macro.hxx>
|
||||||
#include <Standard_Boolean.hxx>
|
#include <Standard_Boolean.hxx>
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
|
||||||
#include <IntTools_Context.hxx>
|
#include <IntTools_Context.hxx>
|
||||||
#else
|
|
||||||
#include <BOPInt_Context.hxx>
|
|
||||||
#endif
|
|
||||||
#include <Standard_Integer.hxx>
|
#include <Standard_Integer.hxx>
|
||||||
|
|
||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
@ -92,34 +86,19 @@ class GEOMAlgo_AlgoTools {
|
|||||||
static Standard_Integer RefineSDShapes
|
static Standard_Integer RefineSDShapes
|
||||||
(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMSD,
|
(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMSD,
|
||||||
const Standard_Real aTol,
|
const Standard_Real aTol,
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
const Handle(IntTools_Context)& aCtx) ;
|
||||||
const Handle(IntTools_Context)& aCtx
|
|
||||||
#else
|
|
||||||
const Handle(BOPInt_Context)& aCtx
|
|
||||||
#endif
|
|
||||||
) ;
|
|
||||||
|
|
||||||
Standard_EXPORT
|
Standard_EXPORT
|
||||||
static Standard_Integer FindSDShapes(const TopTools_ListOfShape& aLE,
|
static Standard_Integer FindSDShapes(const TopTools_ListOfShape& aLE,
|
||||||
const Standard_Real aTol,
|
const Standard_Real aTol,
|
||||||
TopTools_IndexedDataMapOfShapeListOfShape& aMEE,
|
TopTools_IndexedDataMapOfShapeListOfShape& aMEE,
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
const Handle(IntTools_Context)& aCtx) ;
|
||||||
const Handle(IntTools_Context)& aCtx
|
|
||||||
#else
|
|
||||||
const Handle(BOPInt_Context)& aCtx
|
|
||||||
#endif
|
|
||||||
) ;
|
|
||||||
Standard_EXPORT
|
Standard_EXPORT
|
||||||
static Standard_Integer FindSDShapes(const TopoDS_Shape& aE1,
|
static Standard_Integer FindSDShapes(const TopoDS_Shape& aE1,
|
||||||
const TopTools_ListOfShape& aLE,
|
const TopTools_ListOfShape& aLE,
|
||||||
const Standard_Real aTol,
|
const Standard_Real aTol,
|
||||||
TopTools_ListOfShape& aLESD,
|
TopTools_ListOfShape& aLESD,
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
const Handle(IntTools_Context)& aCtx) ;
|
||||||
const Handle(IntTools_Context)& aCtx
|
|
||||||
#else
|
|
||||||
const Handle(BOPInt_Context)& aCtx
|
|
||||||
#endif
|
|
||||||
) ;
|
|
||||||
|
|
||||||
Standard_EXPORT
|
Standard_EXPORT
|
||||||
static void PointOnShape(const TopoDS_Shape& aS,
|
static void PointOnShape(const TopoDS_Shape& aS,
|
||||||
@ -146,12 +125,7 @@ class GEOMAlgo_AlgoTools {
|
|||||||
static Standard_Boolean ProjectPointOnShape(const gp_Pnt& aP1,
|
static Standard_Boolean ProjectPointOnShape(const gp_Pnt& aP1,
|
||||||
const TopoDS_Shape& aS,
|
const TopoDS_Shape& aS,
|
||||||
gp_Pnt& aP2,
|
gp_Pnt& aP2,
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
const Handle(IntTools_Context)& aCtx) ;
|
||||||
const Handle(IntTools_Context)& aCtx
|
|
||||||
#else
|
|
||||||
const Handle(BOPInt_Context)& aCtx
|
|
||||||
#endif
|
|
||||||
) ;
|
|
||||||
|
|
||||||
Standard_EXPORT
|
Standard_EXPORT
|
||||||
static void CorrectTolerances(const TopoDS_Shape& aShape,
|
static void CorrectTolerances(const TopoDS_Shape& aShape,
|
||||||
@ -169,12 +143,7 @@ class GEOMAlgo_AlgoTools {
|
|||||||
Standard_EXPORT
|
Standard_EXPORT
|
||||||
static Standard_Boolean IsSplitToReverse1 (const TopoDS_Edge& aEF1,
|
static Standard_Boolean IsSplitToReverse1 (const TopoDS_Edge& aEF1,
|
||||||
const TopoDS_Edge& aEF2,
|
const TopoDS_Edge& aEF2,
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
const Handle(IntTools_Context)& aCtx) ;
|
||||||
const Handle(IntTools_Context)& aCtx
|
|
||||||
#else
|
|
||||||
const Handle(BOPInt_Context)& aCtx
|
|
||||||
#endif
|
|
||||||
) ;
|
|
||||||
Standard_EXPORT
|
Standard_EXPORT
|
||||||
static void RefinePCurveForEdgeOnFace(const TopoDS_Edge& aE,
|
static void RefinePCurveForEdgeOnFace(const TopoDS_Edge& aE,
|
||||||
const TopoDS_Face& aF,
|
const TopoDS_Face& aF,
|
||||||
@ -191,42 +160,22 @@ class GEOMAlgo_AlgoTools {
|
|||||||
Standard_EXPORT
|
Standard_EXPORT
|
||||||
static Standard_Boolean IsSplitToReverse(const TopoDS_Edge& theSplit,
|
static Standard_Boolean IsSplitToReverse(const TopoDS_Edge& theSplit,
|
||||||
const TopoDS_Edge& theEdge,
|
const TopoDS_Edge& theEdge,
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
const Handle(IntTools_Context)& theCtx) ;
|
||||||
const Handle(IntTools_Context)& theCtx
|
|
||||||
#else
|
|
||||||
const Handle(BOPInt_Context)& theCtx
|
|
||||||
#endif
|
|
||||||
) ;
|
|
||||||
|
|
||||||
Standard_EXPORT
|
Standard_EXPORT
|
||||||
static Standard_Boolean IsSplitToReverse (const TopoDS_Face& theFSp,
|
static Standard_Boolean IsSplitToReverse (const TopoDS_Face& theFSp,
|
||||||
const TopoDS_Face& theFSr,
|
const TopoDS_Face& theFSr,
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
const Handle(IntTools_Context)& theCtx) ;
|
||||||
const Handle(IntTools_Context)& theCtx
|
|
||||||
#else
|
|
||||||
const Handle(BOPInt_Context)& theCtx
|
|
||||||
#endif
|
|
||||||
) ;
|
|
||||||
|
|
||||||
Standard_EXPORT
|
Standard_EXPORT
|
||||||
static Standard_Boolean IsSplitToReverse (const TopoDS_Shape& theSp,
|
static Standard_Boolean IsSplitToReverse (const TopoDS_Shape& theSp,
|
||||||
const TopoDS_Shape& theSr,
|
const TopoDS_Shape& theSr,
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
const Handle(IntTools_Context)& theCtx) ;
|
||||||
const Handle(IntTools_Context)& theCtx
|
|
||||||
#else
|
|
||||||
const Handle(BOPInt_Context)& theCtx
|
|
||||||
#endif
|
|
||||||
) ;
|
|
||||||
Standard_EXPORT
|
Standard_EXPORT
|
||||||
static Standard_Integer BuildPCurveForEdgeOnFace (const TopoDS_Edge& aEold,
|
static Standard_Integer BuildPCurveForEdgeOnFace (const TopoDS_Edge& aEold,
|
||||||
const TopoDS_Edge& aEnew,
|
const TopoDS_Edge& aEnew,
|
||||||
const TopoDS_Face& aF,
|
const TopoDS_Face& aF,
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
const Handle(IntTools_Context)& aCtx) ;
|
||||||
const Handle(IntTools_Context)& aCtx
|
|
||||||
#else
|
|
||||||
const Handle(BOPInt_Context)& aCtx
|
|
||||||
#endif
|
|
||||||
) ;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
Standard_EXPORT
|
Standard_EXPORT
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
//
|
//
|
||||||
#include <GEOMAlgo_Clsf.hxx>
|
#include <GEOMAlgo_Clsf.hxx>
|
||||||
|
|
||||||
OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_Clsf, GEOMAlgo_HAlgo);
|
IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_Clsf, GEOMAlgo_HAlgo);
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function :
|
//function :
|
||||||
|
@ -69,7 +69,7 @@ class GEOMAlgo_Clsf : public GEOMAlgo_HAlgo
|
|||||||
Standard_EXPORT
|
Standard_EXPORT
|
||||||
virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const;
|
virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const;
|
||||||
|
|
||||||
OCCT_DEFINE_STANDARD_RTTIEXT(GEOMAlgo_Clsf,GEOMAlgo_HAlgo)
|
DEFINE_STANDARD_RTTIEXT(GEOMAlgo_Clsf,GEOMAlgo_HAlgo)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Standard_EXPORT
|
Standard_EXPORT
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
#include <GEOMAlgo_SurfaceTools.hxx>
|
#include <GEOMAlgo_SurfaceTools.hxx>
|
||||||
|
|
||||||
OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfBox, GEOMAlgo_Clsf)
|
IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfBox, GEOMAlgo_Clsf)
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function :
|
//function :
|
||||||
|
@ -71,7 +71,7 @@ class GEOMAlgo_ClsfBox : public GEOMAlgo_Clsf
|
|||||||
Standard_EXPORT
|
Standard_EXPORT
|
||||||
virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const;
|
virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const;
|
||||||
|
|
||||||
OCCT_DEFINE_STANDARD_RTTIEXT(GEOMAlgo_ClsfBox,GEOMAlgo_Clsf)
|
DEFINE_STANDARD_RTTIEXT(GEOMAlgo_ClsfBox,GEOMAlgo_Clsf)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
TopoDS_Shape myBox;
|
TopoDS_Shape myBox;
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include <Geom_Plane.hxx>
|
#include <Geom_Plane.hxx>
|
||||||
|
|
||||||
OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfQuad, GEOMAlgo_Clsf);
|
IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfQuad, GEOMAlgo_Clsf);
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function :
|
//function :
|
||||||
|
@ -78,7 +78,7 @@ public:
|
|||||||
Standard_EXPORT
|
Standard_EXPORT
|
||||||
virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const;
|
virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const;
|
||||||
|
|
||||||
OCCT_DEFINE_STANDARD_RTTIEXT(GEOMAlgo_ClsfQuad,GEOMAlgo_Clsf)
|
DEFINE_STANDARD_RTTIEXT(GEOMAlgo_ClsfQuad,GEOMAlgo_Clsf)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
#include <BRep_Builder.hxx>
|
#include <BRep_Builder.hxx>
|
||||||
#include <BRepClass3d_SolidClassifier.hxx>
|
#include <BRepClass3d_SolidClassifier.hxx>
|
||||||
|
|
||||||
OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfSolid, GEOMAlgo_Clsf)
|
IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfSolid, GEOMAlgo_Clsf)
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function :
|
//function :
|
||||||
|
@ -58,7 +58,7 @@ class GEOMAlgo_ClsfSolid : public GEOMAlgo_Clsf
|
|||||||
Standard_EXPORT
|
Standard_EXPORT
|
||||||
virtual void CheckData() ;
|
virtual void CheckData() ;
|
||||||
|
|
||||||
OCCT_DEFINE_STANDARD_RTTIEXT(GEOMAlgo_ClsfSolid,GEOMAlgo_Clsf)
|
DEFINE_STANDARD_RTTIEXT(GEOMAlgo_ClsfSolid,GEOMAlgo_Clsf)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
TopoDS_Shape myShape;
|
TopoDS_Shape myShape;
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#include <GEOMAlgo_SurfaceTools.hxx>
|
#include <GEOMAlgo_SurfaceTools.hxx>
|
||||||
|
|
||||||
OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfSurf, GEOMAlgo_Clsf);
|
IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfSurf, GEOMAlgo_Clsf);
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function :
|
//function :
|
||||||
|
@ -69,7 +69,7 @@ class GEOMAlgo_ClsfSurf : public GEOMAlgo_Clsf
|
|||||||
Standard_EXPORT
|
Standard_EXPORT
|
||||||
virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const;
|
virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const;
|
||||||
|
|
||||||
OCCT_DEFINE_STANDARD_RTTIEXT(GEOMAlgo_ClsfSurf,GEOMAlgo_Clsf)
|
DEFINE_STANDARD_RTTIEXT(GEOMAlgo_ClsfSurf,GEOMAlgo_Clsf)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Handle(Geom_Surface) myS;
|
Handle(Geom_Surface) myS;
|
||||||
|
@ -546,15 +546,15 @@ void GEOMAlgo_Extractor::processFOrSo(const TopoDS_Shape &theFOrSo)
|
|||||||
TopTools_ListOfShape aClosedSubShapes;
|
TopTools_ListOfShape aClosedSubShapes;
|
||||||
TopTools_ListOfShape aNewShapes;
|
TopTools_ListOfShape aNewShapes;
|
||||||
TopoDS_Shape anOuterSubShape;
|
TopoDS_Shape anOuterSubShape;
|
||||||
TopAbs_ShapeEnum aShapeType;
|
//TopAbs_ShapeEnum aShapeType;
|
||||||
TopAbs_ShapeEnum aSubShapeType;
|
TopAbs_ShapeEnum aSubShapeType;
|
||||||
|
|
||||||
if (theFOrSo.ShapeType() == TopAbs_FACE) {
|
if (theFOrSo.ShapeType() == TopAbs_FACE) {
|
||||||
aShapeType = TopAbs_FACE;
|
//aShapeType = TopAbs_FACE;
|
||||||
aSubShapeType = TopAbs_WIRE;
|
aSubShapeType = TopAbs_WIRE;
|
||||||
anOuterSubShape = BRepTools::OuterWire(TopoDS::Face(theFOrSo));
|
anOuterSubShape = BRepTools::OuterWire(TopoDS::Face(theFOrSo));
|
||||||
} else {
|
} else {
|
||||||
aShapeType = TopAbs_SOLID;
|
//aShapeType = TopAbs_SOLID;
|
||||||
aSubShapeType = TopAbs_SHELL;
|
aSubShapeType = TopAbs_SHELL;
|
||||||
anOuterSubShape = BRepClass3d::OuterShell(TopoDS::Solid(theFOrSo));
|
anOuterSubShape = BRepClass3d::OuterShell(TopoDS::Solid(theFOrSo));
|
||||||
}
|
}
|
||||||
@ -675,14 +675,14 @@ void GEOMAlgo_Extractor::processShOrCS(const TopoDS_Shape &theShOrCS)
|
|||||||
TopTools_ListOfShape aNewSubShapes;
|
TopTools_ListOfShape aNewSubShapes;
|
||||||
TopTools_ListOfShape aNewOtherShapes;
|
TopTools_ListOfShape aNewOtherShapes;
|
||||||
TopAbs_ShapeEnum aSubShapeType;
|
TopAbs_ShapeEnum aSubShapeType;
|
||||||
TopAbs_ShapeEnum aSubSubShapeType;
|
//TopAbs_ShapeEnum aSubSubShapeType;
|
||||||
|
|
||||||
if (theShOrCS.ShapeType() == TopAbs_SHELL) {
|
if (theShOrCS.ShapeType() == TopAbs_SHELL) {
|
||||||
aSubShapeType = TopAbs_FACE;
|
aSubShapeType = TopAbs_FACE;
|
||||||
aSubSubShapeType = TopAbs_EDGE;
|
//aSubSubShapeType = TopAbs_EDGE;
|
||||||
} else { // comp-solid
|
} else { // comp-solid
|
||||||
aSubShapeType = TopAbs_SOLID;
|
aSubShapeType = TopAbs_SOLID;
|
||||||
aSubSubShapeType = TopAbs_FACE;
|
//aSubSubShapeType = TopAbs_FACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (; anIter.More(); anIter.Next()) {
|
for (; anIter.More(); anIter.Next()) {
|
||||||
@ -1098,7 +1098,7 @@ void GEOMAlgo_Extractor::makeHistory(const TopoDS_Shape &theShape,
|
|||||||
getModified(theShape, aListModif, theShape.ShapeType());
|
getModified(theShape, aListModif, theShape.ShapeType());
|
||||||
|
|
||||||
Standard_Boolean isModif = !aListModif.IsEmpty();
|
Standard_Boolean isModif = !aListModif.IsEmpty();
|
||||||
const TopAbs_ShapeEnum aType = theShape.ShapeType();
|
//const TopAbs_ShapeEnum aType = theShape.ShapeType();
|
||||||
|
|
||||||
if (isModif) {
|
if (isModif) {
|
||||||
// Add the new shapes.
|
// Add the new shapes.
|
||||||
|
@ -26,8 +26,6 @@
|
|||||||
|
|
||||||
#include <GEOMAlgo_FinderShapeOn.hxx>
|
#include <GEOMAlgo_FinderShapeOn.hxx>
|
||||||
|
|
||||||
#include <Basics_OCCTVersion.hxx>
|
|
||||||
|
|
||||||
#include <Precision.hxx>
|
#include <Precision.hxx>
|
||||||
|
|
||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
|
@ -632,7 +632,7 @@ void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Face& aF,
|
|||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
iCnt=aIt.Value();
|
iCnt=aIt.Value();
|
||||||
if (iCnt>1) {
|
if (iCnt>1) {
|
||||||
// take the first having occured inner link
|
// take the first having occurred inner link
|
||||||
// and discretize it
|
// and discretize it
|
||||||
const GEOMAlgo_PassKey& aPK=aIt.Key();
|
const GEOMAlgo_PassKey& aPK=aIt.Key();
|
||||||
//
|
//
|
||||||
|
@ -68,12 +68,7 @@
|
|||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
#include <TopoDS_Vertex.hxx>
|
#include <TopoDS_Vertex.hxx>
|
||||||
#include <TopTools_IndexedMapOfShape.hxx>
|
#include <TopTools_IndexedMapOfShape.hxx>
|
||||||
|
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
|
||||||
#include <IntTools_Context.hxx>
|
#include <IntTools_Context.hxx>
|
||||||
#else
|
|
||||||
#include <BOPInt_Context.hxx>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function :
|
//function :
|
||||||
@ -599,7 +594,7 @@ void GEOMAlgo_FinderShapeOn2::ProcessSolids()
|
|||||||
void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Face& aF,
|
void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Face& aF,
|
||||||
GEOMAlgo_ListOfPnt& aLP)
|
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;
|
TopLoc_Location aLoc;
|
||||||
Handle(Poly_Triangulation) aTRF;
|
Handle(Poly_Triangulation) aTRF;
|
||||||
TColStd_MapOfInteger aMBN;
|
TColStd_MapOfInteger aMBN;
|
||||||
@ -646,7 +641,6 @@ void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Face& aF,
|
|||||||
}
|
}
|
||||||
//
|
//
|
||||||
// boundary nodes aMBN
|
// boundary nodes aMBN
|
||||||
aNbLinks=aMPKI.Extent();
|
|
||||||
aIt.Initialize(aMPKI);
|
aIt.Initialize(aMPKI);
|
||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
iCnt=aIt.Value();
|
iCnt=aIt.Value();
|
||||||
|
@ -187,7 +187,7 @@ Standard_Integer GEOMAlgo_GetInPlaceAPI::GetInPlaceOld
|
|||||||
if (aWhereDistance.IsDone() && aWhatDistance.IsDone() &&
|
if (aWhereDistance.IsDone() && aWhatDistance.IsDone() &&
|
||||||
fabs(aWhereDistance.Value() - aWhatDistance.Value()) <= aTolConf)
|
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
|
// aVertex must be projected to the same point on Where and on What
|
||||||
gp_Pnt pOnWhat = aWhatDistance.PointOnShape2(1);
|
gp_Pnt pOnWhat = aWhatDistance.PointOnShape2(1);
|
||||||
gp_Pnt pOnWhere = aWhereDistance.PointOnShape2(1);
|
gp_Pnt pOnWhere = aWhereDistance.PointOnShape2(1);
|
||||||
@ -321,7 +321,7 @@ Standard_Boolean GEOMAlgo_GetInPlaceAPI::GetInPlaceByHistory
|
|||||||
}
|
}
|
||||||
|
|
||||||
// try to find in history
|
// 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
|
// search in history for all argument shapes
|
||||||
Standard_Boolean isFound = Standard_False;
|
Standard_Boolean isFound = Standard_False;
|
||||||
|
@ -60,7 +60,7 @@ public:
|
|||||||
GEOMAlgo_GetInPlace &theGIP);
|
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
|
* 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
|
* 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
|
* an output parameter. It returns the error code with the following possible
|
||||||
|
@ -92,7 +92,7 @@ Standard_Boolean GEOMAlgo_GetInPlace::CheckCoincidence(const TopoDS_Shape& aS1,
|
|||||||
{
|
{
|
||||||
Standard_Boolean bOk;
|
Standard_Boolean bOk;
|
||||||
Standard_Integer iErr;
|
Standard_Integer iErr;
|
||||||
Standard_Real aTol2;
|
//Standard_Real aTol2;
|
||||||
TopAbs_ShapeEnum aType1, aType2;
|
TopAbs_ShapeEnum aType1, aType2;
|
||||||
TopAbs_State aState;
|
TopAbs_State aState;
|
||||||
gp_Pnt aP1, aP2;
|
gp_Pnt aP1, aP2;
|
||||||
@ -101,7 +101,7 @@ Standard_Boolean GEOMAlgo_GetInPlace::CheckCoincidence(const TopoDS_Shape& aS1,
|
|||||||
//
|
//
|
||||||
iErr=0;
|
iErr=0;
|
||||||
bOk=Standard_False;
|
bOk=Standard_False;
|
||||||
aTol2=myTolerance*myTolerance;
|
//aTol2=myTolerance*myTolerance;
|
||||||
aType1=aS1.ShapeType();
|
aType1=aS1.ShapeType();
|
||||||
aType2=aS2.ShapeType();
|
aType2=aS2.ShapeType();
|
||||||
//
|
//
|
||||||
|
@ -219,7 +219,7 @@ void GEOMAlgo_GlueDetector::DetectVertices()
|
|||||||
//
|
//
|
||||||
aNbVSD=aBBTree.Select(aSelector);
|
aNbVSD=aBBTree.Select(aSelector);
|
||||||
if (!aNbVSD) {
|
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();
|
const TColStd_ListOfInteger& aLI=aSelector.Indices();
|
||||||
@ -554,11 +554,7 @@ Standard_Integer CheckAncesstors
|
|||||||
//
|
//
|
||||||
iRet=0;
|
iRet=0;
|
||||||
//
|
//
|
||||||
#if OCC_VERSION_MAJOR < 7
|
|
||||||
pLE=const_cast<TopTools_ListOfShape*>(&aMVE.FindFromKey(aVSD));
|
|
||||||
#else
|
|
||||||
pLE=const_cast<TopTools_IndexedDataMapOfShapeListOfShape&>(aMVE).ChangeSeek(aVSD);
|
pLE=const_cast<TopTools_IndexedDataMapOfShapeListOfShape&>(aMVE).ChangeSeek(aVSD);
|
||||||
#endif
|
|
||||||
if (!pLE) {
|
if (!pLE) {
|
||||||
return iRet;
|
return iRet;
|
||||||
}
|
}
|
||||||
@ -566,11 +562,7 @@ Standard_Integer CheckAncesstors
|
|||||||
for (; aItLE.More(); aItLE.Next()) {
|
for (; aItLE.More(); aItLE.Next()) {
|
||||||
const TopoDS_Shape& aE=aItLE.Value();
|
const TopoDS_Shape& aE=aItLE.Value();
|
||||||
//
|
//
|
||||||
#if OCC_VERSION_MAJOR < 7
|
|
||||||
pLV=const_cast<TopTools_ListOfShape*>(&aMEV.FindFromKey(aE));
|
|
||||||
#else
|
|
||||||
pLV=const_cast<TopTools_IndexedDataMapOfShapeListOfShape&>(aMEV).ChangeSeek(aE);
|
pLV=const_cast<TopTools_IndexedDataMapOfShapeListOfShape&>(aMEV).ChangeSeek(aE);
|
||||||
#endif
|
|
||||||
if (!pLV) {
|
if (!pLV) {
|
||||||
continue; // it should be not so
|
continue; // it should be not so
|
||||||
}
|
}
|
||||||
@ -594,11 +586,7 @@ Standard_Integer CheckAncesstors
|
|||||||
//
|
//
|
||||||
iRet=1;
|
iRet=1;
|
||||||
//
|
//
|
||||||
#if OCC_VERSION_MAJOR < 7
|
|
||||||
pLVZ=const_cast<TopTools_ListOfShape*>(&aMEVZ.FindFromKey(aE));
|
|
||||||
#else
|
|
||||||
pLVZ=aMEVZ.ChangeSeek(aE);
|
pLVZ=aMEVZ.ChangeSeek(aE);
|
||||||
#endif
|
|
||||||
if (!pLVZ) {
|
if (!pLVZ) {
|
||||||
aMEVZ.Add(aE, aLVX);
|
aMEVZ.Add(aE, aLVX);
|
||||||
}
|
}
|
||||||
|
@ -78,11 +78,7 @@
|
|||||||
#include <BRepBndLib.hxx>
|
#include <BRepBndLib.hxx>
|
||||||
//
|
//
|
||||||
#include <IntTools_Tools.hxx>
|
#include <IntTools_Tools.hxx>
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
|
||||||
#include <IntTools_Context.hxx>
|
#include <IntTools_Context.hxx>
|
||||||
#else
|
|
||||||
#include <BOPInt_Context.hxx>
|
|
||||||
#endif
|
|
||||||
#include <BOPTools_AlgoTools.hxx>
|
#include <BOPTools_AlgoTools.hxx>
|
||||||
#include <BOPTools_AlgoTools3D.hxx>
|
#include <BOPTools_AlgoTools3D.hxx>
|
||||||
#include <BOPTools_AlgoTools2D.hxx>
|
#include <BOPTools_AlgoTools2D.hxx>
|
||||||
@ -514,7 +510,12 @@ void GEOMAlgo_Gluer::MakeSolids()
|
|||||||
myResult=aCmp;
|
myResult=aCmp;
|
||||||
//
|
//
|
||||||
if (aMS.Extent()) {
|
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);
|
BOPTools_AlgoTools::CorrectCurveOnSurface(myResult, 0.0001);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -907,9 +908,9 @@ void GEOMAlgo_Gluer::MakeEdge(const TopoDS_Edge& aE,
|
|||||||
Standard_Real aTol;
|
Standard_Real aTol;
|
||||||
BRep_Builder aBB;
|
BRep_Builder aBB;
|
||||||
TopoDS_Edge E;
|
TopoDS_Edge E;
|
||||||
TopAbs_Orientation anOrE;
|
//TopAbs_Orientation anOrE;
|
||||||
//
|
//
|
||||||
anOrE=aE.Orientation();
|
//anOrE=aE.Orientation();
|
||||||
aTol=BRep_Tool::Tolerance(aE);
|
aTol=BRep_Tool::Tolerance(aE);
|
||||||
//
|
//
|
||||||
E=aEx;
|
E=aEx;
|
||||||
|
@ -65,7 +65,7 @@ static
|
|||||||
void GEOMAlgo_Gluer2::Detect()
|
void GEOMAlgo_Gluer2::Detect()
|
||||||
{
|
{
|
||||||
Standard_Boolean bCheckGeometry;
|
Standard_Boolean bCheckGeometry;
|
||||||
Standard_Integer iErr, aNbSD;
|
Standard_Integer iErr;
|
||||||
TopTools_ListIteratorOfListOfShape aItLS;
|
TopTools_ListIteratorOfListOfShape aItLS;
|
||||||
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMSLS;
|
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMSLS;
|
||||||
//GEOMAlgo_GlueDetector aDetector;
|
//GEOMAlgo_GlueDetector aDetector;
|
||||||
@ -106,7 +106,6 @@ void GEOMAlgo_Gluer2::Detect()
|
|||||||
for (; aItDMSLS.More(); aItDMSLS.Next()) {
|
for (; aItDMSLS.More(); aItDMSLS.Next()) {
|
||||||
const TopoDS_Shape& aSkey=aItDMSLS.Key();
|
const TopoDS_Shape& aSkey=aItDMSLS.Key();
|
||||||
const TopTools_ListOfShape& aLSD=aItDMSLS.Value();
|
const TopTools_ListOfShape& aLSD=aItDMSLS.Value();
|
||||||
aNbSD=aLSD.Extent();
|
|
||||||
myImagesDetected.Bind(aSkey, aLSD);
|
myImagesDetected.Bind(aSkey, aLSD);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
@ -25,12 +25,7 @@
|
|||||||
// <peter@PREFEX>
|
// <peter@PREFEX>
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_GluerAlgo.hxx>
|
#include <GEOMAlgo_GluerAlgo.hxx>
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
|
||||||
#include <IntTools_Context.hxx>
|
#include <IntTools_Context.hxx>
|
||||||
#else
|
|
||||||
#include <BOPInt_Context.hxx>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : GEOMAlgo_GluerAlgo
|
//function : GEOMAlgo_GluerAlgo
|
||||||
@ -101,11 +96,7 @@ Standard_Boolean GEOMAlgo_GluerAlgo::CheckGeometry() const
|
|||||||
//function : SetContext
|
//function : SetContext
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
|
||||||
void GEOMAlgo_GluerAlgo::SetContext(const Handle(IntTools_Context)& theContext)
|
void GEOMAlgo_GluerAlgo::SetContext(const Handle(IntTools_Context)& theContext)
|
||||||
#else
|
|
||||||
void GEOMAlgo_GluerAlgo::SetContext(const Handle(BOPInt_Context)& theContext)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
myContext=theContext;
|
myContext=theContext;
|
||||||
}
|
}
|
||||||
@ -113,11 +104,7 @@ void GEOMAlgo_GluerAlgo::SetContext(const Handle(BOPInt_Context)& theContext)
|
|||||||
//function : Context
|
//function : Context
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
|
||||||
const Handle(IntTools_Context)& GEOMAlgo_GluerAlgo::Context()
|
const Handle(IntTools_Context)& GEOMAlgo_GluerAlgo::Context()
|
||||||
#else
|
|
||||||
const Handle(BOPInt_Context)& GEOMAlgo_GluerAlgo::Context()
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
return myContext;
|
return myContext;
|
||||||
}
|
}
|
||||||
@ -153,10 +140,6 @@ void GEOMAlgo_GluerAlgo::Clear()
|
|||||||
void GEOMAlgo_GluerAlgo::Perform()
|
void GEOMAlgo_GluerAlgo::Perform()
|
||||||
{
|
{
|
||||||
if (myContext.IsNull()) {
|
if (myContext.IsNull()) {
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
|
||||||
myContext=new IntTools_Context;
|
myContext=new IntTools_Context;
|
||||||
#else
|
|
||||||
myContext=new BOPInt_Context;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,18 +27,11 @@
|
|||||||
#ifndef _GEOMAlgo_GluerAlgo_HeaderFile
|
#ifndef _GEOMAlgo_GluerAlgo_HeaderFile
|
||||||
#define _GEOMAlgo_GluerAlgo_HeaderFile
|
#define _GEOMAlgo_GluerAlgo_HeaderFile
|
||||||
|
|
||||||
#include <Basics_OCCTVersion.hxx>
|
|
||||||
|
|
||||||
#include <Standard_Macro.hxx>
|
#include <Standard_Macro.hxx>
|
||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
#include <Standard_Real.hxx>
|
#include <Standard_Real.hxx>
|
||||||
#include <Standard_Boolean.hxx>
|
#include <Standard_Boolean.hxx>
|
||||||
|
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
|
||||||
#include <IntTools_Context.hxx>
|
#include <IntTools_Context.hxx>
|
||||||
#else
|
|
||||||
#include <BOPInt_Context.hxx>
|
|
||||||
#endif
|
|
||||||
#include <TopTools_DataMapOfShapeListOfShape.hxx>
|
#include <TopTools_DataMapOfShapeListOfShape.hxx>
|
||||||
#include <TopTools_DataMapOfShapeShape.hxx>
|
#include <TopTools_DataMapOfShapeShape.hxx>
|
||||||
|
|
||||||
@ -80,18 +73,10 @@ public:
|
|||||||
virtual void Clear() ;
|
virtual void Clear() ;
|
||||||
|
|
||||||
Standard_EXPORT
|
Standard_EXPORT
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
|
||||||
void SetContext(const Handle(IntTools_Context)&) ;
|
void SetContext(const Handle(IntTools_Context)&) ;
|
||||||
#else
|
|
||||||
void SetContext(const Handle(BOPInt_Context)&) ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Standard_EXPORT
|
Standard_EXPORT
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
|
||||||
const Handle(IntTools_Context)& Context() ;
|
const Handle(IntTools_Context)& Context() ;
|
||||||
#else
|
|
||||||
const Handle(BOPInt_Context)& Context() ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Standard_EXPORT
|
Standard_EXPORT
|
||||||
const TopTools_DataMapOfShapeListOfShape& Images() const;
|
const TopTools_DataMapOfShapeListOfShape& Images() const;
|
||||||
@ -103,11 +88,7 @@ protected:
|
|||||||
TopoDS_Shape myArgument;
|
TopoDS_Shape myArgument;
|
||||||
Standard_Real myTolerance;
|
Standard_Real myTolerance;
|
||||||
Standard_Boolean myCheckGeometry;
|
Standard_Boolean myCheckGeometry;
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
|
||||||
Handle(IntTools_Context) myContext;
|
Handle(IntTools_Context) myContext;
|
||||||
#else
|
|
||||||
Handle(BOPInt_Context) myContext;
|
|
||||||
#endif
|
|
||||||
TopTools_DataMapOfShapeListOfShape myImages;
|
TopTools_DataMapOfShapeListOfShape myImages;
|
||||||
TopTools_DataMapOfShapeShape myOrigins;
|
TopTools_DataMapOfShapeShape myOrigins;
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
//
|
//
|
||||||
#include <GEOMAlgo_HAlgo.hxx>
|
#include <GEOMAlgo_HAlgo.hxx>
|
||||||
|
|
||||||
OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_HAlgo, MMgt_TShared);
|
IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_HAlgo, Standard_Transient);
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// function:
|
// function:
|
||||||
|
@ -32,17 +32,15 @@
|
|||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#include <Standard_DefineHandle.hxx>
|
#include <Standard_DefineHandle.hxx>
|
||||||
#include <Standard_Integer.hxx>
|
#include <Standard_Integer.hxx>
|
||||||
#include <MMgt_TShared.hxx>
|
#include <Standard_Transient.hxx>
|
||||||
|
|
||||||
#include <Basics_OCCTVersion.hxx>
|
DEFINE_STANDARD_HANDLE(GEOMAlgo_HAlgo, Standard_Transient);
|
||||||
|
|
||||||
DEFINE_STANDARD_HANDLE(GEOMAlgo_HAlgo, MMgt_TShared);
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//class : GEOMAlgo_HAlgo
|
//class : GEOMAlgo_HAlgo
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
class GEOMAlgo_HAlgo : public MMgt_TShared
|
class GEOMAlgo_HAlgo : public Standard_Transient
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Standard_EXPORT
|
Standard_EXPORT
|
||||||
@ -60,7 +58,7 @@ class GEOMAlgo_HAlgo : public MMgt_TShared
|
|||||||
Standard_EXPORT
|
Standard_EXPORT
|
||||||
Standard_Integer WarningStatus() const;
|
Standard_Integer WarningStatus() const;
|
||||||
|
|
||||||
OCCT_DEFINE_STANDARD_RTTIEXT(GEOMAlgo_HAlgo,MMgt_TShared)
|
DEFINE_STANDARD_RTTIEXT(GEOMAlgo_HAlgo, Standard_Transient)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Standard_EXPORT
|
Standard_EXPORT
|
||||||
|
@ -26,8 +26,6 @@
|
|||||||
#include <GEOMAlgo_RemoverWebs.hxx>
|
#include <GEOMAlgo_RemoverWebs.hxx>
|
||||||
#include <GEOMAlgo_ShapeAlgo.hxx>
|
#include <GEOMAlgo_ShapeAlgo.hxx>
|
||||||
|
|
||||||
#include <Basics_OCCTVersion.hxx>
|
|
||||||
|
|
||||||
#include <TopoDS_Iterator.hxx>
|
#include <TopoDS_Iterator.hxx>
|
||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
#include <TopoDS_Solid.hxx>
|
#include <TopoDS_Solid.hxx>
|
||||||
@ -37,17 +35,12 @@
|
|||||||
|
|
||||||
#include <BRepClass3d_SolidClassifier.hxx>
|
#include <BRepClass3d_SolidClassifier.hxx>
|
||||||
|
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
|
||||||
#include <IntTools_Context.hxx>
|
#include <IntTools_Context.hxx>
|
||||||
#else
|
|
||||||
#include <BOPInt_Context.hxx>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <BOPAlgo_BuilderSolid.hxx>
|
#include <BOPAlgo_BuilderSolid.hxx>
|
||||||
|
|
||||||
#include <BOPTools.hxx>
|
|
||||||
#include <BOPTools_AlgoTools.hxx>
|
#include <BOPTools_AlgoTools.hxx>
|
||||||
#include <BOPCol_MapOfShape.hxx>
|
#include <TopTools_MapOfShape.hxx>
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function :
|
//function :
|
||||||
@ -108,11 +101,7 @@ void GEOMAlgo_RemoverWebs::Perform()
|
|||||||
if (!myContext.IsNull()) {
|
if (!myContext.IsNull()) {
|
||||||
myContext.Nullify();
|
myContext.Nullify();
|
||||||
}
|
}
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
|
||||||
myContext=new IntTools_Context;
|
myContext=new IntTools_Context;
|
||||||
#else
|
|
||||||
myContext=new BOPInt_Context;
|
|
||||||
#endif
|
|
||||||
//
|
//
|
||||||
BuildSolid();
|
BuildSolid();
|
||||||
//
|
//
|
||||||
@ -129,11 +118,11 @@ void GEOMAlgo_RemoverWebs::BuildSolid()
|
|||||||
TopoDS_Iterator aIt1, aIt2;
|
TopoDS_Iterator aIt1, aIt2;
|
||||||
TopoDS_Shape aShape;
|
TopoDS_Shape aShape;
|
||||||
BRep_Builder aBB;
|
BRep_Builder aBB;
|
||||||
BOPCol_MapOfShape aMFence;
|
TopTools_MapOfShape aMFence;
|
||||||
BOPCol_IndexedMapOfShape aMSI;
|
TopTools_IndexedMapOfShape aMSI;
|
||||||
BOPCol_IndexedDataMapOfShapeListOfShape aMFS;
|
TopTools_IndexedDataMapOfShapeListOfShape aMFS;
|
||||||
BOPCol_ListOfShape aSFS;
|
TopTools_ListOfShape aSFS;
|
||||||
BOPCol_ListIteratorOfListOfShape aItLS;
|
TopTools_ListIteratorOfListOfShape aItLS;
|
||||||
BOPAlgo_BuilderSolid aSB;
|
BOPAlgo_BuilderSolid aSB;
|
||||||
//
|
//
|
||||||
//modified by NIZNHY-PKV Thu Jul 11 06:54:51 2013f
|
//modified by NIZNHY-PKV Thu Jul 11 06:54:51 2013f
|
||||||
@ -154,7 +143,7 @@ void GEOMAlgo_RemoverWebs::BuildSolid()
|
|||||||
//
|
//
|
||||||
aNbR=aMFence.Extent();
|
aNbR=aMFence.Extent();
|
||||||
if (aNbS!=aNbR) {
|
if (aNbS!=aNbR) {
|
||||||
BOPCol_MapIteratorOfMapOfShape aItMS;
|
TopTools_MapIteratorOfMapOfShape aItMS;
|
||||||
//
|
//
|
||||||
BOPTools_AlgoTools::MakeContainer(TopAbs_COMPOUND, aShape);
|
BOPTools_AlgoTools::MakeContainer(TopAbs_COMPOUND, aShape);
|
||||||
//
|
//
|
||||||
@ -169,7 +158,7 @@ void GEOMAlgo_RemoverWebs::BuildSolid()
|
|||||||
aNbF2=0;
|
aNbF2=0;
|
||||||
//
|
//
|
||||||
// 1. aSFS: Faces
|
// 1. aSFS: Faces
|
||||||
BOPTools::MapShapesAndAncestors(aShape, TopAbs_FACE, TopAbs_SOLID, aMFS);
|
TopExp::MapShapesAndAncestors(aShape, TopAbs_FACE, TopAbs_SOLID, aMFS);
|
||||||
//
|
//
|
||||||
aNbF=aMFS.Extent();
|
aNbF=aMFS.Extent();
|
||||||
for (i=1; i<=aNbF; ++i) {
|
for (i=1; i<=aNbF; ++i) {
|
||||||
@ -185,7 +174,7 @@ void GEOMAlgo_RemoverWebs::BuildSolid()
|
|||||||
aSFS.Append(aFi);
|
aSFS.Append(aFi);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const BOPCol_ListOfShape& aLSx=aMFS(i);
|
const TopTools_ListOfShape& aLSx=aMFS(i);
|
||||||
aNbSx=aLSx.Extent();
|
aNbSx=aLSx.Extent();
|
||||||
if (aNbSx==1) {
|
if (aNbSx==1) {
|
||||||
aSFS.Append(aFx);
|
aSFS.Append(aFx);
|
||||||
@ -225,17 +214,13 @@ void GEOMAlgo_RemoverWebs::BuildSolid()
|
|||||||
aSB.SetContext(myContext);
|
aSB.SetContext(myContext);
|
||||||
aSB.SetShapes(aSFS);
|
aSB.SetShapes(aSFS);
|
||||||
aSB.Perform();
|
aSB.Perform();
|
||||||
#if OCC_VERSION_LARGE > 0x07010001
|
|
||||||
iErr=aSB.HasErrors();
|
iErr=aSB.HasErrors();
|
||||||
#else
|
|
||||||
iErr=aSB.ErrorStatus();
|
|
||||||
#endif
|
|
||||||
if (iErr) {
|
if (iErr) {
|
||||||
myErrorStatus=20; // SolidBuilder failed
|
myErrorStatus=20; // SolidBuilder failed
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
const BOPCol_ListOfShape& aLSR=aSB.Areas();
|
const TopTools_ListOfShape& aLSR=aSB.Areas();
|
||||||
//
|
//
|
||||||
// 4 Add the internals
|
// 4 Add the internals
|
||||||
if (aNbSI) {
|
if (aNbSI) {
|
||||||
@ -253,19 +238,15 @@ void GEOMAlgo_RemoverWebs::BuildSolid()
|
|||||||
//function : AddInternalShapes
|
//function : AddInternalShapes
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_RemoverWebs::AddInternalShapes(const BOPCol_ListOfShape& aLSR,
|
void GEOMAlgo_RemoverWebs::AddInternalShapes(const TopTools_ListOfShape& aLSR,
|
||||||
const BOPCol_IndexedMapOfShape& aMSI)
|
const TopTools_IndexedMapOfShape& aMSI)
|
||||||
{
|
{
|
||||||
Standard_Integer i, aNbSI;
|
Standard_Integer i, aNbSI;
|
||||||
TopAbs_State aState;
|
TopAbs_State aState;
|
||||||
TopoDS_Solid aSd;
|
TopoDS_Solid aSd;
|
||||||
BRep_Builder aBB;
|
BRep_Builder aBB;
|
||||||
BOPCol_ListIteratorOfListOfShape aItLS;
|
TopTools_ListIteratorOfListOfShape aItLS;
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
|
||||||
Handle(IntTools_Context) aCtx=new IntTools_Context;
|
Handle(IntTools_Context) aCtx=new IntTools_Context;
|
||||||
#else
|
|
||||||
Handle(BOPInt_Context) aCtx=new BOPInt_Context;
|
|
||||||
#endif
|
|
||||||
//
|
//
|
||||||
aNbSI=aMSI.Extent();
|
aNbSI=aMSI.Extent();
|
||||||
for (i=1; i<=aNbSI; ++i) {
|
for (i=1; i<=aNbSI; ++i) {
|
||||||
|
@ -38,8 +38,8 @@
|
|||||||
#include <Standard_Macro.hxx>
|
#include <Standard_Macro.hxx>
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_ShapeAlgo.hxx>
|
#include <GEOMAlgo_ShapeAlgo.hxx>
|
||||||
#include <BOPCol_ListOfShape.hxx>
|
#include <TopTools_ListOfShape.hxx>
|
||||||
#include <BOPCol_IndexedMapOfShape.hxx>
|
#include <TopTools_IndexedMapOfShape.hxx>
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : GEOMAlgo_RemoverWebs
|
//function : GEOMAlgo_RemoverWebs
|
||||||
@ -66,8 +66,8 @@ protected:
|
|||||||
void BuildSolid() ;
|
void BuildSolid() ;
|
||||||
|
|
||||||
Standard_EXPORT
|
Standard_EXPORT
|
||||||
static void AddInternalShapes(const BOPCol_ListOfShape& ,
|
static void AddInternalShapes(const TopTools_ListOfShape& ,
|
||||||
const BOPCol_IndexedMapOfShape& );
|
const TopTools_IndexedMapOfShape& );
|
||||||
//
|
//
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -26,11 +26,7 @@
|
|||||||
// <pkv@irinox>
|
// <pkv@irinox>
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_ShapeAlgo.hxx>
|
#include <GEOMAlgo_ShapeAlgo.hxx>
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
|
||||||
#include <IntTools_Context.hxx>
|
#include <IntTools_Context.hxx>
|
||||||
#else
|
|
||||||
#include <BOPInt_Context.hxx>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : GEOMAlgo_ShapeAlgo
|
//function : GEOMAlgo_ShapeAlgo
|
||||||
@ -54,11 +50,7 @@ GEOMAlgo_ShapeAlgo::~GEOMAlgo_ShapeAlgo()
|
|||||||
//function : SetContext
|
//function : SetContext
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
|
||||||
void GEOMAlgo_ShapeAlgo::SetContext(const Handle(IntTools_Context)& theContext)
|
void GEOMAlgo_ShapeAlgo::SetContext(const Handle(IntTools_Context)& theContext)
|
||||||
#else
|
|
||||||
void GEOMAlgo_ShapeAlgo::SetContext(const Handle(BOPInt_Context)& theContext)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
myContext=theContext;
|
myContext=theContext;
|
||||||
}
|
}
|
||||||
@ -66,11 +58,7 @@ void GEOMAlgo_ShapeAlgo::SetContext(const Handle(BOPInt_Context)& theContext)
|
|||||||
//function : Context
|
//function : Context
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
|
||||||
const Handle(IntTools_Context)& GEOMAlgo_ShapeAlgo::Context()const
|
const Handle(IntTools_Context)& GEOMAlgo_ShapeAlgo::Context()const
|
||||||
#else
|
|
||||||
const Handle(BOPInt_Context)& GEOMAlgo_ShapeAlgo::Context()const
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
return myContext;
|
return myContext;
|
||||||
}
|
}
|
||||||
@ -121,10 +109,6 @@ const TopoDS_Shape& GEOMAlgo_ShapeAlgo::Result()const
|
|||||||
void GEOMAlgo_ShapeAlgo::Perform()
|
void GEOMAlgo_ShapeAlgo::Perform()
|
||||||
{
|
{
|
||||||
if (myContext.IsNull()) {
|
if (myContext.IsNull()) {
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
|
||||||
myContext=new IntTools_Context;
|
myContext=new IntTools_Context;
|
||||||
#else
|
|
||||||
myContext=new BOPInt_Context;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,25 +20,14 @@
|
|||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
|
||||||
// File: GEOMAlgo_ShapeAlgo.hxx
|
|
||||||
// Created: Tue Dec 7 12:06:54 2004
|
|
||||||
// Author: Peter KURNEV
|
|
||||||
// <pkv@irinox>
|
|
||||||
//
|
|
||||||
#ifndef _GEOMAlgo_ShapeAlgo_HeaderFile
|
#ifndef _GEOMAlgo_ShapeAlgo_HeaderFile
|
||||||
#define _GEOMAlgo_ShapeAlgo_HeaderFile
|
#define _GEOMAlgo_ShapeAlgo_HeaderFile
|
||||||
|
|
||||||
#include <Basics_OCCTVersion.hxx>
|
|
||||||
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#include <Standard_Macro.hxx>
|
#include <Standard_Macro.hxx>
|
||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
#include <Standard_Real.hxx>
|
#include <Standard_Real.hxx>
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
#include <IntTools_Context.hxx>
|
||||||
#include <IntTools_Context.hxx>
|
|
||||||
#else
|
|
||||||
#include <BOPInt_Context.hxx>
|
|
||||||
#endif
|
|
||||||
#include <GEOMAlgo_Algo.hxx>
|
#include <GEOMAlgo_Algo.hxx>
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -47,23 +36,15 @@
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
class GEOMAlgo_ShapeAlgo : public GEOMAlgo_Algo
|
class GEOMAlgo_ShapeAlgo : public GEOMAlgo_Algo
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//! Sets cashed geometrical tools <br>
|
//! Sets cashed geometrical tools <br>
|
||||||
Standard_EXPORT
|
Standard_EXPORT
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
|
||||||
void SetContext(const Handle(IntTools_Context)& theContext) ;
|
void SetContext(const Handle(IntTools_Context)& theContext) ;
|
||||||
#else
|
|
||||||
void SetContext(const Handle(BOPInt_Context)& theContext) ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//! Returns cashed geometrical tools <br>
|
//! Returns cashed geometrical tools <br>
|
||||||
Standard_EXPORT
|
Standard_EXPORT
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
|
||||||
const Handle(IntTools_Context)& Context() const;
|
const Handle(IntTools_Context)& Context() const;
|
||||||
#else
|
|
||||||
const Handle(BOPInt_Context)& Context() const;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Standard_EXPORT
|
Standard_EXPORT
|
||||||
void SetShape(const TopoDS_Shape& aS) ;
|
void SetShape(const TopoDS_Shape& aS) ;
|
||||||
@ -90,14 +71,10 @@ protected:
|
|||||||
Standard_EXPORT
|
Standard_EXPORT
|
||||||
virtual ~GEOMAlgo_ShapeAlgo();
|
virtual ~GEOMAlgo_ShapeAlgo();
|
||||||
|
|
||||||
|
|
||||||
TopoDS_Shape myShape;
|
TopoDS_Shape myShape;
|
||||||
Standard_Real myTolerance;
|
Standard_Real myTolerance;
|
||||||
TopoDS_Shape myResult;
|
TopoDS_Shape myResult;
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
|
||||||
Handle(IntTools_Context) myContext;
|
Handle(IntTools_Context) myContext;
|
||||||
#else
|
|
||||||
Handle(BOPInt_Context) myContext;
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -559,7 +559,7 @@ void GEOMAlgo_ShapeInfoFiller::FillDetails(const TopoDS_Face& aF,
|
|||||||
const gp_Cylinder& aCyl)
|
const gp_Cylinder& aCyl)
|
||||||
|
|
||||||
{
|
{
|
||||||
Standard_Integer i, aNbV, aNbE, aNbCE, aNbSE;
|
Standard_Integer aNbV, aNbE, aNbCE, aNbSE;
|
||||||
Standard_Real aT0, aT1, aHeight;
|
Standard_Real aT0, aT1, aHeight;
|
||||||
gp_Pnt aPC[3], aPc;
|
gp_Pnt aPC[3], aPc;
|
||||||
TopoDS_Edge aE;
|
TopoDS_Edge aE;
|
||||||
@ -578,7 +578,6 @@ void GEOMAlgo_ShapeInfoFiller::FillDetails(const TopoDS_Face& aF,
|
|||||||
const gp_Dir& aDir=aAx1.Direction();
|
const gp_Dir& aDir=aAx1.Direction();
|
||||||
const gp_Pnt& aPLoc=aAx1.Location();
|
const gp_Pnt& aPLoc=aAx1.Location();
|
||||||
//
|
//
|
||||||
i=0;
|
|
||||||
aNbCE=0;
|
aNbCE=0;
|
||||||
aNbSE=0;
|
aNbSE=0;
|
||||||
aExp.Init(aF, TopAbs_EDGE);
|
aExp.Init(aF, TopAbs_EDGE);
|
||||||
@ -795,7 +794,7 @@ Standard_Boolean GEOMAlgo_ShapeInfoFiller::TreatStepSphere
|
|||||||
{
|
{
|
||||||
Standard_Boolean bRet, bIsAllowedType, bOnlyClosed, bIsEqual;
|
Standard_Boolean bRet, bIsAllowedType, bOnlyClosed, bIsEqual;
|
||||||
Standard_Integer j;
|
Standard_Integer j;
|
||||||
Standard_Real aTolAng, aTol;
|
Standard_Real aTol;
|
||||||
Standard_Real aVolume, aVolumeS, dV, aArea, aAreaS, dA;
|
Standard_Real aVolume, aVolumeS, dV, aArea, aAreaS, dA;
|
||||||
gp_Sphere aSphere[2];
|
gp_Sphere aSphere[2];
|
||||||
GeomAbs_SurfaceType aST;
|
GeomAbs_SurfaceType aST;
|
||||||
@ -805,7 +804,6 @@ Standard_Boolean GEOMAlgo_ShapeInfoFiller::TreatStepSphere
|
|||||||
//
|
//
|
||||||
bRet=Standard_False;
|
bRet=Standard_False;
|
||||||
aTol=Precision::Confusion();
|
aTol=Precision::Confusion();
|
||||||
aTolAng=Precision::Angular();
|
|
||||||
//
|
//
|
||||||
aExp.Init(aSd, TopAbs_FACE);
|
aExp.Init(aSd, TopAbs_FACE);
|
||||||
for (j=0; aExp.More(); aExp.Next(), ++j) {
|
for (j=0; aExp.More(); aExp.Next(), ++j) {
|
||||||
|
@ -27,8 +27,6 @@
|
|||||||
//
|
//
|
||||||
#include <GEOMAlgo_ShellSolid.hxx>
|
#include <GEOMAlgo_ShellSolid.hxx>
|
||||||
|
|
||||||
#include <Basics_OCCTVersion.hxx>
|
|
||||||
|
|
||||||
#include <Standard_Failure.hxx>
|
#include <Standard_Failure.hxx>
|
||||||
|
|
||||||
#include <gp_Pnt2d.hxx>
|
#include <gp_Pnt2d.hxx>
|
||||||
@ -50,13 +48,9 @@
|
|||||||
|
|
||||||
#include <BOPTools_AlgoTools.hxx>
|
#include <BOPTools_AlgoTools.hxx>
|
||||||
|
|
||||||
#include <BOPCol_DataMapOfShapeListOfShape.hxx>
|
#include <TopTools_DataMapOfShapeListOfShape.hxx>
|
||||||
#include <BOPCol_ListOfShape.hxx>
|
#include <TopTools_ListOfShape.hxx>
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
|
||||||
#include <IntTools_Context.hxx>
|
#include <IntTools_Context.hxx>
|
||||||
#else
|
|
||||||
#include <BOPInt_Context.hxx>
|
|
||||||
#endif
|
|
||||||
#include <BOPDS_DS.hxx>
|
#include <BOPDS_DS.hxx>
|
||||||
#include <BOPAlgo_Builder.hxx>
|
#include <BOPAlgo_Builder.hxx>
|
||||||
|
|
||||||
@ -101,9 +95,6 @@ GEOMAlgo_ShellSolidBuilder::~GEOMAlgo_ShellSolidBuilder()
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFiller)
|
void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFiller)
|
||||||
{
|
{
|
||||||
#if OCC_VERSION_LARGE <= 0x07010000
|
|
||||||
myErrorStatus=0;
|
|
||||||
#endif
|
|
||||||
//
|
//
|
||||||
myPaveFiller=(BOPAlgo_PaveFiller*)&theFiller;
|
myPaveFiller=(BOPAlgo_PaveFiller*)&theFiller;
|
||||||
myDS=myPaveFiller->PDS();
|
myDS=myPaveFiller->PDS();
|
||||||
@ -111,97 +102,57 @@ void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFi
|
|||||||
//
|
//
|
||||||
// 1. CheckData
|
// 1. CheckData
|
||||||
CheckData();
|
CheckData();
|
||||||
#if OCC_VERSION_LARGE > 0x07010001
|
|
||||||
if (HasErrors()) {
|
if (HasErrors()) {
|
||||||
#else
|
|
||||||
if (myErrorStatus) {
|
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// 2. Prepare
|
// 2. Prepare
|
||||||
Prepare();
|
Prepare();
|
||||||
#if OCC_VERSION_LARGE > 0x07010001
|
|
||||||
if (HasErrors()) {
|
if (HasErrors()) {
|
||||||
#else
|
|
||||||
if (myErrorStatus) {
|
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// 3. Fill Images
|
// 3. Fill Images
|
||||||
// 3.1 Vertice
|
// 3.1 Vertice
|
||||||
FillImagesVertices();
|
FillImagesVertices();
|
||||||
#if OCC_VERSION_LARGE > 0x07010001
|
|
||||||
if (HasErrors()) {
|
if (HasErrors()) {
|
||||||
#else
|
|
||||||
if (myErrorStatus) {
|
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
BuildResult(TopAbs_VERTEX);
|
BuildResult(TopAbs_VERTEX);
|
||||||
#if OCC_VERSION_LARGE > 0x07010001
|
|
||||||
if (HasErrors()) {
|
if (HasErrors()) {
|
||||||
#else
|
|
||||||
if (myErrorStatus) {
|
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 3.2 Edges
|
// 3.2 Edges
|
||||||
FillImagesEdges();
|
FillImagesEdges();
|
||||||
#if OCC_VERSION_LARGE > 0x07010001
|
|
||||||
if (HasErrors()) {
|
if (HasErrors()) {
|
||||||
#else
|
|
||||||
if (myErrorStatus) {
|
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
BuildResult(TopAbs_EDGE);
|
BuildResult(TopAbs_EDGE);
|
||||||
#if OCC_VERSION_LARGE > 0x07010001
|
|
||||||
if (HasErrors()) {
|
if (HasErrors()) {
|
||||||
#else
|
|
||||||
if (myErrorStatus) {
|
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// 3.3 Wires
|
// 3.3 Wires
|
||||||
FillImagesContainers(TopAbs_WIRE);
|
FillImagesContainers(TopAbs_WIRE);
|
||||||
#if OCC_VERSION_LARGE > 0x07010001
|
|
||||||
if (HasErrors()) {
|
if (HasErrors()) {
|
||||||
#else
|
|
||||||
if (myErrorStatus) {
|
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
BuildResult(TopAbs_WIRE);
|
BuildResult(TopAbs_WIRE);
|
||||||
#if OCC_VERSION_LARGE > 0x07010001
|
|
||||||
if (HasErrors()) {
|
if (HasErrors()) {
|
||||||
#else
|
|
||||||
if (myErrorStatus) {
|
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3.4 Faces
|
// 3.4 Faces
|
||||||
FillImagesFaces();
|
FillImagesFaces();
|
||||||
#if OCC_VERSION_LARGE > 0x07010001
|
|
||||||
if (HasErrors()) {
|
if (HasErrors()) {
|
||||||
#else
|
|
||||||
if (myErrorStatus) {
|
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
BuildResult(TopAbs_FACE);
|
BuildResult(TopAbs_FACE);
|
||||||
#if OCC_VERSION_LARGE > 0x07010001
|
|
||||||
if (HasErrors()) {
|
if (HasErrors()) {
|
||||||
#else
|
|
||||||
if (myErrorStatus) {
|
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -228,9 +179,6 @@ GEOMAlgo_ShellSolid::~GEOMAlgo_ShellSolid()
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_ShellSolid::Perform()
|
void GEOMAlgo_ShellSolid::Perform()
|
||||||
{
|
{
|
||||||
#if OCC_VERSION_LARGE <= 0x07010000
|
|
||||||
myErrorStatus=0;
|
|
||||||
#endif
|
|
||||||
//
|
//
|
||||||
try {
|
try {
|
||||||
Standard_Integer aNbArgs, iRank, iErr, iBeg, iEnd, i, aNbSp;
|
Standard_Integer aNbArgs, iRank, iErr, iBeg, iEnd, i, aNbSp;
|
||||||
@ -251,18 +199,14 @@ void GEOMAlgo_ShellSolid::Perform()
|
|||||||
myErrorStatus=10;
|
myErrorStatus=10;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#if OCC_VERSION_LARGE > 0x07010001
|
|
||||||
if(myDSFiller->HasErrors()) {
|
if(myDSFiller->HasErrors()) {
|
||||||
#else
|
|
||||||
if(myDSFiller->ErrorStatus()) {
|
|
||||||
#endif
|
|
||||||
myErrorStatus=11;
|
myErrorStatus=11;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
const BOPDS_DS& aDS=myDSFiller->DS();
|
const BOPDS_DS& aDS=myDSFiller->DS();
|
||||||
BOPDS_DS* pDS=(BOPDS_DS*)&aDS;
|
BOPDS_DS* pDS=(BOPDS_DS*)&aDS;
|
||||||
const BOPCol_ListOfShape& aLS=pDS->Arguments();
|
const TopTools_ListOfShape& aLS=pDS->Arguments();
|
||||||
//
|
//
|
||||||
aNbArgs=aLS.Extent();
|
aNbArgs=aLS.Extent();
|
||||||
if (aNbArgs!=2) {
|
if (aNbArgs!=2) {
|
||||||
@ -285,11 +229,7 @@ void GEOMAlgo_ShellSolid::Perform()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
#if OCC_VERSION_LARGE > 0x06070100
|
|
||||||
Handle(IntTools_Context) aCtx=myDSFiller->Context();
|
Handle(IntTools_Context) aCtx=myDSFiller->Context();
|
||||||
#else
|
|
||||||
Handle(BOPInt_Context) aCtx=myDSFiller->Context();
|
|
||||||
#endif
|
|
||||||
const BOPDS_IndexRange& aRange=pDS->Range(iRank);
|
const BOPDS_IndexRange& aRange=pDS->Range(iRank);
|
||||||
aRange.Indices(iBeg, iEnd);
|
aRange.Indices(iBeg, iEnd);
|
||||||
const TopoDS_Solid& aSolid=(!iRank) ? *((TopoDS_Solid*)&aTool) : *((TopoDS_Solid*)&aObj);
|
const TopoDS_Solid& aSolid=(!iRank) ? *((TopoDS_Solid*)&aTool) : *((TopoDS_Solid*)&aObj);
|
||||||
@ -299,17 +239,13 @@ void GEOMAlgo_ShellSolid::Perform()
|
|||||||
GEOMAlgo_ShellSolidBuilder aSSB;
|
GEOMAlgo_ShellSolidBuilder aSSB;
|
||||||
//
|
//
|
||||||
aSSB.PerformWithFiller(*myDSFiller);
|
aSSB.PerformWithFiller(*myDSFiller);
|
||||||
#if OCC_VERSION_LARGE > 0x07010001
|
|
||||||
iErr=aSSB.HasErrors();
|
iErr=aSSB.HasErrors();
|
||||||
#else
|
|
||||||
iErr=aSSB.ErrorStatus();
|
|
||||||
#endif
|
|
||||||
if (iErr) {
|
if (iErr) {
|
||||||
myErrorStatus=15;
|
myErrorStatus=15;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
const BOPCol_DataMapOfShapeListOfShape& aImages=aSSB.Images();
|
const TopTools_DataMapOfShapeListOfShape& aImages=aSSB.Images();
|
||||||
//
|
//
|
||||||
//-------------------------------
|
//-------------------------------
|
||||||
for (i=iBeg; i<=iEnd; ++i) {
|
for (i=iBeg; i<=iEnd; ++i) {
|
||||||
@ -332,7 +268,7 @@ void GEOMAlgo_ShellSolid::Perform()
|
|||||||
aState=BOPTools_AlgoTools::ComputeState(aP, aSolid, aTol, aCtx);
|
aState=BOPTools_AlgoTools::ComputeState(aP, aSolid, aTol, aCtx);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const BOPCol_ListOfShape& aLSp=aImages.Find(aS);
|
const TopTools_ListOfShape& aLSp=aImages.Find(aS);
|
||||||
aNbSp=aLSp.Extent();
|
aNbSp=aLSp.Extent();
|
||||||
if (aNbSp>0) {
|
if (aNbSp>0) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -37,8 +37,6 @@
|
|||||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||||
#include <TopTools_IndexedMapOfShape.hxx>
|
#include <TopTools_IndexedMapOfShape.hxx>
|
||||||
|
|
||||||
#include <Basics_OCCTVersion.hxx>
|
|
||||||
|
|
||||||
#include <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
|
#include <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -85,11 +83,7 @@ void GEOMAlgo_SolidSolid::Perform()
|
|||||||
myErrorStatus=10;
|
myErrorStatus=10;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#if OCC_VERSION_LARGE > 0x07010001
|
|
||||||
if(myDSFiller->HasErrors()) {
|
if(myDSFiller->HasErrors()) {
|
||||||
#else
|
|
||||||
if(myDSFiller->ErrorStatus()) {
|
|
||||||
#endif
|
|
||||||
myErrorStatus=11;
|
myErrorStatus=11;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -36,16 +36,14 @@
|
|||||||
|
|
||||||
#include <BRep_Builder.hxx>
|
#include <BRep_Builder.hxx>
|
||||||
|
|
||||||
#include <BOPCol_MapOfShape.hxx>
|
#include <TopTools_MapOfShape.hxx>
|
||||||
#include <BOPCol_ListOfShape.hxx>
|
#include <TopTools_ListOfShape.hxx>
|
||||||
|
|
||||||
#include <BOPTools.hxx>
|
#include <TopExp.hxx>
|
||||||
|
|
||||||
#include <Basics_OCCTVersion.hxx>
|
|
||||||
|
|
||||||
static
|
static
|
||||||
void TreatCompound(const TopoDS_Shape& aC,
|
void TreatCompound(const TopoDS_Shape& aC,
|
||||||
BOPCol_ListOfShape& aLSX);
|
TopTools_ListOfShape& aLSX);
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function :
|
//function :
|
||||||
@ -97,7 +95,7 @@ void GEOMAlgo_Splitter::AddTool(const TopoDS_Shape& theShape)
|
|||||||
//function : Tools
|
//function : Tools
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
const BOPCol_ListOfShape& GEOMAlgo_Splitter::Tools()const
|
const TopTools_ListOfShape& GEOMAlgo_Splitter::Tools()const
|
||||||
{
|
{
|
||||||
return myTools;
|
return myTools;
|
||||||
}
|
}
|
||||||
@ -150,14 +148,10 @@ void GEOMAlgo_Splitter::Clear()
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_Splitter::BuildResult(const TopAbs_ShapeEnum theType)
|
void GEOMAlgo_Splitter::BuildResult(const TopAbs_ShapeEnum theType)
|
||||||
{
|
{
|
||||||
#if OCC_VERSION_LARGE <= 0x07010000
|
|
||||||
myErrorStatus=0;
|
|
||||||
#endif
|
|
||||||
//
|
|
||||||
TopAbs_ShapeEnum aType;
|
TopAbs_ShapeEnum aType;
|
||||||
BRep_Builder aBB;
|
BRep_Builder aBB;
|
||||||
BOPCol_MapOfShape aM;
|
TopTools_MapOfShape aM;
|
||||||
BOPCol_ListIteratorOfListOfShape aIt, aItIm;
|
TopTools_ListIteratorOfListOfShape aIt, aItIm;
|
||||||
//
|
//
|
||||||
aIt.Initialize(myArguments);
|
aIt.Initialize(myArguments);
|
||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
@ -165,7 +159,7 @@ void GEOMAlgo_Splitter::BuildResult(const TopAbs_ShapeEnum theType)
|
|||||||
aType=aS.ShapeType();
|
aType=aS.ShapeType();
|
||||||
if (aType==theType && !myMapTools.Contains(aS)) {
|
if (aType==theType && !myMapTools.Contains(aS)) {
|
||||||
if (myImages.IsBound(aS)) {
|
if (myImages.IsBound(aS)) {
|
||||||
const BOPCol_ListOfShape& aLSIm=myImages.Find(aS);
|
const TopTools_ListOfShape& aLSIm=myImages.Find(aS);
|
||||||
aItIm.Initialize(aLSIm);
|
aItIm.Initialize(aLSIm);
|
||||||
for (; aItIm.More(); aItIm.Next()) {
|
for (; aItIm.More(); aItIm.Next()) {
|
||||||
const TopoDS_Shape& aSIm=aItIm.Value();
|
const TopoDS_Shape& aSIm=aItIm.Value();
|
||||||
@ -192,11 +186,11 @@ void GEOMAlgo_Splitter::PostTreat()
|
|||||||
Standard_Integer i, aNbS;
|
Standard_Integer i, aNbS;
|
||||||
BRep_Builder aBB;
|
BRep_Builder aBB;
|
||||||
TopoDS_Compound aC;
|
TopoDS_Compound aC;
|
||||||
BOPCol_IndexedMapOfShape aMx;
|
TopTools_IndexedMapOfShape aMx;
|
||||||
//
|
//
|
||||||
aBB.MakeCompound(aC);
|
aBB.MakeCompound(aC);
|
||||||
//
|
//
|
||||||
BOPTools::MapShapes(myShape, myLimit, aMx);
|
TopExp::MapShapes(myShape, myLimit, aMx);
|
||||||
aNbS=aMx.Extent();
|
aNbS=aMx.Extent();
|
||||||
for (i=1; i<=aNbS; ++i) {
|
for (i=1; i<=aNbS; ++i) {
|
||||||
const TopoDS_Shape& aS=aMx(i);
|
const TopoDS_Shape& aS=aMx(i);
|
||||||
@ -205,9 +199,9 @@ void GEOMAlgo_Splitter::PostTreat()
|
|||||||
if (myLimitMode) {
|
if (myLimitMode) {
|
||||||
Standard_Integer iType, iLimit, iTypeX;
|
Standard_Integer iType, iLimit, iTypeX;
|
||||||
TopAbs_ShapeEnum aType, aTypeX;
|
TopAbs_ShapeEnum aType, aTypeX;
|
||||||
BOPCol_ListOfShape aLSP, aLSX;
|
TopTools_ListOfShape aLSP, aLSX;
|
||||||
BOPCol_ListIteratorOfListOfShape aIt, aItX, aItIm;
|
TopTools_ListIteratorOfListOfShape aIt, aItX, aItIm;
|
||||||
BOPCol_MapOfShape aM;
|
TopTools_MapOfShape aM;
|
||||||
//
|
//
|
||||||
iLimit=(Standard_Integer)myLimit;
|
iLimit=(Standard_Integer)myLimit;
|
||||||
//
|
//
|
||||||
@ -245,13 +239,13 @@ void GEOMAlgo_Splitter::PostTreat()
|
|||||||
}// for (; aIt.More(); aIt.Next()) {
|
}// for (; aIt.More(); aIt.Next()) {
|
||||||
//
|
//
|
||||||
aMx.Clear();
|
aMx.Clear();
|
||||||
BOPTools::MapShapes(aC, aMx);
|
TopExp::MapShapes(aC, aMx);
|
||||||
// 2. Add them to aC
|
// 2. Add them to aC
|
||||||
aIt.Initialize(aLSP);
|
aIt.Initialize(aLSP);
|
||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
const TopoDS_Shape& aS=aIt.Value();
|
const TopoDS_Shape& aS=aIt.Value();
|
||||||
if (myImages.IsBound(aS)) {
|
if (myImages.IsBound(aS)) {
|
||||||
const BOPCol_ListOfShape& aLSIm=myImages.Find(aS);
|
const TopTools_ListOfShape& aLSIm=myImages.Find(aS);
|
||||||
aItIm.Initialize(aLSIm);
|
aItIm.Initialize(aLSIm);
|
||||||
for (; aItIm.More(); aItIm.Next()) {
|
for (; aItIm.More(); aItIm.Next()) {
|
||||||
const TopoDS_Shape& aSIm=aItIm.Value();
|
const TopoDS_Shape& aSIm=aItIm.Value();
|
||||||
@ -276,7 +270,7 @@ void GEOMAlgo_Splitter::PostTreat()
|
|||||||
//
|
//
|
||||||
Standard_Integer aNbS;
|
Standard_Integer aNbS;
|
||||||
TopoDS_Iterator aIt;
|
TopoDS_Iterator aIt;
|
||||||
BOPCol_ListOfShape aLS;
|
TopTools_ListOfShape aLS;
|
||||||
//
|
//
|
||||||
aIt.Initialize(myShape);
|
aIt.Initialize(myShape);
|
||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
@ -295,12 +289,12 @@ void GEOMAlgo_Splitter::PostTreat()
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void TreatCompound(const TopoDS_Shape& aC1,
|
void TreatCompound(const TopoDS_Shape& aC1,
|
||||||
BOPCol_ListOfShape& aLSX)
|
TopTools_ListOfShape& aLSX)
|
||||||
{
|
{
|
||||||
Standard_Integer aNbC1;
|
Standard_Integer aNbC1;
|
||||||
TopAbs_ShapeEnum aType;
|
TopAbs_ShapeEnum aType;
|
||||||
BOPCol_ListOfShape aLC, aLC1;
|
TopTools_ListOfShape aLC, aLC1;
|
||||||
BOPCol_ListIteratorOfListOfShape aIt, aIt1;
|
TopTools_ListIteratorOfListOfShape aIt, aIt1;
|
||||||
TopoDS_Iterator aItC;
|
TopoDS_Iterator aItC;
|
||||||
//
|
//
|
||||||
aLC.Append (aC1);
|
aLC.Append (aC1);
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user