STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
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}_VERSION
${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
# Prerequisites
# =============
# Find "big" prerequisites first - they reference themselves many others
-# -> this can help finding the smaller prerequisites and detect conficts.
+# -> this can help find the smaller prerequisites and detect conflicts.
# In our case KERNEL has already loaded many prereq:
##
Pre-requisites
--------------
-SALOME platform relies on a set of third-party softwares; some of them are needed
-at build time only, while other ones are needed in runtime also.
+SALOME platform relies on a set of third-party software; some of them are needed
+at build time only, while other ones are needed at runtime as well.
For more information about the pre-requisites please visit SALOME platform web
site:
# - Config file for the @PROJECT_NAME@ package
# It defines the following variables.
-# Specific to the pacakge @PROJECT_NAME@ itself:
+# Specific to the package @PROJECT_NAME@ itself:
# @PROJECT_NAME_UC@_ROOT_DIR_EXP - the root path of the installation providing this CMake file
#
#=======================================================
-# Create simple path and recieve points
+# Create simple path and receive points
# for section creation
#=======================================================
WirePath = geompy.MakeSketcher("Sketcher:F 0 0:T 60 0:T 40 0:R 0:C 100 90:",
ShapeListCompound.append(S)
i = i + 1
-# create a compund of the given shapes
+# create a compound of the given shapes
compound = geompy.MakeCompound(ShapeListCompound)
# add object in the study
box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
# create a new object as offset of the given object
-offset = geompy.MakeOffset(box, 70.)
+offset = geompy.MakeOffset(box, 70.)
+offset2 = geompy.MakeOffsetIntersectionJoin(box, 70.)
# add objects in the study
id_box = geompy.addToStudy(box, "Box")
id_offset = geompy.addToStudy(offset, "Offset")
+id_offset2 = geompy.addToStudy(offset2, "Offset_intersection_join")
# display the results
gg.createAndDisplayGO(id_box)
gg.setDisplayMode(id_box,1)
-gg.createAndDisplayGO(id_offset)
+gg.createAndDisplayGO(id_offset)
+gg.createAndDisplayGO(id_offset2)
<b>Arguments:</b>
- \b Radius - Radius of the disk
-- \b Orientation - Plane on wich the disk will be built
+- \b Orientation - Plane on which the disk will be built
- \b Pattern - Division pattern
\image html divided_disk_dlg.png
- The \b height of extrusion. It is calculated from the <b>base profile</b> along the normal to its plane.
-And optionnaly:
+And optionally:
- A <b>draft angle</b> in degrees. Activated by clicking on \image html draft.png
- The \b height of extrusion. It's calculated from the <b>base profile</b> along the normal to its plane.
-And optionnaly:
+And optionally:
- A <b>draft angle</b> in degrees. Activated by clicking on \image html draft.png
<b> Of course, <em>from geompy import *</em> is no more possible.</b>
-\n You have to explicitely write <em>geompy.some_method()</em>.
+\n You have to explicitly write <em>geompy.some_method()</em>.
\n <b>Some variables have been transferred from the namespace <em>geompy.GEOM</em> to the namespace <em>GEOM</em>.</b>
\n All occurrences of <em>geompy.GEOM.</em> can be replaced by <em>GEOM.</em>.
\n This operation translates each point of an \b Object (a set of
Objects) along a local normal by a given \b Offset distance (signed
-number, negative value meaning inner offset).
+number, negative value meaning inner offset). Gaps between translated
+adjacent surfaces are filled in either of two ways:
+- if <b>Join by pipes</b> is activated, they are filled with pipes;
+- else the surfaces are extended and intersected, so that sharp edges
+ are preserved.
+
\n \b Offset operation is applicable to faces, shells and solids.
\n \ref restore_presentation_parameters_page "Advanced options".
\n <b>Example:</b>
-\image html offsetsn.png "The box and its offset surface"
+\image html offsetsn.png "The box and its offset surface (Join by pipes activated)"
+
+\n <b>TUI Command:</b>
+- Gaps filled by pipes: <em>geompy.MakeOffset(Shape, Offset),</em>
+- Gaps filled by intersection: <em>geompy.MakeOffsetIntersectionJoin(Shape, Offset),</em>
-\n <b>TUI Command:</b> <em>geompy.MakeOffset(Shape, Offset),</em>
where Shape is a shape(s) which has to be an offset, Offset is a value of
the offset.
\n <b>Arguments:</b> Name + Object (face(s), shell(s), solid(s)) +
Some tools in GEOM allow you to create shapes, basing the design on imported pictures (engineering drawings, nautical charts ...) :
<ul>
-<li>\subpage import_picture_page, such as engeneering drawings or nautical charts as a support for shape design.
+<li>\subpage import_picture_page, such as engineering drawings or nautical charts as a support for shape design.
<li>\subpage shape_recognition_page previously imported in the OCC viewer .
</ul>
\image html restore-ss-viewer-before.png "The initial box and cylinder"
First, we examine the case when the resulting shape corresponds to one argument (after transformation,
-after the Boolean operation Cut, or after the partiton with one object shape).
+after the Boolean operation Cut, or after the partition with one object shape).
We create a Cut of Box_1 with Cylinder_1.
\image html transformation2.png
-\n Finally you can define the \b Vector explicitely. The \b Object will be translated by the length of the vector.
+\n Finally you can define the \b Vector explicitly. The \b Object will be translated by the length of the vector.
If a curve has been selected instead of the vector, only its first and last vertices will be used to get the vector direction and the dialog preview will display the vector along which the object will be translated.
\n <b>Activate Distance</b> checkbox and <b>Distance</b> field allow defining a custom distance of translation.
/*!
* \brief Set the operation error code
- * \param theErrorID is a string describing the error occured
+ * \param theErrorID is a string describing the error occurred
* \note This method is supposed to be used only by interfaces inheriting from IOperations.
*/
void SetErrorCode (in string theErrorID);
void StartOperation();
/*!
- * \brief Closes the previously opened trasaction
+ * \brief Closes the previously opened transaction
*/
void FinishOperation();
/*!
* C\brief reate a line, passing through the given point
- * and parrallel to the given direction
+ * and parallel to the given direction
* \param thePnt Point. The resulting line will pass through it.
* \param theDir Direction. The resulting line will be parallel to it.
* \return New GEOM_Object, containing the created line.
* \brief Replace the given object by its offset.
* \param theObject The base object for the offset.
* \param theOffset Offset value.
+ * \param theJoinByPipes To join offset surfaces by pipes or by intersection.
* \return theObject.
*/
- GEOM_Object OffsetShape (in GEOM_Object theObject, in double theOffset);
+ GEOM_Object OffsetShape (in GEOM_Object theObject,
+ in double theOffset,
+ in boolean theJoinByPipes);
/*!
* \brief Create new object as offset of the given one.
* \param theObject The base object for the offset.
* \param theOffset Offset value.
+ * \param theJoinByPipes To join offset surfaces by pipes or by intersection.
* \return New GEOM_Object, containing the offset object.
*/
- GEOM_Object OffsetShapeCopy (in GEOM_Object theObject, in double theOffset);
+ GEOM_Object OffsetShapeCopy (in GEOM_Object theObject,
+ in double theOffset,
+ in boolean theJoinByPipes);
/*!
* \brief Create new object as projection of the given one on a 2D surface.
*
* Propagation group is a set of all edges, opposite to one (main)
* edge of this group directly or through other opposite edges.
- * Notion of Opposite Edge make sence only on quadrangle face.
+ * Notion of Opposite Edge make sense only on quadrangle face.
* \param theShape Shape to build propagation groups on.
* \return List of GEOM_Object, each of them is a propagation group.
*/
* \param theRemoveInside Shapes, inside which the results will be deleted.
* Each shape from theRemoveInside must belong to theShapes also.
* \param theRemoveWebs If TRUE, perform Glue 3D algorithm.
- * \param theMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
+ * \param theMaterials Material indices for each shape. Make sense, only if theRemoveWebs is TRUE.
*
* \return New GEOM_Object, containing the result shapes.
*/
/*!
* \brief Perform partition operation.
*
- * This method may be usefull if it is needed to make a partition for
+ * This method may be useful if it is needed to make a partition for
* a compound containing nonintersected shapes. Performance will be better
* since intersection between shapes from compound is not performed.
*
* \param theVertexes Global indices of vertexes to perform fillet on.
* \note Global index of sub-shape can be obtained, using method
* <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
- * \note The list of vertices coudl be empty, in this case fillet fill be done
+ * \note The list of vertices could be empty, in this case fillet fill be done
* at all vertices in given wire
* \param doIgnoreSecantVertices If FALSE, fillet radius is always limited
* by the length of the edges, nearest to the fillet vertex.
in double theD1, in double theD2,
in long theFace1, in long theFace2);
/*!
- * \brief The Same but with params theD = Chamfer Lenght
+ * \brief The Same but with params theD = Chamfer Length
* and theAngle = Chamfer Angle (Angle in radians)
*/
GEOM_Object MakeChamferEdgeAD (in GEOM_Object theShape,
in double theD1, in double theD2,
in ListOfLong theFaces);
/*!
- * The Same but with params theD = Chamfer Lenght
+ * The Same but with params theD = Chamfer Length
* and theAngle = Chamfer Angle (Angle in radians)
*/
GEOM_Object MakeChamferFacesAD (in GEOM_Object theShape,
in double theD1, in double theD2,
in ListOfLong theEdges);
/*!
- * The Same but with params theD = Chamfer Lenght
+ * The Same but with params theD = Chamfer Length
* and theAngle = Chamfer Angle (Angle in radians)
*/
GEOM_Object MakeChamferEdgesAD (in GEOM_Object theShape,
* \param theObjects Shapes to get free boundary of.
* \param theClosedWires Output. Closed wires on the free boundary of the given shape.
* \param theOpenWires Output. Open wires on the free boundary of the given shape.
- * \return FALSE, if an error(s) occured during the method execution.
+ * \return FALSE, if an error(s) occurred during the method execution.
*/
boolean GetFreeBoundary (in ListOfGO theObjects,
out ListOfGO theClosedWires,
};
/*!
- * \brief Sequence of non-topological information tranfer data.
+ * \brief Sequence of non-topological information transfer data.
*/
typedef sequence<TransferDatum> ListOfTransferDatum;
* \param theResult statistics of the operation. Output parameter. It
* represents a sequence of Transfer Datum. A datum has the type
* (string code), the total number of items of this type and
- * the number of transfered items.
+ * the number of transferred items.
* \return true in case of success; otherwise false.
*/
boolean TransferData(in GEOM_Object theObjectFrom,
* in place of sub-shapes of the first argument,
* because the whole shape corresponds to the first argument.
* Mainly to be used after transformations, but it also can be
- * usefull after partition with one object shape, and some other
+ * useful after partition with one object shape, and some other
* operations, where only the first argument has to be considered.
* If theObject has only one argument shape, this flag is automatically
* considered as True, not regarding really passed value.
* in place of sub-shapes of the first argument,
* because the whole shape corresponds to the first argument.
* Mainly to be used after transformations, but it also can be
- * usefull after partition with one object shape, and some other
+ * useful after partition with one object shape, and some other
* operations, where only the first argument has to be considered.
* If theObject has only one argument shape, this flag is automatically
* considered as True, not regarding really passed value.
* in place of sub-shapes of the first argument,
* because the whole shape corresponds to the first argument.
* Mainly to be used after transformations, but it also can be
- * usefull after partition with one object shape, and some other
+ * useful after partition with one object shape, and some other
* operations, where only the first argument has to be considered.
* If theObject has only one argument shape, this flag is automatically
* considered as True, not regarding really passed value.
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer AdvancedEngine_DividedDiskDriver::Execute(LOGBOOK& log) const
+Standard_Integer AdvancedEngine_DividedDiskDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (AdvancedEngine_DividedDiskDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (AdvancedEngine_DividedDiskDriver,GEOM_BaseDriver);
// Methods PUBLIC
//
AdvancedEngine_DividedDiskDriver();
- virtual Standard_Integer Execute(LOGBOOK& log) const;
- virtual void Validate(LOGBOOK&) const {}
- Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
static const Standard_GUID& GetID();
~AdvancedEngine_DividedDiskDriver() {};
TopoDS_Shell MakeDiskHexagon (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
#include "AdvancedEngine_SmoothingSurfaceDriver.hxx"
#include "AdvancedEngine_ISmoothingSurface.hxx"
-#include <Basics_OCCTVersion.hxx>
-
#include <utilities.h>
#include <OpUtil.hxx>
#include <Utils_ExceptHandlers.hxx>
return false;
}
- gp_Trsf aTrsfInv = aTrsf.Inverted();
-
// int expectedGroups = 0;
// if (shapeType == TSHAPE_BASIC)
// if (Abs(theR2+theW2-theR1-theW1) <= Precision::Approximation())
if (aGroup.IsNull())
continue;
+ gp_Trsf aTrsfInv = aTrsf.Inverted();
TopoDS_Shape aGroupShape = aGroup->GetValue();
BRepBuilderAPI_Transform aTransformationShapeInv (aGroupShape, aTrsfInv, Standard_False);
TopoDS_Shape aGroupShapeTrsfInv = aTransformationShapeInv.Shape();
// Default value=3
aFinder.SetNbPntsMin(3);
// Sets the maximal number of inner points for edges or faces.
- // It is usefull for the cases when this number is very big (e.g =2000) to improve
+ // It is useful for the cases when this number is very big (e.g =2000) to improve
// the performance. If this value =0, all inner points will be taken into account.
// Default value=0
aFinder.SetNbPntsMax(100);
TopoDS_Shape aShape = Te3->GetValue();
theShape->GetLastFunction()->SetValue(aShape);
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return false;
}
aFunction->SetValue(aResShape);
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
aFunction->SetValue(aResShape);
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
try {
aChamfer = myLocalOperations->MakeChamferEdges(aShape, theW, theH, theEdges);
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
if (aChamfer.IsNull()) {
aFunction->SetValue(aResShape);
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
try {
aChamfer = myLocalOperations->MakeChamferEdges(aShape, theW, theH, theEdges);
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
if (aChamfer.IsNull()) {
aFunction->SetValue(aResShape);
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
try {
aFillet = myLocalOperations->MakeFilletEdges(aShape, theRF, theEdges);
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
if (aFillet.IsNull()) {
aFunction->SetValue(aResShape);
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
try {
aFillet = myLocalOperations->MakeFilletEdges(aShape, theRF, theEdges);
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
if (aFillet.IsNull()) {
aFunction->SetValue(aResShape);
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
// Default value=3
aFinder.SetNbPntsMin(3);
// Sets the maximal number of inner points for edges or faces.
- // It is usefull for the cases when this number is very big (e.g =2000) to improve
+ // It is useful for the cases when this number is very big (e.g =2000) to improve
// the performance. If this value =0, all inner points will be taken into account.
// Default value=0
aFinder.SetNbPntsMax(0);
gp_Pnt aP0 (0, 0, 0);
gp_Pnt aP1 (-l1, 0, 0);
- gp_Vec aVX = gp::DX(), aVY = gp::DY(), aVZ = gp::DZ();
+ gp_Vec aVX = gp::DX(), aVZ = gp::DZ();
gp_Ax2 anAxes1 (aP1, aVX, aVZ);
gp_Ax2 anAxes2 (aP0, aVZ, aVX);
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer AdvancedEngine_PipeTShapeDriver::Execute(LOGBOOK& log) const
+Standard_Integer AdvancedEngine_PipeTShapeDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (AdvancedEngine_PipeTShapeDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (AdvancedEngine_PipeTShapeDriver,GEOM_BaseDriver);
// Methods PUBLIC
//
AdvancedEngine_PipeTShapeDriver();
- virtual Standard_Integer Execute(LOGBOOK& log) const;
- virtual void Validate(LOGBOOK&) const {}
- Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
static const Standard_GUID& GetID();
~AdvancedEngine_PipeTShapeDriver() {};
std::vector<GEOM_Param>& params);
// Type management
//
- OCCT_DEFINE_STANDARD_RTTIEXT(AdvancedEngine_PipeTShapeDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(AdvancedEngine_PipeTShapeDriver,GEOM_BaseDriver)
private:
/*!
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer AdvancedEngine_SmoothingSurfaceDriver::Execute(LOGBOOK& log) const
+Standard_Integer AdvancedEngine_SmoothingSurfaceDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
for ( int i = 1, nb = aCI.GetLength(); i <= nb; ++i )
theParams[0] << aCI.GetPntOrComp( i ) << " ";
- const Standard_Integer aNbMax = aCI.GetNbMax();
- const Standard_Integer aDegMax = aCI.GetDegMax();
- const Standard_Real aDMax = aCI.GetDMax();
-
AddParam(theParams, "Max nbr of Bezier pieces", aCI.GetNbMax());
AddParam(theParams, "Max BSpline surface degree", aCI.GetDegMax());
AddParam(theParams, "3D tolerance of initial approximation", aCI.GetDMax());
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (AdvancedEngine_SmoothingSurfaceDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (AdvancedEngine_SmoothingSurfaceDriver,GEOM_BaseDriver);
// Methods PUBLIC
//
AdvancedEngine_SmoothingSurfaceDriver();
- virtual Standard_Integer Execute(LOGBOOK& log) const;
- virtual void Validate(LOGBOOK&) const {}
- Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
static const Standard_GUID& GetID();
~AdvancedEngine_SmoothingSurfaceDriver() {};
std::vector<GEOM_Param>& params);
// Type management
//
- OCCT_DEFINE_STANDARD_RTTIEXT(AdvancedEngine_SmoothingSurfaceDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(AdvancedEngine_SmoothingSurfaceDriver,GEOM_BaseDriver)
private:
TopoDS_Shape MakeSmoothingSurfaceUnClosed
(const Handle(TColgp_HArray1OfPnt) &theListOfPoints,
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer BREPPlugin_ExportDriver::Execute(LOGBOOK& log) const
+Standard_Integer BREPPlugin_ExportDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() );
return false;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT( BREPPlugin_ExportDriver,GEOM_BaseDriver );
+IMPLEMENT_STANDARD_RTTIEXT( BREPPlugin_ExportDriver,GEOM_BaseDriver );
~BREPPlugin_ExportDriver() {};
static const Standard_GUID& GetID();
- virtual Standard_Integer Execute(LOGBOOK& log) const;
- virtual void Validate(LOGBOOK&) const {}
- Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
virtual bool GetCreationInformation( std::string& theOperationName,
std::vector<GEOM_Param>& params );
- OCCT_DEFINE_STANDARD_RTTIEXT(BREPPlugin_ExportDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(BREPPlugin_ExportDriver,GEOM_BaseDriver)
};
#endif // _BREPPlugin_ExportDriver_HXX
return;
}
}
- catch( Standard_Failure ) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode( aFail->GetMessageString() );
+ catch( Standard_Failure& aFail ) {
+ SetErrorCode( aFail.GetMessageString() );
return;
}
// Greate material groups.
// MakeMaterialGroups( anImported, aSeq );
}
- catch( Standard_Failure ) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode( aFail->GetMessageString() );
+ catch( Standard_Failure& aFail ) {
+ SetErrorCode( aFail.GetMessageString() );
return NULL;
}
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer BREPPlugin_ImportDriver::Execute(LOGBOOK& log) const
+Standard_Integer BREPPlugin_ImportDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if( Label().IsNull() ) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() );
aFunction->SetValue( aShape );
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT( BREPPlugin_ImportDriver, GEOM_BaseDriver );
+IMPLEMENT_STANDARD_RTTIEXT( BREPPlugin_ImportDriver, GEOM_BaseDriver );
~BREPPlugin_ImportDriver() {};
static const Standard_GUID& GetID();
- virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_Boolean MustExecute( const LOGBOOK& ) const { return Standard_True; }
- virtual void Validate( LOGBOOK& ) const {}
+ virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_Boolean MustExecute( const Handle(TFunction_Logbook)& ) const { return Standard_True; }
+ virtual void Validate( Handle(TFunction_Logbook)& ) const {}
virtual bool GetCreationInformation( std::string& theOperationName,
std::vector<GEOM_Param>& params );
- OCCT_DEFINE_STANDARD_RTTIEXT(BREPPlugin_ImportDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(BREPPlugin_ImportDriver,GEOM_BaseDriver)
};
#endif // _BREPPlugin_ImportDriver_HXX
//=======================================================================
//function : FixResult
-//purpose : auxilary
+//purpose : auxiliary
//=======================================================================
static void FixResult(const TopoDS_Shape& result,
Handle(ShapeBuild_ReShape)& Context,
#include <BlockFix_UnionFaces.hxx>
#include <BlockFix_UnionEdges.hxx>
-#include <Basics_OCCTVersion.hxx>
-
#include <ShapeUpgrade_RemoveLocations.hxx>
#include <Precision.hxx>
-OCCT_IMPLEMENT_STANDARD_RTTIEXT(BlockFix_BlockFixAPI, MMgt_TShared);
+IMPLEMENT_STANDARD_RTTIEXT(BlockFix_BlockFixAPI, Standard_Transient);
//=======================================================================
//function : BlockFix_BlockFixAPI
#include <Standard.hxx>
#include <Standard_DefineHandle.hxx>
+#include <Standard_Transient.hxx>
#include <ShapeBuild_ReShape.hxx>
#include <TopoDS_Shape.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 MMgt_TShared
+class BlockFix_BlockFixAPI : public Standard_Transient
{
public:
Standard_EXPORT BlockFix_BlockFixAPI();
Standard_Integer& OptimumNbFaces();
Standard_EXPORT void Perform();
- OCCT_DEFINE_STANDARD_RTTIEXT(BlockFix_BlockFixAPI,MMgt_TShared)
+ DEFINE_STANDARD_RTTIEXT(BlockFix_BlockFixAPI, Standard_Transient)
private:
Handle(ShapeBuild_ReShape) myContext;
#include <gp_Pnt.hxx>
-OCCT_IMPLEMENT_STANDARD_RTTIEXT(BlockFix_PeriodicSurfaceModifier, BRepTools_Modification);
+IMPLEMENT_STANDARD_RTTIEXT(BlockFix_PeriodicSurfaceModifier, BRepTools_Modification);
//=======================================================================
//function : BlockFix_PeriodicSurfaceModifier()
//=======================================================================
//function : ModifySurface
-//purpose : auxilary
+//purpose : auxiliary
//=======================================================================
static Standard_Boolean ModifySurface(const TopoDS_Face& aFace,
const Handle(Geom_Surface)& aSurface,
#include <Standard_Boolean.hxx>
#include <GeomAbs_Shape.hxx>
-#include <Basics_OCCTVersion.hxx>
-
class TopoDS_Vertex;
class TopoDS_Edge;
class TopoDS_Face;
const TopoDS_Face& NewF1,
const TopoDS_Face& NewF2);
- OCCT_DEFINE_STANDARD_RTTIEXT(BlockFix_PeriodicSurfaceModifier,BRepTools_Modification)
+ DEFINE_STANDARD_RTTIEXT(BlockFix_PeriodicSurfaceModifier,BRepTools_Modification)
private:
Standard_Real myTolerance;
#include <gp_Pnt.hxx>
#include <gp_Sphere.hxx>
-OCCT_IMPLEMENT_STANDARD_RTTIEXT(BlockFix_SphereSpaceModifier, BRepTools_Modification);
+IMPLEMENT_STANDARD_RTTIEXT(BlockFix_SphereSpaceModifier, BRepTools_Modification);
//=======================================================================
//function : BlockFix_SphereSpaceModifier
#include <Standard_Boolean.hxx>
#include <GeomAbs_Shape.hxx>
-#include <Basics_OCCTVersion.hxx>
-
class TopoDS_Vertex;
class TopoDS_Edge;
class TopoDS_Face;
const TopoDS_Face& NewF1, const TopoDS_Face& NewF2);
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:
Standard_Real myTolerance;
//=======================================================================
//function : MergeEdges
-//purpose : auxilary
+//purpose : auxiliary
//=======================================================================
static Standard_Boolean MergeEdges(const TopTools_SequenceOfShape& SeqEdges,
const Standard_Real Tol,
#include <Geom_SurfaceOfRevolution.hxx>
#include <Geom_SurfaceOfLinearExtrusion.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
+#include <BRepAdaptor_Surface.hxx>
+#include <BRepAdaptor_HSurface.hxx>
+#include <LocalAnalysis_SurfaceContinuity.hxx>
+#include <GeomConvert_ApproxSurface.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Line.hxx>
//=======================================================================
//function : AddOrdinaryEdges
-//purpose : auxilary
+//purpose : auxiliary
// adds edges from the shape to the sequence
// seams and equal edges are dropped
// Returns true if one of original edges dropped
//=======================================================================
//function : ClearRts
-//purpose : auxilary
+//purpose : auxiliary
//=======================================================================
static Handle(Geom_Surface) ClearRts(const Handle(Geom_Surface)& aSurface)
{
//=======================================================================
//function : IsFacesOfSameSolids
-//purpose : auxilary
+//purpose : auxiliary
//=======================================================================
static Standard_Boolean IsFacesOfSameSolids
(const TopoDS_Face &theFace1,
return isSame;
}
+#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
//purpose : Edge is valid if it is not seam or if it is a seam and the face
// has another seam edge.
//=======================================================================
-static Standard_Boolean IsEdgeValidToMerge(const TopoDS_Edge &theEdge,
- const TopoDS_Face &theFace)
+#if OCC_VERSION_LARGE > 0x07020001
+// for Mantis issue 0023451 by JGV
+static Standard_Boolean IsEdgeValidToMerge(const TopoDS_Edge& theEdge,
+ const TopoDS_Face& theFace,
+ const Handle(Geom_Surface)& theSurface,
+ Standard_Boolean& theIsEdgeOnSeam,
+ Standard_Boolean& theToMakeUPeriodic,
+ Standard_Boolean& theToMakeVPeriodic)
{
Standard_Boolean isValid = Standard_True;
- if (BRep_Tool::IsClosed(theEdge, theFace)) {
+ theIsEdgeOnSeam |= BRep_Tool::IsClosed(theEdge, theFace);
+
+ if (BRepTools::IsReallyClosed(theEdge, theFace)) {
// Mantis issue 0023451, now code corresponds to the comment to this method
isValid = Standard_False;
}
}
}
+ 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;
}
+#else
+static Standard_Boolean IsEdgeValidToMerge(const TopoDS_Edge &theEdge,
+ const TopoDS_Face &theFace)
+{
+ Standard_Boolean isValid = Standard_True;
+
+ if (BRep_Tool::IsClosed(theEdge, theFace)) {
+ // This is a seam edge. Check if there are another seam edges on the face.
+ TopExp_Explorer anExp(theFace, TopAbs_EDGE);
+
+ for (; anExp.More(); anExp.Next()) {
+ const TopoDS_Shape &aShEdge = anExp.Current();
+
+ // Skip same edge.
+ if (theEdge.IsSame(aShEdge)) {
+ continue;
+ }
+
+ // Check if this edge is a seam.
+ TopoDS_Edge anEdge = TopoDS::Edge(aShEdge);
+
+ if (BRep_Tool::IsClosed(anEdge, theFace)) {
+ isValid = Standard_False;
+ break;
+ }
+ }
+ }
+
+ return isValid;
+}
+#endif
//=======================================================================
//function : Perform
Handle(Geom_Surface) aBaseSurface = BRep_Tool::Surface(aFace,aBaseLocation);
aBaseSurface = ClearRts(aBaseSurface);
aBaseSurface = Handle(Geom_Surface)::DownCast(aBaseSurface->Copy());
+#if OCC_VERSION_LARGE > 0x07020001
+// for Mantis issue 0023451 by JGV
+ Standard_Boolean ToMakeUPeriodic = Standard_False, ToMakeVPeriodic = Standard_False;
+#endif
// find adjacent faces to union
Standard_Integer i;
for (i = 1; i <= edges.Length(); i++) {
TopoDS_Edge edge = TopoDS::Edge(edges(i));
- if (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;
const TopTools_ListOfShape& aList = aMapEdgeFaces.FindFromKey(edge);
if (aProcessed.Contains(anCheckedFace))
continue;
+#if OCC_VERSION_LARGE > 0x07020001
+// for Mantis issue 0023451 by JGV
+ if (!IsEdgeValidToMerge(edge, anCheckedFace, aBaseSurface,
+ IsEdgeOnSeam, ToMakeUPeriodic, ToMakeVPeriodic)) {
+#else
if (!IsEdgeValidToMerge(edge, anCheckedFace)) {
+#endif
// Skip seam edge.
continue;
}
continue;
}
+#if OCC_VERSION_LARGE > 0x07020001
+// for Mantis issue 0023451 by JGV
+ //Prevent creating a face with parametric range more than period
+ if (IsEdgeOnSeam &&
+ (HasSeamEdge(aFace) || HasSeamEdge(anCheckedFace)))
+ continue;
+#endif
+
// replacing pcurves
TopoDS_Face aMockUpFace;
BRep_Builder B;
NbModif++;
TopoDS_Face aResult;
BRep_Builder B;
+#if OCC_VERSION_LARGE > 0x07020001
+// for Mantis issue 0023451 by JGV
+ if (ToMakeUPeriodic || ToMakeVPeriodic)
+ {
+ Handle(Geom_BSplineSurface) aBSplineSurface = Handle(Geom_BSplineSurface)::DownCast(aBaseSurface);
+ 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);
Standard_Integer nbWires = 0;
sff.SetMaxTolerance(Max(1.,myTolerance*1000.));
//Setting modes
sff.FixOrientationMode() = 0;
+#if OCC_VERSION_LARGE > 0x07020001
+ sff.FixWireTool()->CheckMissingEdgesMode() = Standard_False;
+#endif
//sff.FixWireMode() = 0;
sff.SetContext(aContext);
// Applying the fixes
sfw->SetMaxTolerance(Max(1.,myTolerance*1000.));
sfw->SetFace(aFace);
for (TopoDS_Iterator iter (aFace,Standard_False); iter.More(); iter.Next()) {
- TopoDS_Wire wire = TopoDS::Wire(iter.Value());
- sfw->Load(wire);
- sfw->FixReorder();
- sfw->FixShifted();
+ TopoDS_Shape aFaceCont = iter.Value();
+ if (!aFaceCont.IsNull() && aFaceCont.ShapeType() == TopAbs_WIRE) {
+ TopoDS_Wire wire = TopoDS::Wire(iter.Value());
+ sfw->Load(wire);
+ sfw->FixReorder();
+ sfw->FixShifted();
+ }
}
}
} // end processing each solid
if (myPRedo->init(theType, theIntParam)) {
// Construct undo for RemoveSection command.
// If the last section is removed, one AddSection command is enough.
- // If not last section is removed, two commands are requred: AddSection
+ // If not last section is removed, two commands are required: AddSection
// and MoveSection.
const int aLastIndex = theCurve->getNbSections() - 1;
#include "CurveCreator_Section.hxx"
#include "CurveCreator_UtilsICurve.hxx"
-#include <Basics_OCCTVersion.hxx>
-
#include <GEOMUtils.hxx>
#include <gp_Pln.hxx>
Handle(SelectMgr_Selection) aSelection = anAISShape->Selection( AIS_Shape::SelectionMode( TopAbs_VERTEX ) );
for( aSelection->Init(); aSelection->More(); aSelection->Next() )
{
-#if OCC_VERSION_LARGE > 0x06080100
const Handle(SelectMgr_SensitiveEntity) aHSenEntity = aSelection->Sensitive();
if( aHSenEntity.IsNull() )
continue;
Handle(SelectBasics_SensitiveEntity) aSenEntity = aHSenEntity->BaseSensitive();
-#else
- Handle(SelectBasics_SensitiveEntity) aSenEntity = aSelection->Sensitive();
-#endif
Handle(Select3D_SensitivePoint) aSenPnt = Handle(Select3D_SensitivePoint)::DownCast( aSenEntity );
//=================================================================================
// 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 )
{
ic->UpdateCurrentViewer();
}
catch( Standard_Failure ) {
- MESSAGE( "Exception catched in EntityGUI::DisplaySimulationShape" );
+ MESSAGE( "Exception caught in EntityGUI::DisplaySimulationShape" );
}
}
#include "EntityGUI_3DSketcherDlg.h"
#include "EntityGUI_Widgets.h"
-#include <Basics_OCCTVersion.hxx>
-
#include <GEOMBase.h>
#include <GeometryGUI.h>
#include <Precision.hxx>
class AIS_Text:public AIS_InteractiveObject
{
public:
- OCCT_DEFINE_STANDARD_RTTIEXT(AIS_Text,AIS_InteractiveObject)
+ DEFINE_STANDARD_RTTIEXT(AIS_Text,AIS_InteractiveObject)
AIS_Text(){};
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,
Quantity_Color color = Quantity_NOC_YELLOW,
gp_Vec V = Vec1.Transformed(aTransform.Inverted());
gp_Vec Vec3(V.X(),V.Y(),0.0);
- // Express the coordinates in the refernce coordinate system (OXY)
+ // Express the coordinates in the reference coordinate system (OXY)
Vec3.Transform(aTransform);
if(Abs(Vec1.CrossMagnitude(Vec3)) > Precision::Confusion())
{
aLength * sin(anAngle1 * M_PI / 180. ),
0.0);
- // Express the coordinates in the refernce coordinate system (OXY)
+ // Express the coordinates in the reference coordinate system (OXY)
gp_Trsf aTranform = toReferenceSystem(P0);
P1.Transform(aTranform);
P2.Transform(aTranform);
//================================================================
// Function : createAISLengthDimension()
// Purpose : Method for creation of a length dimension object
-// Returns an Handle on the AIS_LengthDimension obect
+// Returns an Handle on the AIS_LengthDimension object
//================================================================
Handle(AIS_LengthDimension) EntityGUI_3DSketcherDlg::createAISLengthDimension(double theLength,
gp_Pnt P1,
//================================================================
// Function : createAISAngleDimension()
// Purpose : Method for creation of an angle dimension object
-// Returns an Handle on the AIS_AngleDimension obect
+// Returns an Handle on the AIS_AngleDimension object
//================================================================
Handle(AIS_AngleDimension) EntityGUI_3DSketcherDlg::createAISAngleDimension(double theAngle,
gp_Pnt P0,
#include <BRepBuilderAPI_MakePolygon.hxx>
#include <BRepBuilderAPI_Transform.hxx>
-#include <AIS_TexturedShape.hxx>
+#include <AIS_Shape.hxx>
+
#include <TCollection_AsciiString.hxx>
#include <StdSelect_DisplayMode.hxx>
// about what will be considered INSIDE the zone we want to find the frontier of
// This makes the algorithm more robust against a bit inhomogeneous parts in the zone
// that we want to delimitate.
- // The drawback is if we want to delimitate a zone wich color is very similar to the zone
+ // The drawback is if we want to delimitate a zone which color is very similar to the zone
// we consider as the OUTSIDE, the result will be bad.
// The current use cases are more of the first form :
// - Strongly contrasted INSIDE and OUTSIDE zones
// local selection
if (!myShape->_is_nil() &&
!myEditCurrentArgument &&
- myShapeIDs.size() > 1 ) // shape type is already choosen by user
+ myShapeIDs.size() > 1 ) // shape type is already chosen by user
{
GEOM_Displayer* aDisplayer = getDisplayer();
CORBA::String_var aMainEntry = myShape->GetStudyEntry();
{
InitClick();
Group3Spin->SpinBox_DX->blockSignals(true); // Block signals in order not to modify
- Group3Spin->SpinBox_DY->blockSignals(true); // defaut values
+ Group3Spin->SpinBox_DY->blockSignals(true); // default values
Group3Spin->SpinBox_DZ->blockSignals(true);
Group2Spin->SpinBox_DX->blockSignals(true);
myEditCurrentArgument = Group2Sel->LineEdit2;
/* User name of object input management */
- /* If successfull the selection is changed and signal emitted... */
+ /* If successful the selection is changed and signal emitted... */
/* so SelectionIntoArgument() is automatically called. */
const QString objectUserName = myEditCurrentArgument->text();
QWidget* thisWidget = (QWidget*)this;
void EntityGUI_SketcherDlg::OnPointSelected(Qt::KeyboardModifiers modifiers, const gp_Pnt& thePnt,
bool isStart )
{
- // NOTE Basing the autoapply functionnality on the background picture has no sense anymore
- // The import picture functionnality is now used for drawing on top of a picture
+ // NOTE Basing the autoapply functionality on the background picture has no sense anymore
+ // The import picture functionality is now used for drawing on top of a picture
// SUIT_ViewWindow* theViewWindow = getDesktop()->activeWindow();
// OCCViewer_ViewPort3d* vp = ((OCCViewer_ViewWindow*)theViewWindow)->getViewPort();
${CAS_TKCDF}
${CAS_TKG3d}
${CAS_TKStdL}
+ ${CAS_TKStd}
+ ${CAS_TKBin}
${KERNEL_SALOMELocalTrace}
${KERNEL_OpUtil}
GEOMSketcher
)
-IF(CAS_VERSION_STR VERSION_GREATER "7.0.0")
- LIST(APPEND _link_LIBRARIES ${CAS_TKStd} ${CAS_TKBin})
-ENDIF()
-
# --- headers ---
SET(GEOM_HEADERS
#include <GEOM_Application.hxx>
-OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_Application, TDocStd_Application)
+IMPLEMENT_STANDARD_RTTIEXT(GEOM_Application, TDocStd_Application)
//=======================================================================
//function : 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
//purpose :
#include <Standard_DefineHandle.hxx>
#include <TColStd_SequenceOfExtendedString.hxx>
-#include <Basics_OCCTVersion.hxx>
-
class GEOM_Application : public TDocStd_Application
{
public:
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();
public:
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_Application,TDocStd_Application)
+ DEFINE_STANDARD_RTTIEXT(GEOM_Application,TDocStd_Application)
};
DEFINE_STANDARD_HANDLE(GEOM_Application, TDocStd_Application)
#include <TDataStd_Name.hxx>
#include <TDocStd_Owner.hxx>
-OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_BaseDriver,TFunction_Driver);
+IMPLEMENT_STANDARD_RTTIEXT(GEOM_BaseDriver,TFunction_Driver);
//================================================================================
/*!
#include <TColStd_HSequenceOfTransient.hxx>
#include <TColStd_HArray1OfInteger.hxx>
-#include <Basics_OCCTVersion.hxx>
-
#include <string>
#include <vector>
#include <sstream>
-#if OCC_VERSION_MAJOR < 7
- #define LOGBOOK TFunction_Logbook
-#else
- #define LOGBOOK Handle(TFunction_Logbook)
-#endif
-
struct GEOM_Param
{
std::string name;
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);
aName = aNameAttr->Get();
// do not return pointer of local variable
// return aName.ToCString();
- // the following code could lead to memory leak, so take care about recieved pointer
+ // the following code could lead to memory leak, so take care about received pointer
return aName;
}
return _label.FindChild(FREE_LABEL);
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_BaseObject, Standard_Transient );
+IMPLEMENT_STANDARD_RTTIEXT(GEOM_BaseObject, Standard_Transient );
TCollection_AsciiString _parameters;
public:
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_BaseObject,Standard_Transient)
+ DEFINE_STANDARD_RTTIEXT(GEOM_BaseObject,Standard_Transient)
};
#endif
#include "GEOM_SubShapeDriver.hxx"
#include "Sketcher_Profile.hxx"
-#include <Basics_OCCTVersion.hxx>
-
#include "utilities.h"
#include <Basics_Utils.hxx>
#include <Resource_DataMapIteratorOfDataMapOfAsciiStringAsciiString.hxx>
-#if OCC_VERSION_LARGE > 0x07000000
#include <BinDrivers.hxx>
#include <StdDrivers_DocumentRetrievalDriver.hxx>
#include <PCDM_StorageDriver.hxx>
-#endif
#include <set>
static int MYDEBUG = 0;
#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, TObjectData > TSting2ObjDataMap;
typedef std::map< TCollection_AsciiString, TObjectData* > TSting2ObjDataPtrMap;
const TIntToListIntMap &theMapRefs,
std::set< int > &thePublished);
+void Prettify(TCollection_AsciiString& theScript);
+
//================================================================================
/*!
* \brief Fix up the name of python variable
TFunction_DriverTable::Get()->AddDriver(GEOM_Object::GetSubShapeID(), new GEOM_SubShapeDriver());
_OCAFApp = new GEOM_Application();
-#if OCC_VERSION_LARGE > 0x07000000
_OCAFApp->DefineFormat("SALOME_GEOM", "GEOM Document Version 1.0", "sgd",
new StdDrivers_DocumentRetrievalDriver, 0);
BinDrivers::DefineFormat(_OCAFApp);
-#endif
_UndoLimit = 0;
}
aDoc = _document;
}
else if (force) {
-#if OCC_VERSION_MAJOR > 6
_OCAFApp->NewDocument("BinOcaf", aDoc);
-#else
- _OCAFApp->NewDocument("SALOME_GEOM", aDoc);
-#endif
aDoc->SetUndoLimit(_UndoLimit);
_document = aDoc;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- MESSAGE("GEOM_Engine::AddSubShape Error: " << aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ MESSAGE("GEOM_Engine::AddSubShape Error: " << aFail.GetMessageString());
return NULL;
}
if ( _freeLabels.empty() || _freeLabels.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
theObject->_label = aLabel.Root();
theObject->_ior.Clear();
return false;
}
-#if OCC_VERSION_MAJOR > 6
// Replace old document format by the new one.
if (aDoc->StorageFormat().IsEqual("SALOME_GEOM")) {
aDoc->ChangeStorageFormat("BinOcaf");
}
-#endif
aDoc->SetUndoLimit(_UndoLimit);
// a map containing copies of TObjectData from theObjectData
TSting2ObjDataMap aEntry2ObjData;
// contains pointers to TObjectData of either aEntry2ObjData or theObjectData; the latter
- // occures when several StudyEntries correspond to one Entry
+ // occurs when several StudyEntries correspond to one Entry
TSting2ObjDataPtrMap aStEntry2ObjDataPtr;
//Resource_DataMapOfAsciiStringAsciiString aEntry2StEntry, aStEntry2Entry, theObjectNames;
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;
}
// store aCreationCommand before publishing commands
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
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
#include "GEOM_Object.hxx"
#include "GEOM_DataMapOfAsciiStringTransient.hxx"
-#include <Basics_OCCTVersion.hxx>
-
#include <TColStd_DataMapOfIntegerTransient.hxx>
#include <Resource_DataMapOfAsciiStringAsciiString.hxx>
class GEOM_Engine
{
- public:
+public:
Standard_EXPORT GEOM_Engine();
Standard_EXPORT virtual ~GEOM_Engine();
- //Retuns the engine
+ //Returns the engine
Standard_EXPORT static GEOM_Engine* GetEngine();
//Returns the OCAF document by its ID, if document doesn't exists it will be created
const TCollection_AsciiString& anEntry,
Resource_DataMapOfAsciiStringAsciiString& aNameToEntry);
- protected:
+protected:
Standard_EXPORT static void SetEngine(GEOM_Engine* theEngine);
- private:
+private:
Handle(GEOM_Application) _OCAFApp;
Handle(TDocStd_Document) _document;
{
//================================================================================
/*!
- * \brief Returns a funtion with a given type OR the 1st function
+ * \brief Returns a function with a given type OR the 1st function
*/
//================================================================================
{
Handle(GEOM_Function) fun = GetFunction(1);
if ( !fun.IsNull() )
- Standard_MultiplyDefined::Raise( "Reinitialization of GEOM_Field is forbiden" );
+ Standard_MultiplyDefined::Raise( "Reinitialization of GEOM_Field is forbidden" );
fun = AddFunction( GetFieldID(), FUN_ADD_FIELD );
GEOM_IField data( fun );
{
Handle(GEOM_Function) fun = GetFunction(1);
if ( !fun.IsNull() )
- Standard_MultiplyDefined::Raise( "Reinitialization of GEOM_FieldStep is forbiden" );
+ Standard_MultiplyDefined::Raise( "Reinitialization of GEOM_FieldStep is forbidden" );
fun = AddFunction( GEOM_Field::GetFieldID(), GEOM_Field::FUN_ADD_STEP );
GEOM_IField data( fun );
return TDataStd_ExtStringArray::GetID();
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_Field, GEOM_BaseObject );
-OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_FieldStep, GEOM_BaseObject );
+IMPLEMENT_STANDARD_RTTIEXT(GEOM_Field, GEOM_BaseObject );
+IMPLEMENT_STANDARD_RTTIEXT(GEOM_FieldStep, GEOM_BaseObject );
// Returns all steps
Standard_EXPORT std::list< Handle(GEOM_FieldStep)> GetSteps();
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_Field,GEOM_BaseObject)
+ DEFINE_STANDARD_RTTIEXT(GEOM_Field,GEOM_BaseObject)
private:
// Returns GUID of CAF data array
const Standard_GUID& GetDataID();
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_FieldStep,GEOM_BaseObject)
+ DEFINE_STANDARD_RTTIEXT(GEOM_FieldStep,GEOM_BaseObject)
private:
#include <GEOM_Solver.hxx>
#include <GEOM_ISubShape.hxx>
-#include <Basics_OCCTVersion.hxx>
-
#include "utilities.h"
#include <TDF.hxx>
//================================================================================
/*!
- * \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
*/
//================================================================================
return aShape;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- MESSAGE("GEOM_Function::GetValue Error: " << aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ MESSAGE("GEOM_Function::GetValue Error: " << aFail.GetMessageString());
return aShape;
}
}
return reinterpret_cast<void*> ( address );
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_Function, Standard_Transient );
+IMPLEMENT_STANDARD_RTTIEXT(GEOM_Function, Standard_Transient );
#include <TDataStd_ListOfExtendedString.hxx>
#include <TopoDS_Shape.hxx>
-#include <Basics_OCCTVersion.hxx>
-
class GEOM_Function;
DEFINE_STANDARD_HANDLE (GEOM_Function, Standard_Transient);
//Returns true if the last method succided
Standard_EXPORT bool IsDone() { return _isDone; }
- //Retuns true if this function is the last one in the study
+ //Returns true if this function is the last one in the study
Standard_EXPORT bool IsLastFuntion();
//Returns a sequence of the external dependencies of this function
//Returns top label of this function's naming tree
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:
return funs;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_Object, GEOM_BaseObject );
+IMPLEMENT_STANDARD_RTTIEXT(GEOM_Object, GEOM_BaseObject );
GetLastFunctions( const std::list< Handle(GEOM_Object) >& theObjects );
public:
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_Object,GEOM_BaseObject)
+ DEFINE_STANDARD_RTTIEXT(GEOM_Object,GEOM_BaseObject)
};
#endif
return *this;
}
- Handle(GEOM_Object) GetCreatedLast(const Handle(GEOM_Object)& theObj1,
- const Handle(GEOM_Object)& theObj2)
+ Handle(GEOM_BaseObject) GetCreatedLast(const Handle(Standard_Transient)& theObj1,
+ const Handle(Standard_Transient)& theObj2)
{
- if (theObj1.IsNull()) return theObj2;
- if (theObj2.IsNull()) return theObj1;
+ Handle(GEOM_BaseObject) bo1 = Handle(GEOM_Object)::DownCast(theObj1);
+ Handle(GEOM_BaseObject) bo2 = Handle(GEOM_Object)::DownCast(theObj2);
+ if (bo1.IsNull()) return bo2;
+ if (bo2.IsNull()) return bo1;
TColStd_ListOfInteger aTags1, aTags2;
- TDF_Tool::TagList(theObj1->GetEntry(), aTags1);
- TDF_Tool::TagList(theObj2->GetEntry(), aTags2);
+ TDF_Tool::TagList(bo1->GetEntry(), aTags1);
+ TDF_Tool::TagList(bo2->GetEntry(), aTags2);
TColStd_ListIteratorOfListOfInteger aListIter1(aTags1), aListIter2(aTags2);
for (; aListIter1.More(); aListIter1.Next(), aListIter2.Next()) {
if (!aListIter2.More())
- return theObj1; // anObj1 is stored under anObj2
+ return bo1; // anObj1 is stored under anObj2
if (aListIter1.Value() > aListIter2.Value())
- return theObj1;
+ return bo1;
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();
if (aLen < 1)
return aLatest;
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() ) {
Handle(GEOM_Function) fun = Handle(GEOM_Function)::DownCast(theObjects->Value(i));
if ( !fun.IsNull() )
- anObject = GEOM_Object::GetObject( fun->GetOwnerEntry() );
+ anObject = GEOM_BaseObject::GetObject( fun->GetOwnerEntry() );
}
aLatest = GetCreatedLast(aLatest, anObject);
}
//operator TCollection_AsciiString () const;
-#if OCC_VERSION_MAJOR >= 7
template <class T>
Standard_EXPORT TPythonDump& operator<< (const Handle(T)& theObject) { return *this << theObject.get(); }
-#endif
Standard_EXPORT TPythonDump& operator<< (bool theArg);
Standard_EXPORT TPythonDump& operator<< (long int theArg);
Standard_EXPORT TPythonDump& operator<< (int theArg);
/*! Returns an object from two given, which has the latest entry
*/
- Standard_EXPORT Handle(::GEOM_Object) GetCreatedLast (const Handle(::GEOM_Object)& theObj1,
- const Handle(::GEOM_Object)& theObj2);
+ Standard_EXPORT Handle(::GEOM_BaseObject) GetCreatedLast (const Handle(Standard_Transient)& theObj1,
+ const Handle(Standard_Transient)& theObj2);
/*! 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
aDriver->Init(theFunction->GetEntry());
-#if OCC_VERSION_MAJOR < 7
- TFunction_Logbook aLog;
-#else
Handle(TFunction_Logbook) aLog = TFunction_Logbook::Set( aDriver->Label() );
-#endif
if(aDriver->Execute(aLog) == 0) return false;
return true;
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOM_SubShapeDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOM_SubShapeDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
if (aShape.IsNull()) return 0;
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOM_SubShapeDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOM_SubShapeDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOM_SubShapeDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOM_SubShapeDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_SubShapeDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOM_SubShapeDriver,GEOM_BaseDriver)
};
#endif
GEOMAlgo_ShapeInfo.cxx
GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx
-Basics_OCCTVersion.hxx
-
GEOMAlgo_KindOfDef.hxx
#include <GEOMAlgo_AlgoTools.hxx>
-#include <Basics_OCCTVersion.hxx>
-
#include <gp_Pnt.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Dir2d.hxx>
(const TopoDS_Edge& aEold,
const TopoDS_Edge& aEnew,
const TopoDS_Face& aF,
-#if OCC_VERSION_LARGE > 0x06070100
- const Handle(IntTools_Context)& aCtx
-#else
- const Handle(BOPInt_Context)& aCtx
-#endif
- )
+ const Handle(IntTools_Context)& aCtx)
{
Standard_Boolean bIsClosed, bUClosed, bHasOld;
Standard_Integer iRet, aNbPoints;
return iRet;
}
//
-#if OCC_VERSION_LARGE > 0x06080000
// Try to copy PCurve from old edge to the new one.
iRet = BOPTools_AlgoTools2D::AttachExistingPCurve(aEold, aEnew, aF, aCtx);
// The PCurve is attached successfully.
return iRet;
}
-#endif
//
BOPTools_AlgoTools2D::BuildPCurveForEdgeOnFace(aEnew, aF);
aC2D=BRep_Tool::CurveOnSurface(aEnew, aF, aT1, aT2);
Standard_Boolean GEOMAlgo_AlgoTools::IsSplitToReverse
(const TopoDS_Edge& aEF1,
const TopoDS_Edge& aEF2,
-#if OCC_VERSION_LARGE > 0x06070100
- const Handle(IntTools_Context)& aContext
-#else
- const Handle(BOPInt_Context)& aContext
-#endif
- )
+ const Handle(IntTools_Context)& aContext)
{
Standard_Boolean aFlag;
Standard_Real aT1, aT2, aScPr, a, b;
(const gp_Pnt& aP1,
const TopoDS_Shape& aS,
gp_Pnt& aP2,
-#if OCC_VERSION_LARGE > 0x06070100
- const Handle(IntTools_Context)& aCtx
-#else
- const Handle(BOPInt_Context)& aCtx
-#endif
- )
+ const Handle(IntTools_Context)& aCtx)
{
Standard_Boolean bIsDone = Standard_False;
Standard_Real aT2;
const TopTools_ListOfShape& aLE,
const Standard_Real aTol,
TopTools_ListOfShape& aLESD,
-#if OCC_VERSION_LARGE > 0x06070100
- const Handle(IntTools_Context)& aCtx
-#else
- const Handle(BOPInt_Context)& aCtx
-#endif
- )
+ const Handle(IntTools_Context)& aCtx)
{
Standard_Boolean bIsDone;
Standard_Real aTol2, aD2;
(const TopTools_ListOfShape& aLE,
const Standard_Real aTol,
TopTools_IndexedDataMapOfShapeListOfShape& aMEE,
-#if OCC_VERSION_LARGE > 0x06070100
- const Handle(IntTools_Context)& aCtx
-#else
- const Handle(BOPInt_Context)& aCtx
-#endif
- )
+ const Handle(IntTools_Context)& aCtx)
{
Standard_Integer aNbE, aNbEProcessed, aNbESD, iErr;
TopTools_ListOfShape aLESD;
Standard_Integer GEOMAlgo_AlgoTools::RefineSDShapes
(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMPKLE,
const Standard_Real aTol,
-#if OCC_VERSION_LARGE > 0x06070100
- const Handle(IntTools_Context)& aCtx
-#else
- const Handle(BOPInt_Context)& aCtx
-#endif
- )
+ const Handle(IntTools_Context)& aCtx)
{
Standard_Integer i, aNbE, iErr, j, aNbEE, aNbToAdd;
TopTools_IndexedDataMapOfShapeListOfShape aMEE, aMSDE, aMEToAdd;
#ifndef _GEOMAlgo_AlgoTools_HeaderFile
#define _GEOMAlgo_AlgoTools_HeaderFile
-#include <Basics_OCCTVersion.hxx>
-
#include <Standard.hxx>
#include <Standard_Macro.hxx>
#include <Standard_Boolean.hxx>
-#if OCC_VERSION_LARGE > 0x06070100
#include <IntTools_Context.hxx>
-#else
-#include <BOPInt_Context.hxx>
-#endif
#include <Standard_Integer.hxx>
#include <gp_Pnt.hxx>
static Standard_Integer RefineSDShapes
(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMSD,
const Standard_Real aTol,
-#if OCC_VERSION_LARGE > 0x06070100
- const Handle(IntTools_Context)& aCtx
-#else
- const Handle(BOPInt_Context)& aCtx
-#endif
- ) ;
+ const Handle(IntTools_Context)& aCtx) ;
Standard_EXPORT
static Standard_Integer FindSDShapes(const TopTools_ListOfShape& aLE,
const Standard_Real aTol,
TopTools_IndexedDataMapOfShapeListOfShape& aMEE,
-#if OCC_VERSION_LARGE > 0x06070100
- const Handle(IntTools_Context)& aCtx
-#else
- const Handle(BOPInt_Context)& aCtx
-#endif
- ) ;
+ const Handle(IntTools_Context)& aCtx) ;
Standard_EXPORT
static Standard_Integer FindSDShapes(const TopoDS_Shape& aE1,
const TopTools_ListOfShape& aLE,
const Standard_Real aTol,
TopTools_ListOfShape& aLESD,
-#if OCC_VERSION_LARGE > 0x06070100
- const Handle(IntTools_Context)& aCtx
-#else
- const Handle(BOPInt_Context)& aCtx
-#endif
- ) ;
+ const Handle(IntTools_Context)& aCtx) ;
Standard_EXPORT
static void PointOnShape(const TopoDS_Shape& aS,
static Standard_Boolean ProjectPointOnShape(const gp_Pnt& aP1,
const TopoDS_Shape& aS,
gp_Pnt& aP2,
-#if OCC_VERSION_LARGE > 0x06070100
- const Handle(IntTools_Context)& aCtx
-#else
- const Handle(BOPInt_Context)& aCtx
-#endif
- ) ;
+ const Handle(IntTools_Context)& aCtx) ;
Standard_EXPORT
static void CorrectTolerances(const TopoDS_Shape& aShape,
Standard_EXPORT
static Standard_Boolean IsSplitToReverse1 (const TopoDS_Edge& aEF1,
const TopoDS_Edge& aEF2,
-#if OCC_VERSION_LARGE > 0x06070100
- const Handle(IntTools_Context)& aCtx
-#else
- const Handle(BOPInt_Context)& aCtx
-#endif
- ) ;
+ const Handle(IntTools_Context)& aCtx) ;
Standard_EXPORT
static void RefinePCurveForEdgeOnFace(const TopoDS_Edge& aE,
const TopoDS_Face& aF,
Standard_EXPORT
static Standard_Boolean IsSplitToReverse(const TopoDS_Edge& theSplit,
const TopoDS_Edge& theEdge,
-#if OCC_VERSION_LARGE > 0x06070100
- const Handle(IntTools_Context)& theCtx
-#else
- const Handle(BOPInt_Context)& theCtx
-#endif
- ) ;
+ const Handle(IntTools_Context)& theCtx) ;
Standard_EXPORT
static Standard_Boolean IsSplitToReverse (const TopoDS_Face& theFSp,
const TopoDS_Face& theFSr,
-#if OCC_VERSION_LARGE > 0x06070100
- const Handle(IntTools_Context)& theCtx
-#else
- const Handle(BOPInt_Context)& theCtx
-#endif
- ) ;
+ const Handle(IntTools_Context)& theCtx) ;
Standard_EXPORT
static Standard_Boolean IsSplitToReverse (const TopoDS_Shape& theSp,
const TopoDS_Shape& theSr,
-#if OCC_VERSION_LARGE > 0x06070100
- const Handle(IntTools_Context)& theCtx
-#else
- const Handle(BOPInt_Context)& theCtx
-#endif
- ) ;
+ const Handle(IntTools_Context)& theCtx) ;
Standard_EXPORT
static Standard_Integer BuildPCurveForEdgeOnFace (const TopoDS_Edge& aEold,
const TopoDS_Edge& aEnew,
const TopoDS_Face& aF,
-#if OCC_VERSION_LARGE > 0x06070100
- const Handle(IntTools_Context)& aCtx
-#else
- const Handle(BOPInt_Context)& aCtx
-#endif
- ) ;
+ const Handle(IntTools_Context)& aCtx) ;
//
Standard_EXPORT
//
#include <GEOMAlgo_Clsf.hxx>
-OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_Clsf, GEOMAlgo_HAlgo);
+IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_Clsf, GEOMAlgo_HAlgo);
//=======================================================================
//function :
Standard_EXPORT
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:
Standard_EXPORT
#include <GEOMAlgo_SurfaceTools.hxx>
-OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfBox, GEOMAlgo_Clsf)
+IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfBox, GEOMAlgo_Clsf)
//=======================================================================
//function :
Standard_EXPORT
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:
TopoDS_Shape myBox;
#include <Geom_Plane.hxx>
-OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfQuad, GEOMAlgo_Clsf);
+IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfQuad, GEOMAlgo_Clsf);
//=======================================================================
//function :
Standard_EXPORT
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:
#include <BRep_Builder.hxx>
#include <BRepClass3d_SolidClassifier.hxx>
-OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfSolid, GEOMAlgo_Clsf)
+IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfSolid, GEOMAlgo_Clsf)
//=======================================================================
//function :
Standard_EXPORT
virtual void CheckData() ;
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMAlgo_ClsfSolid,GEOMAlgo_Clsf)
+ DEFINE_STANDARD_RTTIEXT(GEOMAlgo_ClsfSolid,GEOMAlgo_Clsf)
protected:
TopoDS_Shape myShape;
#include <GEOMAlgo_SurfaceTools.hxx>
-OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfSurf, GEOMAlgo_Clsf);
+IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfSurf, GEOMAlgo_Clsf);
//=======================================================================
//function :
Standard_EXPORT
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:
Handle(Geom_Surface) myS;
TopTools_ListOfShape aClosedSubShapes;
TopTools_ListOfShape aNewShapes;
TopoDS_Shape anOuterSubShape;
- TopAbs_ShapeEnum aShapeType;
+ //TopAbs_ShapeEnum aShapeType;
TopAbs_ShapeEnum aSubShapeType;
if (theFOrSo.ShapeType() == TopAbs_FACE) {
- aShapeType = TopAbs_FACE;
+ //aShapeType = TopAbs_FACE;
aSubShapeType = TopAbs_WIRE;
anOuterSubShape = BRepTools::OuterWire(TopoDS::Face(theFOrSo));
} else {
- aShapeType = TopAbs_SOLID;
+ //aShapeType = TopAbs_SOLID;
aSubShapeType = TopAbs_SHELL;
anOuterSubShape = BRepClass3d::OuterShell(TopoDS::Solid(theFOrSo));
}
TopTools_ListOfShape aNewSubShapes;
TopTools_ListOfShape aNewOtherShapes;
TopAbs_ShapeEnum aSubShapeType;
- TopAbs_ShapeEnum aSubSubShapeType;
+ //TopAbs_ShapeEnum aSubSubShapeType;
if (theShOrCS.ShapeType() == TopAbs_SHELL) {
aSubShapeType = TopAbs_FACE;
- aSubSubShapeType = TopAbs_EDGE;
+ //aSubSubShapeType = TopAbs_EDGE;
} else { // comp-solid
aSubShapeType = TopAbs_SOLID;
- aSubSubShapeType = TopAbs_FACE;
+ //aSubSubShapeType = TopAbs_FACE;
}
for (; anIter.More(); anIter.Next()) {
getModified(theShape, aListModif, theShape.ShapeType());
Standard_Boolean isModif = !aListModif.IsEmpty();
- const TopAbs_ShapeEnum aType = theShape.ShapeType();
+ //const TopAbs_ShapeEnum aType = theShape.ShapeType();
if (isModif) {
// Add the new shapes.
#include <GEOMAlgo_FinderShapeOn.hxx>
-#include <Basics_OCCTVersion.hxx>
-
#include <Precision.hxx>
#include <gp_Pnt.hxx>
for (; aIt.More(); aIt.Next()) {
iCnt=aIt.Value();
if (iCnt>1) {
- // take the first having occured inner link
+ // take the first having occurred inner link
// and discretize it
const GEOMAlgo_PassKey& aPK=aIt.Key();
//
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
-
-#if OCC_VERSION_LARGE > 0x06070100
#include <IntTools_Context.hxx>
-#else
-#include <BOPInt_Context.hxx>
-#endif
//=======================================================================
//function :
void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Face& aF,
GEOMAlgo_ListOfPnt& aLP)
{
- Standard_Integer j, j1, j2, k, n[4], aNbLinks, aNx, aNb, iCnt;//, aNbMax, *pIds;
+ Standard_Integer j, j1, j2, k, n[4], aNx, aNb, iCnt;//, aNbLinks, aNbMax, *pIds;
TopLoc_Location aLoc;
Handle(Poly_Triangulation) aTRF;
TColStd_MapOfInteger aMBN;
}
//
// boundary nodes aMBN
- aNbLinks=aMPKI.Extent();
aIt.Initialize(aMPKI);
for (; aIt.More(); aIt.Next()) {
iCnt=aIt.Value();
if (aWhereDistance.IsDone() && aWhatDistance.IsDone() &&
fabs(aWhereDistance.Value() - aWhatDistance.Value()) <= aTolConf)
{
- // 0020162: "EDF 961 GEOM : Getinplace is getting additionnal orthogonal faces"
+ // 0020162: "EDF 961 GEOM : Getinplace is getting additional orthogonal faces"
// aVertex must be projected to the same point on Where and on What
gp_Pnt pOnWhat = aWhatDistance.PointOnShape2(1);
gp_Pnt pOnWhere = aWhereDistance.PointOnShape2(1);
}
// try to find in history
- TDF_Label aHistoryLabel = theWhereFunction->GetHistoryEntry(Standard_False);
+ //TDF_Label aHistoryLabel = theWhereFunction->GetHistoryEntry(Standard_False);
// search in history for all argument shapes
Standard_Boolean isFound = Standard_False;
GEOMAlgo_GetInPlace &theGIP);
/*!
- * \brief Old implementation of GetInPlace algoritm.
+ * \brief Old implementation of GetInPlace algorithm.
* This method searches among sub shapes of the shape theWhere parts that are
* coincident with the shape theWhat. The result list of shape is returned as
* an output parameter. It returns the error code with the following possible
{
Standard_Boolean bOk;
Standard_Integer iErr;
- Standard_Real aTol2;
+ //Standard_Real aTol2;
TopAbs_ShapeEnum aType1, aType2;
TopAbs_State aState;
gp_Pnt aP1, aP2;
//
iErr=0;
bOk=Standard_False;
- aTol2=myTolerance*myTolerance;
+ //aTol2=myTolerance*myTolerance;
aType1=aS1.ShapeType();
aType2=aS2.ShapeType();
//
//
aNbVSD=aBBTree.Select(aSelector);
if (!aNbVSD) {
- continue; // it shoild not be so [at least IP itself]
+ continue; // it should not be so [at least IP itself]
}
//
const TColStd_ListOfInteger& aLI=aSelector.Indices();
//
iRet=0;
//
-#if OCC_VERSION_MAJOR < 7
- pLE=const_cast<TopTools_ListOfShape*>(&aMVE.FindFromKey(aVSD));
-#else
pLE=const_cast<TopTools_IndexedDataMapOfShapeListOfShape&>(aMVE).ChangeSeek(aVSD);
-#endif
if (!pLE) {
return iRet;
}
for (; aItLE.More(); aItLE.Next()) {
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);
-#endif
if (!pLV) {
continue; // it should be not so
}
//
iRet=1;
//
-#if OCC_VERSION_MAJOR < 7
- pLVZ=const_cast<TopTools_ListOfShape*>(&aMEVZ.FindFromKey(aE));
-#else
pLVZ=aMEVZ.ChangeSeek(aE);
-#endif
if (!pLVZ) {
aMEVZ.Add(aE, aLVX);
}
#include <BRepBndLib.hxx>
//
#include <IntTools_Tools.hxx>
-#if OCC_VERSION_LARGE > 0x06070100
#include <IntTools_Context.hxx>
-#else
-#include <BOPInt_Context.hxx>
-#endif
#include <BOPTools_AlgoTools.hxx>
#include <BOPTools_AlgoTools3D.hxx>
#include <BOPTools_AlgoTools2D.hxx>
myResult=aCmp;
//
if (aMS.Extent()) {
+#if OCC_VERSION_LARGE > 0x07020001
+ TopTools_IndexedMapOfShape aMapToAvoid;
+ BOPTools_AlgoTools::CorrectCurveOnSurface(myResult, aMapToAvoid, 0.0001);
+#else
BOPTools_AlgoTools::CorrectCurveOnSurface(myResult, 0.0001);
+#endif
}
}
//=======================================================================
Standard_Real aTol;
BRep_Builder aBB;
TopoDS_Edge E;
- TopAbs_Orientation anOrE;
+ //TopAbs_Orientation anOrE;
//
- anOrE=aE.Orientation();
+ //anOrE=aE.Orientation();
aTol=BRep_Tool::Tolerance(aE);
//
E=aEx;
void GEOMAlgo_Gluer2::Detect()
{
Standard_Boolean bCheckGeometry;
- Standard_Integer iErr, aNbSD;
+ Standard_Integer iErr;
TopTools_ListIteratorOfListOfShape aItLS;
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMSLS;
//GEOMAlgo_GlueDetector aDetector;
for (; aItDMSLS.More(); aItDMSLS.Next()) {
const TopoDS_Shape& aSkey=aItDMSLS.Key();
const TopTools_ListOfShape& aLSD=aItDMSLS.Value();
- aNbSD=aLSD.Extent();
myImagesDetected.Bind(aSkey, aLSD);
}
//
// <peter@PREFEX>
//
#include <GEOMAlgo_GluerAlgo.hxx>
-#if OCC_VERSION_LARGE > 0x06070100
#include <IntTools_Context.hxx>
-#else
-#include <BOPInt_Context.hxx>
-#endif
-
//=======================================================================
//function : GEOMAlgo_GluerAlgo
//function : SetContext
//purpose :
//=======================================================================
-#if OCC_VERSION_LARGE > 0x06070100
void GEOMAlgo_GluerAlgo::SetContext(const Handle(IntTools_Context)& theContext)
-#else
-void GEOMAlgo_GluerAlgo::SetContext(const Handle(BOPInt_Context)& theContext)
-#endif
{
myContext=theContext;
}
//function : Context
//purpose :
//=======================================================================
-#if OCC_VERSION_LARGE > 0x06070100
const Handle(IntTools_Context)& GEOMAlgo_GluerAlgo::Context()
-#else
-const Handle(BOPInt_Context)& GEOMAlgo_GluerAlgo::Context()
-#endif
{
return myContext;
}
void GEOMAlgo_GluerAlgo::Perform()
{
if (myContext.IsNull()) {
-#if OCC_VERSION_LARGE > 0x06070100
myContext=new IntTools_Context;
-#else
- myContext=new BOPInt_Context;
-#endif
}
}
#ifndef _GEOMAlgo_GluerAlgo_HeaderFile
#define _GEOMAlgo_GluerAlgo_HeaderFile
-#include <Basics_OCCTVersion.hxx>
-
#include <Standard_Macro.hxx>
#include <TopoDS_Shape.hxx>
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
-
-#if OCC_VERSION_LARGE > 0x06070100
#include <IntTools_Context.hxx>
-#else
-#include <BOPInt_Context.hxx>
-#endif
#include <TopTools_DataMapOfShapeListOfShape.hxx>
#include <TopTools_DataMapOfShapeShape.hxx>
virtual void Clear() ;
Standard_EXPORT
-#if OCC_VERSION_LARGE > 0x06070100
void SetContext(const Handle(IntTools_Context)&) ;
-#else
- void SetContext(const Handle(BOPInt_Context)&) ;
-#endif
Standard_EXPORT
-#if OCC_VERSION_LARGE > 0x06070100
const Handle(IntTools_Context)& Context() ;
-#else
- const Handle(BOPInt_Context)& Context() ;
-#endif
Standard_EXPORT
const TopTools_DataMapOfShapeListOfShape& Images() const;
TopoDS_Shape myArgument;
Standard_Real myTolerance;
Standard_Boolean myCheckGeometry;
-#if OCC_VERSION_LARGE > 0x06070100
Handle(IntTools_Context) myContext;
-#else
- Handle(BOPInt_Context) myContext;
-#endif
TopTools_DataMapOfShapeListOfShape myImages;
TopTools_DataMapOfShapeShape myOrigins;
//
#include <GEOMAlgo_HAlgo.hxx>
-OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_HAlgo, MMgt_TShared);
+IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_HAlgo, Standard_Transient);
//=======================================================================
// function:
#include <Standard.hxx>
#include <Standard_DefineHandle.hxx>
#include <Standard_Integer.hxx>
-#include <MMgt_TShared.hxx>
+#include <Standard_Transient.hxx>
-#include <Basics_OCCTVersion.hxx>
-
-DEFINE_STANDARD_HANDLE(GEOMAlgo_HAlgo, MMgt_TShared);
+DEFINE_STANDARD_HANDLE(GEOMAlgo_HAlgo, Standard_Transient);
//=======================================================================
//class : GEOMAlgo_HAlgo
//purpose :
//=======================================================================
-class GEOMAlgo_HAlgo : public MMgt_TShared
+class GEOMAlgo_HAlgo : public Standard_Transient
{
public:
Standard_EXPORT
Standard_EXPORT
Standard_Integer WarningStatus() const;
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMAlgo_HAlgo,MMgt_TShared)
+ DEFINE_STANDARD_RTTIEXT(GEOMAlgo_HAlgo, Standard_Transient)
protected:
Standard_EXPORT
#include <GEOMAlgo_RemoverWebs.hxx>
#include <GEOMAlgo_ShapeAlgo.hxx>
-#include <Basics_OCCTVersion.hxx>
-
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Solid.hxx>
#include <BRepClass3d_SolidClassifier.hxx>
-#if OCC_VERSION_LARGE > 0x06070100
#include <IntTools_Context.hxx>
-#else
-#include <BOPInt_Context.hxx>
-#endif
#include <BOPAlgo_BuilderSolid.hxx>
-#include <BOPTools.hxx>
#include <BOPTools_AlgoTools.hxx>
-#include <BOPCol_MapOfShape.hxx>
+#include <TopTools_MapOfShape.hxx>
//=======================================================================
//function :
if (!myContext.IsNull()) {
myContext.Nullify();
}
-#if OCC_VERSION_LARGE > 0x06070100
myContext=new IntTools_Context;
-#else
- myContext=new BOPInt_Context;
-#endif
//
BuildSolid();
//
TopoDS_Iterator aIt1, aIt2;
TopoDS_Shape aShape;
BRep_Builder aBB;
- BOPCol_MapOfShape aMFence;
- BOPCol_IndexedMapOfShape aMSI;
- BOPCol_IndexedDataMapOfShapeListOfShape aMFS;
- BOPCol_ListOfShape aSFS;
- BOPCol_ListIteratorOfListOfShape aItLS;
+ TopTools_MapOfShape aMFence;
+ TopTools_IndexedMapOfShape aMSI;
+ TopTools_IndexedDataMapOfShapeListOfShape aMFS;
+ TopTools_ListOfShape aSFS;
+ TopTools_ListIteratorOfListOfShape aItLS;
BOPAlgo_BuilderSolid aSB;
//
//modified by NIZNHY-PKV Thu Jul 11 06:54:51 2013f
//
aNbR=aMFence.Extent();
if (aNbS!=aNbR) {
- BOPCol_MapIteratorOfMapOfShape aItMS;
+ TopTools_MapIteratorOfMapOfShape aItMS;
//
BOPTools_AlgoTools::MakeContainer(TopAbs_COMPOUND, aShape);
//
aNbF2=0;
//
// 1. aSFS: Faces
- BOPTools::MapShapesAndAncestors(aShape, TopAbs_FACE, TopAbs_SOLID, aMFS);
+ TopExp::MapShapesAndAncestors(aShape, TopAbs_FACE, TopAbs_SOLID, aMFS);
//
aNbF=aMFS.Extent();
for (i=1; i<=aNbF; ++i) {
aSFS.Append(aFi);
}
else {
- const BOPCol_ListOfShape& aLSx=aMFS(i);
+ const TopTools_ListOfShape& aLSx=aMFS(i);
aNbSx=aLSx.Extent();
if (aNbSx==1) {
aSFS.Append(aFx);
aSB.SetContext(myContext);
aSB.SetShapes(aSFS);
aSB.Perform();
-#if OCC_VERSION_LARGE > 0x07010001
iErr=aSB.HasErrors();
-#else
- iErr=aSB.ErrorStatus();
-#endif
if (iErr) {
myErrorStatus=20; // SolidBuilder failed
return;
}
//
- const BOPCol_ListOfShape& aLSR=aSB.Areas();
+ const TopTools_ListOfShape& aLSR=aSB.Areas();
//
// 4 Add the internals
if (aNbSI) {
//function : AddInternalShapes
//purpose :
//=======================================================================
-void GEOMAlgo_RemoverWebs::AddInternalShapes(const BOPCol_ListOfShape& aLSR,
- const BOPCol_IndexedMapOfShape& aMSI)
+void GEOMAlgo_RemoverWebs::AddInternalShapes(const TopTools_ListOfShape& aLSR,
+ const TopTools_IndexedMapOfShape& aMSI)
{
Standard_Integer i, aNbSI;
TopAbs_State aState;
TopoDS_Solid aSd;
BRep_Builder aBB;
- BOPCol_ListIteratorOfListOfShape aItLS;
-#if OCC_VERSION_LARGE > 0x06070100
+ TopTools_ListIteratorOfListOfShape aItLS;
Handle(IntTools_Context) aCtx=new IntTools_Context;
-#else
- Handle(BOPInt_Context) aCtx=new BOPInt_Context;
-#endif
//
aNbSI=aMSI.Extent();
for (i=1; i<=aNbSI; ++i) {
#include <Standard_Macro.hxx>
//
#include <GEOMAlgo_ShapeAlgo.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#include <BOPCol_IndexedMapOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
//=======================================================================
//function : GEOMAlgo_RemoverWebs
void BuildSolid() ;
Standard_EXPORT
- static void AddInternalShapes(const BOPCol_ListOfShape& ,
- const BOPCol_IndexedMapOfShape& );
+ static void AddInternalShapes(const TopTools_ListOfShape& ,
+ const TopTools_IndexedMapOfShape& );
//
};
// <pkv@irinox>
//
#include <GEOMAlgo_ShapeAlgo.hxx>
-#if OCC_VERSION_LARGE > 0x06070100
#include <IntTools_Context.hxx>
-#else
-#include <BOPInt_Context.hxx>
-#endif
//=======================================================================
//function : GEOMAlgo_ShapeAlgo
//function : SetContext
//purpose :
//=======================================================================
-#if OCC_VERSION_LARGE > 0x06070100
void GEOMAlgo_ShapeAlgo::SetContext(const Handle(IntTools_Context)& theContext)
-#else
-void GEOMAlgo_ShapeAlgo::SetContext(const Handle(BOPInt_Context)& theContext)
-#endif
{
myContext=theContext;
}
//function : Context
//purpose :
//=======================================================================
-#if OCC_VERSION_LARGE > 0x06070100
const Handle(IntTools_Context)& GEOMAlgo_ShapeAlgo::Context()const
-#else
-const Handle(BOPInt_Context)& GEOMAlgo_ShapeAlgo::Context()const
-#endif
{
return myContext;
}
void GEOMAlgo_ShapeAlgo::Perform()
{
if (myContext.IsNull()) {
-#if OCC_VERSION_LARGE > 0x06070100
myContext=new IntTools_Context;
-#else
- myContext=new BOPInt_Context;
-#endif
}
}
// 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
#define _GEOMAlgo_ShapeAlgo_HeaderFile
-#include <Basics_OCCTVersion.hxx>
-
#include <Standard.hxx>
#include <Standard_Macro.hxx>
#include <TopoDS_Shape.hxx>
#include <Standard_Real.hxx>
-#if OCC_VERSION_LARGE > 0x06070100
- #include <IntTools_Context.hxx>
-#else
- #include <BOPInt_Context.hxx>
-#endif
+#include <IntTools_Context.hxx>
#include <GEOMAlgo_Algo.hxx>
//=======================================================================
//=======================================================================
class GEOMAlgo_ShapeAlgo : public GEOMAlgo_Algo
{
- public:
+public:
//! Sets cashed geometrical tools <br>
Standard_EXPORT
-#if OCC_VERSION_LARGE > 0x06070100
void SetContext(const Handle(IntTools_Context)& theContext) ;
-#else
- void SetContext(const Handle(BOPInt_Context)& theContext) ;
-#endif
//! Returns cashed geometrical tools <br>
Standard_EXPORT
-#if OCC_VERSION_LARGE > 0x06070100
const Handle(IntTools_Context)& Context() const;
-#else
- const Handle(BOPInt_Context)& Context() const;
-#endif
Standard_EXPORT
void SetShape(const TopoDS_Shape& aS) ;
Standard_EXPORT
virtual ~GEOMAlgo_ShapeAlgo();
-
TopoDS_Shape myShape;
Standard_Real myTolerance;
TopoDS_Shape myResult;
-#if OCC_VERSION_LARGE > 0x06070100
Handle(IntTools_Context) myContext;
-#else
- Handle(BOPInt_Context) myContext;
-#endif
};
+
#endif
const gp_Cylinder& aCyl)
{
- Standard_Integer i, aNbV, aNbE, aNbCE, aNbSE;
+ Standard_Integer aNbV, aNbE, aNbCE, aNbSE;
Standard_Real aT0, aT1, aHeight;
gp_Pnt aPC[3], aPc;
TopoDS_Edge aE;
const gp_Dir& aDir=aAx1.Direction();
const gp_Pnt& aPLoc=aAx1.Location();
//
- i=0;
aNbCE=0;
aNbSE=0;
aExp.Init(aF, TopAbs_EDGE);
{
Standard_Boolean bRet, bIsAllowedType, bOnlyClosed, bIsEqual;
Standard_Integer j;
- Standard_Real aTolAng, aTol;
+ Standard_Real aTol;
Standard_Real aVolume, aVolumeS, dV, aArea, aAreaS, dA;
gp_Sphere aSphere[2];
GeomAbs_SurfaceType aST;
//
bRet=Standard_False;
aTol=Precision::Confusion();
- aTolAng=Precision::Angular();
//
aExp.Init(aSd, TopAbs_FACE);
for (j=0; aExp.More(); aExp.Next(), ++j) {
//
#include <GEOMAlgo_ShellSolid.hxx>
-#include <Basics_OCCTVersion.hxx>
-
#include <Standard_Failure.hxx>
#include <gp_Pnt2d.hxx>
#include <BOPTools_AlgoTools.hxx>
-#include <BOPCol_DataMapOfShapeListOfShape.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#if OCC_VERSION_LARGE > 0x06070100
+#include <TopTools_DataMapOfShapeListOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
#include <IntTools_Context.hxx>
-#else
-#include <BOPInt_Context.hxx>
-#endif
#include <BOPDS_DS.hxx>
#include <BOPAlgo_Builder.hxx>
//=======================================================================
void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFiller)
{
-#if OCC_VERSION_LARGE <= 0x07010000
- myErrorStatus=0;
-#endif
//
myPaveFiller=(BOPAlgo_PaveFiller*)&theFiller;
myDS=myPaveFiller->PDS();
//
// 1. CheckData
CheckData();
-#if OCC_VERSION_LARGE > 0x07010001
if (HasErrors()) {
-#else
- if (myErrorStatus) {
-#endif
return;
}
//
// 2. Prepare
Prepare();
-#if OCC_VERSION_LARGE > 0x07010001
if (HasErrors()) {
-#else
- if (myErrorStatus) {
-#endif
return;
}
//
// 3. Fill Images
// 3.1 Vertice
FillImagesVertices();
-#if OCC_VERSION_LARGE > 0x07010001
if (HasErrors()) {
-#else
- if (myErrorStatus) {
-#endif
return;
}
//
BuildResult(TopAbs_VERTEX);
-#if OCC_VERSION_LARGE > 0x07010001
if (HasErrors()) {
-#else
- if (myErrorStatus) {
-#endif
return;
}
// 3.2 Edges
FillImagesEdges();
-#if OCC_VERSION_LARGE > 0x07010001
if (HasErrors()) {
-#else
- if (myErrorStatus) {
-#endif
return;
}
//
BuildResult(TopAbs_EDGE);
-#if OCC_VERSION_LARGE > 0x07010001
if (HasErrors()) {
-#else
- if (myErrorStatus) {
-#endif
return;
}
//
// 3.3 Wires
FillImagesContainers(TopAbs_WIRE);
-#if OCC_VERSION_LARGE > 0x07010001
if (HasErrors()) {
-#else
- if (myErrorStatus) {
-#endif
return;
}
//
BuildResult(TopAbs_WIRE);
-#if OCC_VERSION_LARGE > 0x07010001
if (HasErrors()) {
-#else
- if (myErrorStatus) {
-#endif
return;
}
// 3.4 Faces
FillImagesFaces();
-#if OCC_VERSION_LARGE > 0x07010001
if (HasErrors()) {
-#else
- if (myErrorStatus) {
-#endif
return;
}
//
BuildResult(TopAbs_FACE);
-#if OCC_VERSION_LARGE > 0x07010001
if (HasErrors()) {
-#else
- if (myErrorStatus) {
-#endif
return;
}
}
//=======================================================================
void GEOMAlgo_ShellSolid::Perform()
{
-#if OCC_VERSION_LARGE <= 0x07010000
- myErrorStatus=0;
-#endif
//
try {
Standard_Integer aNbArgs, iRank, iErr, iBeg, iEnd, i, aNbSp;
myErrorStatus=10;
return;
}
-#if OCC_VERSION_LARGE > 0x07010001
if(myDSFiller->HasErrors()) {
-#else
- if(myDSFiller->ErrorStatus()) {
-#endif
myErrorStatus=11;
return;
}
//
const BOPDS_DS& aDS=myDSFiller->DS();
BOPDS_DS* pDS=(BOPDS_DS*)&aDS;
- const BOPCol_ListOfShape& aLS=pDS->Arguments();
+ const TopTools_ListOfShape& aLS=pDS->Arguments();
//
aNbArgs=aLS.Extent();
if (aNbArgs!=2) {
return;
}
//
-#if OCC_VERSION_LARGE > 0x06070100
Handle(IntTools_Context) aCtx=myDSFiller->Context();
-#else
- Handle(BOPInt_Context) aCtx=myDSFiller->Context();
-#endif
const BOPDS_IndexRange& aRange=pDS->Range(iRank);
aRange.Indices(iBeg, iEnd);
const TopoDS_Solid& aSolid=(!iRank) ? *((TopoDS_Solid*)&aTool) : *((TopoDS_Solid*)&aObj);
GEOMAlgo_ShellSolidBuilder aSSB;
//
aSSB.PerformWithFiller(*myDSFiller);
-#if OCC_VERSION_LARGE > 0x07010001
iErr=aSSB.HasErrors();
-#else
- iErr=aSSB.ErrorStatus();
-#endif
if (iErr) {
myErrorStatus=15;
return;
}
//
- const BOPCol_DataMapOfShapeListOfShape& aImages=aSSB.Images();
+ const TopTools_DataMapOfShapeListOfShape& aImages=aSSB.Images();
//
//-------------------------------
for (i=iBeg; i<=iEnd; ++i) {
aState=BOPTools_AlgoTools::ComputeState(aP, aSolid, aTol, aCtx);
}
else {
- const BOPCol_ListOfShape& aLSp=aImages.Find(aS);
+ const TopTools_ListOfShape& aLSp=aImages.Find(aS);
aNbSp=aLSp.Extent();
if (aNbSp>0) {
continue;
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
-#include <Basics_OCCTVersion.hxx>
-
#include <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
//=======================================================================
myErrorStatus=10;
return;
}
-#if OCC_VERSION_LARGE > 0x07010001
if(myDSFiller->HasErrors()) {
-#else
- if(myDSFiller->ErrorStatus()) {
-#endif
myErrorStatus=11;
return;
}
#include <BRep_Builder.hxx>
-#include <BOPCol_MapOfShape.hxx>
-#include <BOPCol_ListOfShape.hxx>
+#include <TopTools_MapOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
-#include <BOPTools.hxx>
-
-#include <Basics_OCCTVersion.hxx>
+#include <TopExp.hxx>
static
void TreatCompound(const TopoDS_Shape& aC,
- BOPCol_ListOfShape& aLSX);
+ TopTools_ListOfShape& aLSX);
//=======================================================================
//function :
//function : Tools
//purpose :
//=======================================================================
-const BOPCol_ListOfShape& GEOMAlgo_Splitter::Tools()const
+const TopTools_ListOfShape& GEOMAlgo_Splitter::Tools()const
{
return myTools;
}
//=======================================================================
void GEOMAlgo_Splitter::BuildResult(const TopAbs_ShapeEnum theType)
{
-#if OCC_VERSION_LARGE <= 0x07010000
- myErrorStatus=0;
-#endif
- //
TopAbs_ShapeEnum aType;
BRep_Builder aBB;
- BOPCol_MapOfShape aM;
- BOPCol_ListIteratorOfListOfShape aIt, aItIm;
+ TopTools_MapOfShape aM;
+ TopTools_ListIteratorOfListOfShape aIt, aItIm;
//
aIt.Initialize(myArguments);
for (; aIt.More(); aIt.Next()) {
aType=aS.ShapeType();
if (aType==theType && !myMapTools.Contains(aS)) {
if (myImages.IsBound(aS)) {
- const BOPCol_ListOfShape& aLSIm=myImages.Find(aS);
+ const TopTools_ListOfShape& aLSIm=myImages.Find(aS);
aItIm.Initialize(aLSIm);
for (; aItIm.More(); aItIm.Next()) {
const TopoDS_Shape& aSIm=aItIm.Value();
Standard_Integer i, aNbS;
BRep_Builder aBB;
TopoDS_Compound aC;
- BOPCol_IndexedMapOfShape aMx;
+ TopTools_IndexedMapOfShape aMx;
//
aBB.MakeCompound(aC);
//
- BOPTools::MapShapes(myShape, myLimit, aMx);
+ TopExp::MapShapes(myShape, myLimit, aMx);
aNbS=aMx.Extent();
for (i=1; i<=aNbS; ++i) {
const TopoDS_Shape& aS=aMx(i);
if (myLimitMode) {
Standard_Integer iType, iLimit, iTypeX;
TopAbs_ShapeEnum aType, aTypeX;
- BOPCol_ListOfShape aLSP, aLSX;
- BOPCol_ListIteratorOfListOfShape aIt, aItX, aItIm;
- BOPCol_MapOfShape aM;
+ TopTools_ListOfShape aLSP, aLSX;
+ TopTools_ListIteratorOfListOfShape aIt, aItX, aItIm;
+ TopTools_MapOfShape aM;
//
iLimit=(Standard_Integer)myLimit;
//
}// for (; aIt.More(); aIt.Next()) {
//
aMx.Clear();
- BOPTools::MapShapes(aC, aMx);
+ TopExp::MapShapes(aC, aMx);
// 2. Add them to aC
aIt.Initialize(aLSP);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aS=aIt.Value();
if (myImages.IsBound(aS)) {
- const BOPCol_ListOfShape& aLSIm=myImages.Find(aS);
+ const TopTools_ListOfShape& aLSIm=myImages.Find(aS);
aItIm.Initialize(aLSIm);
for (; aItIm.More(); aItIm.Next()) {
const TopoDS_Shape& aSIm=aItIm.Value();
//
Standard_Integer aNbS;
TopoDS_Iterator aIt;
- BOPCol_ListOfShape aLS;
+ TopTools_ListOfShape aLS;
//
aIt.Initialize(myShape);
for (; aIt.More(); aIt.Next()) {
//purpose :
//=======================================================================
void TreatCompound(const TopoDS_Shape& aC1,
- BOPCol_ListOfShape& aLSX)
+ TopTools_ListOfShape& aLSX)
{
Standard_Integer aNbC1;
TopAbs_ShapeEnum aType;
- BOPCol_ListOfShape aLC, aLC1;
- BOPCol_ListIteratorOfListOfShape aIt, aIt1;
+ TopTools_ListOfShape aLC, aLC1;
+ TopTools_ListIteratorOfListOfShape aIt, aIt1;
TopoDS_Iterator aItC;
//
aLC.Append (aC1);
#include <TopoDS_Shape.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#include <BOPCol_MapOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_MapOfShape.hxx>
#include <BOPAlgo_Builder.hxx>
void AddTool(const TopoDS_Shape& theShape);
Standard_EXPORT
- const BOPCol_ListOfShape& Tools()const;
+ const TopTools_ListOfShape& Tools()const;
Standard_EXPORT
void SetLimit(const TopAbs_ShapeEnum aLimit);
virtual void PostTreat();
protected:
- BOPCol_ListOfShape myTools;
- BOPCol_MapOfShape myMapTools;
+ TopTools_ListOfShape myTools;
+ TopTools_MapOfShape myMapTools;
TopAbs_ShapeEnum myLimit;
Standard_Integer myLimitMode;
};
if (fabs(aRadius1 - aRadius2) <= aTol) {
// Check the deflection of the middle point.
- gp_XYZ aMidP = 0.5*(aDP1 + aDP2);
+ //gp_XYZ aMidP = 0.5*(aDP1 + aDP2);
//Standard_Real aMidRadius1 = aMidP.Modulus();
if (fabs(aRadius1 - aRadius2) <= aTol) {
//
#include <GEOMAlgo_VertexSolid.hxx>
-#include <Basics_OCCTVersion.hxx>
-
#include <gp_Pnt.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <BRep_Tool.hxx>
#include <BRepClass3d_SolidClassifier.hxx>
//
-#include <BOPCol_ListOfShape.hxx>
-#if OCC_VERSION_LARGE > 0x06070100
+#include <TopTools_ListOfShape.hxx>
#include <IntTools_Context.hxx>
-#else
-#include <BOPInt_Context.hxx>
-#endif
//
#include <BOPDS_DS.hxx>
#include <BOPDS_IndexRange.hxx>
myErrorStatus=10;
return;
}
-#if OCC_VERSION_LARGE > 0x07010001
if(myDSFiller->HasErrors()) {
-#else
- if(myDSFiller->ErrorStatus()) {
-#endif
myErrorStatus=11;
return;
}
TopTools_IndexedMapOfShape aM;
//
const BOPDS_DS& aDS=myDSFiller->DS();
- const BOPCol_ListOfShape& aLS=aDS.Arguments();
+ const TopTools_ListOfShape& aLS=aDS.Arguments();
aNbArgs=aLS.Extent();
if (aNbArgs!=2) {
myErrorStatus=14;
//=======================================================================
void GEOMAlgo_VertexSolid::BuildResult()
{
- Standard_Integer i, iBeg, iEnd, aNbVV, aNbVE, aNbVF, j, iFound, aNbRanges;
+ Standard_Integer i, iBeg, iEnd, aNbVV, aNbVE, aNbVF, j, iFound;//, aNbRanges;
Standard_Real aTol;
TopAbs_State aSt;
TopAbs_ShapeEnum aType;
BOPDS_VectorOfInterfVE& aVEs=pDS->InterfVE();
BOPDS_VectorOfInterfVF& aVFs=pDS->InterfVF();
//
- const BOPCol_ListOfShape& aLS=aDS.Arguments();
+ const TopTools_ListOfShape& aLS=aDS.Arguments();
const TopoDS_Shape& aObj=aLS.First();
//
const TopoDS_Shape& aTool=aLS.Last();
const TopoDS_Solid& aSolid=(myRank==0) ? TopoDS::Solid(aTool) : TopoDS::Solid(aObj);
//
-#if OCC_VERSION_LARGE > 0x06070100
Handle(IntTools_Context) aCtx=myDSFiller->Context();
-#else
- Handle(BOPInt_Context) aCtx=myDSFiller->Context();
-#endif
BRepClass3d_SolidClassifier& aSC=aCtx->SolidClassifier(aSolid);
//
- aNbRanges=aDS.NbRanges();
+ //aNbRanges=aDS.NbRanges();
const BOPDS_IndexRange& aRange=aDS.Range(myRank);
aRange.Indices(iBeg, iEnd);
//
iFound=0;
//
// 1
- aNbVV=aVVs.Extent();
+ aNbVV=aVVs.Length();
for (j=0; j<aNbVV; ++j) {
BOPDS_InterfVV& aVV=aVVs(j);
if (aVV.Contains(i)) {
- myLSON.Append(aV);
- iFound=1;
- break;
+ myLSON.Append(aV);
+ iFound=1;
+ break;
}
}
if (iFound) {
continue;
}
// 2
- aNbVE=aVEs.Extent();
+ aNbVE=aVEs.Length();
for (j=0; j<aNbVE; ++j) {
BOPDS_InterfVE& aVE=aVEs(j);
if (aVE.Contains(i)) {
- myLSON.Append(aV);
- iFound=1;
- break;
+ myLSON.Append(aV);
+ iFound=1;
+ break;
}
}
if (iFound) {
continue;
}
// 3
- aNbVF=aVFs.Extent();
+ aNbVF=aVFs.Length();
for (j=0; j<aNbVF; ++j) {
BOPDS_InterfVF& aVF=aVFs(j);
if (aVF.Contains(i)) {
- myLSON.Append(aV);
- iFound=1;
- break;
+ myLSON.Append(aV);
+ iFound=1;
+ break;
}
}
if (iFound) {
//
#include <GEOMAlgo_WireSolid.hxx>
-#include <Basics_OCCTVersion.hxx>
-
#include <Standard_Failure.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <BOPDS_ListOfPaveBlock.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <TopoDS_Solid.hxx>
-#if OCC_VERSION_LARGE > 0x06070100
#include <IntTools_Context.hxx>
-#else
-#include <BOPInt_Context.hxx>
-#endif
#include <BRepClass3d_SolidClassifier.hxx>
#include <BRep_Tool.hxx>
#include <BOPTools_AlgoTools.hxx>
-#include <Basics_OCCTVersion.hxx>
-
//=======================================================================
//function : GEOMAlgo_WireSolid
//purpose :
myErrorStatus=10;
return;
}
-#if OCC_VERSION_LARGE > 0x07010001
if(myDSFiller->HasErrors()) {
-#else
- if(myDSFiller->ErrorStatus()) {
-#endif
myErrorStatus=11;
return;
}
Standard_Integer aNbArgs;
//
const BOPDS_DS& aDS=myDSFiller->DS();
- const BOPCol_ListOfShape& aLS=aDS.Arguments();
+ const TopTools_ListOfShape& aLS=aDS.Arguments();
aNbArgs=aLS.Extent();
if (!aNbArgs) {
myErrorStatus=13;
const BOPDS_DS& aDS=myDSFiller->DS();
BOPDS_DS* pDS=(BOPDS_DS*)&aDS;
//
- const BOPCol_ListOfShape& aLS=pDS->Arguments();
+ const TopTools_ListOfShape& aLS=pDS->Arguments();
aNbArgs=aLS.Extent();
if (aNbArgs!=2) {
myErrorStatus=14;
const TopoDS_Solid& aSolid=(iRank==0) ? *((TopoDS_Solid*)&aTool) :
*((TopoDS_Solid*)&aObj);
//
-#if OCC_VERSION_LARGE > 0x06070100
Handle(IntTools_Context) aCtx=myDSFiller->Context();
-#else
- Handle(BOPInt_Context) aCtx=myDSFiller->Context();
-#endif
//BRepClass3d_SolidClassifier& aSC=aCtx->SolidClassifier(aSolid);
//
const BOPDS_IndexRange& aRange=pDS->Range(iRank);
//================================================================
// Function : onAccept
// Purpose : This method should be called from dialog's slots onOk() and onApply()
-// It perfroms user input validation, then it
+// It performs user input validation, then it
// performs a proper operation and manages transactions, etc.
//================================================================
bool GEOMBase_Helper::onAccept( const bool publish, const bool useTransaction, bool erasePreviewFlag )
catch( const SALOME::SALOME_Exception& e ) {
SalomeApp_Tools::QtCatchCorbaException( e );
abortCommand();
- MESSAGE("Exception catched")
+ MESSAGE("Exception caught")
}
updateViewer();
return;
/* User name of object input management */
- /* If successfull the selection is changed and signal emitted... */
+ /* If successful the selection is changed and signal emitted... */
/* so SelectionIntoArgument() is automatically called. */
const QString objectUserName = myEditCurrentArgument->text();
QWidget* thisWidget = (QWidget*)this;
object that should be removed by the caller as soon as the object is no more required.
For example, function GetSubShape() of the GEOM_IShapesOperation interface always creates
new servant object and returns new object reference to it. If the object is not published
- in the study, it has to be destroyed and the coresponding servant should be deleted.
+ in the study, it has to be destroyed and the corresponding servant should be deleted.
Examples:
\code
#include <AIS_InteractiveObject.hxx>
#include <SelectMgr_EntityOwner.hxx>
-OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_OCCFilter, SelectMgr_Filter)
+IMPLEMENT_STANDARD_RTTIEXT(GEOM_OCCFilter, SelectMgr_Filter)
//=======================================================================
// function : GEOM_OCCFilter
#include <Standard_DefineHandle.hxx>
-#include <Basics_OCCTVersion.hxx>
-
class LightApp_SelectionMgr;
class GEOM_OCCFilter : public SelectMgr_Filter
public:
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_OCCFilter,SelectMgr_Filter)
+ DEFINE_STANDARD_RTTIEXT(GEOM_OCCFilter,SelectMgr_Filter)
};
aStringValues.remove("\\");
- int it = 0;
+ size_t it = 0;
for ( ; it < aPacked.size(); ++it )
{
int aNextPos = aStringValues.indexOf("(.*)");
#include "GEOMGUI_OCCSelector.h"
#include "GEOM_Annotation.hxx"
-#include <Basics_OCCTVersion.hxx>
-
#include <LightApp_DataSubOwner.h>
#include <OCCViewer_ViewModel.h>
Handle(SelectMgr_Selection) sel = theObj->Selection( m );
for ( sel->Init(); sel->More(); sel->Next() ) {
-#if OCC_VERSION_LARGE > 0x06080100
const Handle(SelectMgr_SensitiveEntity) aHSenEntity = sel->Sensitive();
if( aHSenEntity.IsNull() )
continue;
Handle(SelectBasics_SensitiveEntity) entity = aHSenEntity->BaseSensitive();
-#else
- Handle(SelectBasics_SensitiveEntity) entity = sel->Sensitive();
-#endif
if ( entity.IsNull() )
continue;
#include <SUIT_ViewManager.h>
#include <SUIT_ResourceMgr.h>
-#include <Basics_OCCTVersion.hxx>
-
#include <SalomeApp_Study.h>
#include <SalomeApp_Application.h>
#include <LightApp_SelectionMgr.h>
#include <AIS_AngleDimension.hxx>
#include <AIS_ListIteratorOfListOfInteractive.hxx>
#include <Aspect_PolygonOffsetMode.hxx>
-#if OCC_VERSION_MAJOR < 7
- #include <Aspect_ColorScale.hxx>
-#endif
#include <Prs3d_IsoAspect.hxx>
#include <Prs3d_PointAspect.hxx>
#include <StdSelect_TypeOfEdge.hxx>
#include <TopoDS.hxx>
#include <NCollection_DataMap.hxx>
#include <NCollection_Map.hxx>
+#include <Graphic3d_Texture2Dmanual.hxx>
#include <Prs3d_ShadingAspect.hxx>
if ( aAISShape.IsNull() )
continue;
-#ifdef USE_TEXTURED_SHAPE
- const Handle(Image_PixMap)& aPixmap = aAISShape->TexturePixMap();
+ const Handle(Graphic3d_TextureMap)& aTexture = aAISShape->Attributes()->ShadingAspect()->Aspect()->TextureMap();
+ if ( aTexture.IsNull() )
+ continue;
+
+ const Handle(Image_PixMap)& aPixmap = aTexture->GetImage();
if ( aPixmap.IsNull() )
continue;
aPixmapUsersMap.UnBind( aPixmap );
aPixmapCacheMap.remove( aPixmapCacheMap.key( aPixmap ) );
}
-#endif
}
}
myViewFrame = 0;
-#if OCC_VERSION_MAJOR >= 7
- myColorScale = new AIS_ColorScale;
- myColorScale->SetZLayer (Graphic3d_ZLayerId_TopOSD);
- myColorScale->SetTransformPersistence (
- Graphic3d_TransformPers::FromDeprecatedParams(Graphic3d_TMF_2d, gp_Pnt (-1,-1,0)));
-#endif
-
myFieldDataType = GEOM::FDT_Double;
myFieldDimension = 0;
myFieldStepRangeMin = 0;
AISShape->SetLabelColor( qColorFromResources( "label_color", QColor( 255, 255, 255 ) ) );
// set display mode
- AISShape->SetDisplayMode( HasDisplayMode() ?
- // predefined display mode, manually set to displayer via GEOM_Displayer::SetDisplayMode() function
- GetDisplayMode() :
- // display mode from properties
- propMap.value( GEOM::propertyName( GEOM::DisplayMode ) ).toInt() );
+ int displayMode = HasDisplayMode() ?
+ // predefined display mode, manually set to displayer via GEOM_Displayer::SetDisplayMode() function
+ GetDisplayMode() :
+ // display mode from properties
+ propMap.value( GEOM::propertyName( GEOM::DisplayMode ) ).toInt();
+ AISShape->SetDisplayMode( displayMode );
// - face boundaries color and line width
anAspect = AISShape->Attributes()->FaceBoundaryAspect();
study->setObjectProperty( aMgrId, entry, GEOM::propertyName( GEOM::Texture ), QString( GetTexture().c_str() ) );
study->setObjectProperty( aMgrId, entry, GEOM::propertyName( GEOM::DisplayMode ), 3 );
- // Update propeties map
+ // Update properties map
propMap = getObjectProperties( entry, myViewFrame );
}
}
aImagePath = propMap.value( GEOM::propertyName( GEOM::Texture ) ).toString();
}
-#ifdef USE_TEXTURED_SHAPE
Handle(Image_PixMap) aPixmap;
if ( !aImagePath.isEmpty() )
aPixmap = cacheTextureFor( aImagePath, AISShape );
// apply image to shape
if ( !aPixmap.IsNull() ) {
- AISShape->SetTexturePixMap( aPixmap );
- AISShape->SetTextureMapOn();
- AISShape->DisableTextureModulate();
+ AISShape->Attributes()->ShadingAspect()->Aspect()->SetTextureMap( new Graphic3d_Texture2Dmanual( aPixmap ) );
}
- else {
- AISShape->SetTextureMapOff();
- }
-#endif
+ if ( displayMode == GEOM_AISShape::TexturedShape )
+ AISShape->Attributes()->ShadingAspect()->Aspect()->SetTextureMapOn();
+ else
+ AISShape->Attributes()->ShadingAspect()->Aspect()->SetTextureMapOff();
// set line width
AISShape->SetWidth( HasWidth() ?
if ( !GeomObject->_is_nil() )
{
- theIO->setName( GeomObject->GetName() );
- // finally set shape
- setShape( GEOM_Client::get_client().GetShape( GeometryGUI::GetGeomGen(), GeomObject ) );
+ CORBA::String_var name = GeomObject->GetName();
+ theIO->setName( name );
+ // finally set shape
+ setShape( GEOM_Client::get_client().GetShape( GeometryGUI::GetGeomGen(), GeomObject ) );
}
}
}
void GEOM_Displayer::AfterDisplay( SALOME_View* v, const SALOME_OCCPrs* p )
{
- UpdateColorScale(false,false);
+ UpdateColorScale();
// visualize annotations for displayed presentation
SUIT_Session* session = SUIT_Session::session();
void GEOM_Displayer::AfterErase( SALOME_View* v, const SALOME_OCCPrs* p )
{
LightApp_Displayer::AfterErase( v, p );
- UpdateColorScale(false,false);
+ UpdateColorScale();
if ( !myIsRedisplayed ) {
// hide annotations for erased presentation
{
QColor aQColor;
Quantity_Color aColor;
-#if OCC_VERSION_MAJOR < 7
- if( FindColor( aVariant.toDouble(), theFieldStepRangeMin, theFieldStepRangeMax, anIsBoolean ? 2 : aNbIntervals, aColor ) )
-#else
if( AIS_ColorScale::FindColor( aVariant.toDouble(), theFieldStepRangeMin, theFieldStepRangeMax, anIsBoolean ? 2 : aNbIntervals, aColor ) )
-#endif
aQColor = QColor::fromRgbF( aColor.Red(), aColor.Green(), aColor.Blue() );
aResultList << aQColor;
}
return aResultList;
}
-#if OCC_VERSION_MAJOR < 7
-// Note: the method is copied from Aspect_ColorScale class
-Standard_Integer GEOM_Displayer::HueFromValue( const Standard_Integer aValue,
- const Standard_Integer aMin,
- const Standard_Integer aMax )
+void GEOM_Displayer::UpdateColorScale()
{
- Standard_Integer minLimit( 0 ), maxLimit( 230 );
-
- Standard_Integer aHue = maxLimit;
- if ( aMin != aMax )
- aHue = (Standard_Integer)( maxLimit - ( maxLimit - minLimit ) * ( aValue - aMin ) / ( aMax - aMin ) );
-
- aHue = Min( Max( minLimit, aHue ), maxLimit );
-
- return aHue;
-}
-
-// Note: the method is copied from Aspect_ColorScale class
-Standard_Boolean GEOM_Displayer::FindColor( const Standard_Real aValue,
- const Standard_Real aMin,
- const Standard_Real aMax,
- const Standard_Integer ColorsCount,
- Quantity_Color& aColor )
-{
- if( aValue<aMin || aValue>aMax || aMax<aMin )
- return Standard_False;
-
- else
- {
- Standard_Real IntervNumber = 0;
- if( aValue<aMin )
- IntervNumber = 0;
- else if( aValue>aMax )
- IntervNumber = ColorsCount-1;
- else if( Abs( aMax-aMin ) > Precision::Approximation() )
- IntervNumber = Floor( Standard_Real( ColorsCount ) * ( aValue - aMin ) / ( aMax - aMin ) ); // 'Ceiling' replaced with 'Floor'
-
- Standard_Integer Interv = Standard_Integer( IntervNumber );
-
- aColor = Quantity_Color( HueFromValue( Interv, 0, ColorsCount - 1 ), 1.0, 1.0, Quantity_TOC_HLS );
-
- return Standard_True;
- }
-}
-#endif
-
-void GEOM_Displayer::UpdateColorScale( const bool theIsRedisplayFieldSteps, const bool updateViewer )
-{
- SOCC_Viewer* aViewModel = dynamic_cast<SOCC_Viewer*>( GetActiveView() );
- if( !aViewModel )
- return;
-
- Handle(V3d_Viewer) aViewer = aViewModel->getViewer3d();
- if( aViewer.IsNull() )
- return;
-
- aViewer->InitActiveViews();
- if( !aViewer->MoreActiveViews() )
- return;
-
- Handle(V3d_View) aView = aViewer->ActiveView();
- if( aView.IsNull() )
+ if ( !myUpdateColorScale )
return;
- Standard_Boolean anIsDisplayColorScale = Standard_False;
- TCollection_AsciiString aColorScaleTitle;
- Standard_Real aColorScaleMin = 0, aColorScaleMax = 0;
- Standard_Boolean anIsBoolean = Standard_False;
+ SUIT_Session* session = SUIT_Session::session();
+ SUIT_Application* app = session->activeApplication();
+ if ( !app ) return;
- Handle(SALOME_InteractiveObject) anIO;
- if ( myUpdateColorScale )
- anIO = myApp->selectionMgr()->soleSelectedObject();
+ Handle(SALOME_InteractiveObject) io = myApp->selectionMgr()->soleSelectedObject();
- if( !anIO.IsNull() )
+ QList<SUIT_ViewWindow*> windows = app->desktop()->windows();
+ foreach( SUIT_ViewWindow* window, windows )
{
- SOCC_Prs* aPrs = dynamic_cast<SOCC_Prs*>( aViewModel->CreatePrs( anIO->getEntry() ) );
- if( aPrs )
+ OCCViewer_ViewWindow* occWindow = dynamic_cast<OCCViewer_ViewWindow*>( window );
+ if ( !occWindow ) continue;
+ if ( !occWindow->getViewManager() ) continue;
+ if ( !window->getViewManager() ) continue;
+ if ( !window->getViewManager()->getViewModel() ) continue;
+ SOCC_Viewer* view = dynamic_cast<SOCC_Viewer*>( window->getViewManager()->getViewModel() );
+ if ( !view ) continue;
+ Handle(V3d_Viewer) viewer = view->getViewer3d();
+ if ( !io.IsNull() && view->isVisible( io ) )
{
- AIS_ListOfInteractive aList;
- aPrs->GetObjects( aList );
- AIS_ListIteratorOfListOfInteractive anIter( aList );
- for( ; anIter.More(); anIter.Next() )
+ bool visible = false;
+ SOCC_Prs* prs = dynamic_cast<SOCC_Prs*>( view->CreatePrs( io->getEntry() ) );
+ if ( prs )
{
- Handle(GEOM_AISShape) aShape = Handle(GEOM_AISShape)::DownCast( anIter.Value() );
- if( !aShape.IsNull() )
+ AIS_ListOfInteractive presentations;
+ prs->GetObjects( presentations );
+ AIS_ListIteratorOfListOfInteractive iter( presentations );
+ for ( ; iter.More(); iter.Next() )
{
- GEOM::field_data_type aFieldDataType;
- int aFieldDimension;
- QList<QVariant> aFieldStepData;
- TCollection_AsciiString aFieldStepName;
- double aFieldStepRangeMin, aFieldStepRangeMax;
- aShape->getFieldStepInfo( aFieldDataType,
- aFieldDimension,
- aFieldStepData,
- aFieldStepName,
- aFieldStepRangeMin,
- aFieldStepRangeMax );
- if( !aFieldStepData.isEmpty() && aFieldDataType != GEOM::FDT_String )
+ Handle(GEOM_AISShape) shape = Handle(GEOM_AISShape)::DownCast( iter.Value() );
+ if ( shape.IsNull() ) continue;
+ GEOM::field_data_type fieldDataType;
+ int fieldDimension;
+ QList<QVariant> fieldStepData;
+ TCollection_AsciiString fieldStepName;
+ Standard_Real fieldStepRangeMin, fieldStepRangeMax;
+ shape->getFieldStepInfo( fieldDataType, fieldDimension, fieldStepData,
+ fieldStepName, fieldStepRangeMin, fieldStepRangeMax );
+ visible = !fieldStepData.isEmpty() && fieldDataType != GEOM::FDT_String;
+ if ( visible )
{
- anIsDisplayColorScale = Standard_True;
- aColorScaleTitle = aFieldStepName;
- aColorScaleMin = aFieldStepRangeMin;
- aColorScaleMax = aFieldStepRangeMax;
- anIsBoolean = aFieldDataType == GEOM::FDT_Bool;
- }
+ SUIT_Session* session = SUIT_Session::session();
+ SUIT_ResourceMgr* resMgr = session->resourceMgr();
+
+ Standard_Real xPos = resMgr->doubleValue( "Geometry", "scalar_bar_x_position", 0.05 );
+ Standard_Real yPos = resMgr->doubleValue( "Geometry", "scalar_bar_y_position", 0.1 );
+ Standard_Real width = resMgr->doubleValue( "Geometry", "scalar_bar_width", 0.2 );
+ Standard_Real height = resMgr->doubleValue( "Geometry", "scalar_bar_height", 0.5 );
+ Standard_Integer textHeight = resMgr->integerValue( "Geometry", "scalar_bar_text_height", 14 );
+ Standard_Integer nbIntervals = resMgr->integerValue( "Geometry", "scalar_bar_nb_intervals", 20 );
+
+ Standard_Integer viewWidth = 0, viewHeight = 0;
+ occWindow->getView(0)->getViewPort()->getView()->Window()->Size( viewWidth, viewHeight );
+
+ Handle(AIS_ColorScale) colorScale = view->getColorScale();
+
+ colorScale->SetPosition( viewWidth * xPos, viewHeight * yPos );
+ colorScale->SetBreadth( viewWidth * width );
+ colorScale->SetHeight( viewHeight * height );
+ colorScale->SetRange( fieldStepRangeMin, fieldStepRangeMax );
+ colorScale->SetNumberOfIntervals( fieldDataType == GEOM::FDT_Bool ? 2 : nbIntervals );
+ colorScale->SetTextHeight( textHeight );
+ colorScale->SetTitle( fieldStepName );
+ } // if ( visible )
}
}
- }
- }
-
- if( anIsDisplayColorScale )
- {
- SUIT_Session* session = SUIT_Session::session();
- SUIT_ResourceMgr* resMgr = session->resourceMgr();
-
- Standard_Real anXPos = resMgr->doubleValue( "Geometry", "scalar_bar_x_position", 0.05 );
- Standard_Real anYPos = resMgr->doubleValue( "Geometry", "scalar_bar_y_position", 0.1 );
- Standard_Real aWidth = resMgr->doubleValue( "Geometry", "scalar_bar_width", 0.2 );
- Standard_Real aHeight = resMgr->doubleValue( "Geometry", "scalar_bar_height", 0.5 );
- Standard_Integer aTextHeight = resMgr->integerValue( "Geometry", "scalar_bar_text_height", 14 );
- Standard_Integer aNbIntervals = resMgr->integerValue( "Geometry", "scalar_bar_nb_intervals", 20 );
-
-#if OCC_VERSION_MAJOR < 7
- Handle(Aspect_ColorScale) myColorScale = aView->ColorScale();
- if( !myColorScale.IsNull() )
+ view->setColorScaleShown( visible );
+ } // if ( view->isVisible( io ) )
+ else
{
- myColorScale->SetXPosition( anXPos );
- myColorScale->SetYPosition( anYPos );
- myColorScale->SetWidth( aWidth );
- myColorScale->SetHeight( aHeight );
-#else
- Standard_Integer aWinWidth = 0, aWinHeight = 0;
- aView->Window()->Size (aWinWidth, aWinHeight);
-
- myColorScale->SetPosition (aWinWidth*anXPos, aWinHeight*anYPos);
- //myColorScale->SetBreadth (aWinWidth); // ???
- myColorScale->SetBreadth (aWinWidth*aWidth); // ???
- myColorScale->SetHeight (aWinHeight*aHeight);
-#endif
-
- myColorScale->SetRange( aColorScaleMin, aColorScaleMax );
- myColorScale->SetNumberOfIntervals( anIsBoolean ? 2 : aNbIntervals );
-
- myColorScale->SetTextHeight( aTextHeight );
- myColorScale->SetTitle( aColorScaleTitle );
-
-#if OCC_VERSION_MAJOR < 7
+ view->setColorScaleShown( false );
}
- if( !aView->ColorScaleIsDisplayed() )
- aView->ColorScaleDisplay();
- }
- else
- if( aView->ColorScaleIsDisplayed() )
- aView->ColorScaleErase();
-#else
- if( !aViewModel->getAISContext()->IsDisplayed( myColorScale ) )
- aViewModel->getAISContext()->Display( myColorScale, Standard_True);
- }
- else
- if( aViewModel->getAISContext()->IsDisplayed( myColorScale ) )
- aViewModel->getAISContext()->Erase( myColorScale, Standard_True );
-#endif
+ } // foreach( SUIT_ViewWindow* window, windows )
+}
- if( theIsRedisplayFieldSteps )
- {
- _PTR(Study) aStudyDS = getStudy()->studyDS();
- QList<SUIT_ViewManager*> vmList;
- myApp->viewManagers( vmList );
- for( QList<SUIT_ViewManager*>::Iterator vmIt = vmList.begin(); vmIt != vmList.end(); vmIt++ )
- {
- if( SUIT_ViewManager* aViewManager = *vmIt )
- {
- const ObjMap& anObjects = getStudy()->getObjectProperties( aViewManager->getGlobalId() );
- for( ObjMap::ConstIterator objIt = anObjects.begin(); objIt != anObjects.end(); objIt++ )
- {
- _PTR(SObject) aSObj( aStudyDS->FindObjectID( objIt.key().toLatin1().constData() ) );
- if( aSObj )
- {
- CORBA::Object_var anObject = GeometryGUI::ClientSObjectToObject( aSObj );
- if( !CORBA::is_nil( anObject ) )
- {
- GEOM::GEOM_FieldStep_var aFieldStep = GEOM::GEOM_FieldStep::_narrow( anObject );
- if( !aFieldStep->_is_nil() )
- {
- CORBA::String_var aStepEntry = aFieldStep->GetStudyEntry();
- Handle(SALOME_InteractiveObject) aStepIO =
- new SALOME_InteractiveObject( aStepEntry.in(), "GEOM", "TEMP_IO" );
- Redisplay( aStepIO, false, false );
- }
- }
- }
- }
- }
- }
- }
- if(updateViewer)
- UpdateViewer();
+bool GEOM_Displayer::SetUpdateColorScale( bool toUpdate ) // IPAL54049
+{
+ bool previous = myUpdateColorScale;
+ myUpdateColorScale = toUpdate;
+ if ( myUpdateColorScale && !previous )
+ UpdateColorScale();
+ return previous;
}
+
#include <LightApp_Displayer.h>
#include <LightApp_Study.h>
#include <Aspect_TypeOfMarker.hxx>
-#if OCC_VERSION_MAJOR >= 7
- #include <AIS_ColorScale.hxx>
-#endif
#include <TCollection_AsciiString.hxx>
#include <TColStd_MapOfInteger.hxx>
-#include <Basics_OCCTVersion.hxx>
#include <QList>
#include <list>
virtual void BeforeErase ( SALOME_View*, const SALOME_OCCPrs* );
virtual void AfterErase ( SALOME_View*, const SALOME_OCCPrs* );
- /* This methos is used for activisation/deactivisation of objects to be displayed*/
+ /* This methods is used for activisation/deactivisation of objects to be displayed*/
void SetToActivate( const bool );
bool ToActivate() const;
SALOME_View* = 0);
/* Update visibility and parameters of the currently selected field step's color scale */
- void UpdateColorScale( const bool theIsRedisplayFieldSteps = false, const bool updateViewer = true );
- void SetUpdateColorScale(bool toUpdate) { myUpdateColorScale = toUpdate; } // IPAL54049
+ void UpdateColorScale();
+ bool SetUpdateColorScale(bool);
protected:
/* internal methods */
double& theFieldStepRangeMin,
double& theFieldStepRangeMax );
-#if OCC_VERSION_MAJOR < 7
- // Note: the method is copied from Aspect_ColorScale class
- static Standard_Integer HueFromValue( const Standard_Integer aValue,
- const Standard_Integer aMin,
- const Standard_Integer aMax );
-
- // Note: the method is copied from Aspect_ColorScale class
- static Standard_Boolean FindColor( const Standard_Real aValue,
- const Standard_Real aMin,
- const Standard_Real aMax,
- const Standard_Integer ColorsCount,
- Quantity_Color& aColor );
-#endif
-
protected:
Handle(SALOME_InteractiveObject) myIO;
TopoDS_Shape myShape;
std::string myTexture;
int myType;
SALOME_View* myViewFrame;
-#if OCC_VERSION_MAJOR >= 7
- Handle(AIS_ColorScale) myColorScale;
-#endif
- int myUpdateColorScale; // IPAL54049
+ bool myUpdateColorScale; // IPAL54049
// Attributes
Quantity_Color myShadingColor;
</message>
<message>
<source>GEOM_INERTIA_TITLE</source>
- <translation>Calculs Of Inertia</translation>
+ <translation>Calculus Of Inertia</translation>
</message>
<message>
<source>GEOM_INF_LOADED</source>
</message>
<message>
<source>GEOM_MINDIST_TITLE</source>
- <translation>Minimun Distance Between Two Objects</translation>
+ <translation>Minimum Distance Between Two Objects</translation>
</message>
<message>
<source>GEOM_MIRROR</source>
</message>
<message>
<source>GEOM_SKETCHER_ADD_PARAMS</source>
- <translation>Additionnal Parameters</translation>
+ <translation>Additional Parameters</translation>
</message>
<message>
<source>GEOM_SKETCHER_ANGLE</source>
</message>
<message>
<source>GEOM_CLOSEDUNCLOSED</source>
- <translation>Not defined, Closed or Opened. Possibly, error occured.</translation>
+ <translation>Not defined, Closed or Opened. Possibly, error occurred.</translation>
</message>
<message>
<source>GEOM_DISK_CIRCLE</source>
<translation>Rotation angle</translation>
</message>
</context>
+<context>
+ <name>TransformationGUI_OffsetDlg</name>
+ <message>
+ <source>GEOM_JOIN_BY_PIPES</source>
+ <translation>Join by pipes</translation>
+ </message>
+</context>
<context>
<name>OperationGUI_ExtractionDlg</name>
<message>
</message>
<message>
<source>GEOM_COMPSOLIDS</source>
- <translation type="unfinished">CompSolids</translation>
+ <translation>CompSolides</translation>
</message>
<message>
<source>GEOM_COMPOUND_TITLE</source>
<source>GEOM_DIMENSIONS</source>
<translation>Dimensions</translation>
</message>
+ <message>
+ <source>GEOM_ANNOTATIONS</source>
+ <translation>Annotations</translation>
+ </message>
<message>
<source>GEOM_SKETCHER_DIST</source>
<translation>Distance</translation>
</message>
<message>
<source>GEOM_EDGES</source>
- <translation type="unfinished">Edges</translation>
+ <translation>Arêtes</translation>
</message>
<message>
<source>GEOM_EDGE_TITLE</source>
</message>
<message>
<source>GEOM_SOLIDS</source>
- <translation type="unfinished">Solids</translation>
+ <translation>Solides</translation>
</message>
<message>
<source>GEOM_SOLID_TITLE</source>
</message>
<message>
<source>PREF_SHAPE_ANNOTATIONS</source>
- <translation type="unfinished">Shape annotations</translation>
+ <translation>Annotations</translation>
</message>
<message>
<source>PREF_SHAPE_ANNOTATIONS_FONT</source>
- <translation type="unfinished">Font</translation>
+ <translation>Fonte</translation>
</message>
<message>
<source>PREF_SHAPE_ANNOTATIONS_FONT_COLOR</source>
- <translation type="unfinished">Font color</translation>
+ <translation>Couleur du texte</translation>
</message>
<message>
<source>PREF_SHAPE_ANNOTATIONS_LINE_COLOR</source>
- <translation type="unfinished">Line color</translation>
+ <translation>Couleur de la ligne</translation>
</message>
<message>
<source>PREF_SHAPE_ANNOTATIONS_LINE_WIDTH</source>
- <translation type="unfinished">Line width</translation>
+ <translation>Epaisseur de la ligne</translation>
</message>
<message>
<source>PREF_SHAPE_ANNOTATIONS_LINE_STYLE</source>
- <translation type="unfinished">Line style</translation>
+ <translation>Style de la ligne</translation>
</message>
<message>
<source>PREF_SHAPE_ANNOTATIONS_AUTOHIDE</source>
- <translation type="unfinished">Hide when attachment is invisible</translation>
+ <translation>Cacher quand l'objet attaché est invisible</translation>
</message>
<message>
<source>PREF_SHAPE_ANNOTATIONS_LINESTYLE_SOLID</source>
- <translation type="unfinished">Solid</translation>
+ <translation>Continu</translation>
</message>
<message>
<source>PREF_SHAPE_ANNOTATIONS_LINESTYLE_DASH</source>
- <translation type="unfinished">Dashed</translation>
+ <translation>Tirets</translation>
</message>
<message>
<source>PREF_SHAPE_ANNOTATIONS_LINESTYLE_DOT</source>
- <translation type="unfinished">Dotted</translation>
+ <translation>Points</translation>
</message>
<message>
<source>PREF_SHAPE_ANNOTATIONS_LINESTYLE_DOTDASH</source>
- <translation type="unfinished">Mixed</translation>
+ <translation>Mélangé</translation>
</message>
<message>
<source>PREF_HIDE_INPUT_OBJECT</source>
<source>STB_MANAGE_DIMENSIONS</source>
<translation>Gérer la cotation d'un objet</translation>
</message>
+ <message>
+ <source>TOP_ANNOTATION</source>
+ <translation>Annotation</translation>
+ </message>
+ <message>
+ <source>MEN_ANNOTATION</source>
+ <translation>Annotation</translation>
+ </message>
+ <message>
+ <source>STB_ANNOTATION</source>
+ <translation>Annotation</translation>
+ </message>
+ <message>
+ <source>TOP_EDIT_ANNOTATION</source>
+ <translation>Editer une annotation</translation>
+ </message>
+ <message>
+ <source>MEN_EDIT_ANNOTATION</source>
+ <translation>Editer</translation>
+ </message>
+ <message>
+ <source>STB_EDIT_ANNOTATION</source>
+ <translation>Editer une annotation</translation>
+ </message>
+ <message>
+ <source>TOP_DELETE_ANNOTATION</source>
+ <translation>Supprimer l'annotation</translation>
+ </message>
+ <message>
+ <source>MEN_DELETE_ANNOTATION</source>
+ <translation>Supprimer</translation>
+ </message>
+ <message>
+ <source>STB_DELETE_ANNOTATION</source>
+ <translation>Supprimer l'annotation</translation>
+ </message>
<message>
<source>MEN_POP_SHOW_DEPENDENCY_TREE</source>
<translation>Montrer l'arbre des dépendances</translation>
</message>
<message>
<source>MEN_POP_SHOW_ALL_ANNOTATIONS</source>
- <translation type="unfinished">Show all annotations</translation>
+ <translation>Montrer toutes les annotations</translation>
</message>
<message>
<source>STB_POP_SHOW_ALL_ANNOTATIONS</source>
- <translation type="unfinished">Show all shape annotations for the object</translation>
+ <translation>Montrer toutes les annotations pour l'objet</translation>
</message>
<message>
<source>TOP_POP_SHOW_ALL_ANNOTATIONS</source>
- <translation type="unfinished">Show all shape annotations for the object</translation>
+ <translation>Montrer toutes les annotations pour l'objet</translation>
</message>
<message>
<source>MEN_POP_HIDE_ALL_ANNOTATIONS</source>
- <translation type="unfinished">Hide all annotations</translation>
+ <translation>Cacher toutes les annotations</translation>
</message>
<message>
<source>STB_POP_HIDE_ALL_ANNOTATIONS</source>
- <translation type="unfinished">Hide all shape annotations for the object</translation>
+ <translation>Cacher toutes les annotations pour l'objet</translation>
</message>
<message>
<source>TOP_POP_HIDE_ALL_ANNOTATIONS</source>
- <translation type="unfinished">Hide all shape annotations for the object</translation>
+ <translation>Cacher toutes les annotations pour l'objet</translation>
</message>
<message>
<source>TOP_POP_AUTO_COLOR</source>
</message>
<message>
<source>TOP_EXTRACTION</source>
- <translation type="unfinished">Extract and Rebuild</translation>
+ <translation>Extrait et reconstruit</translation>
</message>
<message>
<source>MEN_EXTRACTION</source>
- <translation type="unfinished">Extract and Rebuild</translation>
+ <translation>Extrait et reconstruit</translation>
</message>
<message>
<source>STB_EXTRACTION</source>
- <translation type="unfinished">Extract and Rebuild</translation>
+ <translation>Extrait et reconstruit</translation>
</message>
<message>
<source>TOP_EXTENSION</source>
- <translation>Extend Edge or Face</translation>
+ <translation>Etend l'arête ou la face</translation>
</message>
<message>
<source>MEN_EXTENSION</source>
</message>
<message>
<source>STB_EXTENSION</source>
- <translation>Extend Edge or Face</translation>
+ <translation>Etend l'arête ou la face</translation>
</message>
<message>
<source>GEOM_PUBLISH_RESULT_GRP</source>
Please specify suitable arguments.</translation>
</message>
</context>
+<context>
+ <name>MeasureGUI_AnnotationDlg</name>
+ <message>
+ <source>CREATE_ANNOTATION_TITLE</source>
+ <translation>Créer une annotation</translation>
+ </message>
+ <message>
+ <source>EDIT_ANNOTATION_TITLE</source>
+ <translation>Editer une annotation</translation>
+ </message>
+ <message>
+ <source>ANNOTATION_PREFIX</source>
+ <translation>Annotation</translation>
+ </message>
+ <message>
+ <source>ANNOTATION_NAME</source>
+ <translation>Nom de l'annotation</translation>
+ </message>
+ <message>
+ <source>ANNOTATION_PROPERTIES</source>
+ <translation>Propriétés</translation>
+ </message>
+ <message>
+ <source>ANNOTATION_TEXT</source>
+ <translation>Texte</translation>
+ </message>
+ <message>
+ <source>ANNOTATION_SHAPE</source>
+ <translation>Pièce</translation>
+ </message>
+ <message>
+ <source>ANNOTATION_TYPE</source>
+ <translation>Type</translation>
+ </message>
+ <message>
+ <source>ANNOTATION_SUB_SHAPE</source>
+ <translation>Type du sous-objet</translation>
+ </message>
+ <message>
+ <source>ANNOTATION_IS_SCREEN_FIXED</source>
+ <translation>Position fixe sur l'écran</translation>
+ </message>
+ <message>
+ <source>WHOLE_SHAPE</source>
+ <translation>Toute la pièce</translation>
+ </message>
+ <message>
+ <source>ANNOTATION_STYLE</source>
+ <translation>Style</translation>
+ </message>
+ <message>
+ <source>ANNOTATION_FONT</source>
+ <translation>Fonte</translation>
+ </message>
+</context>
<context>
<name>MeasureGUI_CheckShapeDlg</name>
<message>
<name>OperationGUI_ExtractionDlg</name>
<message>
<source>GEOM_EXTRACT_TITLE</source>
- <translation type="unfinished">Extract and Rebuild</translation>
+ <translation>Extrait et reconstruit</translation>
</message>
<message>
<source>GEOM_EXTRACT_TYPE</source>
- <translation type="unfinished">Extraction type</translation>
+ <translation>Type d'extraction</translation>
</message>
<message>
<source>GEOM_EXTRACT_INPUT_PARAMS</source>
- <translation type="unfinished">Input parameters</translation>
+ <translation>Paramètres d'entrée</translation>
</message>
<message>
<source>GEOM_EXTRACT_STATISTICS</source>
- <translation type="unfinished">Statistics</translation>
+ <translation>Statistiques</translation>
</message>
<message>
<source>GEOM_EXTRACT_SUB_SHAPE_TYPE</source>
- <translation type="unfinished">Sub-shape type</translation>
+ <translation>Type de sous-objet</translation>
</message>
<message>
<source>GEOM_EXTRACT_FILTERED_SHAPES</source>
- <translation type="unfinished">Filtered shapes</translation>
+ <translation>Objets filtrés</translation>
</message>
<message>
<source>GEOM_EXTRACT_SHAPES_TO_EXTRACT</source>
- <translation type="unfinished">Shapes to extract</translation>
+ <translation>Objets à extraire</translation>
</message>
<message>
<source>GEOM_EXTRACT_REBUILD</source>
- <translation type="unfinished">Rebuild</translation>
+ <translation>Reconstruit</translation>
</message>
<message>
<source>GEOM_EXTRACT_REMOVED</source>
- <translation type="unfinished">Removed</translation>
+ <translation>Supprimé</translation>
</message>
<message>
<source>GEOM_EXTRACT_MODIFIED</source>
- <translation type="unfinished">Modified</translation>
+ <translation>Modifié</translation>
</message>
<message>
<source>GEOM_EXTRACT_ADDED</source>
- <translation type="unfinished">Added</translation>
+ <translation>Ajouté</translation>
</message>
<message>
<source>GEOM_EXTRACT_NAME</source>
- <translation type="unfinished">Extraction</translation>
+ <translation>Extraction</translation>
</message>
</context>
</TS>
<source>GEOM_DIMENSIONS</source>
<translation>寸法</translation>
</message>
+ <message>
+ <source>GEOM_ANNOTATIONS</source>
+ <translation>注釈</translation>
+ </message>
<message>
<source>GEOM_SKETCHER_DIST</source>
<translation>距離</translation>
</message>
<message>
<source>PREF_SHAPE_ANNOTATIONS</source>
- <translation type="unfinished">Shape annotations</translation>
+ <translation>形状の注釈</translation>
</message>
<message>
<source>PREF_SHAPE_ANNOTATIONS_FONT</source>
- <translation type="unfinished">Font</translation>
+ <translation>フォント</translation>
</message>
<message>
<source>PREF_SHAPE_ANNOTATIONS_FONT_COLOR</source>
- <translation type="unfinished">Font color</translation>
+ <translation>フォント色</translation>
</message>
<message>
<source>PREF_SHAPE_ANNOTATIONS_LINE_COLOR</source>
- <translation type="unfinished">Line color</translation>
+ <translation>線色</translation>
</message>
<message>
<source>PREF_SHAPE_ANNOTATIONS_LINE_WIDTH</source>
- <translation type="unfinished">Line width</translation>
+ <translation>線幅</translation>
</message>
<message>
<source>PREF_SHAPE_ANNOTATIONS_LINE_STYLE</source>
- <translation type="unfinished">Line style</translation>
+ <translation>線スタイル</translation>
</message>
<message>
<source>PREF_SHAPE_ANNOTATIONS_AUTOHIDE</source>
- <translation type="unfinished">Hide when attachment is invisible</translation>
+ <translation>添付が見えない時に非表示</translation>
</message>
<message>
<source>PREF_SHAPE_ANNOTATIONS_LINESTYLE_SOLID</source>
- <translation type="unfinished">Solid</translation>
+ <translation>ソリッド</translation>
</message>
<message>
<source>PREF_SHAPE_ANNOTATIONS_LINESTYLE_DASH</source>
- <translation type="unfinished">Dashed</translation>
+ <translation>ダッシュ</translation>
</message>
<message>
<source>PREF_SHAPE_ANNOTATIONS_LINESTYLE_DOT</source>
- <translation type="unfinished">Dotted</translation>
+ <translation>ドット</translation>
</message>
<message>
<source>PREF_SHAPE_ANNOTATIONS_LINESTYLE_DOTDASH</source>
- <translation type="unfinished">Mixed</translation>
+ <translation>混合</translation>
</message>
<message>
<source>PREF_HIDE_INPUT_OBJECT</source>
<source>STB_MANAGE_DIMENSIONS</source>
<translation>オブジェクトの基準寸法を管理</translation>
</message>
+ <message>
+ <source>TOP_ANNOTATION</source>
+ <translation>注記</translation>
+ </message>
+ <message>
+ <source>MEN_ANNOTATION</source>
+ <translation>注記</translation>
+ </message>
+ <message>
+ <source>STB_ANNOTATION</source>
+ <translation>注記</translation>
+ </message>
+ <message>
+ <source>TOP_EDIT_ANNOTATION</source>
+ <translation>注記の編集</translation>
+ </message>
+ <message>
+ <source>MEN_EDIT_ANNOTATION</source>
+ <translation>編集</translation>
+ </message>
+ <message>
+ <source>STB_EDIT_ANNOTATION</source>
+ <translation>注記の編集</translation>
+ </message>
+ <message>
+ <source>TOP_DELETE_ANNOTATION</source>
+ <translation>注記の削除</translation>
+ </message>
+ <message>
+ <source>MEN_DELETE_ANNOTATION</source>
+ <translation>削除</translation>
+ </message>
+ <message>
+ <source>STB_DELETE_ANNOTATION</source>
+ <translation>注記の削除</translation>
+ </message>
<message>
<source>MEN_POP_SHOW_DEPENDENCY_TREE</source>
<translation>依存ツリーの表示</translation>
</message>
<message>
<source>MEN_POP_SHOW_ALL_ANNOTATIONS</source>
- <translation type="unfinished">Show all annotations</translation>
+ <translation>全ての注釈を表示</translation>
</message>
<message>
<source>STB_POP_SHOW_ALL_ANNOTATIONS</source>
- <translation type="unfinished">Show all shape annotations for the object</translation>
+ <translation>対象オブジェクトにある全ての形状注釈を表示</translation>
</message>
<message>
<source>TOP_POP_SHOW_ALL_ANNOTATIONS</source>
- <translation type="unfinished">Show all shape annotations for the object</translation>
+ <translation>対象オブジェクトにある全ての形状注釈を表示</translation>
</message>
<message>
<source>MEN_POP_HIDE_ALL_ANNOTATIONS</source>
- <translation type="unfinished">Hide all annotations</translation>
+ <translation>全ての注釈を非表示</translation>
</message>
<message>
<source>STB_POP_HIDE_ALL_ANNOTATIONS</source>
- <translation type="unfinished">Hide all shape annotations for the object</translation>
+ <translation>対象オブジェクトにある全ての形状注釈の非表示</translation>
</message>
<message>
<source>TOP_POP_HIDE_ALL_ANNOTATIONS</source>
- <translation type="unfinished">Hide all shape annotations for the object</translation>
+ <translation>対象オブジェクトにある全ての形状注釈を非表示</translation>
</message>
<message>
<source>TOP_POP_AUTO_COLOR</source>
<translation>寸法は具体的に明記された引数のために作られることは不可能です.適した引数を明記してください.</translation>
</message>
</context>
+ <context>
+ <name>MeasureGUI_AnnotationDlg</name>
+ <message>
+ <source>CREATE_ANNOTATION_TITLE</source>
+ <translation>注釈の作成</translation>
+ </message>
+ <message>
+ <source>EDIT_ANNOTATION_TITLE</source>
+ <translation>注釈の編集</translation>
+ </message>
+ <message>
+ <source>ANNOTATION_PREFIX</source>
+ <translation>Annotation</translation>
+ </message>
+ <message>
+ <source>ANNOTATION_NAME</source>
+ <translation>注釈名</translation>
+ </message>
+ <message>
+ <source>ANNOTATION_PROPERTIES</source>
+ <translation>プロパティ</translation>
+ </message>
+ <message>
+ <source>ANNOTATION_TEXT</source>
+ <translation>テキスト</translation>
+ </message>
+ <message>
+ <source>ANNOTATION_SHAPE</source>
+ <translation>形状</translation>
+ </message>
+ <message>
+ <source>ANNOTATION_TYPE</source>
+ <translation>タイプ</translation>
+ </message>
+ <message>
+ <source>ANNOTATION_SUB_SHAPE</source>
+ <translation>副形状タイプ</translation>
+ </message>
+ <message>
+ <source>ANNOTATION_IS_SCREEN_FIXED</source>
+ <translation>スクリーン位置の固定</translation>
+ </message>
+ <message>
+ <source>WHOLE_SHAPE</source>
+ <translation>形状全体</translation>
+ </message>
+ <message>
+ <source>ANNOTATION_STYLE</source>
+ <translation>スタイル</translation>
+ </message>
+ <message>
+ <source>ANNOTATION_FONT</source>
+ <translation>注釈のフォント</translation>
+ </message>
+ </context>
<context>
<name>MeasureGUI_CheckShapeDlg</name>
<message>
#include <SALOMEDS_SObject.hxx>
-#include <Basics_OCCTVersion.hxx>
#include <QtxFontEdit.h>
// External includes
anObj = anORB->string_to_object(aValue.c_str());
}
} catch(...) {
- INFOS("ClientSObjectToObject - Unknown exception was occured!!!");
+ INFOS("ClientSObjectToObject - Unknown exception has occurred!!!");
}
return anObj._retn();
}
myTextTreeWdg = 0;
myAnnotationMgr = 0;
- connect( Material_ResourceMgr::resourceMgr(), SIGNAL( changed() ), this, SLOT( updateMaterials() ) );
+ connect( Material_ResourceMgr::resourceMgr(), SIGNAL( changed() ), this, SLOT( updateMaterials() ), Qt::UniqueConnection );
Q_INIT_RESOURCE( GEOMGUI );
}
case GEOMOp::OpFace: // MENU BUILD - FACE
case GEOMOp::OpShell: // MENU BUILD - SHELL
case GEOMOp::OpSolid: // MENU BUILD - SOLID
- case GEOMOp::OpCompound: // MENU BUILD - COMPUND
+ case GEOMOp::OpCompound: // MENU BUILD - COMPOUND
libName = "BuildGUI";
break;
case GEOMOp::OpFuse: // MENU BOOLEAN - FUSE
// end of GEOM plugins loading
connect( application()->desktop(), SIGNAL( windowActivated( SUIT_ViewWindow* ) ),
- this, SLOT( onWindowActivated( SUIT_ViewWindow* ) ) );
+ this, SLOT( onWindowActivated( SUIT_ViewWindow* ) ), Qt::UniqueConnection );
// Reset actions accelerator keys
action(GEOMOp::OpDelete)->setEnabled( true ); // Delete: Key_Delete
LightApp_SelectionMgr* sm = getApp()->selectionMgr();
- connect( sm, SIGNAL( currentSelectionChanged() ), this, SLOT( updateCreationInfo() ));
- connect( sm, SIGNAL( currentSelectionChanged() ), this, SLOT( onAutoBringToFront() ));
- connect( sm, SIGNAL( currentSelectionChanged() ), this, SLOT( updateFieldColorScale() ));
+ connect( sm, SIGNAL( currentSelectionChanged() ), this, SLOT( updateCreationInfo() ), Qt::UniqueConnection );
+ connect( sm, SIGNAL( currentSelectionChanged() ), this, SLOT( onAutoBringToFront() ), Qt::UniqueConnection );
+ connect( sm, SIGNAL( currentSelectionChanged() ), this, SLOT( updateFieldColorScale() ), Qt::UniqueConnection );
if ( !myCreationInfoWdg )
myCreationInfoWdg = new GEOMGUI_CreationInfoWdg( getApp() );
QMenu* viewMenu = menuMgr()->findMenu( STD_Application::MenuViewId );
if ( viewMenu )
- connect( viewMenu, SIGNAL( aboutToShow() ), this, SLOT( onViewAboutToShow() ) );
+ connect( viewMenu, SIGNAL( aboutToShow() ), this, SLOT( onViewAboutToShow() ), Qt::UniqueConnection );
// 0020836 (Basic vectors and origin)
SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
LightApp_SelectionMgr* selMrg = getApp()->selectionMgr();
disconnect( selMrg, SIGNAL( currentSelectionChanged() ), this, SLOT( updateCreationInfo() ));
- disconnect( selMrg, SIGNAL( currentSelectionChanged() ), this, SLOT( updateFieldColorScale() ));
+ //disconnect( selMrg, SIGNAL( currentSelectionChanged() ), this, SLOT( updateFieldColorScale() ));
if ( myCreationInfoWdg ) {
getApp()->removeDockWindow( myCreationInfoWdg->getWinID() );
myCreationInfoWdg = 0;
param == QString("scalar_bar_height") ||
param == QString("scalar_bar_text_height") ||
param == QString("scalar_bar_nb_intervals")) {
- GEOM_Displayer aDisplayer;
- bool anIsRedisplayFieldSteps = param == QString("scalar_bar_nb_intervals");
- aDisplayer.UpdateColorScale( anIsRedisplayFieldSteps, true );
+ updateFieldColorScale();
}
else if ( param == QString("dimensions_color") ||
param == QString("dimensions_line_width") ||
_PTR(SObject) obj( studyDS->FindObjectID( o_it.key().toLatin1().data() ) );
if ( !obj || !(aProps.count() > 0))
continue;
- // entry is "encoded" = it does NOT contain component adress, since it is a
+ // entry is "encoded" = it does NOT contain component address, since it is a
// subject to change on next component loading
std::string entry = ip->encodeEntry(o_it.key().toLatin1().data(), componentName);
for (std::vector<std::string>::iterator entIt = entries.begin(); entIt != entries.end(); ++entIt)
{
- // entry is a normal entry - it should be "decoded" (setting base adress of component)
+ // entry is a normal entry - it should be "decoded" (setting base address of component)
QString entry (ip->decodeEntry(*entIt).c_str());
// Check that the entry corresponds to a real object in the Study
#include "GEOM_GEOMGUI.hxx"
-#include <Basics_OCCTVersion.hxx>
-
#include <SalomeApp_Module.h>
#include <GEOM_Client.hxx>
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_3DSketcherDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_3DSketcherDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
if (aShape.IsNull()) return 0;
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOMImpl_3DSketcherDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT(GEOMImpl_3DSketcherDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_3DSketcherDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_3DSketcherDriver() {};
Standard_EXPORT virtual bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_3DSketcherDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_3DSketcherDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_ArcDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_ArcDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ArcDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ArcDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_ArcDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_ArcDriver() {};
Standard_EXPORT virtual bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_ArcDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_ArcDriver,GEOM_BaseDriver)
};
#endif
#include "Archimede_VolumeSection.hxx"
-#include <Basics_OCCTVersion.hxx>
-
#include <stdio.h>
#include <BRepBuilderAPI_MakeFace.hxx>
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_ArchimedeDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_ArchimedeDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
aFunction->SetValue(tirant);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ArchimedeDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ArchimedeDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_ArchimedeDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_ArchimedeDriver() {};
Standard_EXPORT virtual bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_ArchimedeDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_ArchimedeDriver,GEOM_BaseDriver)
};
#endif
#include "utilities.h"
-#include <Basics_OCCTVersion.hxx>
-
#include <BRep_Tool.hxx>
#include <BRep_TFace.hxx>
#include <BRep_Builder.hxx>
if (!theResult.IsNull()) {
// try to deal with result of BRepBuilderAPI_MakeFace + ShHealOper_ShapeProcess
-#if OCC_VERSION_LARGE >= 0x06080000
#ifdef MAKE_FACE_PCURVES_FIX_TOLERANCE
// check and fix pcurves, if necessary
Standard_Real aT, aTolE, aD, aDMax;
for (; aDMETolIt.More(); aDMETolIt.Next()) {
sat.LimitTolerance(aDMETolIt.Key(), aDMETolIt.Value());
}
-#endif
#endif
}
else {
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_BlockDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_BlockDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_BlockDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_BlockDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_BlockDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_BlockDriver() {};
const Standard_Integer theNbIterV,
TopoDS_Shape& theResult) const;
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_BlockDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_BlockDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_BooleanDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_BooleanDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
if (isCheckSelfInte) {
BOPAlgo_CheckerSI aCSI; // checker of self-interferences
aCSI.SetLevelOfCheck(BOP_SELF_INTERSECTIONS_LEVEL);
- BOPCol_ListOfShape aList1, aList2;
+ TopTools_ListOfShape aList1, aList2;
aList1.Append(aShape1);
aList2.Append(aShape2);
aCSI.SetArguments(aList1);
aCSI.Perform();
-#if OCC_VERSION_LARGE > 0x07010001
if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0)
-#else
- if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0)
-#endif
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected");
aCSI.SetArguments(aList2);
aCSI.Perform();
-#if OCC_VERSION_LARGE > 0x07010001
if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0)
-#else
- if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0)
-#endif
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected");
}
if (isCheckSelfInte) {
aCSI.SetLevelOfCheck(BOP_SELF_INTERSECTIONS_LEVEL);
- BOPCol_ListOfShape aList1;
+ TopTools_ListOfShape aList1;
aList1.Append(aShape);
aCSI.SetArguments(aList1);
aCSI.Perform();
-#if OCC_VERSION_LARGE > 0x07010001
if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) {
-#else
- if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) {
-#endif
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected");
}
}
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is not valid");
if (isCheckSelfInte) {
- BOPCol_ListOfShape aList2;
+ TopTools_ListOfShape aList2;
aList2.Append(aShape2);
aCSI.SetArguments(aList2);
aCSI.Perform();
-#if OCC_VERSION_LARGE > 0x07010001
if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) {
-#else
- if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) {
-#endif
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected");
}
}
if (isCheckSelfInte) {
aCSI.SetLevelOfCheck(BOP_SELF_INTERSECTIONS_LEVEL);
- BOPCol_ListOfShape aList1;
+ TopTools_ListOfShape aList1;
aList1.Append(aShape);
aCSI.SetArguments(aList1);
aCSI.Perform();
-#if OCC_VERSION_LARGE > 0x07010001
if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) {
-#else
- if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) {
-#endif
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected");
}
}
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is not valid");
if (isCheckSelfInte) {
- BOPCol_ListOfShape aList2;
+ TopTools_ListOfShape aList2;
aList2.Append(aTool);
aCSI.SetArguments(aList2);
aCSI.Perform();
-#if OCC_VERSION_LARGE > 0x07010001
if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) {
-#else
- if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) {
-#endif
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected");
}
}
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
}
}
- BOPCol_ListOfShape aListShapes;
+ TopTools_ListOfShape aListShapes;
BOPTools_AlgoTools::MakeConnexityBlocks(aFaces, TopAbs_EDGE, TopAbs_FACE, aListShapes);
if (aListShapes.IsEmpty())
TopoDS_Compound aResult;
B.MakeCompound(aResult);
- BOPCol_ListIteratorOfListOfShape anIter(aListShapes);
+ TopTools_ListIteratorOfListOfShape anIter(aListShapes);
for (; anIter.More(); anIter.Next()) {
TopoDS_Shell aShell;
TopoDS_Shape aStepResult = BO.Shape();
// check result of this step: if it is a compound (boolean operations
- // allways return a compound), we add all sub-shapes of it.
+ // always return a compound), we add all sub-shapes of it.
// This allows to avoid adding empty compounds,
// resulting from COMMON on two non-intersecting shapes.
if (aStepResult.ShapeType() == TopAbs_COMPOUND) {
-#if OCC_VERSION_MAJOR >= 7
if ((aValue1.ShapeType() == TopAbs_FACE || aValue1.ShapeType() == TopAbs_SHELL) &&
(aValue2.ShapeType() == TopAbs_FACE || aValue2.ShapeType() == TopAbs_SHELL)) {
aStepResult = makeCompoundShellFromFaces(aStepResult);
}
-#endif
TopoDS_Iterator aCompIter (aStepResult);
for (; aCompIter.More(); aCompIter.Next()) {
// add shape in a result
}
if (isCompound) {
// check result of this step: if it is a compound (boolean operations
- // allways return a compound), we add all sub-shapes of it.
+ // always return a compound), we add all sub-shapes of it.
// This allows to avoid adding empty compounds,
// resulting from CUT of parts
if (aCut.ShapeType() == TopAbs_COMPOUND) {
-#if OCC_VERSION_MAJOR >= 7
if (itSub1.Value().ShapeType() == TopAbs_FACE ||
itSub1.Value().ShapeType() == TopAbs_SHELL) {
aCut = makeCompoundShellFromFaces(aCut);
}
-#endif
TopoDS_Iterator aCompIter (aCut);
for (; aCompIter.More(); aCompIter.Next()) {
// add shape in a result
// perform FUSE operation
else if (theType == BOOLEAN_FUSE) {
-#if OCC_VERSION_MAJOR >= 7
Standard_Boolean isFaces = Standard_False;
TopTools_ListOfShape listShape1, listShape2;
GEOMUtils::AddSimpleShapes(theShape1, listShape1);
}
}
}
-#endif
// Perform
BRepAlgoAPI_Fuse BO (theShape1, theShape2);
StdFail_NotDone::Raise("Fuse operation can not be performed on the given shapes");
}
aShape = BO.Shape();
-#if OCC_VERSION_MAJOR >= 7
if (isFaces)
aShape = makeCompoundShellFromFaces(aShape);
-#endif
}
// perform SECTION operation
TopoDS_Shape aStepResult = BO.Shape();
// check result of this step: if it is a compound (boolean operations
- // allways return a compound), we add all sub-shapes of it.
+ // always return a compound), we add all sub-shapes of it.
// This allows to avoid adding empty compounds,
// resulting from SECTION on two non-intersecting shapes.
if (aStepResult.ShapeType() == TopAbs_COMPOUND) {
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_BooleanDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_BooleanDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_BooleanDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_BooleanDriver() {};
TopoDS_Shape makeCompoundShellFromFaces(const TopoDS_Shape theShape) const;
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_BooleanDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_BooleanDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_BoxDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_BoxDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_BoxDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_BoxDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_BoxDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_BoxDriver() {};
bool GetCreationInformation(std::string& theOperationNameName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_BoxDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_BoxDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_ChamferDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_ChamferDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
}
else if (aType == CHAMFER_SHAPE_EDGES || aType == CHAMFER_SHAPE_EDGES_AD)
{
- // chamfer on selected edges with lenght param D1 & D2.
+ // chamfer on selected edges with length param D1 & D2.
int aLen = aCI.GetLength();
int ind = 1;
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ChamferDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ChamferDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_ChamferDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_ChamferDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_ChamferDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_ChamferDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_CircleDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_CircleDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_CircleDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_CircleDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_CircleDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_CircleDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_CircleDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_CircleDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_ConeDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_ConeDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
}
if (aShape.IsNull()) return 0;
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
aFunction->SetValue(aShape);
return 1;
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ConeDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ConeDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_ConeDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_ConeDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_ConeDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_ConeDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_CopyDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_CopyDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
aFunction->SetValue(aCopy);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
* \brief Performs Transfer Data operation.
*/
//================================================================================
-Standard_Integer GEOMImpl_CopyDriver::transferData(LOGBOOK& log) const
+Standard_Integer GEOMImpl_CopyDriver::transferData(Handle(TFunction_Logbook)& log) const
{
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
GEOMImpl_ITransferData aTD (aFunction);
return Standard_True;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_CopyDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_CopyDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_CopyDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_CopyDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_CopyDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_CopyDriver,GEOM_BaseDriver)
private:
- Standard_Integer transferData(LOGBOOK& log) const;
+ Standard_Integer transferData(Handle(TFunction_Logbook)& log) const;
Standard_Boolean getInPlace
(const TopoDS_Shape &theSourceShape,
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_CylinderDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_CylinderDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
if (aShape.IsNull()) return 0;
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_CylinderDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_CylinderDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_CylinderDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_CylinderDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_CylinderDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_CylinderDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_DiskDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_DiskDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_DiskDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_DiskDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_DiskDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_DiskDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_DiskDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_DiskDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_EllipseDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_EllipseDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_EllipseDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_EllipseDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_EllipseDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_EllipseDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_EllipseDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_EllipseDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_ExportDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_ExportDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
if( !GEOMImpl_IECallBack::GetCallBack( aFormatName )->Export( obj, aFileName, aFormatName ) );
return 0;
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return false;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ExportDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ExportDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_ExportDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_ExportDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_ExportDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_ExportDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_FaceDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_FaceDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_FaceDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_FaceDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_FaceDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_FaceDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_FaceDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_FaceDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_FieldDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_FieldDriver::Execute(Handle(TFunction_Logbook)& log) const
{
return 0;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_FieldDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_FieldDriver,GEOM_BaseDriver);
{
public:
Standard_EXPORT GEOMImpl_FieldDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_FieldDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_FieldDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_FieldDriver,GEOM_BaseDriver)
};
#endif
#include "GEOMImpl_Fillet1d.hxx"
-#include <Basics_OCCTVersion.hxx>
-
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepBuilderAPI_MakeEdge.hxx>
for(a = anInter.NbSegments(); a > 0; a--)
{
// Porting to DEV version of OCCT 10.02.2017 BEGIN
-#if OCC_VERSION_LARGE > 0x07010000
Standard_NotImplemented::Raise("The treatment of tangential intersection is not implemented");
-#else
- // This piece of code seems never worked, because:
- // 1. In case of two curves intersection
- // method Segment with TWO output curves HAS TO be used.
- // 2. Method Segment with ONE output curve (as below) just raises
- // Standard_NotImplemented exception since 05.03.2012 (at least)
- // and that is why has been eliminated 03.02.2017.
- anInter.Segment(a, aCurve);
- aPoint = aCurve->Value(aCurve->FirstParameter());
- if (aPoint.Distance(theStart) < aTol)
- if (!theStartConnected)
- return Standard_True;
- if (aPoint.Distance(theEnd) < aTol)
- return Standard_True;
- if (gp_Vec2d(aPoint, theStart).IsOpposite(gp_Vec2d(aPoint, theEnd), anAngTol))
- return Standard_True;
- aPoint = aCurve->Value(aCurve->LastParameter());
- if (aPoint.Distance(theStart) < aTol)
- if (!theStartConnected)
- return Standard_True;
- if (aPoint.Distance(theEnd) < aTol)
- return Standard_True;
- if (gp_Vec2d(aPoint, theStart).IsOpposite(gp_Vec2d(aPoint, theEnd), anAngTol))
- return Standard_True;
-#endif
// Porting to DEV version of OCCT 10.02.2017 END
}
return Standard_False;
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_Fillet1dDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_Fillet1dDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
}
aFunction->SetValue(aResult);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_Fillet1dDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_Fillet1dDriver,GEOM_BaseDriver);
Standard_EXPORT static const Standard_GUID& GetID();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
Standard_EXPORT bool MakeFillet(const TopoDS_Wire&, const TopTools_ListOfShape&,
const Standard_Real, bool, TopoDS_Wire&) const;
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_Fillet1dDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_Fillet1dDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_Fillet2dDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_Fillet2dDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
if (aShape.IsNull()) return 0;
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_Fillet2dDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_Fillet2dDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_Fillet2dDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_Fillet2dDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_Fillet2dDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_Fillet2dDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_FilletDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_FilletDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_FilletDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_FilletDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_FilletDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_FilletDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_FilletDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_FilletDriver,GEOM_BaseDriver)
};
#endif
#include <GEOM_Function.hxx>
-#include <Basics_OCCTVersion.hxx>
-
#include <BRepAlgo.hxx>
#include <BRepBuilderAPI_Copy.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_FillingDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_FillingDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
Handle(TColStd_HSequenceOfTransient) aConstraints = IF.GetShapes();
- for ( unsigned int ind = 1; ind <= aConstraints->Length(); ind++ ) {
+ for ( int ind = 1; ind <= aConstraints->Length(); ind++ ) {
TopoDS_Edge E;
TopoDS_Face F;
Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast( aConstraints->Value(ind) );
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
}
case FILLING_ON_CONSTRAINTS:
{
- theOperationName = "FACE";
+ theOperationName = "FACE";
AddParam( theParams, "Edges/Faces", aCI.GetShapes() );
break;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_FillingDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_FillingDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_FillingDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_FillingDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_FillingDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_FillingDriver,GEOM_BaseDriver)
};
#endif
#include "GEOMAlgo_CoupleOfShapes.hxx"
#include "GEOMAlgo_ListOfCoupleOfShapes.hxx"
-#include <Basics_OCCTVersion.hxx>
-
#include "utilities.h"
#include <BRep_Builder.hxx>
Standard_Failure::Raise(MSG_BAD_ARG_SHAPE);
break;
case 200:
- Standard_Failure::Raise("Error occured during check of geometric coincidence");
+ Standard_Failure::Raise("Error occurred during check of geometric coincidence");
break;
default:
{
Standard_Failure::Raise("Result shape is Null");
break;
case 200:
- Standard_Failure::Raise("Error occured during check of geometric coincidence");
+ Standard_Failure::Raise("Error occurred during check of geometric coincidence");
break;
default:
{
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_GlueDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_GlueDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
if (!aWrn.IsEmpty()) {
Standard_Failure::Raise(aWrn.ToCString());
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_GlueDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_GlueDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_GlueDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_GlueDriver() {};
const TopTools_MapOfShape& theShapesList,
const Standard_Boolean doGlueAllEdges);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_GlueDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_GlueDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_HealingDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_HealingDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
*stats = healer.GetStatistics();
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_HealingDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_HealingDriver,GEOM_BaseDriver);
Standard_EXPORT static const Standard_GUID& GetID();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static Standard_Boolean AreEdgesC1 (const TopoDS_Edge& E1, const TopoDS_Edge& E2);
Standard_EXPORT static void FuseCollinearEdges (const TopoDS_Shape&,
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_HealingDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_HealingDriver,GEOM_BaseDriver)
private:
Standard_Boolean ShapeProcess ( GEOMImpl_IHealing*, const TopoDS_Shape&, TopoDS_Shape& ) const;
#include <Standard_Stream.hxx>
-#include <Basics_OCCTVersion.hxx>
-
#include <GEOMImpl_I3DPrimOperations.hxx>
#include "utilities.h"
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- if (strcmp(aFail->GetMessageString(), "Geom_BSplineSurface") == 0)
+ catch (Standard_Failure& aFail) {
+ if (strcmp(aFail.GetMessageString(), "Geom_BSplineSurface") == 0)
SetErrorCode("B-Spline surface construction failed");
else
- SetErrorCode(aFail->GetMessageString());
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return anObj;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return anObj;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+ catch (Standard_Failure& aFail) {
SetErrorCode("RestorePath: inappropriate arguments given");
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+ catch (Standard_Failure& aFail) {
SetErrorCode("RestorePath: inappropriate arguments given");
return NULL;
}
#include <GEOMImpl_IBasicOperations.hxx>
-#include <Basics_OCCTVersion.hxx>
-
#include "utilities.h"
#include <OpUtil.hxx>
#include <Utils_ExceptHandlers.hxx>
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
#include <GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx>
#include <BlockFix_CheckTool.hxx>
-#include <Basics_OCCTVersion.hxx>
-
#include "utilities.h"
#include <OpUtil.hxx>
#include <Utils_ExceptHandlers.hxx>
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
anArray->SetValue(1, anIndices.FindIndex(anEdge));
aResult = GetEngine()->AddSubShape(theShape, anArray);
}
- } catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ } catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
anArray->SetValue(1, anIndices.FindIndex(aShape));
aResult = GetEngine()->AddSubShape(theShape, anArray);
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
aResult = GetEngine()->AddSubShape(theShape, anArray);
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
aResult = GetEngine()->AddSubShape(theShape, anArray);
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
anArray->SetValue(1, anIndices.FindIndex(aShape));
aResult = GetEngine()->AddSubShape(theShape, anArray);
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
aResult = GetEngine()->AddSubShape(theShape, anArray);
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
aResult = GetEngine()->AddSubShape(theShape, anArray);
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
aResult = GetEngine()->AddSubShape(theShape, anArray);
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
}
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return isCompOfBlocks;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
}
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return aBlocks;
}
aResult = GetEngine()->AddSubShape(theCompound, anArray);
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
anArray->SetValue(1, anIndices.FindIndex(aShape));
aResult = GetEngine()->AddSubShape(theCompound, anArray);
}
- } catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ } catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
}
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
#include <GEOMImpl_PartitionDriver.hxx>
#include <GEOMImpl_IPartition.hxx>
-#include <Basics_OCCTVersion.hxx>
-
#include <TDF_Tool.hxx>
#include "utilities.h"
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
#include "GEOMImpl_IIsoline.hxx"
#include "GEOMImpl_PolylineDumper.hxx"
-#include <Basics_OCCTVersion.hxx>
-
#include "utilities.h"
#include <TDF_Tool.hxx>
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
//Make a Python command
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
// Compute the isoline curve
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Polyline driver failed");
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
//Compute the isoline curve
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Polyline driver failed");
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
#include <ShHealOper_ModifStats.hxx>
#include <ShHealOper_ShapeProcess.hxx>
-#include <Basics_OCCTVersion.hxx>
-
#include <utilities.h>
#include <OpUtil.hxx>
#include <Utils_ExceptHandlers.hxx>
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;
}
}
- catch (Standard_Failure)
+ catch (Standard_Failure& aFail)
{
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ SetErrorCode(aFail.GetMessageString());
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;
}
}
- catch (Standard_Failure)
+ catch (Standard_Failure& aFail)
{
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ SetErrorCode(aFail.GetMessageString());
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;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
#include <GEOM_PythonDump.hxx>
#include "GEOM_ISubShape.hxx"
-#include <Basics_OCCTVersion.hxx>
-
#include "utilities.h"
#include <OpUtil.hxx>
#include <Utils_ExceptHandlers.hxx>
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
std::list<std::string>::const_iterator it;
for (it = lines.begin(); it != lines.end(); ++it) {
std::string line = *it;
- int lenline = (line.size()/8 + (line.size()%8 ? 1 : 0)) * 8;
- for (int i = 0; i < lenline/8; i++) {
+ size_t lenline = (line.size()/8 + (line.size()%8 ? 1 : 0)) * 8;
+ for (size_t i = 0; i < lenline/8; i++) {
unsigned char byte = 0;
for (int j = 0; j < 8; j++)
byte = (byte << 1) + ( i*8+j < line.size() && line[i*8+j] != '0' ? 1 : 0 );
return false;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return false;
}
#include "GEOM_Object.hxx"
#include "GEOM_Field.hxx"
-#include <Basics_OCCTVersion.hxx>
-
#include "Utils_SALOME_Exception.hxx"
#include <TDocStd_Document.hxx>
#include <GEOM_Function.hxx>
#include <GEOM_PythonDump.hxx>
-#include <Basics_OCCTVersion.hxx>
-
#include "utilities.h"
#include <OpUtil.hxx>
#include <Utils_ExceptHandlers.hxx>
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-#include <Basics_OCCTVersion.hxx>
-
#include <GEOMImpl_IMeasureOperations.hxx>
#include <GEOMImpl_IMeasure.hxx>
#include <GEOMImpl_MeasureDriver.hxx>
// OCCT Includes
#include <Bnd_Box.hxx>
#include <BOPAlgo_CheckerSI.hxx>
-#include <BOPCol_ListOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
#include <BOPDS_DS.hxx>
-#include <BOPDS_MapOfPassKey.hxx>
-#if OCC_VERSION_LARGE > 0x07010000
#include <BOPDS_MapOfPair.hxx>
#include <BOPDS_Pair.hxx>
-#endif
#include <BRepBndLib.hxx>
#include <BRepBuilderAPI_Copy.hxx>
#include <BRepCheck_ListIteratorOfListOfStatus.hxx>
#include <BRepClass_FaceClassifier.hxx>
#include <BRepExtrema_DistShapeShape.hxx>
#include <BRepExtrema_ShapeProximity.hxx>
-#if OCC_VERSION_LARGE > 0x06090000
#include <BRepExtrema_SelfIntersection.hxx>
#include <BRepExtrema_MapOfIntegerPackedMapOfInteger.hxx>
-#endif
#include <BRepGProp.hxx>
#include <BRepTools.hxx>
#include <BRep_Tool.hxx>
}
const GEOMAlgo_ShapeInfo& anInfo = aSF.Info();
- // specific processing for some "advandced" objects
+ // specific processing for some "advanced" objects
switch ( geom_type ) {
case GEOM_MARKER:
- // local coordinate systen
+ // local coordinate system
// (+) geompy.kind.LCS xc yc zc xx xy xz yx yy yz zx zy zz
TopoDS_Face aFace = TopoDS::Face( aShape );
theDoubles->Append(aP.Z());
}
break;
+ default:;
}
SetErrorCode(OK);
aDirZ.Coord(Zx, Zy, Zz);
aDirX.Coord(Xx, Xy, Xz);
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
}
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return;
}
GProp_PrincipalProps Pr = System.PrincipalProperties();
Pr.Moments(Ix,Iy,Iz);
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return;
}
B.Get(Xmin, Ymin, Zmin, Xmax, Ymax, Zmax);
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
VertMin = T;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return;
}
FillErrors(ana, aShape, theErrors);
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return false;
}
TopTools_IndexedMapOfShape anIndices;
TopExp::MapShapes(aScopy, anIndices);
- BOPCol_ListOfShape aLCS;
+ TopTools_ListOfShape aLCS;
aLCS.Append(aScopy);
//
BOPAlgo_CheckerSI aCSI; // checker of self-interferences
// 1. Launch the checker
aCSI.Perform();
-#if OCC_VERSION_LARGE > 0x07010001
Standard_Boolean iErr = aCSI.HasErrors();
-#else
- Standard_Integer iErr = aCSI.ErrorStatus();
-#endif
//
Standard_Integer aNbS, n1, n2;
-#if OCC_VERSION_LARGE > 0x07010000
BOPDS_MapIteratorOfMapOfPair aItMPK;
-#else
- BOPDS_MapIteratorMapOfPassKey aItMPK;
-#endif
//
// 2. Take the shapes from DS
const BOPDS_DS& aDS = aCSI.DS();
aNbS=aDS.NbShapes();
//
// 3. Get the pairs of interfered shapes
-#if OCC_VERSION_LARGE > 0x07010000
const BOPDS_MapOfPair& aMPK=aDS.Interferences();
-#else
- const BOPDS_MapOfPassKey& aMPK=aDS.Interferences();
-#endif
aItMPK.Initialize(aMPK);
for (; aItMPK.More(); aItMPK.Next()) {
-#if OCC_VERSION_LARGE > 0x07010000
const BOPDS_Pair& aPK=aItMPK.Value();
aPK.Indices(n1, n2);
-#else
- const BOPDS_PassKey& aPK=aItMPK.Value();
- aPK.Ids(n1, n2);
-#endif
//
if (n1 > aNbS || n2 > aNbS){
return false; // Error
//=============================================================================
bool GEOMImpl_IMeasureOperations::CheckSelfIntersectionsFast
(Handle(GEOM_Object) theShape,
- float theDeflection, double theTolerance,
+ float theDeflection, double theTolerance,
Handle(TColStd_HSequenceOfInteger)& theIntersections)
{
SetErrorCode(KO);
TopTools_IndexedMapOfShape anIndices;
TopExp::MapShapes(aScopy, anIndices);
-#if OCC_VERSION_LARGE > 0x06090000
// Checker of fast interferences
BRepExtrema_SelfIntersection aTool(aScopy, (theTolerance <= 0.) ? 0.0 : theTolerance);
if (aTool.IsDone())
SetErrorCode(OK);
-#endif
return theIntersections->IsEmpty();
}
TopExp::MapShapes(aScopy1, anIndices1);
TopExp::MapShapes(aScopy2, anIndices2);
- BOPCol_ListOfShape aLCS1, aLCS2;
+ TopTools_ListOfShape aLCS1, aLCS2;
aLCS1.Append(aScopy1); aLCS2.Append(aScopy2);
//
BRepExtrema_ShapeProximity aBSP; // checker of fast interferences
aBSP.Perform();
// 2. Get sets of IDs of overlapped faces
-#if OCC_VERSION_LARGE > 0x06090000
for (BRepExtrema_MapOfIntegerPackedMapOfInteger::Iterator anIt1 (aBSP.OverlapSubShapes1()); anIt1.More(); anIt1.Next())
-#else
- for (BRepExtrema_OverlappedSubShapes::Iterator anIt1 (aBSP.OverlapSubShapes1()); anIt1.More(); anIt1.Next())
-#endif
{
const TopoDS_Shape& aS1 = aBSP.GetSubShape1(anIt1.Key());
theIntersections1->Append(anIndices1.FindIndex(aS1));
}
-#if OCC_VERSION_LARGE > 0x06090000
for (BRepExtrema_MapOfIntegerPackedMapOfInteger::Iterator anIt2 (aBSP.OverlapSubShapes2()); anIt2.More(); anIt2.Next())
-#else
- for (BRepExtrema_OverlappedSubShapes::Iterator anIt2 (aBSP.OverlapSubShapes2()); anIt2.More(); anIt2.Next())
-#endif
{
const TopoDS_Shape& aS2 = aBSP.GetSubShape2(anIt2.Key());
theIntersections2->Append(anIndices2.FindIndex(aS2));
aListOfShape.Append(s);
nbTypes[s.ShapeType()]++;
if ((sp.ShapeType() == TopAbs_COMPOUND) || (sp.ShapeType() == TopAbs_COMPSOLID)) {
- nbFlatType[s.ShapeType()]++;
+ nbFlatType[s.ShapeType()]++;
}
}
}
if ((aShape.ShapeType() == TopAbs_COMPOUND) || (aShape.ShapeType() == TopAbs_COMPSOLID)){
Astr = Astr + " --------------------- \n Flat content : \n";
if (nbFlatType[TopAbs_VERTEX] > 0)
- Astr = Astr + " VERTEX : " + TCollection_AsciiString(nbFlatType[TopAbs_VERTEX]) + "\n";
+ Astr = Astr + " VERTEX : " + TCollection_AsciiString(nbFlatType[TopAbs_VERTEX]) + "\n";
if (nbFlatType[TopAbs_EDGE] > 0)
- Astr = Astr + " EDGE : " + TCollection_AsciiString(nbFlatType[TopAbs_EDGE]) + "\n";
+ Astr = Astr + " EDGE : " + TCollection_AsciiString(nbFlatType[TopAbs_EDGE]) + "\n";
if (nbFlatType[TopAbs_WIRE] > 0)
- Astr = Astr + " WIRE : " + TCollection_AsciiString(nbFlatType[TopAbs_WIRE]) + "\n";
+ Astr = Astr + " WIRE : " + TCollection_AsciiString(nbFlatType[TopAbs_WIRE]) + "\n";
if (nbFlatType[TopAbs_FACE] > 0)
- Astr = Astr + " FACE : " + TCollection_AsciiString(nbFlatType[TopAbs_FACE]) + "\n";
+ Astr = Astr + " FACE : " + TCollection_AsciiString(nbFlatType[TopAbs_FACE]) + "\n";
if (nbFlatType[TopAbs_SHELL] > 0)
- Astr = Astr + " SHELL : " + TCollection_AsciiString(nbFlatType[TopAbs_SHELL]) + "\n";
+ Astr = Astr + " SHELL : " + TCollection_AsciiString(nbFlatType[TopAbs_SHELL]) + "\n";
if (nbFlatType[TopAbs_SOLID] > 0)
- Astr = Astr + " SOLID : " + TCollection_AsciiString(nbFlatType[TopAbs_SOLID]) + "\n";
+ Astr = Astr + " SOLID : " + TCollection_AsciiString(nbFlatType[TopAbs_SOLID]) + "\n";
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return Astr;
}
return MinDist;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return MinDist;
}
}
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return nbSolutions;
}
SetErrorCode(OK);
}
- catch (Standard_Failure)
+ catch (Standard_Failure& aFail)
{
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode( aFail->GetMessageString() );
+ SetErrorCode( aFail.GetMessageString() );
}
}
SetErrorCode(OK);
}
- catch (Standard_Failure)
+ catch (Standard_Failure& aFail)
{
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ SetErrorCode(aFail.GetMessageString());
}
return anAngle;
SetErrorCode(OK);
}
- catch (Standard_Failure)
+ catch (Standard_Failure& aFail)
{
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ SetErrorCode(aFail.GetMessageString());
}
return anAngle;
aRes = fabs(Prop.Curvature());
SetErrorCode(OK);
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return aRes;
}
SetErrorCode(OK);
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return aRes;
}
SetErrorCode(OK);
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return aRes;
}
Standard_EXPORT Standard_Real GetAngleBtwVectors (Handle(GEOM_Object) theVec1, Handle(GEOM_Object) theVec2);
- // Methods for recieving radiuses of curvature of curves and surfaces
+ // Methods for receiving radiuses of curvature of curves and surfaces
// in the given point
Standard_EXPORT Standard_Real CurveCurvatureByParam (Handle(GEOM_Object) theCurve,
Standard_Real& theParam);
#define OFF_ARG_VALUE 2
#define OFF_ARG_IDS 3
#define OFF_ARG_PARAM 4
+#define OFF_ARG_JOIN 5
class GEOMImpl_IOffset
{
Standard_Boolean GetParam() { return _func->GetInteger(OFF_ARG_PARAM); }
+ void SetJoinByPipes(Standard_Boolean theValue) { _func->SetInteger(OFF_ARG_JOIN, theValue); }
+
+ Standard_Boolean GetJoinByPipes() { return _func->GetInteger(OFF_ARG_JOIN); }
+
void SetFaceIDs(const Handle(TColStd_HArray1OfInteger)& theFaceIDs)
{ _func->SetIntegerArray(OFF_ARG_IDS, theFaceIDs); }
#include <Standard_Failure.hxx>
#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
+// 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 GEOM_Engine.cxx.
+// ---------------------------------------
+// #define DUMP_SUBSHAPE_IDS
+// ---------------------------------------
+
namespace {
void AddFlatSubShapes(const TopoDS_Shape& S, TopTools_ListOfShape& L, TopTools_MapOfShape& M)
else {
TopoDS_Iterator It(S, Standard_True, Standard_True);
for (; It.More(); It.Next()) {
- TopoDS_Shape SS = It.Value();
- if (M.Add(SS))
- AddFlatSubShapes(SS, L, M);
+ TopoDS_Shape SS = It.Value();
+ if (M.Add(SS))
+ AddFlatSubShapes(SS, L, M);
}
}
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
// to provide warning
if (!aFunction->GetValue().IsNull()) {
isWarning = Standard_True;
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
// to provide warning
if (!aFunction->GetValue().IsNull()) {
isWarning = Standard_True;
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
// to provide warning
if (!aFunction->GetValue().IsNull()) {
isWarning = Standard_True;
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
// to provide warning
if (!aFunction->GetValue().IsNull()) {
isWarning = Standard_True;
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
// to provide warning
if (!aFunction->GetValue().IsNull()) {
isWarning = Standard_True;
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
// to provide warning
if (!aFunction->GetValue().IsNull()) {
isWarning = Standard_True;
TopoDS_Shape aShape;
TopTools_SequenceOfShape shapes;
std::list< Handle(GEOM_Object) >::iterator s = theShapes.begin();
- Handle(GEOM_Object) lastCreatedGO;
+ Handle(GEOM_BaseObject) lastCreatedGO;
for ( ; s != theShapes.end(); ++s )
{
Handle(GEOM_Object) go = *s;
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
// to provide warning
if (!aFunction->GetValue().IsNull()) {
isWarning = Standard_True;
Standard_Integer types = theGroupsOnly ? Groups : Groups|SubShapes;
Handle(TColStd_HSequenceOfTransient) results = GetExistingSubObjects(theShape, types);
+ Handle(GEOM_BaseObject) lastCreatedGO = GEOM::GetCreatedLast(results);
+ lastCreatedGO = GEOM::GetCreatedLast(lastCreatedGO, theShape);
+
if (results->Length() > 0) {
- //Make a Python command
- TCollection_AsciiString anAsciiList;
- for (int i = 1; i <= results->Length(); i++)
+ // Make a Python command
+ GEOM::TPythonDump pd (lastCreatedGO->GetLastFunction(), /*append=*/true);
+ pd << "[";
+ Standard_Integer i, aLen = results->Length();
+ for (i = 1; i <= aLen; i++)
{
- Handle(GEOM_BaseObject) obj = Handle(GEOM_BaseObject)::DownCast( results->Value(i));
- obj->GetEntryString();
- if ( i < results->Length() )
- anAsciiList += ",";
+ Handle(GEOM_BaseObject) obj = Handle(GEOM_BaseObject)::DownCast(results->Value(i));
+ pd << obj << ((i < aLen) ? ", " : "");
}
-
- GEOM::TPythonDump pd (theShape->GetLastFunction(), /*append=*/true);
- pd << "[" << anAsciiList.ToCString();
pd << "] = geompy.GetExistingSubObjects(";
pd << theShape << ", " << (bool)theGroupsOnly << ")";
}
-
+
return results;
}
bool isGroup = anObj->IsKind(STANDARD_TYPE(GEOM_Object)) && anObj->GetType() == GEOM_GROUP;
bool isSubShape = anObj->IsKind(STANDARD_TYPE(GEOM_Object)) && anObj->GetType() != GEOM_GROUP;
bool isField = anObj->IsKind(STANDARD_TYPE(GEOM_Field));
- if (theTypes & Groups && isGroup ||
- theTypes & SubShapes && isSubShape ||
- theTypes & Fields && isField) {
+ if ((theTypes & Groups && isGroup ) ||
+ (theTypes & SubShapes && isSubShape ) ||
+ (theTypes & Fields && isField ))
aSeq->Append(anObj);
- }
}
delete [] anEntryStr;
}
for (; It.More(); It.Next()) {
TopoDS_Shape SS = It.Value();
if (mapShape.Add(SS)) {
- if (theShapeType == TopAbs_FLAT) {
+ if (theShapeType == TopAbs_FLAT) {
AddFlatSubShapes(SS, listShape, mapShape);
- }
+ }
else if (theShapeType == TopAbs_SHAPE || theShapeType == SS.ShapeType()) {
- listShape.Append(SS);
+ listShape.Append(SS);
}
// VSR: for EXPLODE_NEW_INCLUDE_MAIN and EXPLODE_OLD_INCLUDE_MAIN:
// it seems it is necessary to add top-level shape if theShapeType == TopAbs_COMPOUND
for (; It.More(); It.Next()) {
TopoDS_Shape SS = It.Value();
if (mapShape.Add(SS)) {
- if (theShapeType == TopAbs_FLAT) {
+ if (theShapeType == TopAbs_FLAT) {
AddFlatSubShapes(SS, listShape, mapShape);
- }
+ }
else if (theShapeType == TopAbs_SHAPE || theShapeType == SS.ShapeType()) {
listShape.Append(SS);
}
Handle(GEOM_Function) aFunction = theShape->GetLastFunction();
+ // VSR 29/08/2017: 0023327, 0023428: eliminate unnecessary lines in Python dump
+#ifdef DUMP_SUBSHAPE_IDS
//Make a Python command
GEOM::TPythonDump pd (aFunction, /*append=*/true);
pd << "listSubShapeIDs = geompy.SubShapeAll";
break;
default: ;
}
+#endif // DUMP_SUBSHAPE_IDS
SetErrorCode(OK);
return aSeq;
nbShapes = nbTypes[theShapeType];
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return -1;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
//The explode doesn't change object so no new function is required.
Handle(GEOM_Function) aFunction = theShape->GetLastFunction();
+ // VSR 29/08/2017: 0023327, 0023428: eliminate unnecessary lines in Python dump
+#ifdef DUMP_SUBSHAPE_IDS
//Make a Python command
GEOM::TPythonDump(aFunction, /*append=*/true)
<< "listFreeFacesIDs = geompy.GetFreeFacesIDs(" << theShape << ")";
+#endif // DUMP_SUBSHAPE_IDS
SetErrorCode(OK);
return aSeq;
for (; itSel.More(); itSel.Next()) {
const TopoDS_Shape& aSS = itSel.Value();
if (mapShape.Add(aSS) )
- aShared.Append(aSS);
+ aShared.Append(aSS);
}
}
}
// The GetShapesOnBox() doesn't change object so no new function is required.
Handle(GEOM_Function) aFunction = GEOM::GetCreatedLast(theShape,theBox)->GetLastFunction();
+ // VSR 29/08/2017: 0023327, 0023428: eliminate unnecessary lines in Python dump
+#ifdef DUMP_SUBSHAPE_IDS
// Make a Python command
GEOM::TPythonDump(aFunction, /*append=*/true)
<< "listShapesOnBoxIDs = geompy.GetShapesOnBoxIDs("
<< theShape << ", "
<< TopAbs_ShapeEnum(theShapeType) << ", "
<< theState << ")";
+#endif // DUMP_SUBSHAPE_IDS
SetErrorCode(OK);
return aSeqOfIDs;
Handle(GEOM_Function) aFunction =
GEOM::GetCreatedLast(theShape,theCheckShape)->GetLastFunction();
+ // VSR 29/08/2017: 0023327, 0023428: eliminate unnecessary lines in Python dump
+#ifdef DUMP_SUBSHAPE_IDS
// Make a Python command
GEOM::TPythonDump(aFunction, /*append=*/true)
- << "listShapesOnBoxIDs = geompy.GetShapesOnShapeIDs("
+ << "listShapesOnShapeIDs = geompy.GetShapesOnShapeIDs("
<< theCheckShape << ", "
<< theShape << ", "
<< TopAbs_ShapeEnum(theShapeType) << ", "
<< theState << ")";
+#endif // DUMP_SUBSHAPE_IDS
SetErrorCode(OK);
return aSeqOfIDs;
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
VertMax = T;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return aSeqOfIDs;
}
// END: Mantis issue 0020961
// Default value=3
aFinder.SetNbPntsMin(3);
// Sets the maximal number of inner points for edges or faces.
- // It is usefull for the cases when this number is very big (e.g =2000) to improve
+ // It is useful for the cases when this number is very big (e.g =2000) to improve
// the performance. If this value =0, all inner points will be taken into account.
// Default value=0
aFinder.SetNbPntsMax(100);
// The GetShapesOnPlaneIDs() doesn't change object so no new function is required.
Handle(GEOM_Function) aFunction = GEOM::GetCreatedLast(theShape,theAx1)->GetLastFunction();
+ // VSR 29/08/2017: 0023327, 0023428: eliminate unnecessary lines in Python dump
+#ifdef DUMP_SUBSHAPE_IDS
// Make a Python command
GEOM::TPythonDump(aFunction, /*append=*/true)
<< "listShapesOnPlane = geompy.GetShapesOnPlaneIDs"
<< "(" << theShape << "," << aShapeType << "," << theAx1 << "," << theState << ")";
+#endif // DUMP_SUBSHAPE_IDS
SetErrorCode(OK);
return aSeq;
// The GetShapesOnPlaneIDs() doesn't change object so no new function is required.
Handle(GEOM_Function) aFunction = GEOM::GetCreatedLast(theShape,theAx1)->GetLastFunction();
+ // VSR 29/08/2017: 0023327, 0023428: eliminate unnecessary lines in Python dump
+#ifdef DUMP_SUBSHAPE_IDS
// Make a Python command
GEOM::TPythonDump(aFunction, /*append=*/true)
<< "listShapesOnPlane = geompy.GetShapesOnPlaneWithLocationIDs"
<< "(" << theShape << ", " << aShapeType << ", " << theAx1 << ", "<< thePnt << ", " << theState << ")";
+#endif // DUMP_SUBSHAPE_IDS
SetErrorCode(OK);
return aSeq;
// The GetShapesOnCylinder() doesn't change object so no new function is required.
Handle(GEOM_Function) aFunction = GEOM::GetCreatedLast(theShape,theAxis)->GetLastFunction();
+ // VSR 29/08/2017: 0023327, 0023428: eliminate unnecessary lines in Python dump
+#ifdef DUMP_SUBSHAPE_IDS
// Make a Python command
GEOM::TPythonDump(aFunction, /*append=*/true)
<< "listShapesOnCylinder = geompy.GetShapesOnCylinderIDs"
<< "(" << theShape << ", " << aShapeType << ", " << theAxis << ", "
<< theRadius << ", " << theState << ")";
+#endif // DUMP_SUBSHAPE_IDS
SetErrorCode(OK);
return aSeq;
Handle(GEOM_Function) aFunction =
GEOM::GetCreatedLast(theShape, GEOM::GetCreatedLast(thePnt,theAxis))->GetLastFunction();
+ // VSR 29/08/2017: 0023327, 0023428: eliminate unnecessary lines in Python dump
+#ifdef DUMP_SUBSHAPE_IDS
// Make a Python command
GEOM::TPythonDump(aFunction, /*append=*/true)
<< "listShapesOnCylinder = geompy.GetShapesOnCylinderWithLocationIDs"
<< "(" << theShape << ", " << aShapeType << ", " << theAxis << ", "
<< thePnt << ", " << theRadius << ", " << theState << ")";
+#endif // DUMP_SUBSHAPE_IDS
SetErrorCode(OK);
return aSeq;
// The GetShapesOnSphere() doesn't change object so no new function is required.
Handle(GEOM_Function) aFunction = GEOM::GetCreatedLast(theShape,theCenter)->GetLastFunction();
+ // VSR 29/08/2017: 0023327, 0023428: eliminate unnecessary lines in Python dump
+#ifdef DUMP_SUBSHAPE_IDS
// Make a Python command
GEOM::TPythonDump(aFunction, /*append=*/true)
- << "listShapesOnCylinder = geompy.GetShapesOnSphereIDs"
+ << "listShapesOnSphere = geompy.GetShapesOnSphereIDs"
<< "(" << theShape << ", " << aShapeType << ", " << theCenter << ", "
<< theRadius << ", " << theState << ")";
+#endif // DUMP_SUBSHAPE_IDS
SetErrorCode(OK);
return aSeq;
// Default value=3
aFinder.SetNbPntsMin(3);
// Sets the maximal number of inner points for edges or faces.
- // It is usefull for the cases when this number is very big (e.g =2000) to improve
+ // It is useful for the cases when this number is very big (e.g =2000) to improve
// the performance. If this value =0, all inner points will be taken into account.
// Default value=0
aFinder.SetNbPntsMax(100);
// Make a Python command
// The GetShapesOnCylinder() doesn't change object so no new function is required.
- Handle(GEOM_Object) lastObj = GEOM::GetCreatedLast(theShape,theTopLeftPoint);
+ Handle(GEOM_BaseObject) lastObj = GEOM::GetCreatedLast(theShape,theTopLeftPoint);
lastObj = GEOM::GetCreatedLast(lastObj,theTopRigthPoint);
lastObj = GEOM::GetCreatedLast(lastObj,theBottomRigthPoint);
lastObj = GEOM::GetCreatedLast(lastObj,theBottomLeftPoint);
Handle(GEOM_Function) aFunction = lastObj->GetLastFunction();
+ // VSR 29/08/2017: 0023327, 0023428: eliminate unnecessary lines in Python dump
+#ifdef DUMP_SUBSHAPE_IDS
GEOM::TPythonDump(aFunction, /*append=*/true)
<< "listShapesOnQuadrangle = geompy.GetShapesOnQuadrangleIDs("
<< theShape << ", "
<< theBottomLeftPoint << ", "
<< theBottomRigthPoint << ", "
<< theState << ")";
+#endif // DUMP_SUBSHAPE_IDS
SetErrorCode(OK);
return aSeqOfIDs;
if (aShapeResult.IsNull() == Standard_False) {
TopoDS_Iterator anIt(aShapeResult);
- Standard_Boolean isFirst = Standard_True;
for (; anIt.More(); anIt.Next()) {
const TopoDS_Shape &aPart = anIt.Value();
// The GetSameIDs() doesn't change object so no new function is required.
Handle(GEOM_Function) aFunction = GEOM::GetCreatedLast(theShapeWhere,theShapeWhat)->GetLastFunction();
+ // VSR 29/08/2017: 0023327, 0023428: eliminate unnecessary lines in Python dump
+#ifdef DUMP_SUBSHAPE_IDS
// Make a Python command
GEOM::TPythonDump(aFunction, /*append=*/true)
<< "listSameIDs = geompy.GetSameIDs("
<< theShapeWhere << ", "
<< theShapeWhat << ")";
+#endif // DUMP_SUBSHAPE_IDS
return aSeq;
} else {
SetErrorCode(NOT_FOUND_ANY);
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
#include <GEOM_Function.hxx>
#include <GEOM_PythonDump.hxx>
-#include <Basics_OCCTVersion.hxx>
-
#include "utilities.h"
#include <OpUtil.hxx>
#include <Utils_ExceptHandlers.hxx>
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
* OffsetShape
*/
//=============================================================================
-Handle(GEOM_Object) GEOMImpl_ITransformOperations::OffsetShape
- (Handle(GEOM_Object) theObject, double theOffset)
+Handle(GEOM_Object)
+GEOMImpl_ITransformOperations::OffsetShape (Handle(GEOM_Object) theObject,
+ double theOffset,
+ bool theJoinByPipes)
{
SetErrorCode(KO);
if (aFunction->GetDriverGUID() != GEOMImpl_OffsetDriver::GetID()) return NULL;
GEOMImpl_IOffset aTI (aFunction);
- aTI.SetShape(anOriginal);
- aTI.SetValue(theOffset);
+ aTI.SetShape( anOriginal );
+ aTI.SetValue( theOffset );
+ aTI.SetJoinByPipes( theJoinByPipes );
//Compute the offset
try {
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
* OffsetShapeCopy
*/
//=============================================================================
-Handle(GEOM_Object) GEOMImpl_ITransformOperations::OffsetShapeCopy
- (Handle(GEOM_Object) theObject, double theOffset)
+Handle(GEOM_Object)
+GEOMImpl_ITransformOperations::OffsetShapeCopy( Handle(GEOM_Object) theObject,
+ double theOffset,
+ bool theJoinByPipes)
{
SetErrorCode(KO);
if (aFunction->GetDriverGUID() != GEOMImpl_OffsetDriver::GetID()) return NULL;
GEOMImpl_IOffset aTI (aFunction);
- aTI.SetShape(anOriginal);
- aTI.SetValue(theOffset);
+ aTI.SetShape( anOriginal );
+ aTI.SetValue( theOffset );
+ aTI.SetJoinByPipes( theJoinByPipes );
//Compute the offset
try {
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
}
return aResult;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return aResult;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return aResult;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return aResult;
}
Handle(GEOM_Object) thePoint);
Standard_EXPORT Handle(GEOM_Object) OffsetShape (Handle(GEOM_Object) theObject,
- double theOffset);
+ double theOffset,
+ bool theJoinByPipes);
Standard_EXPORT Handle(GEOM_Object) OffsetShapeCopy (Handle(GEOM_Object) theObject,
- double theOffset);
+ double theOffset,
+ bool theJoinByPipes);
Standard_EXPORT Handle(GEOM_Object) ProjectShapeCopy (Handle(GEOM_Object) theSource,
Handle(GEOM_Object) theTarget);
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_ImportDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_ImportDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
Handle(GEOM_Object) anImported = Handle(GEOM_Object)::DownCast( aSeq->Value(1) );
TopoDS_Shape aShape = anImported->GetValue();
aFunction->SetValue( aShape );
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ImportDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ImportDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_ImportDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_ImportDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_ImportDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_ImportDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_LineDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_LineDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_LineDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_LineDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_LineDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_LineDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_LineDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_LineDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_MarkerDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_MarkerDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_MarkerDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_MarkerDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_MarkerDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_MarkerDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_MarkerDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_MarkerDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_MeasureDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_MeasureDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_MeasureDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_MeasureDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_MeasureDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_MeasureDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_MeasureDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_MeasureDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_MirrorDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_MirrorDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_MirrorDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_MirrorDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_MirrorDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_MirrorDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_MirrorDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_MirrorDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_OffsetDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_OffsetDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
StdFail_NotDone::Raise(aMsg.ToCString());
}
- if (aType == OFFSET_SHAPE || aType == OFFSET_SHAPE_COPY) {
- BRepOffsetAPI_MakeOffsetShape MO (aShapeBase,
- aCI.GetValue(),
- aTol);
- if (MO.IsDone()) {
+ if ( aType == OFFSET_SHAPE || aType == OFFSET_SHAPE_COPY )
+ {
+ BRepOffsetAPI_MakeOffsetShape MO;
+ BRepOffset_Mode aMode = BRepOffset_Skin;
+ Standard_Boolean anIntersection = Standard_False, aSelfInter = Standard_False;
+ MO.PerformByJoin( aShapeBase,
+ aCI.GetValue(),
+ aTol,
+ aMode,
+ anIntersection,
+ aSelfInter,
+ aCI.GetJoinByPipes() ? GeomAbs_Arc : GeomAbs_Intersection );
+
+ if ( MO.IsDone() ) {
aShape = MO.Shape();
if ( !GEOMUtils::CheckShape(aShape, true) && !GEOMUtils::FixShapeTolerance(aShape) )
Standard_ConstructionError::Raise("Boolean operation aborted : non valid shape result");
}
// Create a hollowed solid.
- BRepOffsetAPI_MakeThickSolid aMkSolid
- (aShapeBase, aFacesToRm, anOffset, aTol, BRepOffset_Skin,
- Standard_False, Standard_False, GeomAbs_Intersection);
+ BRepOffsetAPI_MakeThickSolid aMkSolid;
+ aMkSolid.MakeThickSolidByJoin (aShapeBase, aFacesToRm, anOffset, aTol, BRepOffset_Skin,
+ Standard_False, Standard_False, GeomAbs_Intersection);
if (aMkSolid.IsDone()) {
aShape = aMkSolid.Shape();
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_OffsetDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_OffsetDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_OffsetDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_OffsetDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_OffsetDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_OffsetDriver,GEOM_BaseDriver)
};
#endif
#include <Standard_NullObject.hxx>
#include <StdFail_NotDone.hxx>
#include <BOPAlgo_CheckerSI.hxx>
-#if OCC_VERSION_LARGE > 0x07010001
#include <BOPAlgo_Alerts.hxx>
-#endif
-#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
-#include <BOPCol_ListOfShape.hxx>
+#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
#include <BOPDS_DS.hxx>
// Depth of self-intersection check (see BOPAlgo_CheckerSI::SetLevelOfCheck() for more details)
static void CheckSelfIntersection(const TopoDS_Shape &theShape)
{
BOPAlgo_CheckerSI aCSI; // checker of self-interferences
- BOPCol_ListOfShape aList;
+ TopTools_ListOfShape aList;
aList.Append(theShape);
aCSI.SetLevelOfCheck(BOP_SELF_INTERSECTIONS_LEVEL);
aCSI.SetArguments(aList);
aCSI.Perform();
-#if OCC_VERSION_LARGE > 0x07010001
if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) {
-#else
- if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) {
-#endif
StdFail_NotDone::Raise("Partition operation will not be performed, because argument shape is self-intersected");
}
}
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_PartitionDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_PartitionDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
aShape = PS.Shape();
if (aShape.IsNull()) {
// Mantis issue 22009
-#if OCC_VERSION_LARGE > 0x07010001
if (PS.HasError(STANDARD_TYPE(BOPAlgo_AlertTooFewArguments)) && PS.Tools().Extent() == 0 && PS.Arguments().Extent() == 1)
-#else
- if (PS.ErrorStatus() == 100 && PS.Tools().Extent() == 0 && PS.Arguments().Extent() == 1)
-#endif
aShape = PS.Arguments().First();
else
return 0;
TopExp::MapShapes(aShape, aResIndices);
// Map: source_shape/images of source_shape in Result
- const BOPCol_IndexedDataMapOfShapeListOfShape& aMR = PS.ImagesResult();
+ const TopTools_IndexedDataMapOfShapeListOfShape& aMR = PS.ImagesResult();
//const TopTools_IndexedDataMapOfShapeListOfShape& aMR = PS.ImagesResult();
// history for all argument shapes
//
if (!aMR.Contains(anEntity)) continue;
- const BOPCol_ListOfShape& aModified = aMR.FindFromKey(anEntity);
+ const TopTools_ListOfShape& aModified = aMR.FindFromKey(anEntity);
//const TopTools_ListOfShape& aModified = aMR.FindFromKey(anEntity);
Standard_Integer nbModified = aModified.Extent();
if (nbModified > 0) { // Mantis issue 0021182
int ih = 1;
- BOPCol_ListIteratorOfListOfShape itM (aModified);
+ TopTools_ListIteratorOfListOfShape itM (aModified);
for (; itM.More() && nbModified > 0; itM.Next(), ++ih) {
if (!aResIndices.Contains(itM.Value())) {
nbModified = 0;
TDataStd_IntegerArray::Set(aWhatHistoryLabel, 1, nbModified);
int ih = 1;
- BOPCol_ListIteratorOfListOfShape itM (aModified);
+ TopTools_ListIteratorOfListOfShape itM (aModified);
//TopTools_ListIteratorOfListOfShape itM (aModified);
for (; itM.More(); itM.Next(), ++ih) {
int id = aResIndices.FindIndex(itM.Value());
}
}
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PartitionDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PartitionDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_PartitionDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_PartitionDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_PartitionDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_PartitionDriver,GEOM_BaseDriver)
};
#endif
// after OCCT improvement
static bool DoGroups1(const TopoDS_Shape &theProfile,
- BRepOffsetAPI_MakePipeShell &theSweep,
- TopTools_SequenceOfShape *theGroups);
+ BRepOffsetAPI_MakePipeShell &theSweep,
+ TopTools_SequenceOfShape *theGroups);
static bool CreateGroups1(const TopoDS_Shape &theProfile,
- BRepOffsetAPI_MakePipeShell &theSweep,
- GEOMImpl_IPipe *theCI);
+ BRepOffsetAPI_MakePipeShell &theSweep,
+ GEOMImpl_IPipe *theCI);
//=======================================================================
//function : GetID
//=======================================================================
//function : EvaluateBestSweepMode
-//purpose : auxilary for right call of MakePipe and MakePipeShell
+//purpose : auxiliary for right call of MakePipe and MakePipeShell
//=======================================================================
static GeomFill_Trihedron EvaluateBestSweepMode(const TopoDS_Shape& Spine)
{
//=======================================================================
//function : FillForOtherEdges
-//purpose : auxilary for CreatePipeForShellSections()
+//purpose : auxiliary for CreatePipeForShellSections()
//=======================================================================
static bool FillForOtherEdges(const TopoDS_Shape& F1,
const TopoDS_Shape& E1,
//=======================================================================
//function : FillCorrespondingEdges
-//purpose : auxilary for CreatePipeForShellSections()
+//purpose : auxiliary for CreatePipeForShellSections()
//=======================================================================
static bool FillCorrespondingEdges(const TopoDS_Shape& FS1,
const TopoDS_Shape& FS2,
//=======================================================================
//function : FillCorrespondingEdges
-//purpose : auxilary for CreatePipeShellsWithoutPath()
+//purpose : auxiliary for CreatePipeShellsWithoutPath()
//=======================================================================
static bool FillCorrespondingEdges(const TopoDS_Shape& FS1,
const TopoDS_Shape& FS2,
//=======================================================================
//function : FindNextPairOfFaces
-//purpose : auxilary for CreatePipeForShellSections()
+//purpose : auxiliary for CreatePipeForShellSections()
//=======================================================================
static void FindNextPairOfFaces(const TopoDS_Shape& aCurFace,
TopTools_IndexedDataMapOfShapeListOfShape& aMapEdgeFaces1,
//=======================================================================
//function : FindFirstPairFaces
-//purpose : auxilary for Execute()
+//purpose : auxiliary for Execute()
//=======================================================================
static void FindFirstPairFaces(const TopoDS_Shape& S1, const TopoDS_Shape& S2,
TopoDS_Vertex& V1, TopoDS_Vertex& V2,
//function : RemoveFaces
//purpose : This function returns theShapeFrom without faces of the shape
// theFacesToRm. It returns a shell if theShapeFrom is a solid or
-// a compound otherwise. Auxilary for CreatePipeWithDifferentSections
+// a compound otherwise. Auxiliary for CreatePipeWithDifferentSections
// method.
//=======================================================================
static TopoDS_Shape RemoveFaces(const TopoDS_Shape &theShapeFrom,
// Make groups.
TopTools_SequenceOfShape aGroups[5];
- TopoDS_Shape aProfile = aTmpSeqBases.Value(1);
+ TopoDS_Shape aProfile = aTmpSeqBases.Value(1);
if (!DoGroups1(aProfile, aBuilder, aGroups)) {
Standard_ConstructionError::Raise("Generate groups failure");
}
// Make groups.
TopTools_SequenceOfShape aGroups[5];
- TopoDS_Shape aProfile = aTmpSeqBases.Value(1);
+ TopoDS_Shape aProfile = aTmpSeqBases.Value(1);
if (!DoGroups1(aProfile, aBuilder, aGroups)) {
Standard_ConstructionError::Raise("Generate groups failure");
}
// Make groups.
TopTools_SequenceOfShape aSeqGroups[5];
- TopoDS_Shape aProfile = usedBases.Value(1);
+ TopoDS_Shape aProfile = usedBases.Value(1);
if (!DoGroups1(aProfile, aBuilder, aSeqGroups)) {
Standard_ConstructionError::Raise("Generate groups failure");
}
// Fill the groups.
- Handle(TColStd_HArray1OfInteger) aGroupIds[5];
+ //Handle(TColStd_HArray1OfInteger) aGroupIds[5];
TopTools_IndexedMapOfShape anIndices;
const TopoDS_Shape aResult = aBuilder.Shape();
//=======================================================================
//function : CreatePipeForShellSections
-//purpose : auxilary for Execute()
+//purpose : auxiliary for Execute()
//=======================================================================
static TopoDS_Shape CreatePipeForShellSections(const TopoDS_Wire& aWirePath,
GEOMImpl_IPipe* aCI)
//=======================================================================
//function : CreatePipeShellsWithoutPath
-//purpose : auxilary for Execute()
+//purpose : auxiliary for Execute()
//=======================================================================
static TopoDS_Shape CreatePipeShellsWithoutPath(GEOMImpl_IPipe* aCI)
{
if (aCI) delete aCI;
Standard_ConstructionError::Raise("Can not create correct pipe");
}
- MESSAGE (" correspondences for sub-shapes of first pair of faces is found");
+ MESSAGE (" correspondences for sub-shapes of first pair of faces found");
FindNextPairOfFaces(FS1, aMapEdgeFaces1, aMapEdgeFaces2, FF, aCI);
- MESSAGE (" other correspondences is found, make pipe for all pairs of faces");
+ MESSAGE (" other correspondences found, make pipe for all pairs of faces");
// make pipe for each pair of faces
- // auxilary map vertex->edge for created pipe edges
+ // auxiliary map vertex->edge for created pipe edges
TopTools_IndexedDataMapOfShapeShape VPE;
ShapeAnalysis_Edge sae;
//cout<<"FF.Extent()="<<FF.Extent()<<endl;
if (VPE.Contains(E1)) {
aNewFs.Append(VPE.FindFromKey(E1));
#ifdef _DEBUG_
- MESSAGE (" using existed face");
+ MESSAGE (" using existing face");
#endif
continue;
}
//=======================================================================
//function : CreatePipeBiNormalAlongVector
-//purpose : auxilary for Execute()
+//purpose : auxiliary for Execute()
//=======================================================================
static TopoDS_Shape CreatePipeBiNormalAlongVector(const TopoDS_Wire& aWirePath,
GEOMImpl_IPipe* aCI)
//=======================================================================
//function : FillGroups
-//purpose : auxilary for DoGroups()
+//purpose : auxiliary for DoGroups()
//=======================================================================
bool FillGroups(const TopTools_SequenceOfShape *theGroups,
const TopTools_IndexedMapOfShape &theIndices,
//=======================================================================
//function : StoreGroups
-//purpose : auxilary for CreateGroups()
+//purpose : auxiliary for CreateGroups()
//=======================================================================
void StoreGroups(GEOMImpl_IPipe *theCI,
Handle(TColStd_HArray1OfInteger) *theGroups)
//=======================================================================
//function : CreateDownUpGroups
-//purpose : auxilary for DoGroups()
+//purpose : auxiliary for DoGroups()
//=======================================================================
static bool CreateDownUpGroups(BRepPrimAPI_MakeSweep *theSweep,
TopTools_SequenceOfShape *theGroups,
//=======================================================================
//function : DoGroups1
-//purpose : auxilary for CreateGroups1()
+//purpose : auxiliary for CreateGroups1()
//=======================================================================
bool DoGroups1 (const TopoDS_Shape &theProfile,
- BRepOffsetAPI_MakePipeShell &theSweep,
- TopTools_SequenceOfShape *theGroups)
+ BRepOffsetAPI_MakePipeShell &theSweep,
+ TopTools_SequenceOfShape *theGroups)
{
Standard_Boolean isDoSides = Standard_False;
}
} else if (aSideShape.ShapeType() == TopAbs_WIRE) {
if (aMapFence.Add(aSideShape)) {
- TopExp_Explorer anExpWE (aSideShape, TopAbs_EDGE);
- for (; anExpWE.More(); anExpWE.Next()) {
- theGroups[anIdSide].Append(anExpWE.Current());
- }
- }
+ TopExp_Explorer anExpWE (aSideShape, TopAbs_EDGE);
+ for (; anExpWE.More(); anExpWE.Next()) {
+ theGroups[anIdSide].Append(anExpWE.Current());
+ }
+ }
} else {
// Only edges can be in Side1 and Side2 groups.
return false;
}
} else if (anOtherShape.ShapeType() == TopAbs_SHELL) {
if (aMapFence.Add(anOtherShape)) {
- TopExp_Explorer anExpSHF (anOtherShape, TopAbs_FACE);
- for (; anExpSHF.More(); anExpSHF.Next()) {
- theGroups[GROUP_OTHER].Append(anExpSHF.Current());
- }
+ TopExp_Explorer anExpSHF (anOtherShape, TopAbs_FACE);
+ for (; anExpSHF.More(); anExpSHF.Next()) {
+ theGroups[GROUP_OTHER].Append(anExpSHF.Current());
+ }
}
} else {
// Only faces can be in Other group.
//=======================================================================
//function : CreateGroups1
-//purpose : auxilary for Execute()
+//purpose : auxiliary for Execute()
//=======================================================================
bool CreateGroups1 (const TopoDS_Shape &theProfile,
- BRepOffsetAPI_MakePipeShell &theSweep,
- GEOMImpl_IPipe *theCI)
+ BRepOffsetAPI_MakePipeShell &theSweep,
+ GEOMImpl_IPipe *theCI)
{
if (!theCI->GetGenerateGroups()) {
// Nothing to do.
//=======================================================================
//function : DoGroups2
-//purpose : auxilary for CreateGroups()
+//purpose : auxiliary for CreateGroups()
//=======================================================================
static bool DoGroups2(const TopoDS_Shape &theProfile,
- const TopoDS_Shape &thePath,
- BRepOffsetAPI_MakePipe &theSweep,
+ const TopoDS_Shape &thePath,
+ BRepOffsetAPI_MakePipe &theSweep,
TopTools_SequenceOfShape *theGroups)
{
Standard_Boolean isDoSides = Standard_False;
//=======================================================================
//function : CreateGroups
-//purpose : auxilary for Execute()
+//purpose : auxiliary for Execute()
//=======================================================================
static bool CreateGroups2(const TopoDS_Shape &theProfile,
- const TopoDS_Shape &thePath,
- BRepOffsetAPI_MakePipe &theSweep,
- GEOMImpl_IPipe *theCI)
+ const TopoDS_Shape &thePath,
+ BRepOffsetAPI_MakePipe &theSweep,
+ GEOMImpl_IPipe *theCI)
{
if (!theCI->GetGenerateGroups()) {
// Nothing to do.
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_PipeDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_PipeDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
TopoDS_Shape aRes = GEOMUtils::CompsolidToCompound(aShape);
aFunction->SetValue(aRes);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PipeDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PipeDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_PipeDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK& log) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK& log) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)& log) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)& log) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_PipeDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_PipeDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_PipeDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_PipePathDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_PipePathDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
if (aRes.IsNull()) return 0;
aFunction->SetValue(aRes);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PipePathDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PipePathDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_PipePathDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_PipePathDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_PipePathDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_PipePathDriver,GEOM_BaseDriver)
};
#endif
#include <GEOMUtils.hxx>
-#include <Basics_OCCTVersion.hxx>
-
// OCCT Includes
#include <BRepBuilderAPI_MakeFace.hxx>
#include <BRep_Tool.hxx>
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_PlaneDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_PlaneDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PlaneDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PlaneDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_PlaneDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_PlaneDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_PlaneDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_PlaneDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_PointDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_PointDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
//aShape.Infinite(Standard_True); // VSR: 05/04/2010: Fix 20668 (Fit All for points & lines)
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PointDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PointDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_PointDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_PointDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_PointDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_PointDriver,GEOM_BaseDriver)
};
#endif
//function : MakePolyline2D
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_PolylineDriver::MakePolyline2D(LOGBOOK& log) const
+Standard_Integer GEOMImpl_PolylineDriver::MakePolyline2D(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) {
return 0;
}
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_PolylineDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_PolylineDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PolylineDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PolylineDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_PolylineDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_PolylineDriver() {};
std::vector<GEOM_Param>& params);
private:
- Standard_Integer MakePolyline2D(LOGBOOK& log) const;
+ Standard_Integer MakePolyline2D(Handle(TFunction_Logbook)& log) const;
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_PolylineDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_PolylineDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_PositionDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_PositionDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PositionDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PositionDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_PositionDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_PositionDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_PositionDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_PositionDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_PrismDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_PrismDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
Standard_Real anAngle = aCI.GetDraftAngle(); // Draft angle
Standard_Boolean isProtrusion = (aCI.GetFuseFlag()==1);
Standard_Boolean isInvert = aCI.GetInvertFlag();
- // Flag to know wether the feature is a protrusion (fuse) or a depression (cut)
+ // Flag to know whether the feature is a protrusion (fuse) or a depression (cut)
// history of the Base wire (RefBase)
Handle(GEOM_Object) aSuppObj;
aFunction->SetValue(aRes);
}
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PrismDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PrismDriver,GEOM_BaseDriver);
Standard_EXPORT GEOMImpl_PrismDriver();
Standard_EXPORT ~GEOMImpl_PrismDriver() {};
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate (LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute (const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate (Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute (const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_PrismDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_PrismDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_ProjectionDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_ProjectionDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
try {
OrtProj.Build();
- } catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- TCollection_AsciiString aMsg (aFail->GetMessageString());
+ } catch (Standard_Failure& aFail) {
+ TCollection_AsciiString aMsg (aFail.GetMessageString());
if (!aMsg.Length())
aMsg = "Projection aborted : possibly the source shape intersects the cylinder's axis";
Standard_ConstructionError::Raise(aMsg.ToCString());
if (aShape.IsNull()) return 0;
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
} else if (aType == PROJECTION_ON_WIRE) {
// Perform projection of point on a wire or an edge.
GEOMImpl_IProjection aProj (aFunction);
}
// Transform the curve to cylinder's parametric space.
-#if OCC_VERSION_MAJOR < 7
- GEOMUtils::Handle(HTrsfCurve2d) aTrsfCurve =
-#else
Handle(GEOMUtils::HTrsfCurve2d) aTrsfCurve =
-#endif
new GEOMUtils::HTrsfCurve2d(aCurve, aPar[0], aPar[1], aTrsf2d);
Approx_Curve2d aConv (aTrsfCurve, aPar[0], aPar[1],
aUResol, aVResol, GeomAbs_C1,
return aResult;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ProjectionDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ProjectionDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_ProjectionDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_ProjectionDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_ProjectionDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_ProjectionDriver,GEOM_BaseDriver)
private:
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_RevolutionDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_RevolutionDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
TopoDS_Shape aRes = GEOMUtils::CompsolidToCompound(aShape);
aFunction->SetValue(aRes);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_RevolutionDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_RevolutionDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_RevolutionDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_RevolutionDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_RevolutionDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_RevolutionDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_RotateDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_RotateDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_RotateDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_RotateDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_RotateDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_RotateDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_RotateDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_RotateDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_ScaleDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_ScaleDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ScaleDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ScaleDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_ScaleDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_ScaleDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_ScaleDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_ScaleDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_ShapeDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_ShapeDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
unsigned int ind, nbshapes = aShapes->Length();
// add faces
- BOPCol_ListOfShape aLS;
+ TopTools_ListOfShape aLS;
for (ind = 1; ind <= nbshapes; ind++) {
Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast(aShapes->Value(ind));
TopoDS_Shape aShape_i = aRefShape->GetValue();
aMV.SetArguments(aLS);
aMV.SetIntersect(aCI.GetIsIntersect());
aMV.Perform();
-#if OCC_VERSION_LARGE > 0x07010001
if (aMV.HasErrors()) return 0;
-#else
- if (aMV.ErrorStatus()) return 0;
-#endif
aShape = aMV.Shape();
}
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
if (!aWarning.IsEmpty())
Standard_Failure::Raise(aWarning.ToCString());
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ShapeDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ShapeDriver,GEOM_BaseDriver);
//modified by NIZNHY-PKV Wed Dec 28 13:48:31 2011f
#include <TopoDS_Iterator.hxx>
Standard_EXPORT GEOMImpl_ShapeDriver();
Standard_EXPORT ~GEOMImpl_ShapeDriver() {};
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_ShapeDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_ShapeDriver,GEOM_BaseDriver)
private:
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_SketcherDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_SketcherDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
// set the function result
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_SketcherDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_SketcherDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_SketcherDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_SketcherDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_SketcherDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_SketcherDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_SphereDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_SphereDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_SphereDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_SphereDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_SphereDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_SphereDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_SphereDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_SphereDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_SplineDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_SplineDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
{
Handle(TColStd_HArray1OfReal) coords = aCI.GetCoordinates();
GEOM_Param& pntParam = AddParam( theParams, "Points");
- pntParam << ( coords->Length() ) / 3 << " points: ";
- for ( int i = coords->Lower(), nb = coords->Upper(); i <= nb; )
- pntParam << "( " << coords->Value( i++ )
- << ", " << coords->Value( i++ )
- << ", " << coords->Value( i++ ) << " ) ";
+ pntParam << ( coords->Length() / 3 ) << " points: ";
+ for ( int i = coords->Lower(), nb = coords->Upper(); i <= nb; i += 3 )
+ pntParam << "( " << coords->Value( i+0 )
+ << ", " << coords->Value( i+1 )
+ << ", " << coords->Value( i+2 ) << " ) ";
}
else
{
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_SplineDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_SplineDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_SplineDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_SplineDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_SplineDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_SplineDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_ThruSectionsDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_ThruSectionsDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
}
if ( !GEOMUtils::CheckShape(aShape) && !GEOMUtils::FixShapeTolerance(aShape) ) {
- //algoritm thru section creats on the arcs invalid shapes gka
- // Standard_ConstructionError::Raise("Algorithm have produced an invalid shape result");
+ //algorithm through section creates on the arcs invalid shapes gka
+ // Standard_ConstructionError::Raise("Algorithm has produced an invalid shape result");
}
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ThruSectionsDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ThruSectionsDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_ThruSectionsDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_ThruSectionsDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_ThruSectionsDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_ThruSectionsDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_TorusDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_TorusDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
if (aShape.IsNull()) return 0;
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_TorusDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_TorusDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_TorusDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_TorusDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_TorusDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_TorusDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_TranslateDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_TranslateDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_TranslateDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_TranslateDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_TranslateDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_TranslateDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_TranslateDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_TranslateDriver,GEOM_BaseDriver)
};
#endif
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_VectorDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_VectorDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_VectorDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_VectorDriver,GEOM_BaseDriver);
public:
Standard_EXPORT GEOMImpl_VectorDriver();
- Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
- Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
+ Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
+ Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_VectorDriver() {};
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_VectorDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(GEOMImpl_VectorDriver,GEOM_BaseDriver)
};
_PTR(StudyBuilder) aStudyBuilder (aStudy->NewBuilder());
GEOM_Displayer disp;
- disp.SetUpdateColorScale( false ); // IPAL54049
+ bool toUpdateColorScale = disp.SetUpdateColorScale( false ); // IPAL54049
if ( isComponentSelected ) {
// GEOM component is selected: delete all objects recursively
}
}
+ disp.SetUpdateColorScale( toUpdateColorScale ); // IPAL54049
selected.Clear();
aSelMgr->setSelectedObjects( selected );
getGeometryGUI()->updateObjBrowser();
#include <DependencyTree_Selector.h>
#endif
-#include <Basics_OCCTVersion.hxx>
-
#include <SALOME_ListIO.hxx>
#include <SALOMEDS_SObject.hxx>
}
SUIT_OverrideCursor wc;
- disp->SetUpdateColorScale( false ); // IPAL54049
+ bool toUpdateColorScale = disp->SetUpdateColorScale( false ); // IPAL54049
for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
Handle(SALOME_InteractiveObject) IObject = It.Value();
}
} // if ( obj )
} // iterator
- disp->SetUpdateColorScale( true );
+ disp->SetUpdateColorScale( toUpdateColorScale );
}
}
app->updateObjectBrowser( false );
return;
}
SUIT_OverrideCursor wc;
- disp->SetUpdateColorScale( false ); // IPAL54049
+ bool toUpdateColorScale = disp->SetUpdateColorScale( false ); // IPAL54049
for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
Handle(SALOME_InteractiveObject) IObject = It.Value();
}
} // if ( obj )
} // iterator
- disp->SetUpdateColorScale( true ); // IPAL54049
+ disp->SetUpdateColorScale( toUpdateColorScale ); // IPAL54049
aSelMgr->clearSelected();
}
}
app->updateObjectBrowser( false );
app->updateActions();
}
-
}
void GEOMToolsGUI::OnPublishObject() {
#include <GEOM_Constants.h>
#include <GEOM_Displayer.h>
-#include <Basics_OCCTVersion.hxx>
-
#include <QtxComboBox.h>
#include <SUIT_ResourceMgr.h>
#include <SUIT_Session.h>
#include <GEOMUtils.hxx>
-#include <Basics_OCCTVersion.hxx>
-
#include <OpUtil.hxx>
#include <Utils_ExceptHandlers.hxx>
#include <sstream>
#include <algorithm>
-#if OCC_VERSION_LARGE >= 0x07010000
#include <V3d_Coordinate.hxx>
-#endif
#include <Standard_Failure.hxx>
#include <Standard_NullObject.hxx>
/*!
* \brief Extract single SOLID from COMPSOLID or COMPOUND.
*
- * If the argument shape is a COMPUND or COMPSOLID and there's
+ * If the argument shape is a COMPOUND or COMPSOLID and there's
* only single simple-shape type inside, this sub-shape is returned as a result;
* otherwise, the shape is not changed.
*
#include <GEOMUtils_HTrsfCurve2d.hxx>
namespace GEOMUtils {
- OCCT_IMPLEMENT_STANDARD_RTTIEXT(HTrsfCurve2d, Adaptor2d_HCurve2d);
+ IMPLEMENT_STANDARD_RTTIEXT(HTrsfCurve2d, Adaptor2d_HCurve2d);
}
//=======================================================================
public:
- OCCT_DEFINE_STANDARD_RTTIEXT(HTrsfCurve2d,Adaptor2d_HCurve2d)
+ DEFINE_STANDARD_RTTIEXT(HTrsfCurve2d,Adaptor2d_HCurve2d)
};
}
const Standard_Real /*Tol*/) const
{
Handle(Geom2d_Curve) aCurve = myCurve.Curve();
-#if OCC_VERSION_MAJOR < 7
- GEOMUtils::Handle(HTrsfCurve2d) aAHCurve =
-#else
Handle(GEOMUtils::HTrsfCurve2d) aAHCurve =
-#endif
new GEOMUtils::HTrsfCurve2d(aCurve, First, Last, myTrsf);
return aAHCurve;
#include <GEOMUtils_Trsf2d.hxx>
-#include <Basics_OCCTVersion.hxx>
-
#include <Geom2dHatch_Hatcher.hxx>
#include <GeomAbs_IsoType.hxx>
#include <TColStd_HArray1OfInteger.hxx>
GEOM_BaseObject_i::GEOM_BaseObject_i (PortableServer::POA_ptr thePOA,
GEOM::GEOM_Gen_ptr theEngine,
- HANDLE_NAMESPACE(GEOM_BaseObject) theImpl)
+ Handle(::GEOM_BaseObject) theImpl)
: SALOME::GenericObj_i( thePOA ), _engine(theEngine), _impl(theImpl)
{
}
TCollection_AsciiString anEntry;
for (int i = 1; i<=aLength; i++) {
- HANDLE_NAMESPACE(GEOM_BaseObject) anObj = HANDLE_NAMESPACE(GEOM_BaseObject)::DownCast(aSeq->Value(i));
+ Handle(::GEOM_BaseObject) anObj = Handle(::GEOM_BaseObject)::DownCast(aSeq->Value(i));
if (anObj.IsNull()) continue;
TDF_Tool::Entry(anObj->GetEntry(), anEntry);
GEOM::GEOM_BaseObject_var obj = _engine->GetObject((char*) anEntry.ToCString());
TCollection_AsciiString anEntry;
for (int i = 1; i<=aLength; i++) {
- HANDLE_NAMESPACE(GEOM_BaseObject) anObj = HANDLE_NAMESPACE(GEOM_BaseObject)::DownCast(aSeq->Value(i));
+ Handle(::GEOM_BaseObject) anObj = Handle(::GEOM_BaseObject)::DownCast(aSeq->Value(i));
if (anObj.IsNull()) continue;
GEOM::GEOM_BaseObject_var obj = _engine->GetObject(anObj->GetEntryString().ToCString());
aList[i-1] = GEOM::GEOM_BaseObject::_duplicate( obj );
int nbI = 0;
for ( int i = 1; i <= nbFun; ++i )
{
- HANDLE_NAMESPACE(GEOM_BaseDriver) driver =
- HANDLE_NAMESPACE(GEOM_BaseDriver)::DownCast( _impl->GetCreationDriver( i ));
+ Handle(::GEOM_BaseDriver) driver =
+ Handle(::GEOM_BaseDriver)::DownCast( _impl->GetCreationDriver( i ));
if ( !driver.IsNull() )
{
std::vector<GEOM_Param> params;
class GEOM_I_EXPORT GEOM_BaseObject_i : public virtual POA_GEOM::GEOM_BaseObject, public virtual SALOME::GenericObj_i
{
public:
- GEOM_BaseObject_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, HANDLE_NAMESPACE(GEOM_BaseObject) theImpl);
+ GEOM_BaseObject_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, Handle(::GEOM_BaseObject) theImpl);
~GEOM_BaseObject_i();
virtual char* GetEntry();
virtual GEOM::CreationInformationSeq* GetCreationInformation();
- HANDLE_NAMESPACE(GEOM_BaseObject) GetImpl() { return _impl; }
+ Handle(::GEOM_BaseObject) GetImpl() { return _impl; }
protected:
private:
- HANDLE_NAMESPACE(GEOM_BaseObject) _impl;
+ Handle(::GEOM_BaseObject) _impl;
};
#endif
anAttrStr = SALOMEDS::AttributeString::_narrow(anAttr);
SALOMEDS::ListOfListOfStrings_var aSections = aStudy->ParseVariables(anAttrStr->Value());
ObjectStates* aStates = new ObjectStates();
- for(int i = 0; i < aSections->length(); i++) {
+ for( CORBA::ULong i = 0; i < aSections->length(); i++) {
TState aState;
SALOMEDS::ListOfStrings aListOfVars = aSections[i];
- for(int j = 0; j < aListOfVars.length(); j++) {
+ for( CORBA::ULong j = 0; j < aListOfVars.length(); j++) {
bool isVar = aStudy->IsVariable(aListOfVars[j].in());
TVariable aVar = TVariable( (char*)aListOfVars[j].in(), isVar );
aState.push_back(aVar);
{
const char* name = _impl->GetDumpName( theStudyEntry );
if ( name && strlen( name ) > 0 )
- return strdup( name );
+ return CORBA::string_dup( name );
return NULL;
}
GEOM_Field_i::GEOM_Field_i (PortableServer::POA_ptr thePOA,
GEOM::GEOM_Gen_ptr theEngine,
- HANDLE_NAMESPACE(GEOM_Field) theImpl):
+ Handle(::GEOM_Field) theImpl):
SALOME::GenericObj_i( thePOA ),
GEOM_BaseObject_i( thePOA, theEngine, theImpl ),
_impl( theImpl )
GEOM::GEOM_Object_ptr GEOM_Field_i::GetShape()
{
GEOM::GEOM_Object_var shapeVar;
- HANDLE_NAMESPACE(GEOM_Object) shape = _impl->GetShape();
+ Handle(::GEOM_Object) shape = _impl->GetShape();
if ( !shape.IsNull() )
{
GEOM::GEOM_BaseObject_var obj = _engine->GetObject( shape->GetEntryString().ToCString());
GEOM::GEOM_FieldStep_ptr GEOM_Field_i::AddStep(::CORBA::Long stepID, ::CORBA::Long stamp)
{
GEOM::GEOM_FieldStep_var stepVar;
- HANDLE_NAMESPACE(GEOM_FieldStep) step = _impl->AddStep( stepID, stamp );
+ Handle(::GEOM_FieldStep) step = _impl->AddStep( stepID, stamp );
if ( !step.IsNull() )
{
GEOM::GEOM_BaseObject_var obj = _engine->GetObject( step->GetEntryString().ToCString());
GEOM::ListOfLong* GEOM_Field_i::GetSteps()
{
- std::list< HANDLE_NAMESPACE(GEOM_FieldStep)> stepList = _impl->GetSteps();
- std::list< HANDLE_NAMESPACE(GEOM_FieldStep)>::iterator stp = stepList.begin();
+ std::list< Handle(::GEOM_FieldStep)> stepList = _impl->GetSteps();
+ std::list< Handle(::GEOM_FieldStep)>::iterator stp = stepList.begin();
GEOM::ListOfLong_var stepIds = new GEOM::ListOfLong();
stepIds->length( stepList.size() );
GEOM::GEOM_FieldStep_ptr GEOM_Field_i::GetStep(CORBA::Long stepID)
{
GEOM::GEOM_FieldStep_var stepVar;
- HANDLE_NAMESPACE(GEOM_FieldStep) step = _impl->GetStep(stepID);
+ Handle(::GEOM_FieldStep) step = _impl->GetStep(stepID);
if ( !step.IsNull() )
{
GEOM::GEOM_BaseObject_var obj = _engine->GetObject( step->GetEntryString().ToCString());
GEOM_FieldStep_i::GEOM_FieldStep_i(PortableServer::POA_ptr thePOA,
GEOM::GEOM_Gen_ptr theEngine,
- HANDLE_NAMESPACE(GEOM_FieldStep) theImpl):
+ Handle(::GEOM_FieldStep) theImpl):
SALOME::GenericObj_i( thePOA ),
GEOM_BaseObject_i( thePOA, theEngine, theImpl ),
_impl( theImpl )
GEOM::GEOM_Field_ptr GEOM_FieldStep_i::GetField()
{
GEOM::GEOM_Field_var fieldVar;
- HANDLE_NAMESPACE(GEOM_Field) field = _impl->GetField();
+ Handle(::GEOM_Field) field = _impl->GetField();
if ( !field.IsNull() )
{
GEOM::GEOM_BaseObject_var obj = _engine->GetObject( field->GetEntryString().ToCString());
*/
//================================================================================
-GEOM_BoolFieldStep_i::GEOM_BoolFieldStep_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, HANDLE_NAMESPACE(GEOM_FieldStep) theImpl):
+GEOM_BoolFieldStep_i::GEOM_BoolFieldStep_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, Handle(::GEOM_FieldStep) theImpl):
SALOME::GenericObj_i( thePOA ),
GEOM_BaseObject_i( thePOA, theEngine, theImpl ),
GEOM_FieldStep_i( thePOA, theEngine, theImpl )
*/
//================================================================================
-GEOM_IntFieldStep_i::GEOM_IntFieldStep_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, HANDLE_NAMESPACE(GEOM_FieldStep) theImpl):
+GEOM_IntFieldStep_i::GEOM_IntFieldStep_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, Handle(::GEOM_FieldStep) theImpl):
SALOME::GenericObj_i( thePOA ),
GEOM_BaseObject_i( thePOA, theEngine, theImpl ),
GEOM_FieldStep_i( thePOA, theEngine, theImpl )
*/
//================================================================================
-GEOM_DoubleFieldStep_i::GEOM_DoubleFieldStep_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, HANDLE_NAMESPACE(GEOM_FieldStep) theImpl):
+GEOM_DoubleFieldStep_i::GEOM_DoubleFieldStep_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, Handle(::GEOM_FieldStep) theImpl):
SALOME::GenericObj_i( thePOA ),
GEOM_BaseObject_i( thePOA, theEngine, theImpl ),
GEOM_FieldStep_i( thePOA, theEngine, theImpl )
*/
//================================================================================
-GEOM_StringFieldStep_i::GEOM_StringFieldStep_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, HANDLE_NAMESPACE(GEOM_FieldStep) theImpl):
+GEOM_StringFieldStep_i::GEOM_StringFieldStep_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, Handle(::GEOM_FieldStep) theImpl):
SALOME::GenericObj_i( thePOA ),
GEOM_BaseObject_i( thePOA, theEngine, theImpl ),
GEOM_FieldStep_i( thePOA, theEngine, theImpl )
class GEOM_I_EXPORT GEOM_Field_i : public virtual POA_GEOM::GEOM_Field, public virtual GEOM_BaseObject_i
{
public:
- GEOM_Field_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, HANDLE_NAMESPACE(GEOM_Field) theImpl);
+ GEOM_Field_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, Handle(::GEOM_Field) theImpl);
~GEOM_Field_i();
virtual GEOM::GEOM_Object_ptr GetShape();
private:
- HANDLE_NAMESPACE(GEOM_Field) _impl;
+ Handle(::GEOM_Field) _impl;
};
//================================================================================
class GEOM_I_EXPORT GEOM_FieldStep_i : public virtual POA_GEOM::GEOM_FieldStep, public virtual GEOM_BaseObject_i
{
public:
- GEOM_FieldStep_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, HANDLE_NAMESPACE(GEOM_FieldStep) theImpl);
+ GEOM_FieldStep_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, Handle(::GEOM_FieldStep) theImpl);
~GEOM_FieldStep_i();
virtual void SetStamp(::CORBA::Long stamp);
protected:
- HANDLE_NAMESPACE(GEOM_FieldStep) _impl;
+ Handle(::GEOM_FieldStep) _impl;
};
//================================================================================
class GEOM_I_EXPORT GEOM_BoolFieldStep_i : public virtual POA_GEOM::GEOM_BoolFieldStep, public virtual GEOM_FieldStep_i
{
public:
- GEOM_BoolFieldStep_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, HANDLE_NAMESPACE(GEOM_FieldStep) theImpl);
+ GEOM_BoolFieldStep_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, Handle(::GEOM_FieldStep) theImpl);
virtual ::CORBA::Boolean SetValues(const ::GEOM::short_array& boolValues);
virtual GEOM::short_array* GetValues();
class GEOM_I_EXPORT GEOM_IntFieldStep_i : public virtual POA_GEOM::GEOM_IntFieldStep, public virtual GEOM_FieldStep_i
{
public:
- GEOM_IntFieldStep_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, HANDLE_NAMESPACE(GEOM_FieldStep) theImpl);
+ GEOM_IntFieldStep_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, Handle(::GEOM_FieldStep) theImpl);
virtual ::CORBA::Boolean SetValues(const ::GEOM::ListOfLong& intValues);
virtual GEOM::ListOfLong* GetValues();
class GEOM_I_EXPORT GEOM_DoubleFieldStep_i : public virtual POA_GEOM::GEOM_DoubleFieldStep, public virtual GEOM_FieldStep_i
{
public:
- GEOM_DoubleFieldStep_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, HANDLE_NAMESPACE(GEOM_FieldStep) theImpl);
+ GEOM_DoubleFieldStep_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, Handle(::GEOM_FieldStep) theImpl);
virtual ::CORBA::Boolean SetValues(const ::GEOM::ListOfDouble& doubleValues);
virtual GEOM::ListOfDouble* GetValues();
class GEOM_I_EXPORT GEOM_StringFieldStep_i : public virtual POA_GEOM::GEOM_StringFieldStep, public virtual GEOM_FieldStep_i
{
public:
- GEOM_StringFieldStep_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, HANDLE_NAMESPACE(GEOM_FieldStep) theImpl);
+ GEOM_StringFieldStep_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, Handle(::GEOM_FieldStep) theImpl);
virtual ::CORBA::Boolean SetValues(const ::GEOM::string_array& strValues);
virtual GEOM::string_array* GetValues();
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File : GEOM_GEOM_I.hxx
-// Author : Alexander A. BORODIN
-// Module : GEOM
-//
-#ifndef _GEOM_GEOM_I_HXX_
-#define _GEOM_GEOM_I_HXX_
+#ifndef GEOM_GEOM_I_HXX
+#define GEOM_GEOM_I_HXX
#ifdef WIN32
#if defined GEOM_I_EXPORTS || defined GEOMEngine_EXPORTS
#define GEOM_I_EXPORT
#endif
-#include <Basics_OCCTVersion.hxx>
-#if OCC_VERSION_MAJOR < 7
- #define HANDLE_NAMESPACE(CLS) Handle(CLS)
-#else
- #define HANDLE_NAMESPACE(CLS) Handle(::CLS)
-#endif
-
-#endif //_GEOM_GEOM_I_HXX_
+#endif // GEOM_GEOM_I_HXX
GEOM::GEOM_BaseObject_var anObject =
GEOM::GEOM_BaseObject::_narrow(_orb->string_to_object(IORString));
if (!CORBA::is_nil(anObject)) {
- return CORBA::string_dup(anObject->GetEntry());
+ return anObject->GetEntry();
}
return 0;
}
CORBA::Boolean isMultiFile,
CORBA::Boolean isASCII)
{
- HANDLE_NAMESPACE(GEOM_BaseObject) anObject =
+ Handle(::GEOM_BaseObject) anObject =
_impl->GetObject(aLocalPersistentID);
if ( !anObject.IsNull() )
{
// BEGIN: try to find existed name for current shape
if ( !aShape->_is_nil() && mytype != GEOM_GROUP)
{
- // recieve current TopoDS shape
+ // receive current TopoDS shape
CORBA::String_var entry = aShape->GetEntry();
- HANDLE_NAMESPACE(GEOM_Object) aGShape = HANDLE_NAMESPACE(GEOM_Object)::DownCast
+ Handle(::GEOM_Object) aGShape = Handle(::GEOM_Object)::DownCast
( _impl->GetObject( entry ));
TopoDS_Shape TopoSh = aGShape->GetValue();
// find label of main shape
aMainSh = aMainSh->GetMainShape();
}
entry = aMainSh->GetEntry();
- HANDLE_NAMESPACE(GEOM_BaseObject) anObj = _impl->GetObject( entry );
+ Handle(::GEOM_BaseObject) anObj = _impl->GetObject( entry );
TDF_Label aMainLbl = anObj->GetFunction(1)->GetNamingEntry();
// check all named shapes using iterator
aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_GROUP_SOLID");
aNamePrefix = "Group_Of_Solids_";
break;
+ default:
+ aNamePrefix = "Group_";
}
} else if ( mytype == GEOM_MARKER ) {
aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_LCS");
//============================================================================
// function : CreateAndPublishGroup
-// purpose : auxilary for PublishNamedShapesInStudy
+// purpose : auxiliary for PublishNamedShapesInStudy
//============================================================================
void GEOM_Gen_i::CreateAndPublishGroup(GEOM::GEOM_Object_var theMainShape,
const TopTools_IndexedMapOfShape& anIndices,
GEOM::ListOfGO_var aResList)
{
CORBA::String_var entry = theMainShape->GetEntry();
- //HANDLE_NAMESPACE(GEOM_Object) aMainShape = _impl->GetObject(entry);
+ //Handle(::GEOM_Object) aMainShape = _impl->GetObject(entry);
Handle(TColStd_HArray1OfInteger) anArray;
if(SeqS.Length()>0) {
// create a group
GEOM::GEOM_Object_wrap GrObj = GOp->CreateGroup( theMainShape, SeqS(1).ShapeType() );
AddInStudy(GrObj, GrName, theMainShape._retn());
//CORBA::String_var GrEntry = GrObj->GetEntry();
- //HANDLE_NAMESPACE(GEOM_Object) HGrObj = _impl->GetObject(GrEntry);
+ //Handle(::GEOM_Object) HGrObj = _impl->GetObject(GrEntry);
// add named objects
- //HANDLE_NAMESPACE(GEOM_Object) anObj;
+ //Handle(::GEOM_Object) anObj;
for(int i=1; i<=SeqS.Length(); i++) {
TopoDS_Shape aValue = SeqS.Value(i);
//anArray = new TColStd_HArray1OfInteger(1,1);
GOp->AddObject(GrObj,anIndex);
//anObj = GEOM_Engine::GetEngine()->AddObject(GEOM_SUBSHAPE);
//if (anObj.IsNull()) continue;
- //HANDLE_NAMESPACE(GEOM_Function) aFunction = anObj->AddFunction(GEOM_Object::GetSubShapeID(), 1);
+ //Handle(::GEOM_Function) aFunction = anObj->AddFunction(GEOM_Object::GetSubShapeID(), 1);
//if (aFunction.IsNull()) continue;
//GEOM_ISubShape aSSI(aFunction);
//aSSI.SetMainShape(aMainShape->GetLastFunction());
if(theMainShape->_is_nil()) return aResList._retn();
CORBA::String_var entry = theMainShape->GetEntry();
- HANDLE_NAMESPACE(GEOM_Object) aMainShape = HANDLE_NAMESPACE(GEOM_Object)::DownCast
+ Handle(::GEOM_Object) aMainShape = Handle(::GEOM_Object)::DownCast
( _impl->GetObject( entry ));
if (aMainShape.IsNull()) return aResList._retn();
TopoDS_Shape MainSh = aMainShape->GetValue();
aSeq.reserve(1);
// Prepare a file name to open
TCollection_AsciiString aNameWithExt("");
- if (isMultiFile)
- aNameWithExt = TCollection_AsciiString( (char*)(SALOMEDS_Tool::GetNameFromPath(
- Kernel_Utils::encode(getStudyServant()->URL())).c_str()));
-#if OCC_VERSION_MAJOR > 6
+ if (isMultiFile)
+ aNameWithExt = TCollection_AsciiString((char*)(SALOMEDS_Tool::GetNameFromPath(
+ Kernel_Utils::encode(getStudyServant()->URL())).c_str()));
aNameWithExt += TCollection_AsciiString("_GEOM.cbf");
-#else
- aNameWithExt += TCollection_AsciiString("_GEOM.sgd");
-#endif
aSeq.push_back(CORBA::string_dup(aNameWithExt.ToCString()));
// Build a full file name of temporary file
TCollection_AsciiString aFullName = TCollection_AsciiString((char*)aTmpDir.c_str()) + aNameWithExt;
TCollection_AsciiString aNameWithExt("");
SALOMEDS::Study_var study = getStudyServant();
-#if OCC_VERSION_MAJOR > 6
// Get the file name.
int i;
int aLength = aSeq.size();
break;
}
}
-#else
- if (isMultiFile) {
- CORBA::String_var url = study->URL();
- aNameWithExt = (char*)SALOMEDS_Tool::GetNameFromPath(url.in()).c_str();
- }
-
- aNameWithExt += "_GEOM.sgd";
-#endif
TCollection_AsciiString aFullName = (TCollection_AsciiString((char*)aTmpDir.c_str()) + aNameWithExt);
//Create a new GEOM_Object
- HANDLE_NAMESPACE(GEOM_Object) anObj = _impl->AddObject(theObjectID);
- HANDLE_NAMESPACE(GEOM_Function) aFunction = anObj->AddFunction(GEOMImpl_CopyDriver::GetID(), COPY_WITHOUT_REF);
+ Handle(::GEOM_Object) anObj = _impl->AddObject(theObjectID);
+ Handle(::GEOM_Function) aFunction = anObj->AddFunction(GEOMImpl_CopyDriver::GetID(), COPY_WITHOUT_REF);
aFunction->SetValue(aTopology);
TCollection_AsciiString anEntry;
GEOM::GEOM_Object_var anArgOTrsf = aTrsfOpSv->TransformLikeOtherCopy(anArgO, theObject);
if (!CORBA::is_nil(anArgOTrsf)) {
CORBA::String_var anArgOTrsfEntry = anArgOTrsf->GetEntry();
- HANDLE_NAMESPACE(GEOM_BaseObject) anArgOTrsfImpl = _impl->GetObject(anArgOTrsfEntry);
- HANDLE_NAMESPACE(GEOM_Function) anArgOTrsfFun = anArgOTrsfImpl->GetLastFunction();
+ Handle(::GEOM_BaseObject) anArgOTrsfImpl = _impl->GetObject(anArgOTrsfEntry);
+ Handle(::GEOM_Function) anArgOTrsfFun = anArgOTrsfImpl->GetLastFunction();
anArgOTrsfFun->SetDescription("");
aSubO = aShapesOp->GetInPlace(theObject, anArgOTrsf);
}
/*
- HANDLE_NAMESPACE(GEOM_Function) anOFun = theObject->GetLastFunction();
+ Handle(::GEOM_Function) anOFun = theObject->GetLastFunction();
if (!anOFun.IsNull()) {
CORBA::String_var entryArg = anArgO->GetEntry();
- HANDLE_NAMESPACE(GEOM_Object) anArgOImpl = _impl->GetObject(entryArg);
+ Handle(::GEOM_Object) anArgOImpl = _impl->GetObject(entryArg);
if (!anArgOImpl.IsNull()) {
TopoDS_Shape anArgOShape = anArgOImpl->GetValue();
TopoDS_Shape aMultiArgShape;
{}
}
GEOM::GEOM_Object_var anArgOMulti = (aMultiArgShape); // TODO
- HANDLE_NAMESPACE(GEOM_Function) anArgOMultiFun = anArgOMulti->GetLastFunction();
+ Handle(::GEOM_Function) anArgOMultiFun = anArgOMulti->GetLastFunction();
anArgOMultiFun->SetDescription("");
aSubO = aShapesOp->GetInPlace(theObject, anArgOMulti);
}
aResParts->length(nb);
if (nb > 0)
{
- HANDLE_NAMESPACE(GEOM_BaseObject) aMainObj = _impl->GetObject(theObject->GetEntry());
- HANDLE_NAMESPACE(GEOM_Function) aFunction = aMainObj->GetLastFunction();
+ Handle(::GEOM_BaseObject) aMainObj = _impl->GetObject(theObject->GetEntry());
+ Handle(::GEOM_Function) aFunction = aMainObj->GetLastFunction();
GEOM::TPythonDump pd (aFunction, true);
pd <<"[";
int i = 0, j = 0;
anObjEntryMap.insert(anEntry);
aResParts[nbRes++] = anObj;
// clear python dump of object
- HANDLE_NAMESPACE(GEOM_BaseObject) aGeomObj = _impl->GetObject(anEntry);
- HANDLE_NAMESPACE(GEOM_Function) anObjFun = aGeomObj->GetLastFunction();
+ Handle(::GEOM_BaseObject) aGeomObj = _impl->GetObject(anEntry);
+ Handle(::GEOM_Function) anObjFun = aGeomObj->GetLastFunction();
if ( !anObjFun.IsNull() )
anObjFun->SetDescription( "" );
if ( j > 0 )
GEOM::GEOM_Object_var anObj = anOutArgs[ i ];
if (CORBA::is_nil(anObj))
continue;
- HANDLE_NAMESPACE(GEOM_BaseObject) aGeomObj = _impl->GetObject(anObj->GetEntry());
+ Handle(::GEOM_BaseObject) aGeomObj = _impl->GetObject(anObj->GetEntry());
if ( j > 0 )
pd << ", ";
pd << aGeomObj;
GEOM::GEOM_Object_var anArgOTrsf = aTrsfOpSv->TransformLikeOtherCopy(anOldSubO, theNewO);
if (!CORBA::is_nil(anArgOTrsf)) {
CORBA::String_var anArgOTrsfEntry = anArgOTrsf->GetEntry();
- HANDLE_NAMESPACE(GEOM_BaseObject) anArgOTrsfImpl = _impl->GetObject(anArgOTrsfEntry);
- HANDLE_NAMESPACE(GEOM_Function) anArgOTrsfFun = anArgOTrsfImpl->GetLastFunction();
+ Handle(::GEOM_BaseObject) anArgOTrsfImpl = _impl->GetObject(anArgOTrsfEntry);
+ Handle(::GEOM_Function) anArgOTrsfFun = anArgOTrsfImpl->GetLastFunction();
anArgOTrsfFun->SetDescription("");
aNewSubO = aShapesOp->GetInPlace(theNewO, anArgOTrsf);
}
GEOM::GEOM_Object_var anArgOTrsf = aTrsfOpSv->TransformLikeOtherCopy(anArgO, theObject);
if (!CORBA::is_nil(anArgOTrsf)) {
CORBA::String_var anArgOTrsfEntry = anArgOTrsf->GetEntry();
- HANDLE_NAMESPACE(GEOM_BaseObject) anArgOTrsfImpl = _impl->GetObject(anArgOTrsfEntry);
- HANDLE_NAMESPACE(GEOM_Function) anArgOTrsfFun = anArgOTrsfImpl->GetLastFunction();
+ Handle(::GEOM_BaseObject) anArgOTrsfImpl = _impl->GetObject(anArgOTrsfEntry);
+ Handle(::GEOM_Function) anArgOTrsfFun = anArgOTrsfImpl->GetLastFunction();
anArgOTrsfFun->SetDescription("");
aSubO = aShapesOp->GetInPlace(theObject, anArgOTrsf);
}
aResParts->length(nb);
if (nb > 0)
{
- HANDLE_NAMESPACE(GEOM_BaseObject) aMainObj = _impl->GetObject(theObject->GetEntry());
- HANDLE_NAMESPACE(GEOM_Function) aFunction = aMainObj->GetLastFunction();
+ Handle(::GEOM_BaseObject) aMainObj = _impl->GetObject(theObject->GetEntry());
+ Handle(::GEOM_Function) aFunction = aMainObj->GetLastFunction();
GEOM::TPythonDump pd (aFunction, true);
pd <<"[";
int i = 0, j = 0;
anObjEntryMap.insert(anEntry);
aResParts[nbRes++] = anObj;
// clear python dump of object
- HANDLE_NAMESPACE(GEOM_BaseObject) aGeomObj = _impl->GetObject(anEntry);
- HANDLE_NAMESPACE(GEOM_Function) anObjFun = aGeomObj->GetLastFunction();
+ Handle(::GEOM_BaseObject) aGeomObj = _impl->GetObject(anEntry);
+ Handle(::GEOM_Function) anObjFun = aGeomObj->GetLastFunction();
if ( !anObjFun.IsNull() )
anObjFun->SetDescription( "" );
if ( j > 0 )
GEOM::GEOM_Object_var anObj = theArgs[ i ];
if (CORBA::is_nil(anObj))
continue;
- HANDLE_NAMESPACE(GEOM_BaseObject) aGeomObj = _impl->GetObject(anObj->GetEntry());
+ Handle(::GEOM_BaseObject) aGeomObj = _impl->GetObject(anObj->GetEntry());
if ( j > 0 )
pd << ", ";
pd << aGeomObj;
GEOM::GEOM_Object_var anArgOTrsf = aTrsfOpSv->TransformLikeOtherCopy(anOldSubO, theNewO);
if (!CORBA::is_nil(anArgOTrsf)) {
CORBA::String_var anArgOTrsfEntry = anArgOTrsf->GetEntry();
- HANDLE_NAMESPACE(GEOM_BaseObject) anArgOTrsfImpl = _impl->GetObject(anArgOTrsfEntry);
- HANDLE_NAMESPACE(GEOM_Function) anArgOTrsfFun = anArgOTrsfImpl->GetLastFunction();
+ Handle(::GEOM_BaseObject) anArgOTrsfImpl = _impl->GetObject(anArgOTrsfEntry);
+ Handle(::GEOM_Function) anArgOTrsfFun = anArgOTrsfImpl->GetLastFunction();
anArgOTrsfFun->SetDescription("");
aNewSubO = aShapesOp->GetInPlace(theNewO, anArgOTrsf);
}
// load plugin library
LibHandle libHandle = LoadLib( aPlatformLibName.c_str() );
if (!libHandle) {
- // report any error, if occured
+ // report any error, if occurred
#ifndef WIN32
throw(SALOME_Exception(dlerror()));
#else
if (CORBA::is_nil(theMainShape) || theIndices.length() < 1)
return GEOM::GEOM_Object::_nil();
CORBA::String_var entry = theMainShape->GetEntry();
- HANDLE_NAMESPACE(GEOM_Object) aMainShape = HANDLE_NAMESPACE(GEOM_Object)::DownCast
+ Handle(::GEOM_Object) aMainShape = Handle(::GEOM_Object)::DownCast
( _impl->GetObject( entry ));
if (aMainShape.IsNull()) return GEOM::GEOM_Object::_nil();
Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger(1, theIndices.length());
- for(Standard_Integer i = 0; i<theIndices.length(); i++) anArray->SetValue(i+1, theIndices[i]);
+ for(CORBA::ULong i = 0; i<theIndices.length(); i++) anArray->SetValue(i+1, theIndices[i]);
- HANDLE_NAMESPACE(GEOM_Object) anObject = _impl->AddSubShape(aMainShape, anArray, true);
+ Handle(::GEOM_Object) anObject = _impl->AddSubShape(aMainShape, anArray, true);
if(anObject.IsNull()) return GEOM::GEOM_Object::_nil();
TCollection_AsciiString anEntry;
void GEOM_Gen_i::RemoveObject(GEOM::GEOM_BaseObject_ptr theObject)
{
CORBA::String_var anEntry = theObject->GetEntry();
- HANDLE_NAMESPACE(GEOM_BaseObject) anObject = _impl->GetObject(anEntry, false);
+ Handle(::GEOM_BaseObject) anObject = _impl->GetObject(anEntry, false);
if (!anObject.IsNull())
_impl->RemoveObject(anObject);
}
GEOM::GEOM_BaseObject_ptr GEOM_Gen_i::GetObject (const char* theEntry)
{
GEOM::GEOM_BaseObject_var obj;
- HANDLE_NAMESPACE(GEOM_BaseObject) handle_object = _impl->GetObject((char*)theEntry);
+ Handle(::GEOM_BaseObject) handle_object = _impl->GetObject((char*)theEntry);
if (handle_object.IsNull()) return obj._retn();
TCollection_AsciiString stringIOR = handle_object->GetIOR();
GEOM_BaseObject_i* servant = 0;
switch( handle_object->GetType() ) {
case GEOM_FIELD: {
- servant = new GEOM_Field_i (_poa, engine, HANDLE_NAMESPACE(GEOM_Field)::DownCast( handle_object ));
+ servant = new GEOM_Field_i (_poa, engine, Handle(::GEOM_Field)::DownCast( handle_object ));
break;
}
case GEOM_FIELD_STEP: {
- HANDLE_NAMESPACE(GEOM_FieldStep) step = HANDLE_NAMESPACE(GEOM_FieldStep)::DownCast( handle_object );
- HANDLE_NAMESPACE(GEOM_Field) field = step->GetField();
+ Handle(::GEOM_FieldStep) step = Handle(::GEOM_FieldStep)::DownCast( handle_object );
+ Handle(::GEOM_Field) field = step->GetField();
int type = ( !field.IsNull() ? field->GetDataType() : 0 );
switch( type ) {
case GEOM::FDT_Bool:
break;
}
default:
- servant = new GEOM_Object_i (_poa, engine, HANDLE_NAMESPACE(GEOM_Object)::DownCast( handle_object ));
+ servant = new GEOM_Object_i (_poa, engine, Handle(::GEOM_Object)::DownCast( handle_object ));
}
PortableServer::ObjectId_var id = _poa->activate_object(servant);
}
}
- for ( int i = 0; i < what.length(); i++ ) {
+ for ( CORBA::ULong i = 0; i < what.length(); i++ ) {
SALOMEDS::SObject_var sobj = what[i];
if ( CORBA::is_nil( sobj ) ) continue; // skip bad object
// insert the object to the use case tree
GEOMUtils::TreeModel tree;
std::string entry;
- for ( int i = 0; i < theObjectEntries.length(); i++ ) {
+ for ( CORBA::ULong i = 0; i < theObjectEntries.length(); i++ ) {
// process objects one-by-one
entry = theObjectEntries[i].in();
GEOM::GEOM_BaseObject_var anObj = GetObject(entry.c_str() );
GEOMUtils::NodeLinks anEntries;
GEOMUtils::LevelInfo aLevelMap;
if ( level > 0 ) {
- if ( level-1 >= upLevelList.size() ) {
+ if ( level-1 >= (int)upLevelList.size() ) {
// create a new map
upLevelList.push_back( aLevelMap );
} else {
// get objects on that the current one depends
GEOM::ListOfGBO_var depList = gbo->GetDependency();
std::string aDepEntry;
- for( int j = 0; j < depList->length(); j++ ) {
+ for( CORBA::ULong j = 0; j < depList->length(); j++ ) {
if ( depList[j]->_is_nil() )
continue;
aDepEntry = depList[j]->GetEntry();
std::string aGboEntry = gbo->GetEntry();
Handle(TDocStd_Document) aDoc = GEOM_Engine::GetEngine()->GetDocument();
Handle(TDataStd_TreeNode) aNode, aRoot;
- HANDLE_NAMESPACE(GEOM_Function) aFunction;
+ Handle(::GEOM_Function) aFunction;
if (aDoc->Main().FindAttribute(GEOM_Function::GetFunctionTreeID(), aRoot)) {
// go through the whole OCAF tree
TDataStd_ChildNodeIterator Itr( aRoot );
continue;
std::string aGoEntry = geomObj->GetEntry();
// go through dependencies of current object to check whether it depends on the given object
- for( int i = 0; i < depList->length(); i++ ) {
+ for( CORBA::ULong i = 0; i < depList->length(); i++ ) {
if ( depList[i]->_is_nil() )
continue;
if ( depList[i]->_is_equivalent( gbo ) ) {
GEOMUtils::NodeLinks anEntries;
GEOMUtils::LevelInfo aLevelMap;
anEntries.push_back( aGboEntry );
- if ( level >= downLevelList.size() ) {
+ if ( level >= (int)downLevelList.size() ) {
downLevelList.push_back( aLevelMap );
} else {
aLevelMap = downLevelList.at(level);
GEOM::string_array& theOtherEntries)
{
std::set<std::string> aSelected, aParents, aChildren, anOthers;
- for ( int i = 0; i < theSelectedEntries.length(); i++ ) {
+ for ( CORBA::ULong i = 0; i < theSelectedEntries.length(); i++ ) {
aSelected.insert( CORBA::string_dup( theSelectedEntries[i] ) );
}
Handle(TDocStd_Document) aDoc = GEOM_Engine::GetEngine()->GetDocument();
Handle(TDataStd_TreeNode) aNode, aRoot;
- HANDLE_NAMESPACE(GEOM_Function) aFunction;
+ Handle(::GEOM_Function) aFunction;
if (aDoc->Main().FindAttribute(GEOM_Function::GetFunctionTreeID(), aRoot)) {
// go through the whole OCAF tree
TDF_Label aLabel;
// because they could not be modified anyhow.
std::set<std::string> aToBeInSelected;
for ( it = aSelected.begin(); it != aSelected.end(); ++it ) {
- HANDLE_NAMESPACE(GEOM_BaseObject) handle_object = _impl->GetObject((*it).c_str(), false);
+ Handle(::GEOM_BaseObject) handle_object = _impl->GetObject((*it).c_str(), false);
if ( handle_object.IsNull() )
continue;
return;
// go through dependencies of current object to check whether it depends on the given object
std::string aDepEntry;
- for( int i = 0; i < depList->length(); i++ ) {
+ for( CORBA::ULong i = 0; i < depList->length(); i++ ) {
aDepEntry = depList[i]->GetEntry();
if ( depList[i]->_is_nil() ||
aDepEntry == anEntry || // skip self-depending
std::set<std::string>& anOthers)
{
std::set<std::string>::iterator foundIt;
- HANDLE_NAMESPACE(GEOM_BaseObject) handle_object = _impl->GetObject(aSelectedEntry.c_str(), false);
+ Handle(::GEOM_BaseObject) handle_object = _impl->GetObject(aSelectedEntry.c_str(), false);
if ( handle_object.IsNull() )
return;
- HANDLE_NAMESPACE(GEOM_Function) aShapeFun = handle_object->GetFunction(1);
+ Handle(::GEOM_Function) aShapeFun = handle_object->GetFunction(1);
if ( aShapeFun.IsNull() || !aShapeFun->HasSubShapeReferences() )
return;
//=====================================================================
class GEOM_I_EXPORT GEOM_GenericOperationsCreator
{
-public:
+ public:
// Create operations
virtual GEOM_IOperations_i* Create (PortableServer::POA_ptr thePOA,
GEOM::GEOM_Gen_ptr theEngine,
::GEOMImpl_Gen* theGenImpl) = 0;
// return the name of IDL module
//virtual std::string GetModuleName() = 0;
+ virtual ~GEOM_GenericOperationsCreator() {}
};
//=====================================================================
GetOperations()->SetNotDone();
//Create the Box
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeBoxDXDYDZ(theDX, theDY, theDZ);
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeBoxDXDYDZ(theDX, theDY, theDZ);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
//Set a not done flag
GetOperations()->SetNotDone();
- HANDLE_NAMESPACE(GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
- HANDLE_NAMESPACE(GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
+ Handle(::GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
+ Handle(::GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
if (aPnt1.IsNull() || aPnt2.IsNull()) return aGEOMObject._retn();
//Create the Box
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeBoxTwoPnt(aPnt1, aPnt2);
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeBoxTwoPnt(aPnt1, aPnt2);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
return aGEOMObject._retn();
//Create the Face
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeFaceHW(theH, theW, theOrientation);
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeFaceHW(theH, theW, theOrientation);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference object
- HANDLE_NAMESPACE(GEOM_Object) anObj = GetObjectImpl(theObj);
+ Handle(::GEOM_Object) anObj = GetObjectImpl(theObj);
if (anObj.IsNull())
return aGEOMObject._retn();
//Create the Face
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeFaceObjHW(anObj, theH, theW);
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeFaceObjHW(anObj, theH, theW);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference points
- HANDLE_NAMESPACE(GEOM_Object) aPnt = GetObjectImpl(thePnt);
- HANDLE_NAMESPACE(GEOM_Object) aVec = GetObjectImpl(theVec);
+ Handle(::GEOM_Object) aPnt = GetObjectImpl(thePnt);
+ Handle(::GEOM_Object) aVec = GetObjectImpl(theVec);
if (aPnt.IsNull() || aVec.IsNull()) return aGEOMObject._retn();
// Make Disk
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeDiskPntVecR(aPnt, aVec, theR);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference points
- HANDLE_NAMESPACE(GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
- HANDLE_NAMESPACE(GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
- HANDLE_NAMESPACE(GEOM_Object) aPnt3 = GetObjectImpl(thePnt3);
+ Handle(::GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
+ Handle(::GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
+ Handle(::GEOM_Object) aPnt3 = GetObjectImpl(thePnt3);
if (aPnt1.IsNull() || aPnt2.IsNull() || aPnt3.IsNull()) return aGEOMObject._retn();
// Make Disk
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeDiskThreePnt(aPnt1, aPnt2, aPnt3);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
return aGEOMObject._retn();
//Create the Face
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeDiskR(theR, theOrientation);
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeDiskR(theR, theOrientation);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Create the Cylinder
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeCylinderRH(theR, theH);
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeCylinderRH(theR, theH);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Create the Cylinder
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeCylinderRHA(theR, theH, theA);
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeCylinderRHA(theR, theH, theA);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference points
- HANDLE_NAMESPACE(GEOM_Object) aPnt = GetObjectImpl(thePnt);
- HANDLE_NAMESPACE(GEOM_Object) aVec = GetObjectImpl(theVec);
+ Handle(::GEOM_Object) aPnt = GetObjectImpl(thePnt);
+ Handle(::GEOM_Object) aVec = GetObjectImpl(theVec);
if (aPnt.IsNull() || aVec.IsNull()) return aGEOMObject._retn();
//Create the Cylinder
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeCylinderPntVecRH(aPnt, aVec, theR, theH);
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeCylinderPntVecRH(aPnt, aVec, theR, theH);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference points
- HANDLE_NAMESPACE(GEOM_Object) aPnt = GetObjectImpl(thePnt);
- HANDLE_NAMESPACE(GEOM_Object) aVec = GetObjectImpl(theVec);
+ Handle(::GEOM_Object) aPnt = GetObjectImpl(thePnt);
+ Handle(::GEOM_Object) aVec = GetObjectImpl(theVec);
if (aPnt.IsNull() || aVec.IsNull()) return aGEOMObject._retn();
//Create the Cylinder
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeCylinderPntVecRHA(aPnt, aVec, theR, theH, theA);
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeCylinderPntVecRHA(aPnt, aVec, theR, theH, theA);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Create the Cone
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeConeR1R2H(theR1, theR2, theH);
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeConeR1R2H(theR1, theR2, theH);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference points
- HANDLE_NAMESPACE(GEOM_Object) aPnt = GetObjectImpl(thePnt);
- HANDLE_NAMESPACE(GEOM_Object) aVec = GetObjectImpl(theVec);
+ Handle(::GEOM_Object) aPnt = GetObjectImpl(thePnt);
+ Handle(::GEOM_Object) aVec = GetObjectImpl(theVec);
if (aPnt.IsNull() || aVec.IsNull()) return aGEOMObject._retn();
//Create the Cone
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeConePntVecR1R2H(aPnt, aVec, theR1, theR2, theH);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Create the Cone
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeSphereR(theR);
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeSphereR(theR);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference point
- HANDLE_NAMESPACE(GEOM_Object) aPnt = GetObjectImpl(thePnt);
+ Handle(::GEOM_Object) aPnt = GetObjectImpl(thePnt);
if (aPnt.IsNull()) return aGEOMObject._retn();
//Create the Sphere
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeSpherePntR(aPnt, theR);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
// Make Torus
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeTorusRR(theRMajor, theRMinor);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference points
- HANDLE_NAMESPACE(GEOM_Object) aPnt = GetObjectImpl(thePnt);
- HANDLE_NAMESPACE(GEOM_Object) aVec = GetObjectImpl(theVec);
+ Handle(::GEOM_Object) aPnt = GetObjectImpl(thePnt);
+ Handle(::GEOM_Object) aVec = GetObjectImpl(theVec);
if (aPnt.IsNull() || aVec.IsNull()) return aGEOMObject._retn();
// Make Torus
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeTorusPntVecRR(aPnt, aVec, theRMajor, theRMinor);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aBase = GetObjectImpl(theBase);
- HANDLE_NAMESPACE(GEOM_Object) aVec = GetObjectImpl(theVec);
+ Handle(::GEOM_Object) aBase = GetObjectImpl(theBase);
+ Handle(::GEOM_Object) aVec = GetObjectImpl(theVec);
if (aBase.IsNull() || aVec.IsNull()) return aGEOMObject._retn();
//Create the Prism
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakePrismVecH(aBase, aVec, theH);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aBase = GetObjectImpl(theBase);
- HANDLE_NAMESPACE(GEOM_Object) aVec = GetObjectImpl(theVec);
+ Handle(::GEOM_Object) aBase = GetObjectImpl(theBase);
+ Handle(::GEOM_Object) aVec = GetObjectImpl(theVec);
if (aBase.IsNull() || aVec.IsNull()) return aGEOMObject._retn();
//Create the Prism
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakePrismVecH2Ways(aBase, aVec, theH);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aBase = GetObjectImpl(theBase);
- HANDLE_NAMESPACE(GEOM_Object) aVec = GetObjectImpl(theVec);
+ Handle(::GEOM_Object) aBase = GetObjectImpl(theBase);
+ Handle(::GEOM_Object) aVec = GetObjectImpl(theVec);
if (aBase.IsNull() || aVec.IsNull()) return aGEOMObject._retn();
//Create the Prism
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakePrismVecH(aBase, aVec, theH, theScaleFactor);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aBase = GetObjectImpl(theBase);
- HANDLE_NAMESPACE(GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
- HANDLE_NAMESPACE(GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
+ Handle(::GEOM_Object) aBase = GetObjectImpl(theBase);
+ Handle(::GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
+ Handle(::GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
if (aBase.IsNull() || aPoint1.IsNull() || aPoint2.IsNull())
return aGEOMObject._retn();
//Create the Prism
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakePrismTwoPnt(aBase, aPoint1, aPoint2);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aBase = GetObjectImpl(theBase);
- HANDLE_NAMESPACE(GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
- HANDLE_NAMESPACE(GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
+ Handle(::GEOM_Object) aBase = GetObjectImpl(theBase);
+ Handle(::GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
+ Handle(::GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
if (aBase.IsNull() || aPoint1.IsNull() || aPoint2.IsNull())
return aGEOMObject._retn();
//Create the Prism
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakePrismTwoPnt2Ways(aBase, aPoint1, aPoint2);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aBase = GetObjectImpl(theBase);
- HANDLE_NAMESPACE(GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
- HANDLE_NAMESPACE(GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
+ Handle(::GEOM_Object) aBase = GetObjectImpl(theBase);
+ Handle(::GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
+ Handle(::GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
if (aBase.IsNull() || aPoint1.IsNull() || aPoint2.IsNull())
return aGEOMObject._retn();
//Create the Prism
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakePrismTwoPnt(aBase, aPoint1, aPoint2, theScaleFactor);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aBase = GetObjectImpl(theBase);
+ Handle(::GEOM_Object) aBase = GetObjectImpl(theBase);
if (aBase.IsNull()) return aGEOMObject._retn();
//Create the Prism
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakePrismDXDYDZ(aBase, theDX, theDY, theDZ);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aBase = GetObjectImpl(theBase);
+ Handle(::GEOM_Object) aBase = GetObjectImpl(theBase);
if (aBase.IsNull()) return aGEOMObject._retn();
//Create the Prism
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakePrismDXDYDZ2Ways(aBase, theDX, theDY, theDZ);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aBase = GetObjectImpl(theBase);
+ Handle(::GEOM_Object) aBase = GetObjectImpl(theBase);
if (aBase.IsNull()) return aGEOMObject._retn();
//Create the Prism
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakePrismDXDYDZ(aBase, theDX, theDY, theDZ, theScaleFactor);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aInit = GetObjectImpl(theInitShape);
- HANDLE_NAMESPACE(GEOM_Object) aBase = GetObjectImpl(theBase);
+ Handle(::GEOM_Object) aInit = GetObjectImpl(theInitShape);
+ Handle(::GEOM_Object) aBase = GetObjectImpl(theBase);
if (aBase.IsNull() || aInit.IsNull()) return aGEOMObject._retn();
//Create the Prism
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeDraftPrism(aInit, aBase, theHeight, theAngle, theFuse, theInvert);
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeDraftPrism(aInit, aBase, theHeight, theAngle, theFuse, theInvert);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aBase = GetObjectImpl(theBase);
- HANDLE_NAMESPACE(GEOM_Object) aPath = GetObjectImpl(thePath);
+ Handle(::GEOM_Object) aBase = GetObjectImpl(theBase);
+ Handle(::GEOM_Object) aPath = GetObjectImpl(thePath);
if (aBase.IsNull() || aPath.IsNull()) return aSeq._retn();
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++)
- aSeq[i-1] = GetObject(HANDLE_NAMESPACE(GEOM_Object)::DownCast(aHSeq->Value(i)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aBase = GetObjectImpl(theBase);
- HANDLE_NAMESPACE(GEOM_Object) anAxis = GetObjectImpl(theAxis);
+ Handle(::GEOM_Object) aBase = GetObjectImpl(theBase);
+ Handle(::GEOM_Object) anAxis = GetObjectImpl(theAxis);
if (aBase.IsNull() || anAxis.IsNull()) return aGEOMObject._retn();
//Create the Revolution
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeRevolutionAxisAngle(aBase, anAxis, theAngle);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aBase = GetObjectImpl(theBase);
- HANDLE_NAMESPACE(GEOM_Object) anAxis = GetObjectImpl(theAxis);
+ Handle(::GEOM_Object) aBase = GetObjectImpl(theBase);
+ Handle(::GEOM_Object) anAxis = GetObjectImpl(theAxis);
if (aBase.IsNull() || anAxis.IsNull()) return aGEOMObject._retn();
//Create the Revolution
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeRevolutionAxisAngle2Ways(aBase, anAxis, theAngle);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- std::list< HANDLE_NAMESPACE(GEOM_Object) > aShapes;
+ std::list< Handle(::GEOM_Object) > aShapes;
if (! GetListOfObjectsImpl( theContours, aShapes ))
return aGEOMObject._retn();
}
//Create the Solid
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeFilling
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeFilling
(aShapes, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter, aMethod, theApprox);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
//Get the shapes
aLen = theSeqSections.length();
for (ind = 0; ind < aLen; ind++) {
- HANDLE_NAMESPACE(GEOM_Object) aSh = GetObjectImpl(theSeqSections[ind]);
+ Handle(::GEOM_Object) aSh = GetObjectImpl(theSeqSections[ind]);
if (!aSh.IsNull())
aSeqSections->Append(aSh);
}
return aGEOMObject._retn();
// Make shell or solid
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeThruSections(aSeqSections,theModeSolid,thePreci,theRuled);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
if (aNbLocs && aNbBases != aNbLocs)
return aSeq._retn();
- HANDLE_NAMESPACE(GEOM_Object) aPath = GetObjectImpl(thePath);
+ Handle(::GEOM_Object) aPath = GetObjectImpl(thePath);
if (aPath.IsNull())
return aSeq._retn();
for (ind = 0; ind < aNbBases; ind++) {
- HANDLE_NAMESPACE(GEOM_Object) aBase = GetObjectImpl(theBases[ind]);
+ Handle(::GEOM_Object) aBase = GetObjectImpl(theBases[ind]);
if (aBase.IsNull())
continue;
if (aNbLocs)
{
- HANDLE_NAMESPACE(GEOM_Object) aLoc = GetObjectImpl(theLocations[ind]);
+ Handle(::GEOM_Object) aLoc = GetObjectImpl(theLocations[ind]);
if (aLoc.IsNull())
continue;
aSeqLocations->Append(aLoc);
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++)
- aSeq[i-1] = GetObject(HANDLE_NAMESPACE(GEOM_Object)::DownCast(aHSeq->Value(i)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
if (aNbLocs && aNbBases != aNbLocs)
return aSeq._retn();
- HANDLE_NAMESPACE(GEOM_Object) aPath = GetObjectImpl(thePath);
+ Handle(::GEOM_Object) aPath = GetObjectImpl(thePath);
if (aPath.IsNull())
return aSeq._retn();
for (ind = 0; ind < aNbBases; ind++) {
- HANDLE_NAMESPACE(GEOM_Object) aBase = GetObjectImpl(theBases[ind]);
+ Handle(::GEOM_Object) aBase = GetObjectImpl(theBases[ind]);
if (aBase.IsNull())
continue;
if (aNbLocs) {
- HANDLE_NAMESPACE(GEOM_Object) aLoc = GetObjectImpl(theLocations[ind]);
+ Handle(::GEOM_Object) aLoc = GetObjectImpl(theLocations[ind]);
if (aLoc.IsNull())
continue;
aSeqLocations->Append(aLoc);
aSeqBases->Append(aBase);
if (aNbSubBases >= aNbBases) {
- HANDLE_NAMESPACE(GEOM_Object) aSubBase = GetObjectImpl(theSubBases[ind]);
+ Handle(::GEOM_Object) aSubBase = GetObjectImpl(theSubBases[ind]);
if (aSubBase.IsNull()) {
aSeqSubBases->Clear();
aNbSubBases = 0;
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++)
- aSeq[i-1] = GetObject(HANDLE_NAMESPACE(GEOM_Object)::DownCast(aHSeq->Value(i)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
return aSeq._retn();
for (ind = 0; ind < aNbBases; ind++) {
- HANDLE_NAMESPACE(GEOM_Object) aBase = GetObjectImpl(theBases[ind]);
+ Handle(::GEOM_Object) aBase = GetObjectImpl(theBases[ind]);
if (aBase.IsNull())
continue;
if (aNbLocs) {
- HANDLE_NAMESPACE(GEOM_Object) aLoc = GetObjectImpl(theLocations[ind]);
+ Handle(::GEOM_Object) aLoc = GetObjectImpl(theLocations[ind]);
if (aLoc.IsNull())
continue;
aSeqLocations->Append(aLoc);
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++)
- aSeq[i-1] = GetObject(HANDLE_NAMESPACE(GEOM_Object)::DownCast(aHSeq->Value(i)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aBase = GetObjectImpl(theBase);
- HANDLE_NAMESPACE(GEOM_Object) aPath = GetObjectImpl(thePath);
- HANDLE_NAMESPACE(GEOM_Object) aVec = GetObjectImpl(theVec);
+ Handle(::GEOM_Object) aBase = GetObjectImpl(theBase);
+ Handle(::GEOM_Object) aPath = GetObjectImpl(thePath);
+ Handle(::GEOM_Object) aVec = GetObjectImpl(theVec);
if (aBase.IsNull() || aPath.IsNull() || aVec.IsNull()) return aSeq._retn();
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++)
- aSeq[i-1] = GetObject(HANDLE_NAMESPACE(GEOM_Object)::DownCast(aHSeq->Value(i)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
//Get the basic object
- HANDLE_NAMESPACE(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
if (aBasicObject.IsNull()) return aGEOMObject._retn();
// Get faces IDs.
//Create the thickened shape
if (doCopy)
{
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeThickening(
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeThickening(
aBasicObject, aFaceIDs, theOffset, doCopy, theInside);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
// Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
- HANDLE_NAMESPACE(GEOM_Object) aBase1 = GetObjectImpl(theBase1);
- HANDLE_NAMESPACE(GEOM_Object) aBase2 = GetObjectImpl(theBase2);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aBase1 = GetObjectImpl(theBase1);
+ Handle(::GEOM_Object) aBase2 = GetObjectImpl(theBase2);
if (aShape.IsNull() || aBase1.IsNull() || aBase2.IsNull()) return aGEOMObject._retn();
// Create the Path
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->RestorePath(aShape, aBase1, aBase2);
+ Handle(::GEOM_Object) anObject = GetOperations()->RestorePath(aShape, aBase1, aBase2);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
// Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return aGEOMObject._retn();
Handle(TColStd_HSequenceOfTransient) aSeqBases1 = new TColStd_HSequenceOfTransient;
int aNbBases2 = theBase2.length();
for (ind = 0; ind < aNbBases1; ind++) {
- HANDLE_NAMESPACE(GEOM_Object) aBase = GetObjectImpl(theBase1[ind]);
+ Handle(::GEOM_Object) aBase = GetObjectImpl(theBase1[ind]);
if (!aBase.IsNull())
aSeqBases1->Append(aBase);
}
for (ind = 0; ind < aNbBases2; ind++) {
- HANDLE_NAMESPACE(GEOM_Object) aBase = GetObjectImpl(theBase2[ind]);
+ Handle(::GEOM_Object) aBase = GetObjectImpl(theBase2[ind]);
if (!aBase.IsNull())
aSeqBases2->Append(aBase);
}
return aGEOMObject._retn();
// Create the Path
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->RestorePath(aShape, aSeqBases1, aSeqBases2);
+ Handle(::GEOM_Object) anObject = GetOperations()->RestorePath(aShape, aSeqBases1, aSeqBases2);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Create the point
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakePointXYZ(theX, theY, theZ);
+ Handle(::GEOM_Object) anObject = GetOperations()->MakePointXYZ(theX, theY, theZ);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference point
- HANDLE_NAMESPACE(GEOM_Object) aReference = GetObjectImpl(theReference);
+ Handle(::GEOM_Object) aReference = GetObjectImpl(theReference);
if (aReference.IsNull()) return aGEOMObject._retn();
//Create the point
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakePointWithReference(aReference, theX, theY, theZ);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference Lines
- HANDLE_NAMESPACE(GEOM_Object) aRef1 = GetObjectImpl(theLine1);
- HANDLE_NAMESPACE(GEOM_Object) aRef2 = GetObjectImpl(theLine2);
+ Handle(::GEOM_Object) aRef1 = GetObjectImpl(theLine1);
+ Handle(::GEOM_Object) aRef2 = GetObjectImpl(theLine2);
if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
//Create the point
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakePointOnLinesIntersection(aRef1, aRef2);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference curve
- HANDLE_NAMESPACE(GEOM_Object) aReference = GetObjectImpl(theCurve);
+ Handle(::GEOM_Object) aReference = GetObjectImpl(theCurve);
if (aReference.IsNull()) return aGEOMObject._retn();
//Create the point
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakePointOnCurve
+ Handle(::GEOM_Object) anObject = GetOperations()->MakePointOnCurve
(aReference, theParameter, takeOrientationIntoAccount);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference curve
- HANDLE_NAMESPACE(GEOM_Object) aReference = GetObjectImpl(theCurve);
+ Handle(::GEOM_Object) aReference = GetObjectImpl(theCurve);
if (aReference.IsNull()) return aGEOMObject._retn();
//Get the reference point (can be NULL)
- HANDLE_NAMESPACE(GEOM_Object) aRefPoint;
+ Handle(::GEOM_Object) aRefPoint;
if (!CORBA::is_nil(theStartPoint)) {
aRefPoint = GetObjectImpl(theStartPoint);
}
//Create the point
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakePointOnCurveByLength(aReference, theLength, aRefPoint);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference curve
- HANDLE_NAMESPACE(GEOM_Object) aReference = GetObjectImpl(theCurve);
+ Handle(::GEOM_Object) aReference = GetObjectImpl(theCurve);
if (aReference.IsNull()) return aGEOMObject._retn();
//Create the point
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakePointOnCurveByCoord(aReference, theXParameter,
theYParameter, theZParameter);
if (!GetOperations()->IsDone() || anObject.IsNull())
GetOperations()->SetNotDone();
//Get the reference surface
- HANDLE_NAMESPACE(GEOM_Object) aReference = GetObjectImpl(theSurface);
+ Handle(::GEOM_Object) aReference = GetObjectImpl(theSurface);
if (aReference.IsNull()) return aGEOMObject._retn();
//Create the point
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakePointOnSurface(aReference, theUParameter, theVParameter);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference surface
- HANDLE_NAMESPACE(GEOM_Object) aReference = GetObjectImpl(theSurface);
+ Handle(::GEOM_Object) aReference = GetObjectImpl(theSurface);
if (aReference.IsNull()) return aGEOMObject._retn();
//Create the point
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakePointOnSurfaceByCoord(aReference, theXParameter,
theYParameter, theZParameter);
if (!GetOperations()->IsDone() || anObject.IsNull())
GetOperations()->SetNotDone();
//Get the reference face
- HANDLE_NAMESPACE(GEOM_Object) aReference = GetObjectImpl(theFace);
+ Handle(::GEOM_Object) aReference = GetObjectImpl(theFace);
if (aReference.IsNull()) return aGEOMObject._retn();
//Create the point
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakePointOnFace(aReference);
+ Handle(::GEOM_Object) anObject = GetOperations()->MakePointOnFace(aReference);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference curve
- HANDLE_NAMESPACE(GEOM_Object) aReference = GetObjectImpl(theCurve);
+ Handle(::GEOM_Object) aReference = GetObjectImpl(theCurve);
if (aReference.IsNull()) return aGEOMObject._retn();
//Create the vector
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeTangentOnCurve(aReference, theParameter);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
//Create the Vector
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeVectorDXDYDZ(theDX, theDY, theDZ);
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeVectorDXDYDZ(theDX, theDY, theDZ);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference points
- HANDLE_NAMESPACE(GEOM_Object) aRef1 = GetObjectImpl(thePnt1);
- HANDLE_NAMESPACE(GEOM_Object) aRef2 = GetObjectImpl(thePnt2);
+ Handle(::GEOM_Object) aRef1 = GetObjectImpl(thePnt1);
+ Handle(::GEOM_Object) aRef2 = GetObjectImpl(thePnt2);
if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
//Create the vector
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeVectorTwoPnt(aRef1, aRef2);
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeVectorTwoPnt(aRef1, aRef2);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aRef1 = GetObjectImpl(thePnt);
- HANDLE_NAMESPACE(GEOM_Object) aRef2 = GetObjectImpl(theDir);
+ Handle(::GEOM_Object) aRef1 = GetObjectImpl(thePnt);
+ Handle(::GEOM_Object) aRef2 = GetObjectImpl(theDir);
if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
//Create the Line
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeLine(aRef1, aRef2);
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeLine(aRef1, aRef2);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference points
- HANDLE_NAMESPACE(GEOM_Object) aRef1 = GetObjectImpl(thePnt1);
- HANDLE_NAMESPACE(GEOM_Object) aRef2 = GetObjectImpl(thePnt2);
+ Handle(::GEOM_Object) aRef1 = GetObjectImpl(thePnt1);
+ Handle(::GEOM_Object) aRef2 = GetObjectImpl(thePnt2);
if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
//Create the Line
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeLineTwoPnt(aRef1, aRef2);
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeLineTwoPnt(aRef1, aRef2);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference points
- HANDLE_NAMESPACE(GEOM_Object) aRef1 = GetObjectImpl(theFace1);
- HANDLE_NAMESPACE(GEOM_Object) aRef2 = GetObjectImpl(theFace2);
+ Handle(::GEOM_Object) aRef1 = GetObjectImpl(theFace1);
+ Handle(::GEOM_Object) aRef2 = GetObjectImpl(theFace2);
if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
//Create the Line
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeLineTwoFaces(aRef1, aRef2);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the references
- HANDLE_NAMESPACE(GEOM_Object) aRef1 = GetObjectImpl(thePnt);
- HANDLE_NAMESPACE(GEOM_Object) aRef2 = GetObjectImpl(theVec);
+ Handle(::GEOM_Object) aRef1 = GetObjectImpl(thePnt);
+ Handle(::GEOM_Object) aRef2 = GetObjectImpl(theVec);
if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
//Create the plane
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakePlanePntVec(aRef1, aRef2, theTrimSize);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference points
- HANDLE_NAMESPACE(GEOM_Object) aRef1 = GetObjectImpl(thePnt1);
- HANDLE_NAMESPACE(GEOM_Object) aRef2 = GetObjectImpl(thePnt2);
- HANDLE_NAMESPACE(GEOM_Object) aRef3 = GetObjectImpl(thePnt3);
+ Handle(::GEOM_Object) aRef1 = GetObjectImpl(thePnt1);
+ Handle(::GEOM_Object) aRef2 = GetObjectImpl(thePnt2);
+ Handle(::GEOM_Object) aRef3 = GetObjectImpl(thePnt3);
if (aRef1.IsNull() || aRef2.IsNull() || aRef3.IsNull())
return aGEOMObject._retn();
//Create the plane
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakePlaneThreePnt(aRef1, aRef2, aRef3, theTrimSize);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference face
- HANDLE_NAMESPACE(GEOM_Object) aRef = GetObjectImpl(theFace);
+ Handle(::GEOM_Object) aRef = GetObjectImpl(theFace);
if (aRef.IsNull()) return aGEOMObject._retn();
//Create the plane
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakePlaneFace(aRef, theTrimSize);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the references
- HANDLE_NAMESPACE(GEOM_Object) aRef1 = GetObjectImpl(theVec1);
- HANDLE_NAMESPACE(GEOM_Object) aRef2 = GetObjectImpl(theVec2);
+ Handle(::GEOM_Object) aRef1 = GetObjectImpl(theVec1);
+ Handle(::GEOM_Object) aRef2 = GetObjectImpl(theVec2);
if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
//Create the plane
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakePlane2Vec(aRef1, aRef2, theTrimSize);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the references
- HANDLE_NAMESPACE(GEOM_Object) aRef1 = GetObjectImpl(theLCS);
+ Handle(::GEOM_Object) aRef1 = GetObjectImpl(theLCS);
//Create the plane
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakePlaneLCS(aRef1, theTrimSize, theOrientation);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Create the point
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeMarker(theOX , theOY , theOZ,
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeMarker(theOX , theOY , theOZ,
theXDX, theXDY, theXDZ,
theYDX, theYDY, theYDZ);
if (!GetOperations()->IsDone() || anObject.IsNull())
GetOperations()->SetNotDone();
//Get the referenced object
- HANDLE_NAMESPACE(GEOM_Object) aRef = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aRef = GetObjectImpl(theShape);
if (aRef.IsNull()) return aGEOMObject._retn();
//Create the point
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeMarkerFromShape(aRef);
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeMarkerFromShape(aRef);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the referenced objects
- HANDLE_NAMESPACE(GEOM_Object) aRef1 = GetObjectImpl(theOrigin);
- HANDLE_NAMESPACE(GEOM_Object) aRef2 = GetObjectImpl(theXVec);
- HANDLE_NAMESPACE(GEOM_Object) aRef3 = GetObjectImpl(theYVec);
+ Handle(::GEOM_Object) aRef1 = GetObjectImpl(theOrigin);
+ Handle(::GEOM_Object) aRef2 = GetObjectImpl(theXVec);
+ Handle(::GEOM_Object) aRef3 = GetObjectImpl(theYVec);
if (aRef1.IsNull() || aRef2.IsNull() || aRef3.IsNull()) return aGEOMObject._retn();
//Create the point
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeMarkerPntTwoVec(aRef1,
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeMarkerPntTwoVec(aRef1,
aRef2,
aRef3);
if (!GetOperations()->IsDone() || anObject.IsNull())
GetOperations()->SetNotDone();
//Get the reference face
- HANDLE_NAMESPACE(GEOM_Object) aRef = GetObjectImpl(theFace);
+ Handle(::GEOM_Object) aRef = GetObjectImpl(theFace);
if (aRef.IsNull()) return aGEOMObject._retn();
//Create the plane
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeTangentPlaneOnFace(aRef, theParameterU,theParameterV,theTrimSize);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference edges
- HANDLE_NAMESPACE(GEOM_Object) anEdge1 = GetObjectImpl(theEdge1);
- HANDLE_NAMESPACE(GEOM_Object) anEdge2 = GetObjectImpl(theEdge2);
- HANDLE_NAMESPACE(GEOM_Object) anEdge3 = GetObjectImpl(theEdge3);
- HANDLE_NAMESPACE(GEOM_Object) anEdge4 = GetObjectImpl(theEdge4);
+ Handle(::GEOM_Object) anEdge1 = GetObjectImpl(theEdge1);
+ Handle(::GEOM_Object) anEdge2 = GetObjectImpl(theEdge2);
+ Handle(::GEOM_Object) anEdge3 = GetObjectImpl(theEdge3);
+ Handle(::GEOM_Object) anEdge4 = GetObjectImpl(theEdge4);
if (anEdge1.IsNull() || anEdge2.IsNull() ||
anEdge3.IsNull() || anEdge4.IsNull()) return aGEOMObject._retn();
//Create the Face
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeQuad(anEdge1, anEdge2, anEdge3, anEdge4);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference edges
- HANDLE_NAMESPACE(GEOM_Object) anEdge1 = GetObjectImpl(theEdge1);
- HANDLE_NAMESPACE(GEOM_Object) anEdge2 = GetObjectImpl(theEdge2);
+ Handle(::GEOM_Object) anEdge1 = GetObjectImpl(theEdge1);
+ Handle(::GEOM_Object) anEdge2 = GetObjectImpl(theEdge2);
if (anEdge1.IsNull() || anEdge2.IsNull()) return aGEOMObject._retn();
//Create the Face
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeQuad2Edges(anEdge1, anEdge2);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference points
- HANDLE_NAMESPACE(GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
- HANDLE_NAMESPACE(GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
- HANDLE_NAMESPACE(GEOM_Object) aPnt3 = GetObjectImpl(thePnt3);
- HANDLE_NAMESPACE(GEOM_Object) aPnt4 = GetObjectImpl(thePnt4);
+ Handle(::GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
+ Handle(::GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
+ Handle(::GEOM_Object) aPnt3 = GetObjectImpl(thePnt3);
+ Handle(::GEOM_Object) aPnt4 = GetObjectImpl(thePnt4);
if (aPnt1.IsNull() || aPnt2.IsNull() ||
aPnt3.IsNull() || aPnt4.IsNull()) return aGEOMObject._retn();
//Create the Face
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeQuad4Vertices(aPnt1, aPnt2, aPnt3, aPnt4);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference Faces
- HANDLE_NAMESPACE(GEOM_Object) anFace1 = GetObjectImpl(theFace1);
- HANDLE_NAMESPACE(GEOM_Object) anFace2 = GetObjectImpl(theFace2);
- HANDLE_NAMESPACE(GEOM_Object) anFace3 = GetObjectImpl(theFace3);
- HANDLE_NAMESPACE(GEOM_Object) anFace4 = GetObjectImpl(theFace4);
- HANDLE_NAMESPACE(GEOM_Object) anFace5 = GetObjectImpl(theFace5);
- HANDLE_NAMESPACE(GEOM_Object) anFace6 = GetObjectImpl(theFace6);
+ Handle(::GEOM_Object) anFace1 = GetObjectImpl(theFace1);
+ Handle(::GEOM_Object) anFace2 = GetObjectImpl(theFace2);
+ Handle(::GEOM_Object) anFace3 = GetObjectImpl(theFace3);
+ Handle(::GEOM_Object) anFace4 = GetObjectImpl(theFace4);
+ Handle(::GEOM_Object) anFace5 = GetObjectImpl(theFace5);
+ Handle(::GEOM_Object) anFace6 = GetObjectImpl(theFace6);
if (anFace1.IsNull() || anFace2.IsNull() ||
anFace3.IsNull() || anFace4.IsNull() ||
anFace5.IsNull() || anFace6.IsNull()) return aGEOMObject._retn();
//Create the Face
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeHexa
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeHexa
(anFace1, anFace2, anFace3, anFace4, anFace5, anFace6);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference Faces
- HANDLE_NAMESPACE(GEOM_Object) anFace1 = GetObjectImpl(theFace1);
- HANDLE_NAMESPACE(GEOM_Object) anFace2 = GetObjectImpl(theFace2);
+ Handle(::GEOM_Object) anFace1 = GetObjectImpl(theFace1);
+ Handle(::GEOM_Object) anFace2 = GetObjectImpl(theFace2);
if (anFace1.IsNull() || anFace2.IsNull()) return aGEOMObject._retn();
//Create the Face
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeHexa2Faces(anFace1, anFace2);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference Compound
- HANDLE_NAMESPACE(GEOM_Object) aCompound = GetObjectImpl(theCompound);
+ Handle(::GEOM_Object) aCompound = GetObjectImpl(theCompound);
if (aCompound.IsNull()) return aGEOMObject._retn();
//Create the Blocks Compound
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeBlockCompound(aCompound);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference Objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return aGEOMObject._retn();
//Create the Point
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->GetPoint(aShape, theX, theY, theZ, theEpsilon);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
// Get the reference Objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
- HANDLE_NAMESPACE(GEOM_Object) aPoint = GetObjectImpl(thePoint);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aPoint = GetObjectImpl(thePoint);
if (aShape.IsNull() || aPoint.IsNull()) return aGEOMObject._retn();
// Create the Point
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->GetVertexNearPoint(aShape, aPoint);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference Objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
- HANDLE_NAMESPACE(GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
- HANDLE_NAMESPACE(GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
+ Handle(::GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
if (aShape.IsNull() ||
aPoint1.IsNull() || aPoint2.IsNull()) return aGEOMObject._retn();
//Create the Point
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->GetEdge(aShape, aPoint1, aPoint2);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference Objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
- HANDLE_NAMESPACE(GEOM_Object) aPoint = GetObjectImpl(thePoint);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aPoint = GetObjectImpl(thePoint);
if (aShape.IsNull() || aPoint.IsNull()) return aGEOMObject._retn();
//Create the Edge
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->GetEdgeNearPoint(aShape, aPoint);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference Objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
- HANDLE_NAMESPACE(GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
- HANDLE_NAMESPACE(GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
- HANDLE_NAMESPACE(GEOM_Object) aPoint3 = GetObjectImpl(thePoint3);
- HANDLE_NAMESPACE(GEOM_Object) aPoint4 = GetObjectImpl(thePoint4);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
+ Handle(::GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
+ Handle(::GEOM_Object) aPoint3 = GetObjectImpl(thePoint3);
+ Handle(::GEOM_Object) aPoint4 = GetObjectImpl(thePoint4);
if (aShape.IsNull() ||
aPoint1.IsNull() || aPoint2.IsNull() ||
aPoint3.IsNull() || aPoint4.IsNull()) return aGEOMObject._retn();
//Create the Face
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->GetFaceByPoints(aShape, aPoint1, aPoint2, aPoint3, aPoint4);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference Objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
- HANDLE_NAMESPACE(GEOM_Object) anEdge1 = GetObjectImpl(theEdge1);
- HANDLE_NAMESPACE(GEOM_Object) anEdge2 = GetObjectImpl(theEdge2);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) anEdge1 = GetObjectImpl(theEdge1);
+ Handle(::GEOM_Object) anEdge2 = GetObjectImpl(theEdge2);
if (aShape.IsNull() ||
anEdge1.IsNull() || anEdge2.IsNull()) return aGEOMObject._retn();
//Create the Face
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->GetFaceByEdges(aShape, anEdge1, anEdge2);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference Objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
- HANDLE_NAMESPACE(GEOM_Object) aFace = GetObjectImpl(theFace);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aFace = GetObjectImpl(theFace);
if (aShape.IsNull() || aFace.IsNull()) return aGEOMObject._retn();
//Create the Face
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->GetOppositeFace(aShape, aFace);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference Objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
- HANDLE_NAMESPACE(GEOM_Object) aPoint = GetObjectImpl(thePoint);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aPoint = GetObjectImpl(thePoint);
if (aShape.IsNull() || aPoint.IsNull()) return aGEOMObject._retn();
//Create the Face
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->GetFaceNearPoint(aShape, aPoint);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference Objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
- HANDLE_NAMESPACE(GEOM_Object) aVector = GetObjectImpl(theVector);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aVector = GetObjectImpl(theVector);
if (aShape.IsNull() || aVector.IsNull()) return aGEOMObject._retn();
//Create the Face
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->GetFaceByNormale(aShape, aVector);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
// Get the reference Objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
- HANDLE_NAMESPACE(GEOM_Object) aPoint = GetObjectImpl(thePoint);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aPoint = GetObjectImpl(thePoint);
if (aShape.IsNull() || aPoint.IsNull()) return aGEOMObject._retn();
// Create the Shape
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->GetShapesNearPoint(aShape, aPoint, theShapeType, theTolerance);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference Compound
- HANDLE_NAMESPACE(GEOM_Object) aCompound = GetObjectImpl(theCompound);
+ Handle(::GEOM_Object) aCompound = GetObjectImpl(theCompound);
if (aCompound.IsNull()) return aSeq._retn();
//Explode
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++)
- aSeq[i-1] = GetObject(HANDLE_NAMESPACE(GEOM_Object)::DownCast(aHSeq->Value(i)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
GetOperations()->SetNotDone();
//Get the reference Compound
- HANDLE_NAMESPACE(GEOM_Object) aCompound = GetObjectImpl(theCompound);
+ Handle(::GEOM_Object) aCompound = GetObjectImpl(theCompound);
if (aCompound.IsNull()) return isComp;
//Check
GetOperations()->SetNotDone();
//Get the reference Compound
- HANDLE_NAMESPACE(GEOM_Object) aCompound = GetObjectImpl(theCompound);
+ Handle(::GEOM_Object) aCompound = GetObjectImpl(theCompound);
if (aCompound.IsNull()) return isComp;
//Check
const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors)
{
//Get the reference Compound
- HANDLE_NAMESPACE(GEOM_Object) aCompound = GetObjectImpl(theCompound);
+ Handle(::GEOM_Object) aCompound = GetObjectImpl(theCompound);
if (aCompound.IsNull()) return NULL;
// Convert the errors sequence
GetOperations()->SetNotDone();
//Get the reference Objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return aGEOMObject._retn();
//Get the result
- HANDLE_NAMESPACE(GEOM_Object) aFaces;
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) aFaces;
+ Handle(::GEOM_Object) anObject =
GetOperations()->GetNonBlocks(aShape, theToleranceC1, aFaces);
if (!GetOperations()->IsDone())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference Objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return aGEOMObject._retn();
//Get the result
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->RemoveExtraEdges(aShape, theOptimumNbFaces);
+ Handle(::GEOM_Object) anObject = GetOperations()->RemoveExtraEdges(aShape, theOptimumNbFaces);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference Objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return aGEOMObject._retn();
//Get the result
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->UnionFaces(aShape);
+ Handle(::GEOM_Object) anObject = GetOperations()->UnionFaces(aShape);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference Objects
- HANDLE_NAMESPACE(GEOM_Object) aCompound = GetObjectImpl(theCompound);
+ Handle(::GEOM_Object) aCompound = GetObjectImpl(theCompound);
if (aCompound.IsNull()) return aGEOMObject._retn();
//Get the result
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->CheckAndImprove(aCompound);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference Objects
- HANDLE_NAMESPACE(GEOM_Object) aCompound = GetObjectImpl(theCompound);
- HANDLE_NAMESPACE(GEOM_Object) aPoint = GetObjectImpl(thePoint);
+ Handle(::GEOM_Object) aCompound = GetObjectImpl(theCompound);
+ Handle(::GEOM_Object) aPoint = GetObjectImpl(thePoint);
if (aCompound.IsNull() || aPoint.IsNull()) return aGEOMObject._retn();
//Get the block
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->GetBlockNearPoint(aCompound, aPoint);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference Compound
- HANDLE_NAMESPACE(GEOM_Object) aCompound = GetObjectImpl(theCompound);
+ Handle(::GEOM_Object) aCompound = GetObjectImpl(theCompound);
if (aCompound.IsNull()) return aGEOMObject._retn();
//Get the parts
aLen = theParts.length();
for (ind = 0; ind < aLen; ind++) {
- HANDLE_NAMESPACE(GEOM_Object) aSh = GetObjectImpl(theParts[ind]);
+ Handle(::GEOM_Object) aSh = GetObjectImpl(theParts[ind]);
if (aSh.IsNull()) return aGEOMObject._retn();
aParts->Append(aSh);
}
//Get the Block
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->GetBlockByParts(aCompound, aParts);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference Compound
- HANDLE_NAMESPACE(GEOM_Object) aCompound = GetObjectImpl(theCompound);
+ Handle(::GEOM_Object) aCompound = GetObjectImpl(theCompound);
if (aCompound.IsNull()) return aSeq._retn();
//Get the parts
aLen = theParts.length();
for (ind = 0; ind < aLen; ind++) {
- HANDLE_NAMESPACE(GEOM_Object) aSh = GetObjectImpl(theParts[ind]);
+ Handle(::GEOM_Object) aSh = GetObjectImpl(theParts[ind]);
if (aSh.IsNull()) return aSeq._retn();
aParts->Append(aSh);
}
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++)
- aSeq[i-1] = GetObject(HANDLE_NAMESPACE(GEOM_Object)::DownCast(aHSeq->Value(i)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
GetOperations()->SetNotDone();
//Get the object itself and the vector of translation
- HANDLE_NAMESPACE(GEOM_Object) aBasicObject = GetObjectImpl(theBlock);
+ Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theBlock);
if (aBasicObject.IsNull()) return aGEOMObject._retn();
//Perform the transformation
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeMultiTransformation1D
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeMultiTransformation1D
(aBasicObject, theDirFace1, theDirFace2, theNbTimes);
if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) aBasicObject = GetObjectImpl(theBlock);
+ Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theBlock);
if (aBasicObject.IsNull()) return aGEOMObject._retn();
//Perform the transformation
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeMultiTransformation2D
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeMultiTransformation2D
(aBasicObject,
theDirFace1U, theDirFace2U, theNbTimesU,
theDirFace1V, theDirFace2V, theNbTimesV);
GetOperations()->SetNotDone();
//Get the reference Shape
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return aSeq._retn();
//Get the Propagation chains
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++)
- aSeq[i-1] = GetObject(HANDLE_NAMESPACE(GEOM_Object)::DownCast(aHSeq->Value(i)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
GetOperations()->SetNotDone();
//Get the reference shapes
- HANDLE_NAMESPACE(GEOM_Object) aSh1 = GetObjectImpl(theShape1);
- HANDLE_NAMESPACE(GEOM_Object) aSh2 = GetObjectImpl(theShape2);
+ Handle(::GEOM_Object) aSh1 = GetObjectImpl(theShape1);
+ Handle(::GEOM_Object) aSh2 = GetObjectImpl(theShape2);
if (aSh1.IsNull() || aSh2.IsNull()) return aGEOMObject._retn();
// Make Boolean
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeBoolean(aSh1, aSh2, theOp, IsCheckSelfInte);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference shapes
- HANDLE_NAMESPACE(GEOM_Object) aSh1 = GetObjectImpl(theShape1);
- HANDLE_NAMESPACE(GEOM_Object) aSh2 = GetObjectImpl(theShape2);
+ Handle(::GEOM_Object) aSh1 = GetObjectImpl(theShape1);
+ Handle(::GEOM_Object) aSh2 = GetObjectImpl(theShape2);
if (aSh1.IsNull() || aSh2.IsNull()) return aGEOMObject._retn();
// Make Boolean
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeFuse
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeFuse
(aSh1, aSh2, IsCheckSelfInte, IsRmExtraEdges);
if (!GetOperations()->IsDone() || anObject.IsNull())
}
// Make fusion
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeFuseList(aShapes, IsCheckSelfInte, IsRmExtraEdges);
if (!GetOperations()->IsDone() || anObject.IsNull())
}
// Make fusion
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeCommonList(aShapes, IsCheckSelfInte);
if (!GetOperations()->IsDone() || anObject.IsNull())
//Set a not done flag
GetOperations()->SetNotDone();
- HANDLE_NAMESPACE(GEOM_Object) aMainShape = GetObjectImpl(theMainShape);
+ Handle(::GEOM_Object) aMainShape = GetObjectImpl(theMainShape);
if (aMainShape.IsNull()) {
return aGEOMObject._retn();
}
// Make fusion
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeCutList(aMainShape, aShapes, IsCheckSelfInte);
if (!GetOperations()->IsDone() || anObject.IsNull())
}
// Make Partition
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakePartition(aShapes, aTools, aKeepIns, aRemIns,
theLimit, theRemoveWebs, aMaterials,
theKeepNonlimitShapes,
}
// Make Partition
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakePartition(aShapes, aTools, aKeepIns, aRemIns,
theLimit, theRemoveWebs, aMaterials,
theKeepNonlimitShapes,
GetOperations()->SetNotDone();
//Get the reference shapes
- HANDLE_NAMESPACE(GEOM_Object) aSh = GetObjectImpl(theShape);
- HANDLE_NAMESPACE(GEOM_Object) aPl = GetObjectImpl(thePlane);
+ Handle(::GEOM_Object) aSh = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aPl = GetObjectImpl(thePlane);
if (aSh.IsNull() || aPl.IsNull()) return aGEOMObject._retn();
// Make Half Partition
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeHalfPartition(aSh, aPl);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
//if (thePnt == NULL || theVec == NULL) return aGEOMObject._retn();
//Get the arguments
- HANDLE_NAMESPACE(GEOM_Object) aPnt, aVec;
+ Handle(::GEOM_Object) aPnt, aVec;
if (!CORBA::is_nil(thePnt)) {
aPnt = GetObjectImpl(thePnt);
if (aPnt.IsNull()) return aGEOMObject._retn();
}
// Make Circle
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeCirclePntVecR(aPnt, aVec, theR);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference points
- HANDLE_NAMESPACE(GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
- HANDLE_NAMESPACE(GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
- HANDLE_NAMESPACE(GEOM_Object) aPnt3 = GetObjectImpl(thePnt3);
+ Handle(::GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
+ Handle(::GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
+ Handle(::GEOM_Object) aPnt3 = GetObjectImpl(thePnt3);
if (aPnt1.IsNull() || aPnt2.IsNull() || aPnt3.IsNull()) return aGEOMObject._retn();
// Make Circle
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeCircleThreePnt(aPnt1, aPnt2, aPnt3);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference points
- HANDLE_NAMESPACE(GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
- HANDLE_NAMESPACE(GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
- HANDLE_NAMESPACE(GEOM_Object) aPnt3 = GetObjectImpl(thePnt3);
+ Handle(::GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
+ Handle(::GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
+ Handle(::GEOM_Object) aPnt3 = GetObjectImpl(thePnt3);
if (aPnt1.IsNull() || aPnt2.IsNull() || aPnt3.IsNull()) return aGEOMObject._retn();
// Make Circle
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeCircleCenter2Pnt(aPnt1, aPnt2, aPnt3);
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeCircleCenter2Pnt(aPnt1, aPnt2, aPnt3);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
//if (thePnt == NULL || theVec == NULL) return aGEOMObject._retn();
//Get the arguments
- HANDLE_NAMESPACE(GEOM_Object) aPnt, aVec, aVecMaj;
+ Handle(::GEOM_Object) aPnt, aVec, aVecMaj;
if (!CORBA::is_nil(thePnt)) {
aPnt = GetObjectImpl(thePnt);
if (aPnt.IsNull()) return aGEOMObject._retn();
}
// Make Ellipse
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeEllipse(aPnt, aVec, theRMajor, theRMinor, aVecMaj);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
//if (thePnt == NULL || theVec == NULL || theVecMaj == NULL) return aGEOMObject._retn();
//Get the arguments
- HANDLE_NAMESPACE(GEOM_Object) aPnt, aVec, aVecMaj;
+ Handle(::GEOM_Object) aPnt, aVec, aVecMaj;
if (!CORBA::is_nil(thePnt)) {
aPnt = GetObjectImpl(thePnt);
if (aPnt.IsNull()) return aGEOMObject._retn();
}
// Make Ellipse
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeEllipse(aPnt, aVec, theRMajor, theRMinor, aVecMaj);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference points
- HANDLE_NAMESPACE(GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
- HANDLE_NAMESPACE(GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
- HANDLE_NAMESPACE(GEOM_Object) aPnt3 = GetObjectImpl(thePnt3);
+ Handle(::GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
+ Handle(::GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
+ Handle(::GEOM_Object) aPnt3 = GetObjectImpl(thePnt3);
if (aPnt1.IsNull() || aPnt2.IsNull() || aPnt3.IsNull()) return aGEOMObject._retn();
// Make Arc
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeArc(aPnt1, aPnt2, aPnt3);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference points
- HANDLE_NAMESPACE(GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
- HANDLE_NAMESPACE(GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
- HANDLE_NAMESPACE(GEOM_Object) aPnt3 = GetObjectImpl(thePnt3);
+ Handle(::GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
+ Handle(::GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
+ Handle(::GEOM_Object) aPnt3 = GetObjectImpl(thePnt3);
if (aPnt1.IsNull() || aPnt2.IsNull() || aPnt3.IsNull()) return aGEOMObject._retn();
// Make ArcCenter
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeArcCenter(aPnt1, aPnt2, aPnt3,theSense);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference points
- HANDLE_NAMESPACE(GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
- HANDLE_NAMESPACE(GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
- HANDLE_NAMESPACE(GEOM_Object) aPnt3 = GetObjectImpl(thePnt3);
+ Handle(::GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
+ Handle(::GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
+ Handle(::GEOM_Object) aPnt3 = GetObjectImpl(thePnt3);
if (aPnt1.IsNull() || aPnt2.IsNull() || aPnt3.IsNull()) return aGEOMObject._retn();
// Make Arc
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeArcOfEllipse(aPnt1, aPnt2, aPnt3);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
//Get the reference point
int ind = 0;
int aLen = thePoints.length();
- std::list<HANDLE_NAMESPACE(GEOM_Object)> aPoints;
+ std::list<Handle(::GEOM_Object)> aPoints;
for (; ind < aLen; ind++) {
- HANDLE_NAMESPACE(GEOM_Object) aPnt = GetObjectImpl(thePoints[ind]);
+ Handle(::GEOM_Object) aPnt = GetObjectImpl(thePoints[ind]);
if (aPnt.IsNull()) return aGEOMObject._retn();
aPoints.push_back(aPnt);
}
// Make Polyline
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakePolyline(aPoints, theIsClosed);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
//Get the reference point
int ind = 0;
int aLen = thePoints.length();
- std::list<HANDLE_NAMESPACE(GEOM_Object)> aPoints;
+ std::list<Handle(::GEOM_Object)> aPoints;
for (; ind < aLen; ind++) {
- HANDLE_NAMESPACE(GEOM_Object) aPnt = GetObjectImpl(thePoints[ind]);
+ Handle(::GEOM_Object) aPnt = GetObjectImpl(thePoints[ind]);
if (aPnt.IsNull()) return aGEOMObject._retn();
aPoints.push_back(aPnt);
}
// Make Bezier curve
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeSplineBezier(aPoints, theIsClosed);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
//Get the reference point
int ind = 0;
int aLen = thePoints.length();
- std::list<HANDLE_NAMESPACE(GEOM_Object)> aPoints;
+ std::list<Handle(::GEOM_Object)> aPoints;
for (; ind < aLen; ind++) {
- HANDLE_NAMESPACE(GEOM_Object) aPnt = GetObjectImpl(thePoints[ind]);
+ Handle(::GEOM_Object) aPnt = GetObjectImpl(thePoints[ind]);
if (aPnt.IsNull()) return aGEOMObject._retn();
aPoints.push_back(aPnt);
}
// Make Polyline
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeSplineInterpolation(aPoints, theIsClosed, theDoReordering);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
//Get the reference points
int ind = 0;
int aLen = thePoints.length();
- std::list<HANDLE_NAMESPACE(GEOM_Object)> aPoints;
+ std::list<Handle(::GEOM_Object)> aPoints;
for (; ind < aLen; ind++) {
- HANDLE_NAMESPACE(GEOM_Object) aPnt = GetObjectImpl(thePoints[ind]);
+ Handle(::GEOM_Object) aPnt = GetObjectImpl(thePoints[ind]);
if (aPnt.IsNull()) return aGEOMObject._retn();
aPoints.push_back(aPnt);
}
//Get the reference vectors
- HANDLE_NAMESPACE(GEOM_Object) aVec1 = GetObjectImpl(theFirstVec);
- HANDLE_NAMESPACE(GEOM_Object) aVec2 = GetObjectImpl(theLastVec);
+ Handle(::GEOM_Object) aVec1 = GetObjectImpl(theFirstVec);
+ Handle(::GEOM_Object) aVec2 = GetObjectImpl(theLastVec);
if (aVec1.IsNull() || aVec2.IsNull()) return aGEOMObject._retn();
// Make Polyline
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeSplineInterpolWithTangents(aPoints, aVec1, aVec2);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
}
// Make Polyline
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeCurveParametric(thexExpr, theyExpr, thezExpr,
theParamMin, theParamMax,
theParamStep, aType);
}
// Make Polyline
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeCurveParametric(thexExpr, theyExpr, thezExpr,
theParamMin, theParamMax,
0.0, aType, theParamNbStep, true);
//Set a not done flag
GetOperations()->SetNotDone();
- HANDLE_NAMESPACE(GEOM_Object) aFace = GetObjectImpl(theFace);
+ Handle(::GEOM_Object) aFace = GetObjectImpl(theFace);
// Make isoline
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeIsoline(aFace, IsUIsoline, theParameter);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
aWorkingPlane.push_back(theWorkingPlane[ind]);
// Make Sketcher
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeSketcher(theCommand, aWorkingPlane);
if (!GetOperations()->IsDone() || anObject.IsNull())
return GEOM::GEOM_Object::_nil();
//Set a not done flag
GetOperations()->SetNotDone();
- HANDLE_NAMESPACE(GEOM_Object) aWorkingPlane = GetObjectImpl(theWorkingPlane);
+ Handle(::GEOM_Object) aWorkingPlane = GetObjectImpl(theWorkingPlane);
// Make Sketcher
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeSketcherOnPlane(theCommand, aWorkingPlane);
if (!GetOperations()->IsDone() || anObject.IsNull())
return GEOM::GEOM_Object::_nil();
GetOperations()->SetNotDone();
// Make 3D Sketcher
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->Make3DSketcherCommand(theCommand);
+ Handle(::GEOM_Object) anObject = GetOperations()->Make3DSketcherCommand(theCommand);
if (!GetOperations()->IsDone() || anObject.IsNull())
return GEOM::GEOM_Object::_nil();
aCoords.push_back(theCoordinates[ind]);
// Make Sketcher
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->Make3DSketcher(aCoords);
if (!GetOperations()->IsDone() || anObject.IsNull())
return GEOM::GEOM_Object::_nil();
}
// Make Polyline
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakePolyline2D
+ Handle(::GEOM_Object) anObject = GetOperations()->MakePolyline2D
(aCoords, aNames, aTypes, aCloseds, aWorkingPlane);
if (!GetOperations()->IsDone() || anObject.IsNull()) {
Handle(TColStd_HArray1OfByte) aCloseds =
ConvertBoolArray(theClosedList);
std::list <std::list <double> > aCoords;
- HANDLE_NAMESPACE(GEOM_Object) aWorkingPlane =
+ Handle(::GEOM_Object) aWorkingPlane =
GetObjectImpl(theWorkingPlane);
ConvertListListDouble(theCoordsList, aCoords);
// Make Polyline
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakePolyline2DOnPlane
+ Handle(::GEOM_Object) anObject = GetOperations()->MakePolyline2DOnPlane
(aCoords, aNames, aTypes, aCloseds, aWorkingPlane);
if (!GetOperations()->IsDone() || anObject.IsNull()) {
for ( size_t i = 0; i < theComponentNames.length(); ++i )
compNames->SetValue( i+1, theComponentNames[ i ].in() );
}
- HANDLE_NAMESPACE(GEOM_Object) aShapeRef = GetObjectImpl( theShape );
- HANDLE_NAMESPACE(GEOM_Field) aFieldRef = GetOperations()->CreateField( aShapeRef,
+ Handle(::GEOM_Object) aShapeRef = GetObjectImpl( theShape );
+ Handle(::GEOM_Field) aFieldRef = GetOperations()->CreateField( aShapeRef,
theName,
(int) theType,
theDimension,
CORBA::Long GEOM_IFieldOperations_i::CountFields( GEOM::GEOM_Object_ptr shape)
{
- HANDLE_NAMESPACE(GEOM_Object) go = GetObjectImpl( shape );
+ Handle(::GEOM_Object) go = GetObjectImpl( shape );
return ( CORBA::Long) GetOperations()->CountFields( go );
}
{
GEOM::ListOfFields_var fields = new GEOM::ListOfFields;
- HANDLE_NAMESPACE(GEOM_Object) go = GetObjectImpl( shape );
+ Handle(::GEOM_Object) go = GetObjectImpl( shape );
Handle(TColStd_HSequenceOfTransient) seq = GetOperations()->GetFields( go );
if ( !seq.IsNull() )
int nbF = 0;
for ( int i = 1; i <= seq->Length(); ++i )
{
- HANDLE_NAMESPACE(GEOM_Field) f = HANDLE_NAMESPACE(GEOM_Field)::DownCast( seq->Value( i ));
+ Handle(::GEOM_Field) f = Handle(::GEOM_Field)::DownCast( seq->Value( i ));
GEOM::GEOM_Field_var fvar = GEOM::GEOM_Field::_narrow( GetBaseObject( f ));
if ( !fvar->_is_nil() )
fields[ nbF++ ] = fvar._retn();
{
GEOM::GEOM_Field_var field;
- HANDLE_NAMESPACE(GEOM_Object) go = GetObjectImpl( shape );
+ Handle(::GEOM_Object) go = GetObjectImpl( shape );
- HANDLE_NAMESPACE(GEOM_Field) f = GetOperations()->GetField( go, name );
+ Handle(::GEOM_Field) f = GetOperations()->GetField( go, name );
field = GEOM::GEOM_Field::_narrow( GetBaseObject( f ));
return field._retn();
::CORBA::Long GEOM_IFieldOperations_i::GetNbSubShapes(::GEOM::GEOM_Object_ptr shape,
::CORBA::Short fieldDim)
{
- HANDLE_NAMESPACE(GEOM_Object) go = GetObjectImpl( shape );
+ Handle(::GEOM_Object) go = GetObjectImpl( shape );
return GEOM_Field::GetNbSubShapes( go, fieldDim );
}
if (theShapeType < 0) return aGEOMObject._retn();
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShapeRef = GetObjectImpl(theMainShape);
+ Handle(::GEOM_Object) aShapeRef = GetObjectImpl(theMainShape);
if (aShapeRef.IsNull()) return aGEOMObject._retn();
//Create the Fillet
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->CreateGroup(aShapeRef, (TopAbs_ShapeEnum)theShapeType);
+ Handle(::GEOM_Object) anObject = GetOperations()->CreateGroup(aShapeRef, (TopAbs_ShapeEnum)theShapeType);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference group
- HANDLE_NAMESPACE(GEOM_Object) aGroupRef = GetObjectImpl(theGroup);
+ Handle(::GEOM_Object) aGroupRef = GetObjectImpl(theGroup);
if (aGroupRef.IsNull()) return;
GetOperations()->AddObject(aGroupRef, theSubShapeId);
GetOperations()->SetNotDone();
//Get the reference group
- HANDLE_NAMESPACE(GEOM_Object) aGroupRef = GetObjectImpl(theGroup);
+ Handle(::GEOM_Object) aGroupRef = GetObjectImpl(theGroup);
if (aGroupRef.IsNull()) return;
GetOperations()->RemoveObject(aGroupRef, theSubShapeId);
GetOperations()->SetNotDone();
//Get the reference group
- HANDLE_NAMESPACE(GEOM_Object) aGroupRef = GetObjectImpl(theGroup);
+ Handle(::GEOM_Object) aGroupRef = GetObjectImpl(theGroup);
if (aGroupRef.IsNull()) return;
//Get sub-shape to add
int ind, aLen = theSubShapes.length();
for (ind = 0; ind < aLen; ind++) {
- HANDLE_NAMESPACE(GEOM_Object) aSh = GetObjectImpl(theSubShapes[ind]);
+ Handle(::GEOM_Object) aSh = GetObjectImpl(theSubShapes[ind]);
if (aSh.IsNull()) return;
aSubShapes->Append(aSh);
}
GetOperations()->SetNotDone();
//Get the reference group
- HANDLE_NAMESPACE(GEOM_Object) aGroupRef = GetObjectImpl(theGroup);
+ Handle(::GEOM_Object) aGroupRef = GetObjectImpl(theGroup);
if (aGroupRef.IsNull()) return;
//Get sub-shape to remove
int ind, aLen = theSubShapes.length();
for (ind = 0; ind < aLen; ind++) {
- HANDLE_NAMESPACE(GEOM_Object) aSh = GetObjectImpl(theSubShapes[ind]);
+ Handle(::GEOM_Object) aSh = GetObjectImpl(theSubShapes[ind]);
if (aSh.IsNull()) return;
aSubShapes->Append(aSh);
}
GetOperations()->SetNotDone();
//Get the reference group
- HANDLE_NAMESPACE(GEOM_Object) aGroupRef = GetObjectImpl(theGroup);
+ Handle(::GEOM_Object) aGroupRef = GetObjectImpl(theGroup);
if (aGroupRef.IsNull()) return;
//Get sub-shape to add
GetOperations()->SetNotDone();
//Get the reference group
- HANDLE_NAMESPACE(GEOM_Object) aGroupRef = GetObjectImpl(theGroup);
+ Handle(::GEOM_Object) aGroupRef = GetObjectImpl(theGroup);
if (aGroupRef.IsNull()) return;
//Get sub-shape to remove
GetOperations()->SetNotDone();
//Get the reference groups
- HANDLE_NAMESPACE(GEOM_Object) aGroupRef1 = GetObjectImpl(theGroup1);
- HANDLE_NAMESPACE(GEOM_Object) aGroupRef2 = GetObjectImpl(theGroup2);
+ Handle(::GEOM_Object) aGroupRef1 = GetObjectImpl(theGroup1);
+ Handle(::GEOM_Object) aGroupRef2 = GetObjectImpl(theGroup2);
if (aGroupRef1.IsNull() || aGroupRef2.IsNull()) return aGEOMObject._retn();
//Perform the operation
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->UnionGroups(aGroupRef1, aGroupRef2);
+ Handle(::GEOM_Object) anObject = GetOperations()->UnionGroups(aGroupRef1, aGroupRef2);
if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn();
return GetObject(anObject);
GetOperations()->SetNotDone();
//Get the reference groups
- HANDLE_NAMESPACE(GEOM_Object) aGroupRef1 = GetObjectImpl(theGroup1);
- HANDLE_NAMESPACE(GEOM_Object) aGroupRef2 = GetObjectImpl(theGroup2);
+ Handle(::GEOM_Object) aGroupRef1 = GetObjectImpl(theGroup1);
+ Handle(::GEOM_Object) aGroupRef2 = GetObjectImpl(theGroup2);
if (aGroupRef1.IsNull() || aGroupRef2.IsNull()) return aGEOMObject._retn();
//Perform the operation
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->IntersectGroups(aGroupRef1, aGroupRef2);
+ Handle(::GEOM_Object) anObject = GetOperations()->IntersectGroups(aGroupRef1, aGroupRef2);
if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn();
return GetObject(anObject);
GetOperations()->SetNotDone();
//Get the reference groups
- HANDLE_NAMESPACE(GEOM_Object) aGroupRef1 = GetObjectImpl(theGroup1);
- HANDLE_NAMESPACE(GEOM_Object) aGroupRef2 = GetObjectImpl(theGroup2);
+ Handle(::GEOM_Object) aGroupRef1 = GetObjectImpl(theGroup1);
+ Handle(::GEOM_Object) aGroupRef2 = GetObjectImpl(theGroup2);
if (aGroupRef1.IsNull() || aGroupRef2.IsNull()) return aGEOMObject._retn();
//Perform the operation
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->CutGroups(aGroupRef1, aGroupRef2);
+ Handle(::GEOM_Object) anObject = GetOperations()->CutGroups(aGroupRef1, aGroupRef2);
if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn();
return GetObject(anObject);
int ind, aLen = theGList.length();
for (ind = 0; ind < aLen; ind++) {
- HANDLE_NAMESPACE(GEOM_Object) aGr = GetObjectImpl(theGList[ind]);
+ Handle(::GEOM_Object) aGr = GetObjectImpl(theGList[ind]);
if (aGr.IsNull()) return aGEOMObject._retn();
aGroups->Append(aGr);
}
//Perform the operation
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->UnionListOfGroups(aGroups);
+ Handle(::GEOM_Object) anObject = GetOperations()->UnionListOfGroups(aGroups);
if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn();
return GetObject(anObject);
int ind, aLen = theGList.length();
for (ind = 0; ind < aLen; ind++) {
- HANDLE_NAMESPACE(GEOM_Object) aGr = GetObjectImpl(theGList[ind]);
+ Handle(::GEOM_Object) aGr = GetObjectImpl(theGList[ind]);
if (aGr.IsNull()) return aGEOMObject._retn();
aGroups->Append(aGr);
}
//Perform the operation
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->IntersectListOfGroups(aGroups);
+ Handle(::GEOM_Object) anObject = GetOperations()->IntersectListOfGroups(aGroups);
if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn();
return GetObject(anObject);
int ind, aLen = theGList1.length();
for (ind = 0; ind < aLen; ind++) {
- HANDLE_NAMESPACE(GEOM_Object) aGr = GetObjectImpl(theGList1[ind]);
+ Handle(::GEOM_Object) aGr = GetObjectImpl(theGList1[ind]);
if (aGr.IsNull()) return aGEOMObject._retn();
aGroups1->Append(aGr);
}
aLen = theGList2.length();
for (ind = 0; ind < aLen; ind++) {
- HANDLE_NAMESPACE(GEOM_Object) aGr = GetObjectImpl(theGList2[ind]);
+ Handle(::GEOM_Object) aGr = GetObjectImpl(theGList2[ind]);
if (aGr.IsNull()) return aGEOMObject._retn();
aGroups2->Append(aGr);
}
//Perform the operation
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->CutListOfGroups(aGroups1, aGroups2);
+ Handle(::GEOM_Object) anObject = GetOperations()->CutListOfGroups(aGroups1, aGroups2);
if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn();
return GetObject(anObject);
GetOperations()->SetNotDone();
//Get the reference group
- HANDLE_NAMESPACE(GEOM_Object) aGroupRef = GetObjectImpl(theGroup);
+ Handle(::GEOM_Object) aGroupRef = GetObjectImpl(theGroup);
if (aGroupRef.IsNull()) return -1;
return GetOperations()->GetType(aGroupRef);
GetOperations()->SetNotDone();
//Get the reference group
- HANDLE_NAMESPACE(GEOM_Object) aGroupRef = GetObjectImpl(theGroup);
+ Handle(::GEOM_Object) aGroupRef = GetObjectImpl(theGroup);
if (aGroupRef.IsNull()) return aGEOMObject._retn();
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->GetMainShape(aGroupRef);
+ Handle(::GEOM_Object) anObject = GetOperations()->GetMainShape(aGroupRef);
if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn();
return GetObject(anObject);
GetOperations()->SetNotDone();
//Get the reference group
- HANDLE_NAMESPACE(GEOM_Object) aGroupRef = GetObjectImpl(theGroup);
+ Handle(::GEOM_Object) aGroupRef = GetObjectImpl(theGroup);
if (aGroupRef.IsNull()) return aList._retn();
aList = new GEOM::ListOfLong;
// return aGEOMObject._retn();
// Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
if (anObject.IsNull())
return aGEOMObject._retn();
// Perform
- HANDLE_NAMESPACE(GEOM_Object) aNewObject = GetOperations()->ShapeProcess( anObject,
+ Handle(::GEOM_Object) aNewObject = GetOperations()->ShapeProcess( anObject,
ConvertStringArray( theOperations ), ConvertStringArray( theParams ),
ConvertStringArray( theValues ) );
if ( !GetOperations()->IsDone() || aNewObject.IsNull() )
GetOperations()->SetNotDone();
// Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
if (anObject.IsNull())
return aGEOMObject._retn();
// if theFaces is empty - it's OK, it means that ALL faces must be removed
// Perform
- HANDLE_NAMESPACE(GEOM_Object) aNewObject =
+ Handle(::GEOM_Object) aNewObject =
GetOperations()->SuppressFaces( anObject, Convert( theFaces ) );
if (!GetOperations()->IsDone() || aNewObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
// Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
if (anObject.IsNull())
return aGEOMObject._retn();
// Perform
- HANDLE_NAMESPACE(GEOM_Object) aNewObject =
+ Handle(::GEOM_Object) aNewObject =
GetOperations()->CloseContour( anObject, Convert( theWires ), isCommonVertex );
if (!GetOperations()->IsDone() || aNewObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
// Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
if (anObject.IsNull())
return aGEOMObject._retn();
// if theWires is empty - it's OK, it means that ALL wires should be removed
// Perform
- HANDLE_NAMESPACE(GEOM_Object) aNewObject =
+ Handle(::GEOM_Object) aNewObject =
GetOperations()->RemoveIntWires( anObject, Convert( theWires ) );
if (!GetOperations()->IsDone() || aNewObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
// Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
if (anObject.IsNull())
return aGEOMObject._retn();
// if theWires is empty - it's OK, it means that ALL wires should be removed
// Perform
- HANDLE_NAMESPACE(GEOM_Object) aNewObject =
+ Handle(::GEOM_Object) aNewObject =
GetOperations()->FillHoles( anObject, Convert( theWires ) );
if (!GetOperations()->IsDone() || aNewObject.IsNull())
return aGEOMObject._retn();
return aGEOMObject._retn();
//Get the shapes
- std::list< HANDLE_NAMESPACE(GEOM_Object) > aShapes;
+ std::list< Handle(::GEOM_Object) > aShapes;
if (! GetListOfObjectsImpl( theObjects, aShapes ))
return aGEOMObject._retn();
// Perform
- HANDLE_NAMESPACE(GEOM_Object) aNewObject = GetOperations()->Sew( aShapes, theTolerance, false );
+ Handle(::GEOM_Object) aNewObject = GetOperations()->Sew( aShapes, theTolerance, false );
if (!GetOperations()->IsDone() || aNewObject.IsNull())
return aGEOMObject._retn();
return aGEOMObject._retn();
//Get the shapes
- std::list< HANDLE_NAMESPACE(GEOM_Object) > aShapes;
+ std::list< Handle(::GEOM_Object) > aShapes;
if (! GetListOfObjectsImpl( theObjects, aShapes ))
return aGEOMObject._retn();
// Perform
- HANDLE_NAMESPACE(GEOM_Object) aNewObject = GetOperations()->Sew( aShapes, theTolerance, true );
+ Handle(::GEOM_Object) aNewObject = GetOperations()->Sew( aShapes, theTolerance, true );
if (!GetOperations()->IsDone() || aNewObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
// Get the objects
- std::list< HANDLE_NAMESPACE(GEOM_Object) > aShapes;
+ std::list< Handle(::GEOM_Object) > aShapes;
if (! GetListOfObjectsImpl( theSolids, aShapes ))
return aGEOMObject._retn();
// Perform
- HANDLE_NAMESPACE(GEOM_Object) aNewObject = GetOperations()->RemoveInternalFaces(aShapes);
+ Handle(::GEOM_Object) aNewObject = GetOperations()->RemoveInternalFaces(aShapes);
if (!GetOperations()->IsDone() || aNewObject.IsNull())
return aGEOMObject._retn();
return aGEOMObject._retn();
// Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
if (anObject.IsNull())
return aGEOMObject._retn();
// Perform
- HANDLE_NAMESPACE(GEOM_Object) aNewObject =
+ Handle(::GEOM_Object) aNewObject =
GetOperations()->DivideEdge( anObject, theIndex, theValue, isByParameter );
if (!GetOperations()->IsDone() || aNewObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
// Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
if (anObject.IsNull())
return aGEOMObject._retn();
// Get the points
- std::list< HANDLE_NAMESPACE(GEOM_Object) > aPoints;
+ std::list< Handle(::GEOM_Object) > aPoints;
if (! GetListOfObjectsImpl( thePoints, aPoints ))
return aGEOMObject._retn();
// Perform
- HANDLE_NAMESPACE(GEOM_Object) aNewObject =
+ Handle(::GEOM_Object) aNewObject =
GetOperations()->DivideEdgeByPoint( anObject, theIndex, aPoints );
if (!GetOperations()->IsDone() || aNewObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aWire = GetObjectImpl(theWire);
+ Handle(::GEOM_Object) aWire = GetObjectImpl(theWire);
if (aWire.IsNull()) return aGEOMObject._retn();
int ind, aLen;
- std::list<HANDLE_NAMESPACE(GEOM_Object)> aVerts;
+ std::list<Handle(::GEOM_Object)> aVerts;
//Get the shapes
aLen = theVertices.length();
for (ind = 0; ind < aLen; ind++) {
- HANDLE_NAMESPACE(GEOM_Object) aSh = GetObjectImpl(theVertices[ind]);
+ Handle(::GEOM_Object) aSh = GetObjectImpl(theVertices[ind]);
if (aSh.IsNull()) return aGEOMObject._retn();
aVerts.push_back(aSh);
}
//Perform operation
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->FuseCollinearEdgesWithinWire(aWire, aVerts);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
Handle(TColStd_HSequenceOfTransient) anObjects = new TColStd_HSequenceOfTransient();
for ( size_t i = 0; i < theObjects.length(); ++i )
{
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetObjectImpl(theObjects[i]);
+ Handle(::GEOM_Object) anObject = GetObjectImpl(theObjects[i]);
if (anObject.IsNull())
return false;
anObjects->Append( anObject );
int i, n = aClosed->Length();
theClosedWires->length( n );
for ( i = 1; i <= n; i++ )
- (*theClosedWires)[i-1] = GetObject(HANDLE_NAMESPACE(GEOM_Object)::DownCast(aClosed->Value(i)));
+ (*theClosedWires)[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aClosed->Value(i)));
n = anOpen->Length();
theOpenWires->length( n );
for ( i = 1, n = anOpen->Length(); i <= n; i++ )
- (*theOpenWires)[i-1] = GetObject(HANDLE_NAMESPACE(GEOM_Object)::DownCast(anOpen->Value(i)));
+ (*theOpenWires)[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(anOpen->Value(i)));
return true;
}
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
// Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
if (anObject.IsNull())
return aGEOMObject._retn();
// Perform
-// HANDLE_NAMESPACE(GEOM_Object) aNewObject =
+// Handle(::GEOM_Object) aNewObject =
GetOperations()->ChangeOrientation( anObject );
// if (!GetOperations()->IsDone() || aNewObject.IsNull())
// return aGEOMObject._retn();
GetOperations()->SetNotDone();
// Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
if (anObject.IsNull())
return aGEOMObject._retn();
// Perform
- HANDLE_NAMESPACE(GEOM_Object) aNewObject =
+ Handle(::GEOM_Object) aNewObject =
GetOperations()->ChangeOrientationCopy( anObject );
if (!GetOperations()->IsDone() || aNewObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
// Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
if (anObject.IsNull())
return aGEOMObject._retn();
// Perform
- HANDLE_NAMESPACE(GEOM_Object) aNewObject =
+ Handle(::GEOM_Object) aNewObject =
GetOperations()->LimitTolerance(anObject, theTolerance);
if (!GetOperations()->IsDone() || aNewObject.IsNull())
return aGEOMObject._retn();
#include "GEOM_BaseObject.hxx"
#include "GEOMImpl_Types.hxx"
-#include <Basics_OCCTVersion.hxx>
-
#include <TColStd_HSequenceOfAsciiString.hxx>
-
#include <TColStd_HArray1OfByte.hxx>
//=============================================================================
GetOperations()->SetNotDone();
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) anOriginal = GetObjectImpl(theOriginal);
+ Handle(::GEOM_Object) anOriginal = GetObjectImpl(theOriginal);
if (anOriginal.IsNull()) return aGEOMObject._retn();
//Create the copy
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeCopy(anOriginal);
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeCopy(anOriginal);
if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) anOriginal = GetObjectImpl(theOriginal);
+ Handle(::GEOM_Object) anOriginal = GetObjectImpl(theOriginal);
if (anOriginal.IsNull()) return;
//Export the shape to the file
aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++)
- aSeq[i-1] = GetBaseObject(HANDLE_NAMESPACE(GEOM_BaseObject)::DownCast(aHSeq->Value(i)));
+ aSeq[i-1] = GetBaseObject(Handle(::GEOM_BaseObject)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
char* buf = (char*)theStream.NP_data();
std::istringstream aStream (buf);
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->RestoreShape(aStream);
+ Handle(::GEOM_Object) anObject = GetOperations()->RestoreShape(aStream);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
if ( theTexture.length() > 0 ) {
aTexture = new TColStd_HArray1OfByte (1, theTexture.length());
- for ( int i = 0; i < theTexture.length(); i++ )
+ for ( CORBA::ULong i = 0; i < theTexture.length(); i++ )
aTexture->SetValue( i+1, (Standard_Byte)theTexture[i] );
}
return GetOperations()->AddTexture( theWidth, theHeight, aTexture );
}
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShapeFrom = GetObjectImpl(theObjectFrom);
- HANDLE_NAMESPACE(GEOM_Object) aShapeTo = GetObjectImpl(theObjectTo);
+ Handle(::GEOM_Object) aShapeFrom = GetObjectImpl(theObjectFrom);
+ Handle(::GEOM_Object) aShapeTo = GetObjectImpl(theObjectTo);
if (aShapeFrom.IsNull() || aShapeTo.IsNull())
{
GEOM::GEOM_Object_var aGEOMObject;
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShapeRef = GetObjectImpl(theShape);
if (aShapeRef.IsNull()) return aGEOMObject._retn();
//Create the Fillet
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeFilletAll(aShapeRef, theR);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GEOM::GEOM_Object_var aGEOMObject;
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShapeRef = GetObjectImpl(theShape);
if (aShapeRef.IsNull()) return aGEOMObject._retn();
//Get the reference edges
}
//Create the Fillet
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeFilletEdges(aShapeRef, theR, anEdges);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GEOM::GEOM_Object_var aGEOMObject;
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShapeRef = GetObjectImpl(theShape);
if (aShapeRef.IsNull()) return aGEOMObject._retn();
//Get the reference edges
}
//Create the Fillet
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeFilletEdgesR1R2(aShapeRef, theR1, theR2, anEdges);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GEOM::GEOM_Object_var aGEOMObject;
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShapeRef = GetObjectImpl(theShape);
if (aShapeRef.IsNull()) return aGEOMObject._retn();
//Get the reference faces
}
//Create the Fillet
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeFilletFaces(aShapeRef, theR, aFaces);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GEOM::GEOM_Object_var aGEOMObject;
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShapeRef = GetObjectImpl(theShape);
if (aShapeRef.IsNull()) return aGEOMObject._retn();
//Get the reference faces
}
//Create the Fillet
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeFilletFacesR1R2(aShapeRef, theR1, theR2, aFaces);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GEOM::GEOM_Object_var aGEOMObject;
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShapeRef = GetObjectImpl(theShape);
if (aShapeRef.IsNull()) return aGEOMObject._retn();
//Get the reference vertex
}
//Create the Fillet
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeFillet2D(aShapeRef, theR, aVertexes);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GEOM::GEOM_Object_var aGEOMObject;
//Get the reference shape (wire)
- HANDLE_NAMESPACE(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShapeRef = GetObjectImpl(theShape);
if (aShapeRef.IsNull()) return aGEOMObject._retn();
//Get the reference vertex
}
//Create the Fillet
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeFillet1D(aShapeRef, theR, aVertexes, doIgnoreSecantVertices);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GEOM::GEOM_Object_var aGEOMObject;
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShapeRef = GetObjectImpl(theShape);
if (aShapeRef.IsNull()) return aGEOMObject._retn();
//Create the Chamfer
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeChamferAll(aShapeRef, theD);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GEOM::GEOM_Object_var aGEOMObject;
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShapeRef = GetObjectImpl(theShape);
if (aShapeRef.IsNull()) return aGEOMObject._retn();
//Create the Chamfer
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeChamferEdge(aShapeRef, theD1, theD2, theFace1, theFace2);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GEOM::GEOM_Object_var aGEOMObject;
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShapeRef = GetObjectImpl(theShape);
if (aShapeRef.IsNull()) return aGEOMObject._retn();
//Create the Chamfer
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeChamferEdgeAD(aShapeRef, theD, theAngle, theFace1, theFace2);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GEOM::GEOM_Object_var aGEOMObject;
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShapeRef = GetObjectImpl(theShape);
if (aShapeRef.IsNull()) return aGEOMObject._retn();
//Get the reference faces
}
//Create the Chamfer
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeChamferFaces(aShapeRef, theD1, theD2, aFaces);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GEOM::GEOM_Object_var aGEOMObject;
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShapeRef = GetObjectImpl(theShape);
if (aShapeRef.IsNull()) return aGEOMObject._retn();
//Get the reference faces
}
//Create the Chamfer
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeChamferFacesAD(aShapeRef, theD, theAngle, aFaces);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GEOM::GEOM_Object_var aGEOMObject;
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShapeRef = GetObjectImpl(theShape);
if (aShapeRef.IsNull()) return aGEOMObject._retn();
//Get the reference edges
}
//Create the Chamfer
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeChamferEdges(aShapeRef, theD1, theD2, aEdges);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GEOM::GEOM_Object_var aGEOMObject;
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShapeRef = GetObjectImpl(theShape);
if (aShapeRef.IsNull()) return aGEOMObject._retn();
//Get the reference edges
}
//Create the Chamfer
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeChamferEdgesAD(aShapeRef, theD, theAngle, aEdges);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GEOM::GEOM_Object_var aGEOMObject;
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShapeRef = GetObjectImpl(theShape);
if (aShapeRef.IsNull()) return aGEOMObject._retn();
//Create the Archimede
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeArchimede
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeArchimede
(aShapeRef, theWeight, theWaterDensity, theMeshingDeflection);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
(GEOM::GEOM_Object_ptr theShape, GEOM::GEOM_Object_ptr theSubShape)
{
//Get the reference shapes
- HANDLE_NAMESPACE(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
- HANDLE_NAMESPACE(GEOM_Object) aSubShapeRef = GetObjectImpl(theSubShape);
+ Handle(::GEOM_Object) aShapeRef = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aSubShapeRef = GetObjectImpl(theSubShape);
if (aShapeRef.IsNull() || aSubShapeRef.IsNull()) return -1;
//Get the unique ID of <theSubShape> inside <theShape>
GEOM::ListOfDouble_var aDoublesArray = new GEOM::ListOfDouble();
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (!aShape.IsNull()) {
Handle(TColStd_HSequenceOfInteger) anIntegers = new TColStd_HSequenceOfInteger;
Zz = Xx = 1.;
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return;
// Get shape parameters
GetOperations()->SetNotDone();
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return aGEOMObject._retn();
// Make Point - centre of mass of theShape
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->GetCentreOfMass(aShape);
+ Handle(::GEOM_Object) anObject = GetOperations()->GetCentreOfMass(aShape);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if ( aShape.IsNull() ) return aGEOMObject._retn();
// Get vertex by index
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->GetVertexByIndex(aShape, theIndex);
+ Handle(::GEOM_Object) anObject = GetOperations()->GetVertexByIndex(aShape, theIndex);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aFace = GetObjectImpl(theFace);
+ Handle(::GEOM_Object) aFace = GetObjectImpl(theFace);
if (aFace.IsNull()) return aGEOMObject._retn();
// Get the OptionalPoint (can be not defined)
- HANDLE_NAMESPACE(GEOM_Object) anOptionalPoint = GetObjectImpl(theOptionalPoint);
+ Handle(::GEOM_Object) anOptionalPoint = GetObjectImpl(theOptionalPoint);
// Make Vector - normal to theFace (in point theOptionalPoint if the face is not planar)
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->GetNormal(aFace, anOptionalPoint);
+ Handle(::GEOM_Object) anObject = GetOperations()->GetNormal(aFace, anOptionalPoint);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return;
// Get shape parameters
GetOperations()->SetNotDone();
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return;
// Get shape parameters
GetOperations()->SetNotDone();
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return;
// Get shape parameters
GetOperations()->SetNotDone();
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return aGEOMObject._retn();
// Make Box - bounding box of theShape
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->GetBoundingBox(aShape, precise);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return;
// Get shape parameters
}
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull())
{
}
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull())
{
const GEOM::GEOM_IMeasureOperations::ShapeErrors &theErrors)
{
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) {
return NULL;
GEOM::ListOfLong_var anIntegersArray = new GEOM::ListOfLong();
// Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (!aShape.IsNull()) {
GEOMImpl_IMeasureOperations::SICheckLevel aCheckLevel;
GEOM::ListOfLong_var anIntegersArray = new GEOM::ListOfLong();
// Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (!aShape.IsNull()) {
Handle(TColStd_HSequenceOfInteger) anIntegers = new TColStd_HSequenceOfInteger;
GetOperations()->SetNotDone();
// Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
bool isGood = false;
if (!aShape.IsNull()) {
GEOM::ListOfLong_var anIntegersArray2 = new GEOM::ListOfLong();
// Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShape1 = GetObjectImpl(theShape1);
- HANDLE_NAMESPACE(GEOM_Object) aShape2 = GetObjectImpl(theShape2);
+ Handle(::GEOM_Object) aShape1 = GetObjectImpl(theShape1);
+ Handle(::GEOM_Object) aShape2 = GetObjectImpl(theShape2);
if (!aShape1.IsNull() && !aShape2.IsNull()) {
Handle(TColStd_HSequenceOfInteger) anIntegers1 = new TColStd_HSequenceOfInteger;
GetOperations()->SetNotDone();
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return CORBA::string_dup("WRN_NULL_OBJECT_OR_SHAPE");
// Get shape parameters
GetOperations()->SetNotDone();
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return NULL;
// Get shape parameters
//Set a not done flag
GetOperations()->SetNotDone();
- unsigned int nb_points = theCoords.length()/3;
+ int nb_points = theCoords.length()/3;
GEOM::ListOfBool_var aResults = new GEOM::ListOfBool;
aResults->length(nb_points);
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
std::vector<double> tmp(3*nb_points);
for (int i = 0; i < 3*nb_points; i++)
tmp[i] = theCoords[i];
std::vector<bool> res = GetOperations()->AreCoordsInside(aShape, tmp, tolerance);
- for (int i = 0; i < nb_points; i++)
- aResults[i] = i < res.size() ? res[i] : false;
+ for (int i = 0, resSize = res.size(); i < nb_points; i++)
+ aResults[i] = i < resSize ? res[i] : false;
return aResults._retn();
}
GetOperations()->SetNotDone();
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShape1 = GetObjectImpl(theShape1);
- HANDLE_NAMESPACE(GEOM_Object) aShape2 = GetObjectImpl(theShape2);
+ Handle(::GEOM_Object) aShape1 = GetObjectImpl(theShape1);
+ Handle(::GEOM_Object) aShape2 = GetObjectImpl(theShape2);
if (aShape1.IsNull() || aShape2.IsNull()) return -1.0;
// Get shape parameters
GEOM::ListOfDouble_var aDoublesArray = new GEOM::ListOfDouble();
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShape1 = GetObjectImpl(theShape1);
- HANDLE_NAMESPACE(GEOM_Object) aShape2 = GetObjectImpl(theShape2);
+ Handle(::GEOM_Object) aShape1 = GetObjectImpl(theShape1);
+ Handle(::GEOM_Object) aShape2 = GetObjectImpl(theShape2);
if (!aShape1.IsNull() && !aShape2.IsNull()) {
Handle(TColStd_HSequenceOfReal) aDoubles = new TColStd_HSequenceOfReal;
GetOperations()->SetNotDone();
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull())
return;
GetOperations()->SetNotDone();
//Get the reference shapes
- HANDLE_NAMESPACE(GEOM_Object) aShape1 = GetObjectImpl(theShape1);
- HANDLE_NAMESPACE(GEOM_Object) aShape2 = GetObjectImpl(theShape2);
+ Handle(::GEOM_Object) aShape1 = GetObjectImpl(theShape1);
+ Handle(::GEOM_Object) aShape2 = GetObjectImpl(theShape2);
if (aShape1.IsNull() || aShape2.IsNull()) return -1.0;
// Get the angle
GetOperations()->SetNotDone();
//Get the reference shapes
- HANDLE_NAMESPACE(GEOM_Object) aShape1 = GetObjectImpl(theShape1);
- HANDLE_NAMESPACE(GEOM_Object) aShape2 = GetObjectImpl(theShape2);
+ Handle(::GEOM_Object) aShape1 = GetObjectImpl(theShape1);
+ Handle(::GEOM_Object) aShape2 = GetObjectImpl(theShape2);
if (aShape1.IsNull() || aShape2.IsNull()) return -1.0;
// Get the angle
GetOperations()->SetNotDone();
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theCurve);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theCurve);
if(aShape.IsNull()) return -1.0;
return GetOperations()->CurveCurvatureByParam(aShape,theParam);
GetOperations()->SetNotDone();
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theCurve);
- HANDLE_NAMESPACE(GEOM_Object) aPoint = GetObjectImpl(thePoint);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theCurve);
+ Handle(::GEOM_Object) aPoint = GetObjectImpl(thePoint);
if( aShape.IsNull() || aPoint.IsNull() ) return -1.0;
return GetOperations()->CurveCurvatureByPoint(aShape,aPoint);
GetOperations()->SetNotDone();
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theSurf);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theSurf);
if(aShape.IsNull()) return -1.0;
return GetOperations()->MaxSurfaceCurvatureByParam(aShape,theUParam,theVParam);
GetOperations()->SetNotDone();
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theSurf);
- HANDLE_NAMESPACE(GEOM_Object) aPoint = GetObjectImpl(thePoint);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theSurf);
+ Handle(::GEOM_Object) aPoint = GetObjectImpl(thePoint);
if( aShape.IsNull() || aPoint.IsNull() ) return -1.0;
return GetOperations()->MaxSurfaceCurvatureByPoint(aShape,aPoint);
GetOperations()->SetNotDone();
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theSurf);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theSurf);
if (aShape.IsNull()) return -1.0;
return GetOperations()->MinSurfaceCurvatureByParam(aShape,theUParam,theVParam);
GetOperations()->SetNotDone();
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theSurf);
- HANDLE_NAMESPACE(GEOM_Object) aPoint = GetObjectImpl(thePoint);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theSurf);
+ Handle(::GEOM_Object) aPoint = GetObjectImpl(thePoint);
if (aShape.IsNull() || aPoint.IsNull()) return -1.0;
return GetOperations()->MinSurfaceCurvatureByPoint(aShape,aPoint);
CORBA::Double GetAngleBtwVectors (GEOM::GEOM_Object_ptr theShape1,
GEOM::GEOM_Object_ptr theShape2);
- // Methods for recieving radiuses of curvature of curves and surfaces
+ // Methods for receiving radiuses of curvature of curves and surfaces
// in the given point
CORBA::Double CurveCurvatureByParam (GEOM::GEOM_Object_ptr theCurve,
CORBA::Double theParam);
*/
//=============================================================================
GEOM::GEOM_BaseObject_ptr
-GEOM_IOperations_i::GetBaseObject(HANDLE_NAMESPACE(GEOM_BaseObject) theObject)
+GEOM_IOperations_i::GetBaseObject(Handle(::GEOM_BaseObject) theObject)
{
GEOM::GEOM_BaseObject_var GO;
if (theObject.IsNull()) return GO._retn();
* GetObjectImpl
*/
//=============================================================================
-HANDLE_NAMESPACE(GEOM_BaseObject)
+Handle(::GEOM_BaseObject)
GEOM_IOperations_i::GetBaseObjectImpl(GEOM::GEOM_BaseObject_ptr theObject)
{
- HANDLE_NAMESPACE(GEOM_BaseObject) anImpl;
+ Handle(::GEOM_BaseObject) anImpl;
if (!CORBA::is_nil(theObject)) {
CORBA::String_var anEntry = theObject->GetEntry();
anImpl = GetImpl()->GetEngine()->GetObject( anEntry );
* GetObject
*/
//=============================================================================
-GEOM::GEOM_Object_ptr GEOM_IOperations_i::GetObject(HANDLE_NAMESPACE(GEOM_Object) theObject)
+GEOM::GEOM_Object_ptr GEOM_IOperations_i::GetObject(Handle(::GEOM_Object) theObject)
{
return GEOM::GEOM_Object::_narrow( GetBaseObject( theObject ));
}
* GetObjectImpl
*/
//=============================================================================
-HANDLE_NAMESPACE(GEOM_Object) GEOM_IOperations_i::GetObjectImpl(GEOM::GEOM_Object_ptr theObject)
+Handle(::GEOM_Object) GEOM_IOperations_i::GetObjectImpl(GEOM::GEOM_Object_ptr theObject)
{
- return HANDLE_NAMESPACE(GEOM_Object)::DownCast( GetBaseObjectImpl( theObject ));
+ return Handle(::GEOM_Object)::DownCast( GetBaseObjectImpl( theObject ));
}
//=============================================================================
int aNbObj = theObjects.length();
for (i = 0; i < aNbObj; i++) {
- HANDLE_NAMESPACE(GEOM_Object) anObj = GetObjectImpl(theObjects[i]);
+ Handle(::GEOM_Object) anObj = GetObjectImpl(theObjects[i]);
if (anObj.IsNull()) {
aResult.Nullify();
//=======================================================================
bool GEOM_IOperations_i::GetListOfObjectsImpl(const GEOM::ListOfGO& theObjects,
- std::list< HANDLE_NAMESPACE(GEOM_Object) >& theList)
+ std::list< Handle(::GEOM_Object) >& theList)
{
int i;
int aNbObj = theObjects.length();
for (i = 0; i < aNbObj; i++) {
- HANDLE_NAMESPACE(GEOM_Object) anObj = GetObjectImpl(theObjects[i]);
+ Handle(::GEOM_Object) anObj = GetObjectImpl(theObjects[i]);
if (anObj.IsNull())
return false;
virtual char* GetErrorCode();
- virtual GEOM::GEOM_BaseObject_ptr GetBaseObject(HANDLE_NAMESPACE(GEOM_BaseObject) theObject);
- virtual HANDLE_NAMESPACE(GEOM_BaseObject) GetBaseObjectImpl(GEOM::GEOM_BaseObject_ptr theObject);
- virtual GEOM::GEOM_Object_ptr GetObject(HANDLE_NAMESPACE(GEOM_Object) theObject);
- virtual HANDLE_NAMESPACE(GEOM_Object) GetObjectImpl(GEOM::GEOM_Object_ptr theObject);
+ virtual GEOM::GEOM_BaseObject_ptr GetBaseObject(Handle(::GEOM_BaseObject) theObject);
+ virtual Handle(::GEOM_BaseObject) GetBaseObjectImpl(GEOM::GEOM_BaseObject_ptr theObject);
+ virtual GEOM::GEOM_Object_ptr GetObject(Handle(::GEOM_Object) theObject);
+ virtual Handle(::GEOM_Object) GetObjectImpl(GEOM::GEOM_Object_ptr theObject);
virtual void StartOperation();
Handle(TColStd_HSequenceOfTransient)
GetListOfObjectsImpl(const GEOM::ListOfGO& theObjects);
bool GetListOfObjectsImpl(const GEOM::ListOfGO& theObjects,
- std::list< HANDLE_NAMESPACE(GEOM_Object) >& theList);
+ std::list< Handle(::GEOM_Object) >& theList);
Handle(TColStd_HArray1OfExtendedString)
ConvertStringArray(const GEOM::string_array &theInArray);
GetOperations()->SetNotDone();
//Get the reference points
- HANDLE_NAMESPACE(GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
- HANDLE_NAMESPACE(GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
+ Handle(::GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
+ Handle(::GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
if (aPnt1.IsNull() || aPnt2.IsNull()) return aGEOMObject._retn();
//Create the Edge
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeEdge(aPnt1, aPnt2);
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeEdge(aPnt1, aPnt2);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference curve
- HANDLE_NAMESPACE(GEOM_Object) aRefCurve = GetObjectImpl(theCurve);
+ Handle(::GEOM_Object) aRefCurve = GetObjectImpl(theCurve);
if (aRefCurve.IsNull()) return aGEOMObject._retn();
//Get the reference point (can be NULL)
- HANDLE_NAMESPACE(GEOM_Object) aRefPoint;
+ Handle(::GEOM_Object) aRefPoint;
if (!CORBA::is_nil(theStartPoint)) {
aRefPoint = GetObjectImpl(theStartPoint);
}
//Create the point
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeEdgeOnCurveByLength(aRefCurve, theLength, aRefPoint);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the source wire
- HANDLE_NAMESPACE(GEOM_Object) aWire = GetObjectImpl(theWire);
+ Handle(::GEOM_Object) aWire = GetObjectImpl(theWire);
if (aWire.IsNull()) return aGEOMObject._retn();
//Create the Edge
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeEdgeWire(aWire, theLinearTolerance, theAngularTolerance);
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeEdgeWire(aWire, theLinearTolerance, theAngularTolerance);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
int ind, aLen;
- std::list<HANDLE_NAMESPACE(GEOM_Object)> aShapes;
+ std::list<Handle(::GEOM_Object)> aShapes;
//Get the shapes
aLen = theEdgesAndWires.length();
for (ind = 0; ind < aLen; ind++) {
- HANDLE_NAMESPACE(GEOM_Object) aSh = GetObjectImpl(theEdgesAndWires[ind]);
+ Handle(::GEOM_Object) aSh = GetObjectImpl(theEdgesAndWires[ind]);
if (aSh.IsNull()) return aGEOMObject._retn();
aShapes.push_back(aSh);
}
// Make Solid
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeWire(aShapes, theTolerance);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference wire
- HANDLE_NAMESPACE(GEOM_Object) aWire = GetObjectImpl(theWire);
+ Handle(::GEOM_Object) aWire = GetObjectImpl(theWire);
if (aWire.IsNull()) return aGEOMObject._retn();
//Create the Face
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeFace(aWire, isPlanarWanted);
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeFace(aWire, isPlanarWanted);
//if (!GetOperations()->IsDone() || anObject.IsNull())
// enable warning status
if (anObject.IsNull())
GetOperations()->SetNotDone();
int ind, aLen;
- std::list<HANDLE_NAMESPACE(GEOM_Object)> aShapes;
+ std::list<Handle(::GEOM_Object)> aShapes;
//Get the shapes
aLen = theWires.length();
for (ind = 0; ind < aLen; ind++) {
- HANDLE_NAMESPACE(GEOM_Object) aSh = GetObjectImpl(theWires[ind]);
+ Handle(::GEOM_Object) aSh = GetObjectImpl(theWires[ind]);
if (aSh.IsNull()) return aGEOMObject._retn();
aShapes.push_back(aSh);
}
// Make Face
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeFaceWires(aShapes, isPlanarWanted);
//if (!GetOperations()->IsDone() || anObject.IsNull())
// enable warning status
GetOperations()->SetNotDone();
//Get the reference face and wire
- HANDLE_NAMESPACE(GEOM_Object) aFace = GetObjectImpl(theFace);
- HANDLE_NAMESPACE(GEOM_Object) aWire = GetObjectImpl(theWire);
+ Handle(::GEOM_Object) aFace = GetObjectImpl(theFace);
+ Handle(::GEOM_Object) aWire = GetObjectImpl(theWire);
if (aFace.IsNull() || aWire.IsNull()) {
return aGEOMObject._retn();
}
//Create the Face
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeFaceFromSurface(aFace, aWire);
if (anObject.IsNull()) {
GetOperations()->SetNotDone();
//Get the shapes
- std::list<HANDLE_NAMESPACE(GEOM_Object)> aConstraints;
- for( int ind = 0; ind < theConstraints.length(); ind++ ) {
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetObjectImpl( theConstraints[ind] );
+ std::list<Handle(::GEOM_Object)> aConstraints;
+ for( CORBA::ULong ind = 0; ind < theConstraints.length(); ind++ ) {
+ Handle(::GEOM_Object) anObject = GetObjectImpl( theConstraints[ind] );
aConstraints.push_back(anObject);
}
// Make Face
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeFaceWithConstraints( aConstraints );
// enable warning status
GetOperations()->SetNotDone();
int ind, aLen;
- std::list<HANDLE_NAMESPACE(GEOM_Object)> aShapes;
+ std::list<Handle(::GEOM_Object)> aShapes;
//Get the shapes
aLen = theFacesAndShells.length();
for (ind = 0; ind < aLen; ind++) {
- HANDLE_NAMESPACE(GEOM_Object) aSh = GetObjectImpl(theFacesAndShells[ind]);
+ Handle(::GEOM_Object) aSh = GetObjectImpl(theFacesAndShells[ind]);
if (aSh.IsNull()) return aGEOMObject._retn();
aShapes.push_back(aSh);
}
// Make Solid
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeShell(aShapes);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aShell = GetObjectImpl(theShell);
+ Handle(::GEOM_Object) aShell = GetObjectImpl(theShell);
if (aShell.IsNull()) return aGEOMObject._retn();
- std::list<HANDLE_NAMESPACE(GEOM_Object)> aShapes;
+ std::list<Handle(::GEOM_Object)> aShapes;
aShapes.push_back(aShell);
//Create the Solid
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeSolidShells(aShapes);
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeSolidShells(aShapes);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
int ind, aLen;
- std::list<HANDLE_NAMESPACE(GEOM_Object)> aShapes;
+ std::list<Handle(::GEOM_Object)> aShapes;
//Get the shapes
aLen = theShells.length();
for (ind = 0; ind < aLen; ind++) {
- HANDLE_NAMESPACE(GEOM_Object) aSh = GetObjectImpl(theShells[ind]);
+ Handle(::GEOM_Object) aSh = GetObjectImpl(theShells[ind]);
if (aSh.IsNull()) return aGEOMObject._retn();
aShapes.push_back(aSh);
}
// Make Solid
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeSolidShells(aShapes);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
int ind, aLen;
- std::list<HANDLE_NAMESPACE(GEOM_Object)> aShapes;
+ std::list<Handle(::GEOM_Object)> aShapes;
//Get the shapes
aLen = theShapes.length();
for (ind = 0; ind < aLen; ind++) {
- HANDLE_NAMESPACE(GEOM_Object) aSh = GetObjectImpl(theShapes[ind]);
+ Handle(::GEOM_Object) aSh = GetObjectImpl(theShapes[ind]);
if (aSh.IsNull()) return aGEOMObject._retn();
aShapes.push_back(aSh);
}
// Make Solid
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeCompound(aShapes);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
int ind, aLen;
- std::list<HANDLE_NAMESPACE(GEOM_Object)> aShapes;
+ std::list<Handle(::GEOM_Object)> aShapes;
//Get the shapes
aLen = theFacesOrShells.length();
for (ind = 0; ind < aLen; ind++) {
- ::HANDLE_NAMESPACE(GEOM_Object) aSh = GetObjectImpl(theFacesOrShells[ind]);
+ ::Handle(::GEOM_Object) aSh = GetObjectImpl(theFacesOrShells[ind]);
if (aSh.IsNull()) return aGEOMObject._retn();
aShapes.push_back(aSh);
}
// Make Solid
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeSolidFromConnectedFaces(aShapes, isIntersect);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- std::list< HANDLE_NAMESPACE(GEOM_Object) > aShapes;
+ std::list< Handle(::GEOM_Object) > aShapes;
if (! GetListOfObjectsImpl( theShapes, aShapes ))
return aGEOMObject._retn();
//Perform the gluing
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeGlueFaces(aShapes, theTolerance, doKeepNonSolids);
//if (!GetOperations()->IsDone() || anObject.IsNull())
// to allow warning
GetOperations()->SetNotDone();
//Get the reference objects
- std::list< HANDLE_NAMESPACE(GEOM_Object) > aShapes;
+ std::list< Handle(::GEOM_Object) > aShapes;
if (! GetListOfObjectsImpl( theShapes, aShapes ))
return aSeq._retn();
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++)
- aSeq[i-1] = GetObject(HANDLE_NAMESPACE(GEOM_Object)::DownCast(aHSeq->Value(i)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
GetOperations()->SetNotDone();
//Get the reference objects
- std::list< HANDLE_NAMESPACE(GEOM_Object) > aShapes;
+ std::list< Handle(::GEOM_Object) > aShapes;
if (! GetListOfObjectsImpl( theShapes, aShapes ))
return aGEOMObject._retn();
//Get the shapes
- std::list<HANDLE_NAMESPACE(GEOM_Object)> aFaces;
+ std::list<Handle(::GEOM_Object)> aFaces;
if (! GetListOfObjectsImpl( theFaces, aFaces ))
return aGEOMObject._retn();
//Perform the gluing
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeGlueFacesByList(aShapes, theTolerance, aFaces,
doKeepNonSolids, doGlueAllEdges);
//if (!GetOperations()->IsDone() || anObject.IsNull())
GetOperations()->SetNotDone();
//Get the reference objects
- std::list< HANDLE_NAMESPACE(GEOM_Object) > aShapes;
+ std::list< Handle(::GEOM_Object) > aShapes;
if (! GetListOfObjectsImpl( theShapes, aShapes ))
return aGEOMObject._retn();
//Perform the gluing
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeGlueEdges(aShapes, theTolerance);
//if (!GetOperations()->IsDone() || anObject.IsNull())
// to allow warning
GetOperations()->SetNotDone();
//Get the reference objects
- std::list< HANDLE_NAMESPACE(GEOM_Object) > aShapes;
+ std::list< Handle(::GEOM_Object) > aShapes;
if (! GetListOfObjectsImpl( theShapes, aShapes ))
return aSeq._retn();
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++)
- aSeq[i-1] = GetObject(HANDLE_NAMESPACE(GEOM_Object)::DownCast(aHSeq->Value(i)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
GetOperations()->SetNotDone();
//Get the reference objects
- std::list< HANDLE_NAMESPACE(GEOM_Object) > aShapes;
+ std::list< Handle(::GEOM_Object) > aShapes;
if (! GetListOfObjectsImpl( theShapes, aShapes ))
return aGEOMObject._retn();
//Get the shapes
- std::list<HANDLE_NAMESPACE(GEOM_Object)> anEdges;
+ std::list<Handle(::GEOM_Object)> anEdges;
if (! GetListOfObjectsImpl( theEdges, anEdges ))
return aGEOMObject._retn();
//Perform the gluing
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeGlueEdgesByList(aShapes, theTolerance, anEdges);
//if (!GetOperations()->IsDone() || anObject.IsNull())
// to allow warning
{
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return aSeq._retn();
Handle(TColStd_HSequenceOfTransient) aHSeq =
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++)
- aSeq[i-1] = GetObject(HANDLE_NAMESPACE(GEOM_Object)::DownCast(aHSeq->Value(i)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
{
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return aSeq._retn();
Handle(TColStd_HSequenceOfTransient) aHSeq =
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++)
- aSeq[i-1] = GetObject(HANDLE_NAMESPACE(GEOM_Object)::DownCast(aHSeq->Value(i)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
{
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return aSeq._retn();
Handle(TColStd_HSequenceOfTransient) aHSeq =
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++)
- aSeq[i-1] = GetObject(HANDLE_NAMESPACE(GEOM_Object)::DownCast(aHSeq->Value(i)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
{
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return aSeq._retn();
Handle(TColStd_HSequenceOfTransient) aHSeq =
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++)
- aSeq[i-1] = GetObject(HANDLE_NAMESPACE(GEOM_Object)::DownCast(aHSeq->Value(i)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
{
GEOM::ListOfLong_var aSeq = new GEOM::ListOfLong;
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return aSeq._retn();
Handle(TColStd_HSequenceOfInteger) aHSeq =
{
GEOM::ListOfLong_var aSeq = new GEOM::ListOfLong;
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return aSeq._retn();
Handle(TColStd_HSequenceOfInteger) aHSeq =
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theMainShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theMainShape);
if (aShape.IsNull()) return aGEOMObject._retn();
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->GetSubShape(aShape, theID);
+ Handle(::GEOM_Object) anObject = GetOperations()->GetSubShape(aShape, theID);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
const GEOM::ListOfLong& theIndices)
{
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
- Standard_Integer i;
//Set a not done flag
GetOperations()->SetNotDone();
if (theIndices.length() < 1)
return aSeq._retn();
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theMainShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theMainShape);
if (aShape.IsNull()) return aSeq._retn();
Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger (1, theIndices.length());
- for (i = 0; i < theIndices.length(); i++)
+ for (CORBA::ULong i = 0; i < theIndices.length(); i++)
anArray->SetValue(i+1, theIndices[i]);
Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->MakeSubShapes(aShape, anArray);
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
- for (i = 0; i < aLength; i++)
- aSeq[i] = GetObject(HANDLE_NAMESPACE(GEOM_Object)::DownCast(aHSeq->Value(i+1)));
+ for (int i = 0; i < aLength; i++)
+ aSeq[i] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i+1)));
return aSeq._retn();
}
(GEOM::GEOM_Object_ptr theMainShape, GEOM::GEOM_Object_ptr theSubShape)
{
//Get the reference shapes
- HANDLE_NAMESPACE(GEOM_Object) aMainShapeRef = GetObjectImpl(theMainShape);
- HANDLE_NAMESPACE(GEOM_Object) aSubShapeRef = GetObjectImpl(theSubShape);
+ Handle(::GEOM_Object) aMainShapeRef = GetObjectImpl(theMainShape);
+ Handle(::GEOM_Object) aSubShapeRef = GetObjectImpl(theSubShape);
if (aMainShapeRef.IsNull() || aSubShapeRef.IsNull()) return -1;
GEOM::ListOfLong_var aSeq = new GEOM::ListOfLong;
//Get the reference main shape
- HANDLE_NAMESPACE(GEOM_Object) aMainShapeRef = GetObjectImpl(theMainShape);
+ Handle(::GEOM_Object) aMainShapeRef = GetObjectImpl(theMainShape);
if (aMainShapeRef.IsNull()) return aSeq._retn();
//Get the subshapes
- std::list<HANDLE_NAMESPACE(GEOM_Object)> aShapes;
+ std::list<Handle(::GEOM_Object)> aShapes;
int aLen = theSubShapes.length();
for (int ind = 0; ind < aLen; ind++) {
- HANDLE_NAMESPACE(GEOM_Object) aSh = GetObjectImpl(theSubShapes[ind]);
+ Handle(::GEOM_Object) aSh = GetObjectImpl(theSubShapes[ind]);
if (aSh.IsNull())
{
MESSAGE("NULL shape")
(GEOM::GEOM_Object_ptr theMainShape, GEOM::GEOM_Object_ptr theSubShape)
{
//Get the reference shapes
- HANDLE_NAMESPACE(GEOM_Object) aMainShapeRef = GetObjectImpl(theMainShape);
- HANDLE_NAMESPACE(GEOM_Object) aSubShapeRef = GetObjectImpl(theSubShape);
+ Handle(::GEOM_Object) aMainShapeRef = GetObjectImpl(theMainShape);
+ Handle(::GEOM_Object) aSubShapeRef = GetObjectImpl(theSubShape);
if (aMainShapeRef.IsNull() || aSubShapeRef.IsNull()) return -1;
char* GEOM_IShapesOperations_i::GetShapeTypeString (GEOM::GEOM_Object_ptr theShape)
{
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return NULL;
// Get shape parameters
GEOM::GEOM_Object_ptr theObject,
const CORBA::Long theObjectIndex)
{
- HANDLE_NAMESPACE(GEOM_Object) aSubObject = GetObjectImpl( theSubObject );
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetObjectImpl( theObject );
+ Handle(::GEOM_Object) aSubObject = GetObjectImpl( theSubObject );
+ Handle(::GEOM_Object) anObject = GetObjectImpl( theObject );
if( anObject.IsNull() || aSubObject.IsNull() )
return false;
CORBA::Long GEOM_IShapesOperations_i::NumberOfSubShapes (GEOM::GEOM_Object_ptr theShape,
const CORBA::Long theShapeType)
{
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return -1;
CORBA::Long aNb = GetOperations()->NumberOfSubShapes(aShape, theShapeType);
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return aGEOMObject._retn();
//Create the Solid
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->ReverseShape(aShape);
+ Handle(::GEOM_Object) anObject = GetOperations()->ReverseShape(aShape);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GEOM::ListOfLong_var aSeq = new GEOM::ListOfLong;
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return aSeq._retn();
Handle(TColStd_HSequenceOfInteger) aHSeq =
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
- HANDLE_NAMESPACE(GEOM_Object) aShape1 = GetObjectImpl(theShape1);
- HANDLE_NAMESPACE(GEOM_Object) aShape2 = GetObjectImpl(theShape2);
+ Handle(::GEOM_Object) aShape1 = GetObjectImpl(theShape1);
+ Handle(::GEOM_Object) aShape2 = GetObjectImpl(theShape2);
if (aShape1.IsNull() || aShape2.IsNull()) return aSeq._retn();
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++)
- aSeq[i-1] = GetObject(HANDLE_NAMESPACE(GEOM_Object)::DownCast(aHSeq->Value(i)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
//Get the shapes
- std::list<HANDLE_NAMESPACE(GEOM_Object)> aShapes;
+ std::list<Handle(::GEOM_Object)> aShapes;
if (! GetListOfObjectsImpl( theShapes, aShapes ))
return aSeq._retn();
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++)
- aSeq[i-1] = GetObject(HANDLE_NAMESPACE(GEOM_Object)::DownCast(aHSeq->Value(i)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
- HANDLE_NAMESPACE(GEOM_Object) anAx1 = GetObjectImpl(theAx1);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) anAx1 = GetObjectImpl(theAx1);
if (aShape.IsNull() || anAx1.IsNull()) return aSeq._retn();
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++)
- aSeq[i-1] = GetObject(HANDLE_NAMESPACE(GEOM_Object)::DownCast(aHSeq->Value(i)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
- HANDLE_NAMESPACE(GEOM_Object) anAx1 = GetObjectImpl(theAx1);
- HANDLE_NAMESPACE(GEOM_Object) anPnt = GetObjectImpl(thePnt);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) anAx1 = GetObjectImpl(theAx1);
+ Handle(::GEOM_Object) anPnt = GetObjectImpl(thePnt);
if (aShape.IsNull() || anAx1.IsNull() || anPnt.IsNull()) return aSeq._retn();
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++)
- aSeq[i-1] = GetObject(HANDLE_NAMESPACE(GEOM_Object)::DownCast(aHSeq->Value(i)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
- HANDLE_NAMESPACE(GEOM_Object) anAxis = GetObjectImpl(theAxis);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) anAxis = GetObjectImpl(theAxis);
if (aShape.IsNull() || anAxis.IsNull()) return aSeq._retn();
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++)
- aSeq[i-1] = GetObject(HANDLE_NAMESPACE(GEOM_Object)::DownCast(aHSeq->Value(i)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
- HANDLE_NAMESPACE(GEOM_Object) anAxis = GetObjectImpl(theAxis);
- HANDLE_NAMESPACE(GEOM_Object) aPnt = GetObjectImpl(thePnt);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) anAxis = GetObjectImpl(theAxis);
+ Handle(::GEOM_Object) aPnt = GetObjectImpl(thePnt);
if (aShape.IsNull() || anAxis.IsNull() || aPnt.IsNull()) return aSeq._retn();
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++)
- aSeq[i-1] = GetObject(HANDLE_NAMESPACE(GEOM_Object)::DownCast(aHSeq->Value(i)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
- HANDLE_NAMESPACE(GEOM_Object) aCenter = GetObjectImpl(theCenter);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aCenter = GetObjectImpl(theCenter);
if (aShape.IsNull() || aCenter.IsNull()) return aSeq._retn();
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++)
- aSeq[i-1] = GetObject(HANDLE_NAMESPACE(GEOM_Object)::DownCast(aHSeq->Value(i)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
- HANDLE_NAMESPACE(GEOM_Object) aTopLeftPoint = GetObjectImpl(theTopLeftPoint);
- HANDLE_NAMESPACE(GEOM_Object) aTopRigthPoint = GetObjectImpl(theTopRigthPoint);
- HANDLE_NAMESPACE(GEOM_Object) aBottomLeftPoint = GetObjectImpl(theBottomLeftPoint);
- HANDLE_NAMESPACE(GEOM_Object) aBottomRigthPoint = GetObjectImpl(theBottomRigthPoint);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aTopLeftPoint = GetObjectImpl(theTopLeftPoint);
+ Handle(::GEOM_Object) aTopRigthPoint = GetObjectImpl(theTopRigthPoint);
+ Handle(::GEOM_Object) aBottomLeftPoint = GetObjectImpl(theBottomLeftPoint);
+ Handle(::GEOM_Object) aBottomRigthPoint = GetObjectImpl(theBottomRigthPoint);
if (aShape.IsNull() ||
aTopLeftPoint.IsNull() ||
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++)
- aSeq[i-1] = GetObject(HANDLE_NAMESPACE(GEOM_Object)::DownCast(aHSeq->Value(i)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
- HANDLE_NAMESPACE(GEOM_Object) anAx1 = GetObjectImpl(theAx1);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) anAx1 = GetObjectImpl(theAx1);
if (aShape.IsNull() || anAx1.IsNull()) return aSeq._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
- HANDLE_NAMESPACE(GEOM_Object) anAx1 = GetObjectImpl(theAx1);
- HANDLE_NAMESPACE(GEOM_Object) anPnt = GetObjectImpl(thePnt);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) anAx1 = GetObjectImpl(theAx1);
+ Handle(::GEOM_Object) anPnt = GetObjectImpl(thePnt);
if (aShape.IsNull() || anAx1.IsNull() || anPnt.IsNull()) return aSeq._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
- HANDLE_NAMESPACE(GEOM_Object) anAxis = GetObjectImpl(theAxis);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) anAxis = GetObjectImpl(theAxis);
if (aShape.IsNull() || anAxis.IsNull()) return aSeq._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
- HANDLE_NAMESPACE(GEOM_Object) anAxis = GetObjectImpl(theAxis);
- HANDLE_NAMESPACE(GEOM_Object) aPnt = GetObjectImpl(thePnt);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) anAxis = GetObjectImpl(theAxis);
+ Handle(::GEOM_Object) aPnt = GetObjectImpl(thePnt);
if (aShape.IsNull() || anAxis.IsNull() || aPnt.IsNull()) return aSeq._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
- HANDLE_NAMESPACE(GEOM_Object) aCenter = GetObjectImpl(theCenter);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aCenter = GetObjectImpl(theCenter);
if (aShape.IsNull() || aCenter.IsNull()) return aSeq._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
- HANDLE_NAMESPACE(GEOM_Object) aTopLeftPoint = GetObjectImpl(theTopLeftPoint);
- HANDLE_NAMESPACE(GEOM_Object) aTopRigthPoint = GetObjectImpl(theTopRigthPoint);
- HANDLE_NAMESPACE(GEOM_Object) aBottomLeftPoint = GetObjectImpl(theBottomLeftPoint);
- HANDLE_NAMESPACE(GEOM_Object) aBottomRigthPoint = GetObjectImpl(theBottomRigthPoint);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aTopLeftPoint = GetObjectImpl(theTopLeftPoint);
+ Handle(::GEOM_Object) aTopRigthPoint = GetObjectImpl(theTopRigthPoint);
+ Handle(::GEOM_Object) aBottomLeftPoint = GetObjectImpl(theBottomLeftPoint);
+ Handle(::GEOM_Object) aBottomRigthPoint = GetObjectImpl(theBottomRigthPoint);
if (aShape.IsNull() ||
aTopLeftPoint.IsNull() ||
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
- HANDLE_NAMESPACE(GEOM_Object) aBox = GetObjectImpl(theBox);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aBox = GetObjectImpl(theBox);
if (aShape.IsNull() || aBox.IsNull() )
return aSeq._retn();
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++)
- aSeq[i-1] = GetObject(HANDLE_NAMESPACE(GEOM_Object)::DownCast(aHSeq->Value(i)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
- HANDLE_NAMESPACE(GEOM_Object) aBox = GetObjectImpl(theBox);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aBox = GetObjectImpl(theBox);
if (aShape.IsNull() || aBox.IsNull() )
return aSeq._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
- HANDLE_NAMESPACE(GEOM_Object) aCheckShape = GetObjectImpl(theCheckShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aCheckShape = GetObjectImpl(theCheckShape);
if (aShape.IsNull() || aCheckShape.IsNull() )
return aSeq._retn();
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++)
- aSeq[i-1] = GetObject(HANDLE_NAMESPACE(GEOM_Object)::DownCast(aHSeq->Value(i)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
- HANDLE_NAMESPACE(GEOM_Object) aCheckShape = GetObjectImpl(theCheckShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aCheckShape = GetObjectImpl(theCheckShape);
if (aShape.IsNull() || aCheckShape.IsNull() )
return aGEOMObject._retn();
//Get Shapes On Shape
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->GetShapesOnShapeAsCompound
+ Handle(::GEOM_Object) anObject = GetOperations()->GetShapesOnShapeAsCompound
(aCheckShape,aShape, theShapeType,ShapeState(theState));
if (anObject.IsNull())
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
- HANDLE_NAMESPACE(GEOM_Object) aCheckShape = GetObjectImpl(theCheckShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aCheckShape = GetObjectImpl(theCheckShape);
if (aShape.IsNull() || aCheckShape.IsNull() )
return aSeq._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aShapeWhere = GetObjectImpl(theShapeWhere);
- HANDLE_NAMESPACE(GEOM_Object) aShapeWhat = GetObjectImpl(theShapeWhat);
+ Handle(::GEOM_Object) aShapeWhere = GetObjectImpl(theShapeWhere);
+ Handle(::GEOM_Object) aShapeWhat = GetObjectImpl(theShapeWhat);
if (aShapeWhere.IsNull() ||
aShapeWhat.IsNull()) return aGEOMObject._retn();
//Get Shapes in place of aShapeWhat
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->GetInPlace(aShapeWhere, aShapeWhat);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aShapeWhere = GetObjectImpl(theShapeWhere);
- HANDLE_NAMESPACE(GEOM_Object) aShapeWhat = GetObjectImpl(theShapeWhat);
+ Handle(::GEOM_Object) aShapeWhere = GetObjectImpl(theShapeWhere);
+ Handle(::GEOM_Object) aShapeWhat = GetObjectImpl(theShapeWhat);
if (aShapeWhere.IsNull() ||
aShapeWhat.IsNull()) return aGEOMObject._retn();
//Get Shapes in place of aShapeWhat
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->GetInPlaceOld(aShapeWhere, aShapeWhat);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aShapeWhere = GetObjectImpl(theShapeWhere);
- HANDLE_NAMESPACE(GEOM_Object) aShapeWhat = GetObjectImpl(theShapeWhat);
+ Handle(::GEOM_Object) aShapeWhere = GetObjectImpl(theShapeWhere);
+ Handle(::GEOM_Object) aShapeWhat = GetObjectImpl(theShapeWhat);
if (aShapeWhere.IsNull() ||
aShapeWhat.IsNull()) return aGEOMObject._retn();
//Get Shapes in place of aShapeWhat
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->GetInPlaceByHistory(aShapeWhere, aShapeWhat);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aShapeWhere = GetObjectImpl(theShapeWhere);
- HANDLE_NAMESPACE(GEOM_Object) aShapeWhat = GetObjectImpl(theShapeWhat);
+ Handle(::GEOM_Object) aShapeWhere = GetObjectImpl(theShapeWhere);
+ Handle(::GEOM_Object) aShapeWhat = GetObjectImpl(theShapeWhat);
if (aShapeWhere.IsNull() ||
aShapeWhat.IsNull()) return aGEOMObject._retn();
//Get Shapes in place of aShapeWhat
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->GetSame(aShapeWhere, aShapeWhat);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GEOM::ListOfLong_var aSeq = new GEOM::ListOfLong;
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aShapeWhere = GetObjectImpl(theShapeWhere);
- HANDLE_NAMESPACE(GEOM_Object) aShapeWhat = GetObjectImpl(theShapeWhat);
+ Handle(::GEOM_Object) aShapeWhere = GetObjectImpl(theShapeWhere);
+ Handle(::GEOM_Object) aShapeWhat = GetObjectImpl(theShapeWhat);
if (aShapeWhere.IsNull() ||
aShapeWhat.IsNull()) return aSeq._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) anEdge = GetObjectImpl(theEdge);
+ Handle(::GEOM_Object) anEdge = GetObjectImpl(theEdge);
if (anEdge.IsNull()) {
return aGEOMObject._retn();
}
//Get Shapes in place of aShapeWhat
- HANDLE_NAMESPACE(GEOM_Object) aNewEdge =
+ Handle(::GEOM_Object) aNewEdge =
GetOperations()->ExtendEdge(anEdge, theMin, theMax);
if (!GetOperations()->IsDone() || aNewEdge.IsNull()) {
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aFace = GetObjectImpl(theFace);
+ Handle(::GEOM_Object) aFace = GetObjectImpl(theFace);
if (aFace.IsNull()) {
return aGEOMObject._retn();
}
//Get Shapes in place of aShapeWhat
- HANDLE_NAMESPACE(GEOM_Object) aNewFace =
+ Handle(::GEOM_Object) aNewFace =
GetOperations()->ExtendFace(aFace, theUMin, theUMax, theVMin, theVMax);
if (!GetOperations()->IsDone() || aNewFace.IsNull()) {
GetOperations()->SetNotDone();
//Get the reference object
- HANDLE_NAMESPACE(GEOM_Object) aFace = GetObjectImpl(theFace);
+ Handle(::GEOM_Object) aFace = GetObjectImpl(theFace);
if (aFace.IsNull()) {
return aGEOMObject._retn();
}
//Get Shapes in place of aShapeWhat
- HANDLE_NAMESPACE(GEOM_Object) aNewFace = GetOperations()->MakeSurfaceFromFace(aFace);
+ Handle(::GEOM_Object) aNewFace = GetOperations()->MakeSurfaceFromFace(aFace);
if (!GetOperations()->IsDone() || aNewFace.IsNull()) {
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
- HANDLE_NAMESPACE(GEOM_Object) aStartPoint = GetObjectImpl(theStartPoint);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aStartPoint = GetObjectImpl(theStartPoint);
if (aShape.IsNull() || aStartPoint.IsNull()) {
return aSeq._retn();
aSeq->length(aLength);
for (i = 1; i <= aLength; i++) {
- aSeq[i-1] = GetObject(HANDLE_NAMESPACE(GEOM_Object)::DownCast(aHSeq->Value(i)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
}
return aSeq._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- HANDLE_NAMESPACE(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) {
return aSeq._retn();
aSeq->length(aLength);
for (i = 1; i <= aLength; i++) {
- aSeq[i-1] = GetObject(HANDLE_NAMESPACE(GEOM_Object)::DownCast(aHSeq->Value(i)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
}
return aSeq._retn();
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
//Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
if (anObject.IsNull()) return aGEOMObject._retn();
//Get the first point of translation
- HANDLE_NAMESPACE(GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
+ Handle(::GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
if (aPoint1.IsNull()) return aGEOMObject._retn();
//Get the second point of translation
- HANDLE_NAMESPACE(GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
+ Handle(::GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
if (aPoint2.IsNull()) return aGEOMObject._retn();
//Perform the translation
GetOperations()->SetNotDone();
//Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
if (aBasicObject.IsNull()) return aGEOMObject._retn();
//Get the first point of translation
- HANDLE_NAMESPACE(GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
+ Handle(::GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
if (aPoint1.IsNull()) return aGEOMObject._retn();
//Get the second point of translation
- HANDLE_NAMESPACE(GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
+ Handle(::GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
if (aPoint2.IsNull()) return aGEOMObject._retn();
//Create the translated shape
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->TranslateTwoPointsCopy(aBasicObject, aPoint1, aPoint2);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
//Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
if (anObject.IsNull()) return aGEOMObject._retn();
//Perform the translation
GetOperations()->SetNotDone();
//Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
if (aBasicObject.IsNull()) return aGEOMObject._retn();
//Create the translated shape
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->TranslateDXDYDZCopy(aBasicObject, theDX, theDY, theDZ);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
//Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
if (anObject.IsNull()) return aGEOMObject._retn();
//Get the vector of translation
- HANDLE_NAMESPACE(GEOM_Object) aVector = GetObjectImpl(theVector);
+ Handle(::GEOM_Object) aVector = GetObjectImpl(theVector);
if (aVector.IsNull()) return aGEOMObject._retn();
//Perform the translation
GetOperations()->SetNotDone();
//Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
if (aBasicObject.IsNull()) return aGEOMObject._retn();
//Get the vector of translation
- HANDLE_NAMESPACE(GEOM_Object) aVector = GetObjectImpl(theVector);
+ Handle(::GEOM_Object) aVector = GetObjectImpl(theVector);
if (aVector.IsNull()) return aGEOMObject._retn();
//Perform the translation
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->TranslateVectorCopy(aBasicObject, aVector);
+ Handle(::GEOM_Object) anObject = GetOperations()->TranslateVectorCopy(aBasicObject, aVector);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
//Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
if (aBasicObject.IsNull()) return aGEOMObject._retn();
//Get the vector of translation
- HANDLE_NAMESPACE(GEOM_Object) aVector = GetObjectImpl(theVector);
+ Handle(::GEOM_Object) aVector = GetObjectImpl(theVector);
if (aVector.IsNull()) return aGEOMObject._retn();
//Perform the translation
if (theCopy) {
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->
+ Handle(::GEOM_Object) anObject = GetOperations()->
TranslateVectorDistance(aBasicObject, aVector, theDistance, theCopy);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
//Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
if (anObject.IsNull()) return aGEOMObject._retn();
//Get the axis of revolution
- HANDLE_NAMESPACE(GEOM_Object) anAxis = GetObjectImpl(theAxis);
+ Handle(::GEOM_Object) anAxis = GetObjectImpl(theAxis);
if (anAxis.IsNull()) return aGEOMObject._retn();
//Perform the rotation
GetOperations()->SetNotDone();
//Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
if (aBasicObject.IsNull()) return aGEOMObject._retn();
//Get the axis of rotation
- HANDLE_NAMESPACE(GEOM_Object) anAxis = GetObjectImpl(theAxis);
+ Handle(::GEOM_Object) anAxis = GetObjectImpl(theAxis);
if (anAxis.IsNull()) return aGEOMObject._retn();
//Perform the rotation
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->RotateCopy(aBasicObject, anAxis, theAngle);
+ Handle(::GEOM_Object) anObject = GetOperations()->RotateCopy(aBasicObject, anAxis, theAngle);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
}
//Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
if (anObject.IsNull()) return aGEOMObject._retn();
//Get the plane
- HANDLE_NAMESPACE(GEOM_Object) aPlane = GetObjectImpl(thePlane);
+ Handle(::GEOM_Object) aPlane = GetObjectImpl(thePlane);
if (aPlane.IsNull()) return aGEOMObject._retn();
//Perform the mirror
GetOperations()->SetNotDone();
//Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
if (aBasicObject.IsNull()) return aGEOMObject._retn();
//Get the vector of translation
- HANDLE_NAMESPACE(GEOM_Object) aPlane = GetObjectImpl(thePlane);
+ Handle(::GEOM_Object) aPlane = GetObjectImpl(thePlane);
if (aPlane.IsNull()) return aGEOMObject._retn();
//Perform the mirror
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MirrorPlaneCopy(aBasicObject, aPlane);
+ Handle(::GEOM_Object) anObject = GetOperations()->MirrorPlaneCopy(aBasicObject, aPlane);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
}
//Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
if (anObject.IsNull()) return aGEOMObject._retn();
//Get the axis
- HANDLE_NAMESPACE(GEOM_Object) aAxis = GetObjectImpl(theAxis);
+ Handle(::GEOM_Object) aAxis = GetObjectImpl(theAxis);
if (aAxis.IsNull()) return aGEOMObject._retn();
//Perform the mirror
GetOperations()->SetNotDone();
//Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
if (aBasicObject.IsNull()) return aGEOMObject._retn();
//Get the vector of translation
- HANDLE_NAMESPACE(GEOM_Object) aAxis = GetObjectImpl(theAxis);
+ Handle(::GEOM_Object) aAxis = GetObjectImpl(theAxis);
if (aAxis.IsNull()) return aGEOMObject._retn();
//Perform the mirror
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MirrorAxisCopy(aBasicObject, aAxis);
+ Handle(::GEOM_Object) anObject = GetOperations()->MirrorAxisCopy(aBasicObject, aAxis);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
}
//Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
if (anObject.IsNull()) return aGEOMObject._retn();
//Get the point
- HANDLE_NAMESPACE(GEOM_Object) aPoint = GetObjectImpl(thePoint);
+ Handle(::GEOM_Object) aPoint = GetObjectImpl(thePoint);
if (aPoint.IsNull()) return aGEOMObject._retn();
//Perform the mirror
GetOperations()->SetNotDone();
//Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
if (aBasicObject.IsNull()) return aGEOMObject._retn();
//Get the vector of translation
- HANDLE_NAMESPACE(GEOM_Object) aPoint = GetObjectImpl(thePoint);
+ Handle(::GEOM_Object) aPoint = GetObjectImpl(thePoint);
if (aPoint.IsNull()) return aGEOMObject._retn();
//Perform the mirror
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MirrorPointCopy(aBasicObject, aPoint);
+ Handle(::GEOM_Object) anObject = GetOperations()->MirrorPointCopy(aBasicObject, aPoint);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
* OffsetShape
*/
//=============================================================================
-GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::OffsetShape
- (GEOM::GEOM_Object_ptr theObject,
- CORBA::Double theOffset)
+GEOM::GEOM_Object_ptr
+GEOM_ITransformOperations_i::OffsetShape (GEOM::GEOM_Object_ptr theObject,
+ CORBA::Double theOffset,
+ CORBA::Boolean theJoinByPipes)
{
GEOM::GEOM_Object_var aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
}
//Get the basic object
- HANDLE_NAMESPACE(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
if (aBasicObject.IsNull()) return aGEOMObject._retn();
//Create the offset shape
- GetOperations()->OffsetShape(aBasicObject, theOffset);
+ GetOperations()->OffsetShape( aBasicObject, theOffset, theJoinByPipes );
// Update GUI.
UpdateGUIForObject(theObject);
* OffsetShapeCopy
*/
//=============================================================================
-GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::OffsetShapeCopy
- (GEOM::GEOM_Object_ptr theObject,
- CORBA::Double theOffset)
+GEOM::GEOM_Object_ptr
+GEOM_ITransformOperations_i::OffsetShapeCopy (GEOM::GEOM_Object_ptr theObject,
+ CORBA::Double theOffset,
+ CORBA::Boolean theJoinByPipes)
{
GEOM::GEOM_Object_var aGEOMObject;
GetOperations()->SetNotDone();
//Get the basic object
- HANDLE_NAMESPACE(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
if (aBasicObject.IsNull()) return aGEOMObject._retn();
//Create the offset shape
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->OffsetShapeCopy(aBasicObject, theOffset);
+ Handle(::GEOM_Object) anObject =
+ GetOperations()->OffsetShapeCopy(aBasicObject, theOffset, theJoinByPipes);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the input objects
- HANDLE_NAMESPACE(GEOM_Object) aSource = GetObjectImpl(theSource);
- HANDLE_NAMESPACE(GEOM_Object) aTarget = GetObjectImpl(theTarget);
+ Handle(::GEOM_Object) aSource = GetObjectImpl(theSource);
+ Handle(::GEOM_Object) aTarget = GetObjectImpl(theTarget);
if (aSource.IsNull() || aTarget.IsNull()) return aGEOMObject._retn();
//Create the projection
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->ProjectShapeCopy(aSource, aTarget);
+ Handle(::GEOM_Object) anObject = GetOperations()->ProjectShapeCopy(aSource, aTarget);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference shape
- HANDLE_NAMESPACE(GEOM_Object) aPoint = GetObjectImpl(thePoint);
- HANDLE_NAMESPACE(GEOM_Object) aWire = GetObjectImpl(theWire);
+ Handle(::GEOM_Object) aPoint = GetObjectImpl(thePoint);
+ Handle(::GEOM_Object) aWire = GetObjectImpl(theWire);
if (aPoint.IsNull() || aWire.IsNull()) {
return -1.0;
}
- HANDLE_NAMESPACE(GEOM_Object) aPointOnEdge;
+ Handle(::GEOM_Object) aPointOnEdge;
Standard_Integer anEdgeIndex;
CORBA::Double aResult = GetOperations()->ProjectPointOnWire
(aPoint, aWire, aPointOnEdge, anEdgeIndex);
}
//Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
if (anObject.IsNull()) return aGEOMObject._retn();
//Get the point
- HANDLE_NAMESPACE(GEOM_Object) aPoint;
+ Handle(::GEOM_Object) aPoint;
if (!thePoint->_is_nil()) {
aPoint = GetObjectImpl(thePoint);
if (aPoint.IsNull()) return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the basic object
- HANDLE_NAMESPACE(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
if (aBasicObject.IsNull()) return aGEOMObject._retn();
//Get the point
- HANDLE_NAMESPACE(GEOM_Object) aPoint;
+ Handle(::GEOM_Object) aPoint;
if (!thePoint->_is_nil()) {
aPoint = GetObjectImpl(thePoint);
if (aPoint.IsNull()) return aGEOMObject._retn();
}
//Perform the scale
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->ScaleShapeCopy(aBasicObject, aPoint, theFactor);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
}
//Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
if (anObject.IsNull()) return aGEOMObject._retn();
//Get the point
- HANDLE_NAMESPACE(GEOM_Object) aPoint;
+ Handle(::GEOM_Object) aPoint;
if (!thePoint->_is_nil()) {
aPoint = GetObjectImpl(thePoint);
if (aPoint.IsNull()) return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the basic object
- HANDLE_NAMESPACE(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
if (aBasicObject.IsNull()) return aGEOMObject._retn();
//Get the point
- HANDLE_NAMESPACE(GEOM_Object) aPoint;
+ Handle(::GEOM_Object) aPoint;
if (!thePoint->_is_nil()) {
aPoint = GetObjectImpl(thePoint);
if (aPoint.IsNull()) return aGEOMObject._retn();
}
//Perform the scale
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->ScaleShapeAlongAxes
+ Handle(::GEOM_Object) anObject = GetOperations()->ScaleShapeAlongAxes
(aBasicObject, aPoint, theFactorX, theFactorY, theFactorZ, /*doCopy*/true);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
}
//Get the basic object
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
if (anObject.IsNull()) return aGEOMObject._retn();
//Get the Start LCS (may be NULL for positioning from global LCS)
- HANDLE_NAMESPACE(GEOM_Object) aStartLCS;
+ Handle(::GEOM_Object) aStartLCS;
if (!CORBA::is_nil(theStartLCS)) {
aStartLCS = GetObjectImpl(theStartLCS);
if (aStartLCS.IsNull()) return aGEOMObject._retn();
}
//Get the End LCS
- HANDLE_NAMESPACE(GEOM_Object) aEndLCS = GetObjectImpl(theEndLCS);
+ Handle(::GEOM_Object) aEndLCS = GetObjectImpl(theEndLCS);
if (aEndLCS.IsNull()) return aGEOMObject._retn();
//Perform the Position
GetOperations()->SetNotDone();
//Get the basic object
- HANDLE_NAMESPACE(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
if (aBasicObject.IsNull()) return aGEOMObject._retn();
//Get the Start LCS (may be NULL for positioning from global LCS)
- HANDLE_NAMESPACE(GEOM_Object) aStartLCS;
+ Handle(::GEOM_Object) aStartLCS;
if (!CORBA::is_nil(theStartLCS)) {
aStartLCS = GetObjectImpl(theStartLCS);
if (aStartLCS.IsNull()) return aGEOMObject._retn();
}
//Get the End LCS
- HANDLE_NAMESPACE(GEOM_Object) aEndLCS = GetObjectImpl(theEndLCS);
+ Handle(::GEOM_Object) aEndLCS = GetObjectImpl(theEndLCS);
if (aEndLCS.IsNull()) return aGEOMObject._retn();
//Perform the position
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->PositionShapeCopy(aBasicObject, aStartLCS, aEndLCS);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the basic object
- HANDLE_NAMESPACE(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
if (aBasicObject.IsNull()) return aGEOMObject._retn();
//Get the path object
- HANDLE_NAMESPACE(GEOM_Object) aPathObject = GetObjectImpl(thePath);
+ Handle(::GEOM_Object) aPathObject = GetObjectImpl(thePath);
if (aPathObject.IsNull()) return aGEOMObject._retn();
//Perform the position
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->PositionAlongPath(aBasicObject, aPathObject, theDistance, theCopy, theReverse);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GEOM::GEOM_Object_var aGEOMObject;
//Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
if (aBasicObject.IsNull()) return aGEOMObject._retn();
//Get the vector of translation
- HANDLE_NAMESPACE(GEOM_Object) aVector = GetObjectImpl(theVector);
+ Handle(::GEOM_Object) aVector = GetObjectImpl(theVector);
//if (aVector.IsNull()) return aGEOMObject._retn(); // DX by default
//Perform the translation
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->Translate1D(aBasicObject, aVector, theStep, theNbTimes);
if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn();
GEOM::GEOM_Object_var aGEOMObject;
//Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
if (aBasicObject.IsNull()) return aGEOMObject._retn();
//Get the vector1 of translation
- HANDLE_NAMESPACE(GEOM_Object) aVector1 = GetObjectImpl(theVector1);
+ Handle(::GEOM_Object) aVector1 = GetObjectImpl(theVector1);
//if (aVector1.IsNull()) return aGEOMObject._retn(); // DX by default
//Get the vector2 of translation
- HANDLE_NAMESPACE(GEOM_Object) aVector2 = GetObjectImpl(theVector2);
+ Handle(::GEOM_Object) aVector2 = GetObjectImpl(theVector2);
//if (aVector2.IsNull()) return aGEOMObject._retn(); // DY by default
//Perform the translation
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->Translate2D
+ Handle(::GEOM_Object) anObject = GetOperations()->Translate2D
(aBasicObject, aVector1, theStep1, theNbTimes1, aVector2, theStep2, theNbTimes2);
if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn();
GEOM::GEOM_Object_var aGEOMObject;
//Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
if (aBasicObject.IsNull()) return aGEOMObject._retn();
//Get the a directon of rotation
- HANDLE_NAMESPACE(GEOM_Object) aVector = GetObjectImpl(theVector);
+ Handle(::GEOM_Object) aVector = GetObjectImpl(theVector);
//if (aVector.IsNull()) return aGEOMObject._retn(); // DZ by default
//Perform the rotation
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->Rotate1D(aBasicObject, aVector, theNbTimes);
+ Handle(::GEOM_Object) anObject = GetOperations()->Rotate1D(aBasicObject, aVector, theNbTimes);
if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn();
return GetObject(anObject);
GEOM::GEOM_Object_var aGEOMObject;
//Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
if (aBasicObject.IsNull()) return aGEOMObject._retn();
//Get the a directon of rotation
- HANDLE_NAMESPACE(GEOM_Object) aVector = GetObjectImpl(theVector);
+ Handle(::GEOM_Object) aVector = GetObjectImpl(theVector);
//if (aVector.IsNull()) return aGEOMObject._retn(); // DZ by default
//Perform the rotation
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->Rotate1D(aBasicObject, aVector, theAngleStep, theNbSteps);
+ Handle(::GEOM_Object) anObject = GetOperations()->Rotate1D(aBasicObject, aVector, theAngleStep, theNbSteps);
if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn();
return GetObject(anObject);
GEOM::GEOM_Object_var aGEOMObject;
//Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
if (aBasicObject.IsNull()) return aGEOMObject._retn();
//Get the a directon of rotation
- HANDLE_NAMESPACE(GEOM_Object) aVector = GetObjectImpl(theVector);
+ Handle(::GEOM_Object) aVector = GetObjectImpl(theVector);
//if (aVector.IsNull()) return aGEOMObject._retn(); // DZ by default
//Perform the rotation
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->Rotate2D
+ Handle(::GEOM_Object) anObject = GetOperations()->Rotate2D
(aBasicObject, aVector, theNbObjects, theRadialStep, theNbSteps);
if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn();
GEOM::GEOM_Object_var aGEOMObject;
//Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
if (aBasicObject.IsNull()) return aGEOMObject._retn();
//Get the a directon of rotation
- HANDLE_NAMESPACE(GEOM_Object) aVector = GetObjectImpl(theVector);
+ Handle(::GEOM_Object) aVector = GetObjectImpl(theVector);
//if (aVector.IsNull()) return aGEOMObject._retn(); // DZ by default
//Perform the rotation
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->Rotate2D
+ Handle(::GEOM_Object) anObject = GetOperations()->Rotate2D
(aBasicObject, aVector, theAngle, theNbTimes1, theStep, theNbTimes2);
if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn();
GEOM::GEOM_Object_var aGEOMObject;
//Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
if (aBasicObject.IsNull()) return aGEOMObject._retn();
//Get the a directon of rotation
- HANDLE_NAMESPACE(GEOM_Object) aVector = GetObjectImpl(theVector);
+ Handle(::GEOM_Object) aVector = GetObjectImpl(theVector);
//if (aVector.IsNull()) return aGEOMObject._retn(); // DZ by default
double anAngle = M_PI * theAngle / 180.;
//Perform the rotation
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->Rotate2D
+ Handle(::GEOM_Object) anObject = GetOperations()->Rotate2D
(aBasicObject, aVector, anAngle, theNbTimes1, theStep, theNbTimes2);
if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn();
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
//Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
if (anObject.IsNull()) return aGEOMObject._retn();
//Get the central point of rotation
- HANDLE_NAMESPACE(GEOM_Object) aCentPoint = GetObjectImpl(theCentPoint);
+ Handle(::GEOM_Object) aCentPoint = GetObjectImpl(theCentPoint);
if (aCentPoint.IsNull()) return aGEOMObject._retn();
//Get the first point
- HANDLE_NAMESPACE(GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
+ Handle(::GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
if (aPoint1.IsNull()) return aGEOMObject._retn();
//Get the second point
- HANDLE_NAMESPACE(GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
+ Handle(::GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
if (aPoint2.IsNull()) return aGEOMObject._retn();
//Perform the translation
GetOperations()->SetNotDone();
//Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
if (aBasicObject.IsNull()) return aGEOMObject._retn();
//Get the central point of rotation
- HANDLE_NAMESPACE(GEOM_Object) aCentPoint = GetObjectImpl(theCentPoint);
+ Handle(::GEOM_Object) aCentPoint = GetObjectImpl(theCentPoint);
if (aCentPoint.IsNull()) return aGEOMObject._retn();
//Get the first point
- HANDLE_NAMESPACE(GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
+ Handle(::GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
if (aPoint1.IsNull()) return aGEOMObject._retn();
//Get the second point
- HANDLE_NAMESPACE(GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
+ Handle(::GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
if (aPoint2.IsNull()) return aGEOMObject._retn();
//Perform the rotation
- HANDLE_NAMESPACE(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->RotateThreePointsCopy(aBasicObject, aCentPoint, aPoint1, aPoint2);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
if (anObject.IsNull()) return aGEOMObject._retn();
//Get the sample object
- HANDLE_NAMESPACE(GEOM_Object) aSample = GetObjectImpl(theSample);
+ Handle(::GEOM_Object) aSample = GetObjectImpl(theSample);
if (aSample.IsNull()) return aGEOMObject._retn();
//Perform the transformation
- HANDLE_NAMESPACE(GEOM_Object) aResObject =
+ Handle(::GEOM_Object) aResObject =
GetOperations()->TransformLikeOtherCopy(anObject, aSample);
if (!GetOperations()->IsDone() || aResObject.IsNull())
return aGEOMObject._retn();
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
//Get the object itself
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
if (anObject.IsNull()) return aGEOMObject._retn();
//Perform the recomputation
- HANDLE_NAMESPACE(GEOM_Function) aLastFunction = anObject->GetLastFunction();
+ Handle(::GEOM_Function) aLastFunction = anObject->GetLastFunction();
if (aLastFunction.IsNull()) return aGEOMObject._retn();
GetOperations()->GetSolver()->ComputeFunction(aLastFunction);
GetOperations()->SetNotDone();
//Get the object
- HANDLE_NAMESPACE(GEOM_Object) anObject = GetObjectImpl(theObject);
+ Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
if (anObject.IsNull()) {
return aGEOMObject._retn();
}
//Perform the transformation
- HANDLE_NAMESPACE(GEOM_Object) aResObject = GetOperations()->MakeProjectionOnCylinder
+ Handle(::GEOM_Object) aResObject = GetOperations()->MakeProjectionOnCylinder
(anObject, theRadius, theStartAngle, theAngleLength, theAngleRotation);
if (!GetOperations()->IsDone() || aResObject.IsNull()) {
GEOM::GEOM_Object_ptr thePoint);
GEOM::GEOM_Object_ptr OffsetShape (GEOM::GEOM_Object_ptr theObject,
- CORBA::Double theOffset);
+ CORBA::Double theOffset,
+ CORBA::Boolean theJoinByPipes);
GEOM::GEOM_Object_ptr OffsetShapeCopy (GEOM::GEOM_Object_ptr theObject,
- CORBA::Double theOffset);
+ CORBA::Double theOffset,
+ CORBA::Boolean theJoinByPipes);
GEOM::GEOM_Object_ptr ProjectShapeCopy (GEOM::GEOM_Object_ptr theSource,
GEOM::GEOM_Object_ptr theTarget);
//=============================================================================
GEOM_Object_i::GEOM_Object_i (PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine,
- HANDLE_NAMESPACE(GEOM_Object) theImpl) :
+ Handle(::GEOM_Object) theImpl) :
SALOME::GenericObj_i( thePOA ),
GEOM_BaseObject_i( thePOA, theEngine, theImpl ),
_impl( theImpl )
{
CORBA::String_var name("");
- HANDLE_NAMESPACE(GEOM_Function) aMainFun = _impl->GetLastFunction();
+ Handle(::GEOM_Function) aMainFun = _impl->GetLastFunction();
if ( aMainFun.IsNull() ) return name._retn();
const TDataStd_ListOfExtendedString& aListEntries = aMainFun->GetSubShapeReferences();
for (; anIt.More(); anIt.Next())
{
TCollection_AsciiString anEntry = anIt.Value();
- HANDLE_NAMESPACE(GEOM_BaseObject) anObj =
+ Handle(::GEOM_BaseObject) anObj =
GEOM_Engine::GetEngine()->GetObject( anEntry.ToCString(), false );
if ( anObj.IsNull() ) continue;
TCollection_AsciiString aSubName = anObj->GetName();
if ( aSubName.IsEmpty() ) continue;
- HANDLE_NAMESPACE(GEOM_Function) aFun = anObj->GetLastFunction();
+ Handle(::GEOM_Function) aFun = anObj->GetLastFunction();
if ( aFun.IsNull() ) continue;
GEOM_ISubShape ISS( aFun );
GEOM::ListOfLong_var anIndices = new GEOM::ListOfLong;
if(!_impl->IsMainShape()) {
- HANDLE_NAMESPACE(GEOM_Function) aFunction = _impl->GetLastFunction(); //Get Sub-shape function (always the first (and last) one)
+ Handle(::GEOM_Function) aFunction = _impl->GetLastFunction(); //Get Sub-shape function (always the first (and last) one)
if(aFunction.IsNull()) return anIndices._retn();
GEOM_ISubShape ISS(aFunction);
Handle(TColStd_HArray1OfInteger) anArray = ISS.GetIndices();
{
GEOM::GEOM_Object_var obj;
if(!_impl->IsMainShape()) {
- HANDLE_NAMESPACE(GEOM_Function) aFunction = _impl->GetFunction(1); //Get Sub-shape function (always the first (and last) one)
+ Handle(::GEOM_Function) aFunction = _impl->GetFunction(1); //Get Sub-shape function (always the first (and last) one)
if(aFunction.IsNull()) return obj._retn();
GEOM_ISubShape ISS(aFunction);
GEOM::GEOM_Object_var shapePtr = GEOM::GEOM_Object::_narrow( other );
if ( !CORBA::is_nil( shapePtr ) ) {
CORBA::String_var entry = shapePtr->GetEntry();
- HANDLE_NAMESPACE(GEOM_Object) otherObject = HANDLE_NAMESPACE(GEOM_Object)::DownCast
+ Handle(::GEOM_Object) otherObject = Handle(::GEOM_Object)::DownCast
( GEOM_Engine::GetEngine()->GetObject( entry, false ));
if ( !otherObject.IsNull() ) {
TopoDS_Shape thisShape = _impl->GetValue();
class GEOM_I_EXPORT GEOM_Object_i : public virtual POA_GEOM::GEOM_Object, public virtual GEOM_BaseObject_i
{
public:
- GEOM_Object_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, HANDLE_NAMESPACE(GEOM_Object) theImpl);
+ GEOM_Object_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, Handle(::GEOM_Object) theImpl);
~GEOM_Object_i();
virtual GEOM::shape_type GetShapeType();
virtual bool IsShape();
- HANDLE_NAMESPACE(GEOM_Object) GetImpl() { return _impl; }
+ Handle(::GEOM_Object) GetImpl() { return _impl; }
private:
- HANDLE_NAMESPACE(GEOM_Object) _impl;
+ Handle(::GEOM_Object) _impl;
TopoDS_Shape _geom;
};
beginService( " GEOM_Superv_i::OffsetShape" );
MESSAGE("GEOM_Superv_i::OffsetShape");
getTransfOp();
- GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShape(theObject, theOffset);
+ GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShape(theObject, theOffset, true);
endService( " GEOM_Superv_i::OffsetShape" );
return anObj;
}
beginService( " GEOM_Superv_i::OffsetShapeCopy" );
MESSAGE("GEOM_Superv_i::OffsetShapeCopy");
getTransfOp();
- GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShapeCopy(theObject, theOffset);
+ GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShapeCopy(theObject, theOffset, true);
endService( " GEOM_Superv_i::OffsetShapeCopy" );
return anObj;
}
## Display the geometrical shape whose entry is given by \em entry.
# You should prefer use this function instead of the
- # displayShapeByName() which can have an unpredictible behavior in
+ # displayShapeByName() which can have an unpredictable behavior in
# the case where several objects exist with the same name in the study.
def displayShapeByEntry(self, shapeStudyEntry, color = None, fit=True):
"""
Display the geometrical shape whose entry is given by
`entry`. You should prefer use this function instead of the
- displayShapeByName which can have an unpredictible behavior in
+ displayShapeByName which can have an unpredictable behavior in
the case where several objects exist with the same name in the
study.
"""
# Helper functions for a complete suppression of a shape from the
# SALOME session.
# ======================================================================
- ## This completly deletes a geom shape.
+ ## This completely deletes a geom shape.
# \warning Please be aware that to delete a geom object,
# you have three operations to perform:
#
# 3. destroy the underlying geom object
def deleteShape(self,shapeStudyEntry):
"""
- This completly deletes a geom shape.
+ This completely deletes a geom shape.
WARNING: please be aware that to delete a geom object, you have
three operations to perform:
gst.eraseShapeByEntry(sphereStudyEntry)
# --------------------------------------------------
- # In this last example, we completly delete an object from the
+ # In this last example, we completely delete an object from the
# SALOME session (erase from viewer, remove from study and finnaly
# destroy the object). This is done by a simple call to
# deleteShape().
geompy = geomBuilder.New()
geompy.addToStudy( wire, 'mysketch' )
-Additionnal examples can be found as unit tests in the source code.
+Additional examples can be found as unit tests in the source code.
"""
geompyEnable = True
MultiRot2Dt = geompy.MultiRotate2DNbTimes(Chamfer, vx, nbtimes1, step1, nbtimes2)
MultiRot2Ds = geompy.MultiRotate2DByStep(Chamfer, vx, angle1, nbtimes1, step1, nbtimes2)
- #Create Informations objects
+ #Create Information objects
CDG = geompy.MakeCDG(Prism) #(GEOM_Object)->GEOM_Object
Archimede = geompy.Archimede(Box, weight, waterdensity,
meshingdeflection) #(GEOM_Object, 3 Doubles)->GEOM_Object
for aface in afaces:
ssname = "Reflection of face " + repr(ifa) + " of box " + repr(ibb) + " (by history)"
if ibb == 6 and (ifa == 2 or ifa == 4):
- # use IDL interface directly to avoid error message appearence in Python console
+ # use IDL interface directly to avoid error message appearance in Python console
refl_box_face = geompy.ShapesOp.GetInPlaceByHistory(part, aface)
if refl_box_face is not None:
geompy.addToStudyInFather(part, refl_box_face, ssname)
def MakeMirrorByPoint(s, point):
"""
- Creates a symmetric object by point symetry
+ Creates a symmetric object by point symmetry
"""
return fkl
def MakeMirrorByLine(s, line):
"""
- Creates a symmetric object by line symetry
+ Creates a symmetric object by line symmetry
"""
return fkl
def MakeMirrorByPlane(s, pt, ve):
"""
- Creates a symmetric object by plane symetry defined by a point and a normal vector
+ Creates a symmetric object by plane symmetry defined by a point and a normal vector
"""
p = plane(pt, ve)
r = geompy.MakeMirrorByplane(s, p)
"""
return fkl
-# Acces operators
+# Access operators
# ---------------
def getCoords(v):
## vertices = geompy.SubShapeAll(box, geomBuilder.ShapeType['VERTEX'])
## # only 5 first vertices will be published, with default names
## print len(vertices)
-## # note, that result value still containes all 8 vertices
+## # note, that result value still contains all 8 vertices
## geompy.addToStudyAuto(-1) # disable automatic publication
## @endcode
##
# in place of sub-shapes of the first argument,
# because the whole shape corresponds to the first argument.
# Mainly to be used after transformations, but it also can be
- # usefull after partition with one object shape, and some other
+ # useful after partition with one object shape, and some other
# operations, where only the first argument has to be considered.
# If theObject has only one argument shape, this flag is automatically
# considered as True, not regarding really passed value.
in place of sub-shapes of the first argument,
because the whole shape corresponds to the first argument.
Mainly to be used after transformations, but it also can be
- usefull after partition with one object shape, and some other
+ useful after partition with one object shape, and some other
operations, where only the first argument has to be considered.
If theObject has only one argument shape, this flag is automatically
considered as True, not regarding really passed value.
# in place of sub-shapes of the first argument,
# because the whole shape corresponds to the first argument.
# Mainly to be used after transformations, but it also can be
- # usefull after partition with one object shape, and some other
+ # useful after partition with one object shape, and some other
# operations, where only the first argument has to be considered.
# If theObject has only one argument shape, this flag is automatically
# considered as True, not regarding really passed value.
in place of sub-shapes of the first argument,
because the whole shape corresponds to the first argument.
Mainly to be used after transformations, but it also can be
- usefull after partition with one object shape, and some other
+ useful after partition with one object shape, and some other
operations, where only the first argument has to be considered.
If theObject has only one argument shape, this flag is automatically
considered as True, not regarding really passed value.
return anObj
## Create a line, passing through the given point
- # and parrallel to the given direction
+ # and parallel to the given direction
# @param thePnt Point. The resulting line will pass through it.
# @param theDir Direction. The resulting line will be parallel to it.
# @param theName Object name; when specified, this parameter is used
def MakeLine(self, thePnt, theDir, theName=None):
"""
Create a line, passing through the given point
- and parrallel to the given direction
+ and parallel to the given direction
Parameters:
thePnt Point. The resulting line will pass through it.
# possible to generate groups along with the result by means of
# setting the flag \a IsGenerateGroups.<BR>
# If \a thePath is a closed edge or wire and \a IsGenerateGroups is
- # set, an error is occured. If \a thePath is not closed edge/wire,
+ # set, an error is occurred. If \a thePath is not closed edge/wire,
# the following groups are returned:
# - If \a theBase is unclosed edge or wire: "Down", "Up", "Side1",
# "Side2";
possible to generate groups along with the result by means of
setting the flag IsGenerateGroups.
If thePath is a closed edge or wire and IsGenerateGroups is
- set, an error is occured. If thePath is not closed edge/wire,
+ set, an error is occurred. If thePath is not closed edge/wire,
the following groups are returned:
- If theBase is unclosed edge or wire: "Down", "Up", "Side1",
"Side2";
## Create a shape by extrusion of the profile shape along
# the path shape. This function is used only for debug pipe
# functionality - it is a version of function MakePipeWithShellSections()
- # which give a possibility to recieve information about
+ # which give a possibility to receive information about
# creating pipe between each pair of sections step by step.
@ManageTransactions("PrimOp")
def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
the path shape. This function is used only for debug pipe
functionality - it is a version of previous function
geompy.MakePipeWithShellSections() which give a possibility to
- recieve information about creating pipe between each pair of
+ receive information about creating pipe between each pair of
sections step by step.
"""
res = []
# publication is switched on, default value is used for result name.
#
# @return [\a status, \a theClosedWires, \a theOpenWires]
- # \n \a status: FALSE, if an error(s) occured during the method execution.
+ # \n \a status: FALSE, if an error(s) occurred during the method execution.
# \n \a theClosedWires: Closed wires on the free boundary of the given shape.
# \n \a theOpenWires: Open wires on the free boundary of the given shape.
#
Returns:
[status, theClosedWires, theOpenWires]
- status: FALSE, if an error(s) occured during the method execution.
+ status: FALSE, if an error(s) occurred during the method execution.
theClosedWires: Closed wires on the free boundary of the given shape.
theOpenWires: Open wires on the free boundary of the given shape.
"""
# @param ListRemoveInside Shapes, inside which the results will be deleted.
# Each shape from theRemoveInside must belong to theShapes also.
# @param RemoveWebs If TRUE, perform Glue 3D algorithm.
- # @param ListMaterials Material indices for each shape. Make sence,
+ # @param ListMaterials Material indices for each shape. Make sense,
# only if theRemoveWebs is TRUE.
#
# @return New GEOM.GEOM_Object, containing the result shapes.
ListRemoveInside Shapes, inside which the results will be deleted.
Each shape from theRemoveInside must belong to theShapes also.
RemoveWebs If TRUE, perform Glue 3D algorithm.
- ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
+ ListMaterials Material indices for each shape. Make sense, only if theRemoveWebs is TRUE.
Returns:
New GEOM.GEOM_Object, containing the result shapes.
"""
theOffset, Parameters = ParseParameters(theOffset)
if theCopy:
- anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
+ anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset, True)
else:
- anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
+ anObj = self.TrsfOp.OffsetShape(theObject, theOffset, True)
RaiseIfFailed("Offset", self.TrsfOp)
anObj.SetParameters(Parameters)
return anObj
- ## Create new object as offset of the given one.
+ ## Create new object as offset of the given one. Gap between two adjacent
+ # offset surfaces is filled by a pipe.
# @param theObject The base object for the offset.
# @param theOffset Offset value.
# @param theName Object name; when specified, this parameter is used
#
# @return New GEOM.GEOM_Object, containing the offset object.
#
+ # @sa MakeOffsetIntersectionJoin
# @ref tui_offset "Example"
@ManageTransactions("TrsfOp")
def MakeOffset(self, theObject, theOffset, theName=None):
"""
- Create new object as offset of the given one.
+ Create new object as offset of the given one. Gap between adjacent
+ offset surfaces is filled by a pipe.
Parameters:
theObject The base object for the offset.
"""
# Example: see GEOM_TestAll.py
theOffset, Parameters = ParseParameters(theOffset)
- anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
+ anObj = self.TrsfOp.OffsetShapeCopy( theObject, theOffset, True )
+ RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
+ anObj.SetParameters(Parameters)
+ self._autoPublish(anObj, theName, "offset")
+ return anObj
+
+ ## Create new object as offset of the given one. Gap between adjacent
+ # offset surfaces is filled by extending and intersecting them.
+ # @param theObject The base object for the offset.
+ # @param theOffset Offset value.
+ # @param theName Object name; when specified, this parameter is used
+ # for result publication in the study. Otherwise, if automatic
+ # publication is switched on, default value is used for result name.
+ #
+ # @return New GEOM.GEOM_Object, containing the offset object.
+ #
+ # @sa MakeOffset
+ # @ref tui_offset "Example"
+ @ManageTransactions("TrsfOp")
+ def MakeOffsetIntersectionJoin(self, theObject, theOffset, theName=None):
+ """
+ Create new object as offset of the given one. Gap between adjacent
+ offset surfaces is filled by extending and intersecting them.
+
+ Parameters:
+ theObject The base object for the offset.
+ theOffset Offset value.
+ theName Object name; when specified, this parameter is used
+ for result publication in the study. Otherwise, if automatic
+ publication is switched on, default value is used for result name.
+
+ Returns:
+ New GEOM.GEOM_Object, containing the offset object.
+
+ Example of usage:
+ box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
+ # create a new box extended by 70
+ offset = geompy.MakeOffsetIntersectionJoin(box, 70.)
+ """
+ # Example: see GEOM_TestAll.py
+ theOffset, Parameters = ParseParameters( theOffset )
+ anObj = self.TrsfOp.OffsetShapeCopy( theObject, theOffset, False )
RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
anObj.SetParameters(Parameters)
self._autoPublish(anObj, theName, "offset")
self._autoPublish(anObj, theName, "chamfer")
return anObj
- ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
+ ## The Same that MakeChamferFaces() but with params theD is chamfer length and
# theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
#
# @ref swig_FilletChamfer "Example"
@ManageTransactions("LocalOp")
def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
"""
- The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
+ The Same that geompy.MakeChamferFaces but with params theD is chamfer length and
theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
"""
flag = False
self._autoPublish(anObj, theName, "chamfer")
return anObj
- ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
+ ## The Same that MakeChamferEdges() but with params theD is chamfer length and
# theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
@ManageTransactions("LocalOp")
def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
"""
- The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
+ The Same that geompy.MakeChamferEdges but with params theD is chamfer length and
theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
"""
flag = False
## Build all possible propagation groups.
# Propagation group is a set of all edges, opposite to one (main)
# edge of this group directly or through other opposite edges.
- # Notion of Opposite Edge make sence only on quadrangle face.
+ # Notion of Opposite Edge make sense only on quadrangle face.
# @param theShape Shape to build propagation groups on.
# @param theName Object name; when specified, this parameter is used
# for result publication in the study. Otherwise, if automatic
Build all possible propagation groups.
Propagation group is a set of all edges, opposite to one (main)
edge of this group directly or through other opposite edges.
- Notion of Opposite Edge make sence only on quadrangle face.
+ Notion of Opposite Edge make sense only on quadrangle face.
Parameters:
theShape Shape to build propagation groups on.
return aType
## Convert a type of geom object from id to string value
- # @param theId is a GEOM obect type id.
+ # @param theId is a GEOM object type id.
# @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
# @ref swig_GetType "Example"
def ShapeIdToType(self, theId):
Convert a type of geom object from id to string value
Parameters:
- theId is a GEOM obect type id.
+ theId is a GEOM object type id.
Returns:
type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
# # update object browser
# salome.sg.updateObjBrowser()
# @endcode
-# @n Additionnal examples can be found as unit tests in the source code.
+# @n Additional examples can be found as unit tests in the source code.
# @}
"""
/*!
\brief Set number of iso-lines to the presentation
\param theEntry geometry object's entry
- \param theNbU number of iso-lines along U axis (interger value >= 0)
- \param theNbV number of iso-lines along V axis (interger value >= 0)
+ \param theNbU number of iso-lines along U axis (integer value >= 0)
+ \param theNbV number of iso-lines along V axis (integer value >= 0)
\param theUpdateViewer \c true to update active view's contents
*/
void GEOM_Swig::setIsos( const char* theEntry, int theNbU, int theNbV, bool theUpdateViewer )
// local selection
if (!myMainObj->_is_nil() &&
!myEditCurrentArgument &&
- myIsShapeType) // check if shape type is already choosen by user
+ myIsShapeType) // check if shape type is already chosen by user
{
GEOM_Displayer* aDisplayer = getDisplayer();
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer IGESPlugin_ExportDriver::Execute(LOGBOOK& log) const
+Standard_Integer IGESPlugin_ExportDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() );
return false;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT( IGESPlugin_ExportDriver,GEOM_BaseDriver );
+IMPLEMENT_STANDARD_RTTIEXT( IGESPlugin_ExportDriver,GEOM_BaseDriver );
~IGESPlugin_ExportDriver() {};
static const Standard_GUID& GetID();
- virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_Boolean MustExecute( const LOGBOOK& ) const { return Standard_True; }
- virtual void Validate( LOGBOOK& ) const {}
+ virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_Boolean MustExecute( const Handle(TFunction_Logbook)& ) const { return Standard_True; }
+ virtual void Validate( Handle(TFunction_Logbook)& ) const {}
virtual bool GetCreationInformation( std::string& theOperationName,
std::vector<GEOM_Param>& params );
- OCCT_DEFINE_STANDARD_RTTIEXT(IGESPlugin_ExportDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(IGESPlugin_ExportDriver,GEOM_BaseDriver)
};
#endif // _IGESPlugin_ExportDriver_HXX
getGeometryGUI()->getApp()->putInfo( tr("GEOM_PRP_COMMAND").arg( theCommandID ) );
}
- return true;
+ return true; // ?????????????
}
//=======================================================================
return;
}
}
- catch( Standard_Failure ) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode( aFail->GetMessageString() );
+ catch( Standard_Failure& aFail ) {
+ SetErrorCode( aFail.GetMessageString() );
return;
}
// Greate material groups.
// MakeMaterialGroups( anImported, aSeq );
}
- catch( Standard_Failure ) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode( aFail->GetMessageString() );
+ catch( Standard_Failure& aFail ) {
+ SetErrorCode( aFail.GetMessageString() );
return NULL;
}
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer IGESPlugin_ImportDriver::Execute(LOGBOOK& log) const
+Standard_Integer IGESPlugin_ImportDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if( Label().IsNull() ) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() );
aResShape.Nullify();
}
}
- catch( Standard_Failure ) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- anError = aFail->GetMessageString();
+ catch( Standard_Failure& aFail ) {
+ anError = aFail.GetMessageString();
aResShape.Nullify();
}
aFunction->SetValue( aResShape );
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
theError = theFileName + " reading failed";
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- theError = aFail->GetMessageString();
+ catch (Standard_Failure& aFail) {
+ theError = aFail.GetMessageString();
}
if (!aValue.IsNull())
return aValue->String();
return TCollection_AsciiString();
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT( IGESPlugin_ImportDriver, GEOM_BaseDriver );
+IMPLEMENT_STANDARD_RTTIEXT( IGESPlugin_ImportDriver, GEOM_BaseDriver );
~IGESPlugin_ImportDriver() {};
static const Standard_GUID& GetID();
- virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_Boolean MustExecute( const LOGBOOK& ) const { return Standard_True; }
- virtual void Validate( LOGBOOK& ) const {}
+ virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_Boolean MustExecute( const Handle(TFunction_Logbook)& ) const { return Standard_True; }
+ virtual void Validate( Handle(TFunction_Logbook)& ) const {}
virtual bool GetCreationInformation( std::string& theOperationName,
std::vector<GEOM_Param>& params );
const TCollection_AsciiString&,
TCollection_AsciiString& );
- OCCT_DEFINE_STANDARD_RTTIEXT(IGESPlugin_ImportDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(IGESPlugin_ImportDriver,GEOM_BaseDriver)
};
#endif // _IGESPlugin_ImportDriver_HXX
#include <GEOMBase.h>
#include <GeometryGUI.h>
-#include <Basics_OCCTVersion.hxx>
-
#include <SUIT_Session.h>
#include <SUIT_Desktop.h>
#include <SUIT_ResourceMgr.h>
/*!
* \class MeasureGUI_AnnotationInteractor
* \brief Class implementing logical layer for interactive dragging of annotation
- * labels. It includes two components: listener for GUI events occuring
+ * labels. It includes two components: listener for GUI events occurring
* inside of OCCT 3D viewer and processor for hooked events to perform
* interactive modification of the selected annotation within current
* AIS context.
Handle(AIS_DiameterDimension) aDimension = new AIS_DiameterDimension( aRuledCirc, aPln );
// if flyout is extended in tangent direction to circle, the default flyout value is used
- // if flyout is extended in plane of circle, the zero flyout value is choosen initially
+ // if flyout is extended in plane of circle, the zero flyout value is chosen initially
Standard_Real aFlyout = aCircN.IsParallel( aPln.Axis().Direction(), Precision::Angular() ) ? 0.0 : Settings.DefaultFlyout;
aDimension->SetFlyout(aFlyout);
// flyout plane to best match the current view projection (if any)
// The points are aligned to XOY, YOZ, ZOX planes.
// The flyout takes into account bounding box of main shape of face normal
-// vector. The flyouts tangetial to the circle plane are directed in
+// vector. The flyouts tangential to the circle plane are directed in
// accordance with the face normal (if not-null), otherwise the flyouts
// are turned to direct to the closest border of bounding box.
//=================================================================================
// SALOME includes
#include <SALOME_InteractiveObject.hxx>
-OCCT_IMPLEMENT_STANDARD_RTTIEXT(MeasureGUI_DimensionFilter, SelectMgr_Filter)
+IMPLEMENT_STANDARD_RTTIEXT(MeasureGUI_DimensionFilter, SelectMgr_Filter)
//=======================================================================
// function : Constructor
#ifndef MEASUREGUI_DIMENSIONFILTER_H
#define MEASUREGUI_DIMENSIONFILTER_H
-// KERNEL includes
-#include <Basics_OCCTVersion.hxx>
-
// GEOM includes
#include <GEOM_GenericObjPtr.h>
{
public:
- OCCT_DEFINE_STANDARD_RTTIEXT(MeasureGUI_DimensionFilter,SelectMgr_Filter)
+ DEFINE_STANDARD_RTTIEXT(MeasureGUI_DimensionFilter,SelectMgr_Filter)
public:
Standard_EXPORT MeasureGUI_DimensionFilter( const Handle(AIS_InteractiveObject)& theIO );
#include <Geom_Line.hxx>
#include <Geom_Plane.hxx>
#include <NCollection_Sequence.hxx>
-
-#if OCC_VERSION_LARGE >= 0x07010000
#include <Quantity_Length.hxx>
-#endif
//=================================================================================
// function : Constructor
//=================================================================================
void MeasureGUI_ManageDimensionsDlg::OnShowAll()
{
- // read propety data
+ // read property data
SalomeApp_Application* anApp = myGeomGUI->getApp();
if ( !anApp )
{
//=================================================================================
void MeasureGUI_ManageDimensionsDlg::OnHideAll()
{
- // read propety data
+ // read property data
SalomeApp_Application* anApp = myGeomGUI->getApp();
if ( !anApp )
{
void MeasureGUI_Skeleton::LineEditReturnPressed()
{
/* User name of object input management */
- /* If successfull the selection is changed and signal emitted... */
+ /* If successful the selection is changed and signal emitted... */
/* so SelectionIntoArgument() is automatically called. */
if ( mySelEdit ) {
#include "GEOM_AISDimension.hxx"
-OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_AISLength, AIS_LengthDimension)
-OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_AISDiameter, AIS_DiameterDimension)
-OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_AISAngle, AIS_AngleDimension)
+IMPLEMENT_STANDARD_RTTIEXT(GEOM_AISLength, AIS_LengthDimension)
+IMPLEMENT_STANDARD_RTTIEXT(GEOM_AISDiameter, AIS_DiameterDimension)
+IMPLEMENT_STANDARD_RTTIEXT(GEOM_AISAngle, AIS_AngleDimension)
/* ****************************************************************************** *
* *
#include <AIS_DiameterDimension.hxx>
#include <AIS_AngleDimension.hxx>
-#include <Basics_OCCTVersion.hxx>
-
DEFINE_STANDARD_HANDLE(GEOM_AISLength, AIS_LengthDimension)
DEFINE_STANDARD_HANDLE(GEOM_AISDiameter, AIS_DiameterDimension)
DEFINE_STANDARD_HANDLE(GEOM_AISAngle, AIS_AngleDimension)
{
public:
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_AISLength,AIS_LengthDimension)
+ DEFINE_STANDARD_RTTIEXT(GEOM_AISLength,AIS_LengthDimension)
public:
Standard_EXPORT GEOM_AISLength( const Standard_Integer theId );
{
public:
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_AISDiameter,AIS_DiameterDimension)
+ DEFINE_STANDARD_RTTIEXT(GEOM_AISDiameter,AIS_DiameterDimension)
public:
Standard_EXPORT GEOM_AISDiameter( const Standard_Integer theId );
{
public:
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_AISAngle,AIS_AngleDimension)
+ DEFINE_STANDARD_RTTIEXT(GEOM_AISAngle,AIS_AngleDimension)
public:
Standard_EXPORT GEOM_AISAngle( const Standard_Integer theId );
#include <GEOMUtils.hxx>
-#include <Basics_OCCTVersion.hxx>
-
// Open CASCADE Includes
#include <AIS_InteractiveContext.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <gp_Dir.hxx>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
-
-#if OCC_VERSION_LARGE > 0x06070200
#include <Prs3d_VertexDrawMode.hxx>
-#endif
-
-#if OCC_VERSION_MAJOR < 7
- #include <StdPrs_WFDeflectionShape.hxx>
-#else
- #include <StdPrs_WFShape.hxx>
-#endif
+#include <StdPrs_WFShape.hxx>
#include <SalomeApp_Tools.h>
#include <SUIT_Session.h>
#include <SUIT_ResourceMgr.h>
-OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_AISShape, SALOME_AISShape)
+IMPLEMENT_STANDARD_RTTIEXT(GEOM_AISShape, SALOME_AISShape)
GEOM_AISShape::TopLevelDispMode GEOM_AISShape::myTopLevelDm = GEOM_AISShape::TopKeepCurrent;
Quantity_Color GEOM_AISShape::myTopLevelColor;
Handle(SelectMgr_Selection) sel = theObj->Selection( m );
for ( sel->Init(); sel->More(); sel->Next() ) {
-#if OCC_VERSION_LARGE > 0x06080100
const Handle(SelectMgr_SensitiveEntity) aHSenEntity = sel->Sensitive();
if( aHSenEntity.IsNull() )
continue;
Handle(SelectBasics_SensitiveEntity) entity = aHSenEntity->BaseSensitive();
-#else
- Handle(SelectBasics_SensitiveEntity) entity = sel->Sensitive();
-#endif
if ( entity.IsNull() )
continue;
Handle(SelectMgr_EntityOwner) owner =
void GEOM_AISShape::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
const Handle(Prs3d_Presentation)& aPrs,
const Standard_Integer aMode)
-{
+{
if (IsInfinite()) aPrs->SetInfiniteState(Standard_True); //pas de prise en compte lors du FITALL
Handle(AIS_InteractiveContext) anIC = GetContext();
bool anIsColorField = anIsField && myFieldDataType != GEOM::FDT_String;
bool anIsTextField = anIsField && myFieldDataType == GEOM::FDT_String;
-#if OCC_VERSION_LARGE > 0x06070200
if (isShowVertices())
myDrawer->SetVertexDrawMode(Prs3d_VDM_All);
-#endif
// StdSelect_DisplayMode d = (StdSelect_DisplayMode) aMode;
bool isTopLev = isTopLevel() && switchTopLevel();
if( !isTopLev && anIsColorField && myFieldDimension == 1 )
drawField( aPrs, false, aMode == CustomHighlight );
else
-#if OCC_VERSION_MAJOR < 7
- StdPrs_WFDeflectionShape::Add(aPrs,myshape,myDrawer);
-#else
StdPrs_WFShape::Add(aPrs,myshape,myDrawer);
-#endif
break;
}
case Shading:
}
case TexturedShape:
{
-#ifdef USE_TEXTURED_SHAPE
- AIS_TexturedShape::Compute(aPresentationManager, aPrs, aMode);
-#else
- AIS_Shape::Compute(aPresentationManager, aPrs, aMode);
-#endif
+ shadingMode(aPresentationManager, aPrs, Shading);
+ break;
}
}
if (isShowVectors())
{
// PAL12113: AIS_Shape::Compute() works correctly with shapes containing no faces
//StdPrs_ShadedShape::Add(aPrs,myshape,myDrawer);
-#ifdef USE_TEXTURED_SHAPE
- AIS_TexturedShape::Compute(aPresentationManager, aPrs, aMode);
-#else
- AIS_Shape::Compute(aPresentationManager, aPrs, aMode);
-#endif
+ SALOME_AISShape::Compute(aPresentationManager, aPrs, aMode);
}
}
else
{
Quantity_Color aColor( aQColor.redF(), aQColor.greenF(), aQColor.blueF(), Quantity_TOC_RGB );
+ SetCustomColor( aSubShape, aColor );
if( myFieldDimension == 0 )
{
TopoDS_Vertex aVertexShape = TopoDS::Vertex( aSubShape );
myDrawer->WireAspect()->SetWidth( myOwnWidth );
else
myDrawer->WireAspect()->SetWidth( myOwnWidth + 4 );
-#if OCC_VERSION_MAJOR < 7
- StdPrs_WFDeflectionShape::Add( thePrs, aSubShape, myDrawer );
-#else
+ /*
StdPrs_WFShape::Add( thePrs, aSubShape, myDrawer );
-#endif
+ */
}
else if( myFieldDimension == 2 ||
myFieldDimension == 3 ||
myFieldDimension == -1 )
{
- myDrawer->ShadingAspect()->SetColor( aColor );
- StdPrs_ShadedShape::Add( thePrs, aSubShape, myDrawer );
+ //Handle(Prs3d_ShadingAspect) anAspect = new Prs3d_ShadingAspect();
+ //anAspect->SetColor( aColor );
+ //myDrawer->SetShadingAspect( anAspect );
+ //StdPrs_ShadedShape::Add( thePrs, aSubShape, myDrawer );
}
}
}
}
+
+ SALOME_AISShape::Compute( Handle(PrsMgr_PresentationManager3d)(),
+ thePrs, AIS_Shaded );
}
void GEOM_AISShape::drawName( const Handle(Prs3d_Presentation)& thePrs )
static Quantity_Color myTopLevelColor;
public:
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_AISShape,SALOME_AISShape)
+ DEFINE_STANDARD_RTTIEXT(GEOM_AISShape, SALOME_AISShape)
};
DEFINE_STANDARD_HANDLE(GEOM_AISShape, SALOME_AISShape)
#include "GEOM_AISTrihedron.hxx"
#include <Geom_Axis2Placement.hxx>
-OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_AISTrihedron, AIS_Trihedron)
+IMPLEMENT_STANDARD_RTTIEXT(GEOM_AISTrihedron, AIS_Trihedron)
/*
Class : GEOM_AISTrihedron
Handle(SALOME_InteractiveObject) myObject;
public:
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_AISTrihedron,AIS_Trihedron)
+ DEFINE_STANDARD_RTTIEXT(GEOM_AISTrihedron,AIS_Trihedron)
};
#endif
#include <Prs3d_Presentation.hxx>
#include <PrsMgr_PresentationManager3d.hxx>
-OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_AISVector, GEOM_AISShape)
+IMPLEMENT_STANDARD_RTTIEXT(GEOM_AISVector, GEOM_AISShape)
//=======================================================================
//function : GEOM_AISVector
virtual bool isShowVectors() {return true;}
public:
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_AISVector,GEOM_AISShape)
+ DEFINE_STANDARD_RTTIEXT(GEOM_AISVector,GEOM_AISShape)
};
DEFINE_STANDARD_HANDLE(GEOM_AISVector, GEOM_AISShape)
myShadingFaceSource(GEOM_ShadingFace::New(),true),
myHighlightActor(GEOM_DeviceActor::New(),true),
- myAppendFilter(vtkAppendPolyData::New(),true),
- // Use mapper as an instance of GEOM_PainterPolyDataMapper class
- // to prevent drawing of mappers' content (due to an empty definition
- // of GEOM_PainterPolyDataMapper::RenderPiece(...)).
- // !!! Presentation of GEOM_Actor is drawing only with help of actors
- // defined in this class !!!
- myPolyDataMapper(GEOM_PainterPolyDataMapper::New(),true),
myTextActor( vtkTextActor::New() ),
myHighlightProp(vtkProperty::New()),
myPreHighlightProp(vtkProperty::New()),
myShadingFaceProp(vtkProperty::New()),
- myShadingBackFaceProp(vtkProperty::New())
+ myShadingBackFaceProp(vtkProperty::New()),
+
+ myAppendFilter(vtkAppendPolyData::New(),true),
+ // Use mapper as an instance of GEOM_PainterPolyDataMapper class
+ // to prevent drawing of mappers' content (due to an empty definition
+ // of GEOM_PainterPolyDataMapper::RenderPiece(...)).
+ // !!! Presentation of GEOM_Actor is drawing only with help of actors
+ // defined in this class !!!
+ myPolyDataMapper(GEOM_PainterPolyDataMapper::New(),true)
{
#ifdef MYDEBUG
MESSAGE (this<< " GEOM_Actor::GEOM_Actor");
SetDisplayMode( 0 );
SetZLayer( Graphic3d_ZLayerId_Default );
SetAutoHide( Standard_True );
-#if OCC_VERSION_LARGE <= 0x07010001
- SetHilightMode( HighlightAll );
-#endif
SetMutable( Standard_True );
SetDepthCulling( Standard_True );
return;
}
}
-#if OCC_VERSION_LARGE > 0x07010001
const Handle(Graphic3d_PresentationAttributes) aHighlightStyle = theWorkspace->HighlightStyle();
if (!aHighlightStyle.IsNull() && myAISObject->myHilightMode == HighlightLabel)
{
theWorkspace->SetHighlightStyle(empty);
theWorkspace->ApplyAspectLine();
}
-#else
- const bool toHighlight = theWorkspace->ToHighlight();
-
- if (toHighlight && myAISObject->myHilightMode == HighlightLabel)
- {
- theWorkspace->SetHighlight( false );
- theWorkspace->ApplyAspectLine();
- }
-#endif
GLint myOldDepthMode = 0;
aContext->ApplyModelViewMatrix();
-#if OCC_VERSION_LARGE > 0x07010001
theWorkspace->SetHighlightStyle(aHighlightStyle);
-#else
- if ( toHighlight != theWorkspace->ToHighlight() )
- {
- theWorkspace->SetHighlight( toHighlight );
- }
-#endif
}
// =======================================================================
// purpose : Perform highlighting of the presentation.
// =======================================================================
void GEOM_Annotation::GEOM_AnnotationOwner::HilightWithColor( const Handle(PrsMgr_PresentationManager3d)& thePM,
-#if OCC_VERSION_LARGE > 0x07010001
const Handle(Prs3d_Drawer)& theStyle,
-#else
- const Handle(Graphic3d_HighlightStyle)& theStyle,
-#endif
const Standard_Integer theMode )
{
if ( myPrsSh.IsNull() )
{
Handle(Prs3d_Drawer) aDrawer = new Prs3d_Drawer;
-#if OCC_VERSION_LARGE > 0x07010001
aDrawer->Link( theStyle );
-#else
- aDrawer->Link( Selectable()->HilightAttributes() );
-#endif
Handle(Prs3d_IsoAspect) aUIsoAspect = new Prs3d_IsoAspect(
aDrawer->UIsoAspect()->Aspect()->Color(),
aDrawer->UIsoAspect()->Aspect()->Type(),
const Standard_Integer theMode )
{
SelectMgr_EntityOwner::Unhilight( thePM, theMode );
-
-#if OCC_VERSION_LARGE > 0x07010001
thePM->Unhighlight( myPrsSh );
-#else
- thePM->Unhighlight( myPrsSh, theMode );
-#endif
}
// =======================================================================
#ifndef GEOM_Annotation_HeaderFile
#define GEOM_Annotation_HeaderFile
-#include <Basics_OCCTVersion.hxx>
-
#include <AIS_InteractiveObject.hxx>
#include <Bnd_Box.hxx>
#include <Font_FontAspect.hxx>
//! screen, while its position is a 3D point defined in world's coordinate system.
Standard_EXPORT void SetIsScreenFixed( const Standard_Boolean theIsFixed );
- //! Retuns value of "screen fixed" positioning mode.
+ //! Returns value of "screen fixed" positioning mode.
Standard_Boolean GetIsScreenFixed() const { return myIsScreenFixed; }
//! Converts annotation position to screen fixed coordinates and
//! \param theMode [in] the display mode.
virtual void
HilightWithColor( const Handle(PrsMgr_PresentationManager3d)& thePM,
-#if OCC_VERSION_LARGE > 0x07010001
const Handle(Prs3d_Drawer)& theStyle,
-#else
- const Handle(Graphic3d_HighlightStyle)& theStyle,
-#endif
const Standard_Integer theMode = 0 ) Standard_OVERRIDE;
//! Removes highlighting from the type of shape.
#include "GEOM_InteractiveObject.hxx"
-OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_InteractiveObject, SALOME_InteractiveObject)
+IMPLEMENT_STANDARD_RTTIEXT(GEOM_InteractiveObject, SALOME_InteractiveObject)
GEOM_InteractiveObject::GEOM_InteractiveObject()
: SALOME_InteractiveObject()
std::string myFatherIOR;
public:
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_InteractiveObject,SALOME_InteractiveObject)
+ DEFINE_STANDARD_RTTIEXT(GEOM_InteractiveObject,SALOME_InteractiveObject)
};
DEFINE_STANDARD_HANDLE(GEOM_InteractiveObject, SALOME_InteractiveObject)
case GeomAbs_Hyperbola :
case GeomAbs_BezierCurve :
case GeomAbs_BSplineCurve :
+ case GeomAbs_OffsetCurve:
case GeomAbs_OtherCurve :
for (j = 1; j <= myDiscret/2; j++) {
void GEOM_OCCReader::TransferEdgeWData(const TopoDS_Edge& aEdge,
vtkPoints* Pts,
- vtkCellArray* Cells) {
-
-
+ vtkCellArray* Cells)
+{
Handle(Poly_PolygonOnTriangulation) aEdgePoly;
Standard_Integer i = 1;
Handle(Poly_Triangulation) T;
//=======================================================================
void GEOM_OCCReader::TransferVertexWData(const TopoDS_Vertex& aVertex,
- vtkPoints* Pts,
- vtkCellArray* Cells) {
-#define ZERO_COORD coord[0] = 0.0; coord[1] = 0.0; coord[2] = 0.0
+ vtkPoints* Pts,
+ vtkCellArray* Cells)
+{
+#define ZERO_COORD coord[0] = coord[1] = coord[2] = 0.0
- gp_Pnt P = BRep_Tool::Pnt( aVertex );
+ // gp_Pnt P = BRep_Tool::Pnt( aVertex ); ??????????????????????????
float delta = 1, coord[3];
vtkIdType pts[2];
// insert pt
#include <TopoDS_Shape.hxx>
#include <Prs3d_IsoAspect.hxx>
-OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_TopWireframeShape, SALOME_AISShape)
+IMPLEMENT_STANDARD_RTTIEXT(GEOM_TopWireframeShape, SALOME_AISShape)
GEOM_TopWireframeShape::GEOM_TopWireframeShape( const TopoDS_Shape& shape )
:SALOME_AISShape(shape)
Standard_EXPORT virtual void highlightSubShapes(const TColStd_IndexedMapOfInteger& aIndexMap, const Standard_Boolean aHighlight );
public:
- OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_TopWireframeShape,SALOME_AISShape)
+ DEFINE_STANDARD_RTTIEXT(GEOM_TopWireframeShape,SALOME_AISShape)
};
DEFINE_STANDARD_HANDLE(GEOM_TopWireframeShape, SALOME_AISShape)
#include "RepairGUI_ShapeProcessDlg.h" // Method PROCESS SHAPE
#include "RepairGUI_CloseContourDlg.h" // Method CLOSE CONTOUR
#include "RepairGUI_RemoveIntWiresDlg.h"// Method REMOVE INTERNAL WIRES
-#include "RepairGUI_DivideEdgeDlg.h" // Method DEVIDE EDGE
+#include "RepairGUI_DivideEdgeDlg.h" // Method DIVIDE EDGE
#include "RepairGUI_FreeBoundDlg.h" // Method FREE BOUNDARIES
#include "RepairGUI_FreeFacesDlg.h" // Method FREE FACES
#include "RepairGUI_GlueDlg.h" // Method GLUE FACES
//================================================================
// Function : onAccept
// Purpose : This method should be called from dialog's slots onOk() and onApply()
-// It perfroms user input validation, then it
+// It performs user input validation, then it
// performs a proper operation and manages transactions, etc.
//================================================================
bool RepairGUI_GlueDlg::onAcceptLocal()
//================================================================
// Function : onAccept
// Purpose : This method should be called from dialog's slots onOk() and onApply()
-// It perfroms user input validation, then it
+// It performs user input validation, then it
// performs a proper operation and manages transactions, etc.
//================================================================
bool RepairGUI_LimitToleranceDlg::onAcceptLocal()
}
if ( !anErrorObjNames.empty() )
- MESSAGE( "ERRORS occured while processing the following objects: " << anErrorObjNames.join( " " ).toLatin1().data() );
+ MESSAGE( "ERRORS occurred while processing the following objects: " << anErrorObjNames.join( " " ).toLatin1().data() );
return anErrorObjNames.size() < myObjects->length(); // true if at least one object was OK, false if ALL objects were nil after Healing.
}
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer STEPPlugin_ExportDriver::Execute(LOGBOOK& log) const
+Standard_Integer STEPPlugin_ExportDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() );
}
catch (Standard_Failure)
{
- //THROW_SALOME_CORBA_EXCEPTION("Exception catched in STEPExport", SALOME::BAD_PARAM);
+ //THROW_SALOME_CORBA_EXCEPTION("Exception caught in STEPExport", SALOME::BAD_PARAM);
}
return 0;
}
return false;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT( STEPPlugin_ExportDriver,GEOM_BaseDriver );
+IMPLEMENT_STANDARD_RTTIEXT( STEPPlugin_ExportDriver,GEOM_BaseDriver );
~STEPPlugin_ExportDriver() {};
static const Standard_GUID& GetID();
- virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_Boolean MustExecute( const LOGBOOK& ) const { return Standard_True; }
- virtual void Validate( LOGBOOK& ) const {}
+ virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_Boolean MustExecute( const Handle(TFunction_Logbook)& ) const { return Standard_True; }
+ virtual void Validate( Handle(TFunction_Logbook)& ) const {}
virtual bool GetCreationInformation( std::string& theOperationName,
std::vector<GEOM_Param>& params );
- OCCT_DEFINE_STANDARD_RTTIEXT(STEPPlugin_ExportDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(STEPPlugin_ExportDriver,GEOM_BaseDriver)
};
#endif // _STEPPlugin_ExportDriver_HXX
return;
}
}
- catch( Standard_Failure ) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode( aFail->GetMessageString() );
+ catch( Standard_Failure& aFail ) {
+ SetErrorCode( aFail.GetMessageString() );
return;
}
// Greate material groups.
MakeMaterialGroups( anImported, aSeq );
}
- catch( Standard_Failure ) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode( aFail->GetMessageString() );
+ catch( Standard_Failure& aFail ) {
+ SetErrorCode( aFail.GetMessageString() );
return NULL;
}
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer STEPPlugin_ImportDriver::Execute(LOGBOOK& log) const
+Standard_Integer STEPPlugin_ImportDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if( Label().IsNull() ) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() );
aResShape.Nullify();
}
}
- catch( Standard_Failure ) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- anError = aFail->GetMessageString();
+ catch( Standard_Failure& aFail ) {
+ anError = aFail.GetMessageString();
aResShape.Nullify();
}
aFunction->SetValue( aResShape );
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
theError = theFileName + " reading failed";
}
}
- catch( Standard_Failure ) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- theError = aFail->GetMessageString();
+ catch( Standard_Failure& aFail ) {
+ theError = aFail.GetMessageString();
}
return aValue;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT( STEPPlugin_ImportDriver, GEOM_BaseDriver );
+IMPLEMENT_STANDARD_RTTIEXT( STEPPlugin_ImportDriver, GEOM_BaseDriver );
~STEPPlugin_ImportDriver() {};
static const Standard_GUID& GetID();
- virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_Boolean MustExecute( const LOGBOOK& ) const { return Standard_True; }
- virtual void Validate( LOGBOOK& ) const {}
+ virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_Boolean MustExecute( const Handle(TFunction_Logbook)& ) const { return Standard_True; }
+ virtual void Validate( Handle(TFunction_Logbook)& ) const {}
virtual bool GetCreationInformation( std::string& theOperationName,
std::vector<GEOM_Param>& params );
const TCollection_AsciiString&,
TCollection_AsciiString& );
- OCCT_DEFINE_STANDARD_RTTIEXT(STEPPlugin_ImportDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(STEPPlugin_ImportDriver,GEOM_BaseDriver)
};
#endif // _STEPPlugin_ImportDriver_HXX
// KERNEL includes
#include <utilities.h>
#include <Basics_Utils.hxx>
-#include <Basics_OCCTVersion.hxx>
// GEOM includes
#include "GEOM_Function.hxx"
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer STLPlugin_ExportDriver::Execute(LOGBOOK& log) const
+Standard_Integer STLPlugin_ExportDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() );
TopoDS_Shape aCopyShape = aCopy.Shape();
// ASCII mode
aWriter.ASCIIMode() = anIsASCII;
-#if OCC_VERSION_LARGE > 0x06080000
if ( anIsRelative ) {
Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
Bnd_Box bndBox;
//Compute triangulation
BRepTools::Clean( aCopyShape );
BRepMesh_IncrementalMesh aMesh( aCopyShape, aDeflection );
-#else
- // set relative mode on false for using custom deflection coefficient
- aWriter.RelativeMode( ) = anIsRelative;
- if( anIsRelative )
- aWriter.SetCoefficient( aDeflection );
- else
- aWriter.SetDeflection( aDeflection );
-#endif
aWriter.Write( aCopyShape, aFileName.ToCString() );
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
catch( Standard_Failure )
{
- //THROW_SALOME_CORBA_EXCEPTION("Exception catched in ExportSTL", SALOME::BAD_PARAM);
+ //THROW_SALOME_CORBA_EXCEPTION("Exception caught in ExportSTL", SALOME::BAD_PARAM);
}
return 0;
}
return false;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT( STLPlugin_ExportDriver,GEOM_BaseDriver );
+IMPLEMENT_STANDARD_RTTIEXT( STLPlugin_ExportDriver,GEOM_BaseDriver );
~STLPlugin_ExportDriver() {};
static const Standard_GUID& GetID();
- virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_Boolean MustExecute( const LOGBOOK& ) const { return Standard_True; }
- virtual void Validate( LOGBOOK& ) const {}
+ virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_Boolean MustExecute( const Handle(TFunction_Logbook)& ) const { return Standard_True; }
+ virtual void Validate( Handle(TFunction_Logbook)& ) const {}
virtual bool GetCreationInformation( std::string& theOperationName,
std::vector<GEOM_Param>& params );
- OCCT_DEFINE_STANDARD_RTTIEXT(STLPlugin_ExportDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(STLPlugin_ExportDriver,GEOM_BaseDriver)
};
#endif // _STLPlugin_ExportDriver_HXX
getGeometryGUI()->getApp()->putInfo( tr("GEOM_PRP_COMMAND").arg( theCommandID ) );
}
- return true;
+ return true; // ?????????
}
//=======================================================================
return;
}
}
- catch( Standard_Failure ) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode( aFail->GetMessageString() );
+ catch( Standard_Failure& aFail ) {
+ SetErrorCode( aFail.GetMessageString() );
return;
}
// Greate material groups.
// MakeMaterialGroups( anImported, aSeq );
}
- catch( Standard_Failure ) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode( aFail->GetMessageString() );
+ catch( Standard_Failure& aFail ) {
+ SetErrorCode( aFail.GetMessageString() );
return NULL;
}
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer STLPlugin_ImportDriver::Execute(LOGBOOK& log) const
+Standard_Integer STLPlugin_ImportDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if( Label().IsNull() ) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() );
aFunction->SetValue( aShape );
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT( STLPlugin_ImportDriver, GEOM_BaseDriver );
+IMPLEMENT_STANDARD_RTTIEXT( STLPlugin_ImportDriver, GEOM_BaseDriver );
~STLPlugin_ImportDriver() {};
static const Standard_GUID& GetID();
- virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_Boolean MustExecute( const LOGBOOK& ) const { return Standard_True; }
- virtual void Validate( LOGBOOK& ) const {}
+ virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_Boolean MustExecute( const Handle(TFunction_Logbook)& ) const { return Standard_True; }
+ virtual void Validate( Handle(TFunction_Logbook)& ) const {}
virtual bool GetCreationInformation( std::string& theOperationName,
std::vector<GEOM_Param>& params );
- OCCT_DEFINE_STANDARD_RTTIEXT(STLPlugin_ImportDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(STLPlugin_ImportDriver,GEOM_BaseDriver)
};
#endif // _STLPlugin_ImportDriver_HXX
#ifndef ShHealOper_ChangeOrientation_HeaderFile
#define ShHealOper_ChangeOrientation_HeaderFile
-#include <MMgt_TShared.hxx>
#include <ShHealOper_Tool.hxx>
#include <TopoDS_Shape.hxx>
/// Copy constructor
Standard_EXPORT ShHealOper_ChangeOrientation (const TopoDS_Shape& theShape);
- //Method for initalization by whole shape.
+ //Method for initialization by whole shape.
Standard_EXPORT virtual void Init(const TopoDS_Shape& theShape);
- //Method for initalization by whole shape.
+ //Method for initialization by whole shape.
Standard_EXPORT Standard_Boolean Perform();
//Change orientation
//checks that all specified edges belong the one face or not.
Standard_Boolean isOneFace = checkOneFace(theSewd,aCommonFaces);
- //add edge or increase max tolerance in dependance on specified VertexMode.
+ //add edge or increase max tolerance in dependence on specified VertexMode.
//if all edges belong the one face that gap will be closed in the 2D by line
//else gap will be closed in the 3D by line.
myDone = fixGaps(theSewd,aCommonFaces);
#ifndef ShHealOper_CloseContour_HeaderFile
#define ShHealOper_CloseContour_HeaderFile
-#include <MMgt_TShared.hxx>
#include <TopoDS_Shape.hxx>
#include <TopTools_SequenceOfShape.hxx>
#include <TopoDS_Wire.hxx>
//Initalizes by whole shape.
Standard_EXPORT virtual void Init(const TopoDS_Shape& theShape);
- //Method for initalization by whole shape.
+ //Method for initialization by whole shape.
Standard_EXPORT Standard_Boolean Perform(const TopTools_SequenceOfShape& theSeqEdges,
const Standard_Boolean theModeVertex = Standard_False,
has2d = Standard_False,
hasPCurves = Standard_False;
- //computation of the split values in dependance from specified mode and values.
+ //computation of the split values in dependence from specified mode and values.
if(!computeValues(theValues, has3d,has2d,hasPCurves)) {
myErrorStatus = ShHealOper_InvalidParameters;
return Standard_False;
return Standard_False;
}
- //split 3d curve and pcurve for each face reffering to edge.
+ //split 3d curve and pcurve for each face referring to edge.
Standard_Boolean isDone = Standard_True;
if(hasPCurves) {
const TopTools_ListOfShape& lfaces = myMapEdgesFace.FindFromKey(myEdge);
/// Constructor initializes by shape.
Standard_EXPORT virtual void Init(const TopoDS_Shape& theShape);
- //Method for initalization by whole shape.
+ //Method for initialization by whole shape.
Standard_EXPORT Standard_Boolean Perform(const TopoDS_Shape& theEdge,
const Standard_Real theValue,
// Created: 26.04.04 17:35:30
// Author: Galina KULIKOVA
-#include <Basics_OCCTVersion.hxx>
-
#include <ShapeFix_Shell.hxx>
#include <ShapeFix_Face.hxx>
#include <ShHealOper_FillHoles.hxx>
aB.Range (anEdge, aFace, aF, aL);
// Set orientation of the edge: orientation should be changed
- // if its orientation does not make sence with curve orientation
+ // if its orientation does not make sense with curve orientation
// recommended by GeomPlate
if ((anEdge.Orientation() == TopAbs_FORWARD) ==
(theSenses->Value (theOrders->Value (aInd)) == 1)) {
#ifndef ShHealOper_FillHoles_HeaderFile
#define ShHealOper_FillHoles_HeaderFile
-#include <MMgt_TShared.hxx>
#include <TopoDS_Shape.hxx>
#include <TopTools_SequenceOfShape.hxx>
#include <TopoDS_Wire.hxx>
Standard_EXPORT ShHealOper_FillHoles (const TopoDS_Shape& theShape);
Standard_EXPORT virtual void Init(const TopoDS_Shape& theShape);
- //Method for initalization by whole shape.
+ //Method for initialization by whole shape.
Standard_EXPORT void InitParameters(Standard_Integer theDegree = 3,//3(2)
Standard_Integer theNbPtsOnCur =5,//3,
#ifndef ShHealOper_RemoveFace_HeaderFile
#define ShHealOper_RemoveFace_HeaderFile
-#include <MMgt_TShared.hxx>
#include <ShHealOper_Tool.hxx>
#include <TopoDS_Shape.hxx>
#include <TopTools_SequenceOfShape.hxx>
Standard_EXPORT ShHealOper_RemoveFace (const TopoDS_Shape& theShape);
// Constructor initialized by shape from which faces will be removed.
Standard_EXPORT virtual void Init(const TopoDS_Shape& theShape);
- //Method for initalization by whole shape.
+ //Method for initialization by whole shape.
Standard_EXPORT Standard_Boolean Perform();
//Removes all faces from specified shape.
#ifndef ShHealOper_RemoveInternalWires_HeaderFile
#define ShHealOper_RemoveInternalWires_HeaderFile
-#include <MMgt_TShared.hxx>
#include <ShHealOper_Tool.hxx>
#include <TopoDS_Shape.hxx>
#include <TopTools_SequenceOfShape.hxx>
/// Copy constructor
Standard_EXPORT ShHealOper_RemoveInternalWires (const TopoDS_Shape& theShape);
- //Method for initalization by whole shape.
+ //Method for initialization by whole shape.
Standard_EXPORT virtual void Init(const TopoDS_Shape& theShape);
- //Method for initalization by whole shape.
+ //Method for initialization by whole shape.
Standard_EXPORT Standard_Boolean Remove();
//Removes all internal wires from all faces of the shape
#ifndef ShHealOper_Sewing_HeaderFile
#define ShHealOper_Sewing_HeaderFile
-#include <MMgt_TShared.hxx>
#include <ShHealOper_Tool.hxx>
#include <TopoDS_Shape.hxx>
#include <TopAbs_ShapeEnum.hxx>
Standard_EXPORT ShHealOper_Sewing (const TopoDS_Shape& theShape,
const Standard_Real theTolerance);
- //Constructor for initalization by shape and tolerance.
+ //Constructor for initialization by shape and tolerance.
Standard_EXPORT virtual void Init(const TopoDS_Shape& theShape);
- //Method for initalization by whole shape.
+ //Method for initialization by whole shape.
Standard_EXPORT Standard_Boolean Perform();
//Performs sewing specified whole shape.
public:
// Declaration of CASCADE RTTI
- OCCT_DEFINE_STANDARD_RTTIEXT(ShHealOper_SplitCurve2d,ShapeUpgrade_SplitCurve2d)
+ DEFINE_STANDARD_RTTIEXT(ShHealOper_SplitCurve2d,ShapeUpgrade_SplitCurve2d)
};
// Definition of HANDLE object using Standard_DefineHandle.hxx
#include <ShapeExtend_Status.hxx>
#include <ShapeExtend.hxx>
-OCCT_IMPLEMENT_STANDARD_RTTIEXT(ShHealOper_SplitCurve2d,ShapeUpgrade_SplitCurve2d)
+IMPLEMENT_STANDARD_RTTIEXT(ShHealOper_SplitCurve2d,ShapeUpgrade_SplitCurve2d)
//=======================================================================
//function : Compute
#ifndef ShHealOper_SplitCurve2d_HeaderFile
#define ShHealOper_SplitCurve2d_HeaderFile
-#include <Basics_OCCTVersion.hxx>
-
#include <ShapeUpgrade_SplitCurve2d.hxx>
#include <TColStd_HSequenceOfReal.hxx>
#include <Standard_DefineHandle.hxx>
public:
// Declaration of CASCADE RTTI
- OCCT_DEFINE_STANDARD_RTTIEXT(ShHealOper_SplitCurve2d,ShapeUpgrade_SplitCurve2d)
+ DEFINE_STANDARD_RTTIEXT(ShHealOper_SplitCurve2d,ShapeUpgrade_SplitCurve2d)
};
// Definition of HANDLE object using Standard_DefineHandle.hxx
#include <ShapeExtend_Status.hxx>
#include <ShapeExtend.hxx>
-OCCT_IMPLEMENT_STANDARD_RTTIEXT(ShHealOper_SplitCurve3d,ShapeUpgrade_SplitCurve3d)
+IMPLEMENT_STANDARD_RTTIEXT(ShHealOper_SplitCurve3d,ShapeUpgrade_SplitCurve3d)
//=======================================================================
//function : Compute
#ifndef ShHealOper_SplitCurve3d_HeaderFile
#define ShHealOper_SplitCurve3d_HeaderFile
-#include <Basics_OCCTVersion.hxx>
-
#include <ShapeUpgrade_SplitCurve3d.hxx>
#include <TColStd_HSequenceOfReal.hxx>
#include <Standard_DefineHandle.hxx>
public:
// Declaration of CASCADE RTTI
- OCCT_DEFINE_STANDARD_RTTIEXT(ShHealOper_SplitCurve3d,ShapeUpgrade_SplitCurve3d)
+ DEFINE_STANDARD_RTTIEXT(ShHealOper_SplitCurve3d,ShapeUpgrade_SplitCurve3d)
};
// Definition of HANDLE object using Standard_DefineHandle.hxx
// Constructor initialized by shape from which faces will be removed.
Standard_EXPORT virtual void Init(const TopoDS_Shape& theShape);
- //Method for initalization by whole shape.
+ //Method for initialization by whole shape.
inline const TopoDS_Shape& GetResultShape() const
{
detected_edges = cv::Mat(binary_backproject);
}
- // else if ( detection_method == RIDGE_DETECTOR ) // Method adapted for engineering drawings (e.g. watershed functionnality could be used here cf.OpenCV documentation and samples)
+ // else if ( detection_method == RIDGE_DETECTOR ) // Method adapted for engineering drawings (e.g. watershed functionality could be used here cf.OpenCV documentation and samples)
// {
// // TODO
// return false;
# --- scripts ---
# base scripts
-SET(base_SCRIPTS
+SET(_base_SCRIPTS
__init__.py
t_shape_builder.py
)
IF(SALOME_BUILD_GUI)
# gui scripts
- SET(gui_SCRIPTS
+ SET(_gui_SCRIPTS
t_shape_dialog.py
t_shape_dialog.ui
t_shape_progress.py
)
# uic files / to be processed by pyuic
- SET(_pyuic_files
+ SET(_pyuic_FILES
t_shape_dialog.ui
)
# scripts / pyuic wrappings
- PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
+ PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_FILES} TARGET_NAME _target_name_pyuic)
ENDIF()
# --- rules ---
-SALOME_INSTALL_SCRIPTS("${base_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/geom/t_shape)
+SALOME_INSTALL_SCRIPTS("${_base_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/geom/t_shape)
IF(SALOME_BUILD_GUI)
- SALOME_INSTALL_SCRIPTS("${gui_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/geom/t_shape)
- SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/geom/t_shape)
-ENDIF()
\ No newline at end of file
+ SALOME_INSTALL_SCRIPTS("${_gui_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/geom/t_shape)
+ SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/geom/t_shape TARGET_NAME _target_name_pyuic_py)
+ # add dependency of compiled py files on uic files in order
+ # to avoid races problems when compiling in parallel
+ ADD_DEPENDENCIES(${_target_name_pyuic_py} ${_target_name_pyuic})
+ENDIF()
mainFrame()->RadioButton2->close();
mainFrame()->RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
mainFrame()->RadioButton3->close();
-
+
GroupPoints = new DlgRef_1Sel1Spin1Check( centralWidget() );
GroupPoints->GroupBox1->setTitle( tr( "GEOM_ARGUMENTS" ) );
GroupPoints->TextLabel1->setText( tr( "GEOM_OBJECTS" ) );
GroupPoints->TextLabel2->setText( tr( "GEOM_OFFSET" ) );
- GroupPoints->CheckButton1->setText( tr( "GEOM_CREATE_COPY" ) );
-
- // san -- modification of an exisitng object by offset is not allowed
- GroupPoints->CheckButton1->hide();
+ GroupPoints->CheckButton1->setText( tr( "GEOM_JOIN_BY_PIPES" ) );
+ GroupPoints->CheckButton1->setChecked( true );
GroupPoints->PushButton1->setIcon( image1 );
-
+
QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
layout->setMargin( 0 ); layout->setSpacing( 6 );
layout->addWidget( GroupPoints );
-
+
/***************************************************************/
setHelpFileName( "offset_operation_page.html" );
-
+
Init();
}
// purpose :
//=================================================================================
void TransformationGUI_OffsetDlg::Init()
-{
+{
/* init variables */
myEditCurrentArgument = GroupPoints->LineEdit1;
GroupPoints->LineEdit1->setReadOnly( true );
myObjects.clear();
-
+
/* Get setting of step value from file configuration */
double step = 1;
-
+
/* min, max, step and decimals for spin boxes & initial values */
initSpinBox( GroupPoints->SpinBox_DX, COORD_MIN, COORD_MAX, step, "length_precision" );
GroupPoints->SpinBox_DX->setValue( 1e-05 );
-
- // Activate Create a Copy mode
- GroupPoints->CheckButton1->setChecked( true );
- CreateCopyModeChanged();
mainFrame()->GroupBoxPublish->show();
/* signals and slots connections */
connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
-
+
connect( GroupPoints->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
- connect( myGeomGUI->getApp()->selectionMgr(),
+ connect( myGeomGUI->getApp()->selectionMgr(),
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
connect( GroupPoints->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox() ) );
- connect( GroupPoints->CheckButton1, SIGNAL( toggled( bool ) ), this, SLOT( CreateCopyModeChanged() ) );
-
+ connect( GroupPoints->CheckButton1, SIGNAL( toggled( bool ) ), this, SLOT( JoinModeChanged() ) );
+
initName( tr( "GEOM_OFFSET" ) );
globalSelection( GEOM_ALLSHAPES );
GEOM::GEOM_ITransformOperations_var anOper = GEOM::GEOM_ITransformOperations::_narrow(getOperation());
- if ( GroupPoints->CheckButton1->isChecked() || IsPreview() ) {
+ if ( true /*GroupPoints->CheckButton1->isChecked() || IsPreview()*/ ) {
for ( int i = 0; i < myObjects.count(); i++ ) {
- anObj = anOper->OffsetShapeCopy( myObjects[i].get(), GetOffset() );
+ anObj = anOper->OffsetShapeCopy( myObjects[i].get(), GetOffset(), GetIsJoinByPipes() );
if ( !anObj->_is_nil() ) {
if(!IsPreview()) {
anObj->SetParameters(GroupPoints->SpinBox_DX->text().toLatin1().constData());
}
else {
for ( int i = 0; i < myObjects.count(); i++ ) {
- anObj = anOper->OffsetShape( myObjects[i].get(), GetOffset() );
+ anObj = anOper->OffsetShape( myObjects[i].get(), GetOffset(), GetIsJoinByPipes() );
if ( !anObj->_is_nil() )
objects.push_back( anObj._retn() );
}
return GroupPoints->SpinBox_DX->value();
}
+//=======================================================================
+//function : GetIsJoinByPipes
+//purpose :
+//=======================================================================
+
+bool TransformationGUI_OffsetDlg::GetIsJoinByPipes() const
+{
+ return GroupPoints->CheckButton1->isChecked();
+}
+
//=================================================================================
-// function : CreateCopyModeChanged()
+// function : JoinModeChanged()
// purpose :
//=================================================================================
-void TransformationGUI_OffsetDlg::CreateCopyModeChanged()
+void TransformationGUI_OffsetDlg::JoinModeChanged()
{
- mainFrame()->GroupBoxName->setEnabled( GroupPoints->CheckButton1->isChecked() );
+ processPreview();
+ //mainFrame()->GroupBoxName->setEnabled( GroupPoints->CheckButton1->isChecked() );
}
//=================================================================================
void Init();
void enterEvent( QEvent* );
double GetOffset() const;
+ bool GetIsJoinByPipes() const;
private:
QList<GEOM::GeomObjPtr> myObjects;
void SelectionIntoArgument();
void SetEditCurrentArgument();
void ValueChangedInSpinBox();
- void CreateCopyModeChanged();
+ void JoinModeChanged();
};
#endif // TRANSFORMATIONGUI_OFFSETDLG_H
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer VTKPlugin_ExportDriver::Execute(LOGBOOK& log) const
+Standard_Integer VTKPlugin_ExportDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() );
aWriter->SetFileName( aFileName.ToCString() );
aWriter->Write();
aWriter->Delete();
- pd->Delete(); //instanciated by the GEOM::GetData(...) method
+ pd->Delete(); //instantiated by the GEOM::GetData(...) method
return 1;
}
catch( Standard_Failure )
{
- //THROW_SALOME_CORBA_EXCEPTION("Exception catched in ExportVTK", SALOME::BAD_PARAM);
+ //THROW_SALOME_CORBA_EXCEPTION("Exception caught in ExportVTK", SALOME::BAD_PARAM);
}
return 0;
}
return false;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT( VTKPlugin_ExportDriver,GEOM_BaseDriver );
+IMPLEMENT_STANDARD_RTTIEXT( VTKPlugin_ExportDriver,GEOM_BaseDriver );
~VTKPlugin_ExportDriver() {};
static const Standard_GUID& GetID();
- virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_Boolean MustExecute( const LOGBOOK& ) const { return Standard_True; }
- virtual void Validate( LOGBOOK& ) const {}
+ virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_Boolean MustExecute( const Handle(TFunction_Logbook)& ) const { return Standard_True; }
+ virtual void Validate( Handle(TFunction_Logbook)& ) const {}
virtual bool GetCreationInformation( std::string& theOperationName,
std::vector<GEOM_Param>& params );
- OCCT_DEFINE_STANDARD_RTTIEXT(VTKPlugin_ExportDriver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(VTKPlugin_ExportDriver,GEOM_BaseDriver)
};
#endif // _VTKPlugin_ExportDriver_HXX
getGeometryGUI()->getApp()->putInfo( tr("GEOM_PRP_COMMAND").arg( theCommandID ) );
}
- return true;
+ return true; // ???????????
}
//=======================================================================
double deflection = 0.;
QString fileName = VTKPlugin_ExportDlg::getFileName( io,
- tr( "VTK_FILES" ),
- tr( "EXPORT_TITLE" ),
- parent,
- deflection );
+ tr( "VTK_FILES" ),
+ tr( "EXPORT_TITLE" ),
+ parent,
+ deflection );
if ( fileName.isEmpty() )
return false;
if ( vtkOp->IsDone() )
{
- transaction.commit();
+ transaction.commit();
}
else
{
- transaction.abort();
- SUIT_MessageBox::critical( parent,
- tr( "GEOM_ERROR" ),
- tr( "GEOM_PRP_ABORT" ) + "\n" + tr( vtkOp->GetErrorCode() ) );
- return false;
+ transaction.abort();
+ SUIT_MessageBox::critical( parent,
+ tr( "GEOM_ERROR" ),
+ tr( "GEOM_PRP_ABORT" ) + "\n" + tr( vtkOp->GetErrorCode() ) );
+ return false;
}
}
catch ( const SALOME::SALOME_Exception& e )
if ( !ok )
{
SUIT_MessageBox::warning( parent,
- tr( "WRN_WARNING" ),
- tr( "GEOM_WRN_NO_APPROPRIATE_SELECTION" ) );
+ tr( "WRN_WARNING" ),
+ tr( "GEOM_WRN_NO_APPROPRIATE_SELECTION" ) );
}
return ok;
}
return;
}
}
- catch( Standard_Failure ) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode( aFail->GetMessageString() );
+ catch( Standard_Failure& aFail ) {
+ SetErrorCode( aFail.GetMessageString() );
return;
}
void BrepGeometry::initIds()
{
- // intialization of Ids
+ // initialization of Ids
initListIds(TopAbs_VERTEX, m_vertices);
initListIds(TopAbs_EDGE, m_edges);
initListIds(TopAbs_FACE, m_faces);
protected:
/**
* Constructor.
- * @param dimension the dimension ot the field.
+ * @param dimension the dimension of the field.
* @param nbElements the number of elements.
* @param nbComponents the number of components.
* @param name the name of the field.
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-# --- options ---
+ADD_SUBDIRECTORY(data)
# additional include directories
INCLUDE_DIRECTORIES(
TARGET_LINK_LIBRARIES(TestXAO ${_link_LIBRARIES})
SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
+SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/xao)
ADD_TEST(TestXAO TestXAO)
-SET_TESTS_PROPERTIES(TestXAO PROPERTIES ENVIRONMENT "GEOM_SRC_DIR=${PROJECT_SOURCE_DIR};${tests_env}")
+SET_TESTS_PROPERTIES(TestXAO PROPERTIES ENVIRONMENT "XAO_DATA_DIR=${CMAKE_CURRENT_SOURCE_DIR}/data;${tests_env}")
INSTALL(TARGETS TestXAO DESTINATION ${SALOME_INSTALL_BINS})
# Application tests
-SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/xao)
INSTALL(TARGETS TestXAO RUNTIME DESTINATION ${TEST_INSTALL_DIRECTORY})
INSTALL(FILES CTestTestfileInstall.cmake
#
ADD_TEST(GEOM_TestXAO python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestXAO)
-SET_TESTS_PROPERTIES(GEOM_TestXAO PROPERTIES LABELS "${COMPONENT_NAME}")
+SET_TESTS_PROPERTIES(GEOM_TestXAO PROPERTIES
+ LABELS "${COMPONENT_NAME}"
+ ENVIRONMENT "XAO_DATA_DIR=$ENV{ABSOLUTE_APPLI_PATH}/bin/salome/test/GEOM/xao/data")
public:
static std::string getTestFilePath(const std::string& fileName)
{
- std::string dataDir = getenv("GEOM_SRC_DIR");
- dataDir += "/src/XAO/tests/data/";
- dataDir += fileName;
+ std::string dataDir = "";
+ char* geomSrcDir = getenv("XAO_DATA_DIR");
+ if (geomSrcDir != NULL)
+ {
+ dataDir = geomSrcDir;
+#if defined _WIN32 || defined __CYGWIN__
+ dataDir += "\\";
+#else
+ dataDir += "/";
+#endif
+ dataDir += fileName;
+ }
+
return dataDir;
}
--- /dev/null
+# Copyright (C) 2012-2017 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+SET(XAO_DATA_FILES
+ Box_1.brep
+ Box_2.brep
+ Cut_2.brep
+ test.xao
+ )
+
+# --- rules ---
+SET(XAO_DATA_DIR ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/xao/data)
+INSTALL(FILES ${XAO_DATA_FILES} DESTINATION ${XAO_DATA_DIR})
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer XAOPlugin_Driver::Execute(LOGBOOK& log) const
+Standard_Integer XAOPlugin_Driver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
if (shape.IsNull()) return 0;
function->SetValue(shape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT(XAOPlugin_Driver, GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT(XAOPlugin_Driver, GEOM_BaseDriver);
~XAOPlugin_Driver();
static const Standard_GUID& GetID();
- virtual Standard_Integer Execute(LOGBOOK& log) const;
- Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
- virtual void Validate(LOGBOOK&) const {}
+ virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
+ Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
+ virtual void Validate(Handle(TFunction_Logbook)&) const {}
virtual bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& theParams);
static int GetFileNameTag() { return 1; } // where to store file name in GEOM_Function
- OCCT_DEFINE_STANDARD_RTTIEXT(XAOPlugin_Driver,GEOM_BaseDriver)
+ DEFINE_STANDARD_RTTIEXT(XAOPlugin_Driver,GEOM_BaseDriver)
};
#endif // _XAOPlugin_Driver_HXX
Handle(GEOM_Object) reference = GetObjectImpl( shape );
// Get the reference groups
- int ind = 0;
+ CORBA::ULong ind = 0;
std::list<Handle(GEOM_Object)> groupsObj;
for (; ind < groups.length(); ind++)
{
<source>XAOPLUGIN_EXPORT_AUTHOR</source>
<translation>作成者</translation>
</message>
+ <message>
+ <source>XAOPLUGIN_EXPORT_SHAPEFILE</source>
+ <translation>別のファイルに形状を出力する</translation>
+ </message>
<message>
<source>XAOPLUGIN_EXPORT_LGROUPS</source>
<translation>グループ</translation>