-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// 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.
+// 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
/*!
* \brief Marker type
*/
- enum marker_type { MT_NONE, MT_POINT, MT_PLUS, MT_STAR, MT_O, MT_X, MT_O_POINT, MT_O_PLUS,
- MT_O_STAR, MT_O_X, MT_BALL, MT_RING1, MT_RING2, MT_RING3, MT_USER };
+ enum marker_type { MT_NONE, MT_POINT, MT_PLUS, MT_STAR, MT_X, MT_O, MT_O_POINT, MT_O_PLUS,
+ MT_O_STAR, MT_O_X, MT_RING1, MT_RING2, MT_RING3, MT_BALL, MT_USER };
/*!
* /brief Marker size
*/
long GetType();
+ /*!
+ * \brief Get value of a modification counter of the object
+ */
+ long GetTick();
+
/*!
* \brief Set a Study entry where this object was published.
*/
in GEOM_Object theShape2,
in long theOperation,
in boolean IsCheckSelfInte);
+ /*!
+ * \brief Perform fusion boolean operation on two given shapes.
+ * \param theShape1 First argument for fuse operation.
+ * \param theShape2 Second argument for fuse operation.
+ * \param IsCheckSelfInte If TRUE, perform check self intersection
+ * of arguments before an operation.
+ * \param IsRmExtraEdges If TRUE, perform removal of extra edges
+ * during an operation.
+ * \return New GEOM_Object, containing the result shape.
+ */
+ GEOM_Object MakeFuse (in GEOM_Object theShape1,
+ in GEOM_Object theShape2,
+ in boolean IsCheckSelfInte,
+ in boolean IsRmExtraEdges);
/*!
* \brief Perform fusion boolean operation on list of objects.
* \param theShapes Shapes to be fused.
* \param IsCheckSelfInte If TRUE, perform check self intersection
* of arguments before an operation.
+ * \param IsRmExtraEdges If TRUE, perform removal of extra edges
+ * during an operation.
* \return New GEOM_Object, containing the result shape.
*/
GEOM_Object MakeFuseList (in ListOfGO theShapes,
- in boolean IsCheckSelfInte);
+ in boolean IsCheckSelfInte,
+ in boolean IsRmExtraEdges);
/*!
* \brief Perform common boolean operation on list of objects.
* a compound containing nonintersected shapes. Performance will be better
* since intersection between shapes from compound is not performed.
*
- * Description of all parameters as in previous method MakePartition()
+ * Description of all parameters as in previous method MakePartition().
+ * One additional parameter is provided:
+ * \param IsCheckSelfInte If TRUE, perform check self intersection
+ * of arguments before an operation.
*
* \note Passed compounds (via ListShapes or via ListTools)
* have to consist of nonintersecting shapes.
in short theLimit,
in boolean theRemoveWebs,
in ListOfLong theMaterials,
- in short theKeepNonlimitShapes);
+ in short theKeepNonlimitShapes,
+ in boolean IsCheckSelfInte);
/*!
* \brief Perform partition of the Shape with the Plane
in long theParamNbStep,
in curve_type theCurveType);
+ /*!
+ * \brief Creates an isoline curve on a face.
+ * \param theFace the face for which an isoline is created.
+ * \param IsUIsoline True for U-isoline creation; False for V-isoline
+ * creation.
+ * \param theParameter the U parameter for U-isoline or V parameter
+ * for V-isoline.
+ * \return New GEOM_Object, containing the created isoline edge or a
+ * compound of edges.
+ */
+ GEOM_Object MakeIsoline(in GEOM_Object theFace,
+ in boolean IsUIsoline,
+ in double theParameter);
+
/*!
* \brief Create a sketcher (wire or face), following the textual description,
* passed through \a theCommand argument.
* If format 'IGES_SCALE' is used instead of 'IGES' or
* format 'STEP_SCALE' is used instead of 'STEP',
* file length unit will be ignored (set to 'meter') and result model will be scaled.
- * \return New GEOM_Object, containing the imported shape.
+ * \return List of GEOM_Object, containing the created shape and groups of materials.
*/
- GEOM_Object ImportFile (in string theFileName, in string theFormatName);
+ ListOfGO ImportFile (in string theFileName, in string theFormatName);
/*!
* \brief Read a value of parameter from a file, containing a shape.
out double EdgeMin, out double EdgeMax,
out double VertMin, out double VertMax);
+ /*!
+ * \brief Enumeration of Shape defects coming from CheckShape algorithms.
+ */
+ enum ShapeErrorType
+ {
+ /* for vertices */
+ InvalidPointOnCurve,
+ InvalidPointOnCurveOnSurface,
+ InvalidPointOnSurface,
+
+ /* for edges */
+ No3DCurve,
+ Multiple3DCurve,
+ Invalid3DCurve,
+ NoCurveOnSurface,
+ InvalidCurveOnSurface,
+ InvalidCurveOnClosedSurface,
+ InvalidSameRangeFlag,
+ InvalidSameParameterFlag,
+ InvalidDegeneratedFlag,
+
+ FreeEdge,
+ InvalidMultiConnexity,
+ InvalidRange,
+
+ /* for wires */
+ EmptyWire,
+ RedundantEdge,
+ SelfIntersectingWire, /* on a face */
+
+ /* for faces */
+ NoSurface,
+ InvalidWire,
+ RedundantWire,
+ IntersectingWires,
+ InvalidImbricationOfWires,
+
+ /* for shells */
+ EmptyShell,
+ RedundantFace,
+
+ /* for shapes */
+ UnorientableShape,
+ NotClosed,
+ NotConnected,
+
+ SubshapeNotInShape,
+
+ BadOrientation,
+ BadOrientationOfSubshape,
+
+ InvalidToleranceValue,
+
+ /* for exception */
+ CheckFail
+ };
+
+ /*!
+ * \brief Description of a shape defect: type and incriminated sub-shapes.
+ */
+ struct ShapeError
+ {
+ ShapeErrorType error;
+ ListOfLong incriminated;
+ };
+
+ /*!
+ * \brief Sequence of all shape defects.
+ */
+ typedef sequence<ShapeError> ShapeErrors;
+
/*!
* \brief Check a topology of the given shape.
* \param theShape Shape to check validity of.
- * \param theDescription Output. Description of problems in the shape, if they are.
+ * \param theErrors Structure, containing discovered errors and incriminated sub-shapes.
* \return TRUE, if the shape "seems to be valid" from the topological point of view.
*/
- boolean CheckShape (in GEOM_Object theShape,
- out string theDescription);
+ boolean CheckShape (in GEOM_Object theShape,
+ out ShapeErrors theErrors);
/*!
* \brief Check a topology and a geometry of the given shape.
* \param theShape Shape to check validity of.
- * \param theDescription Output. Description of problems in the shape, if they are.
+ * \param theErrors Structure, containing discovered errors and incriminated sub-shapes.
* \return TRUE, if the shape "seems to be valid".
*/
- boolean CheckShapeWithGeometry (in GEOM_Object theShape,
- out string theDescription);
+ boolean CheckShapeWithGeometry (in GEOM_Object theShape,
+ out ShapeErrors theErrors);
+
+ /*!
+ * \brief Convert sequence of shape errors, returned by
+ * <VAR>CheckShape()</VAR> or <VAR>CheckShapeWithGeometry()</VAR>, into string.
+ * \param theShape the invalid shape.
+ * \param theErrors The sequence of \a theShape errors.
+ * \return String, describing all the errors in form, suitable for printing.
+ */
+ string PrintShapeErrors (in GEOM_Object theShape,
+ in ShapeErrors theErrors);
/*!
* \brief Check a topology of the given shape on self-intersections presence.
/*!
*
* Create a smoothing surface from a set of points
- * \param thelPoints list of points
+ * \param thelPoints list of points. Compounds of points are accepted as well.
+ * \param theNbMax maximum number of Bezier pieces in the resulting surface.
+ * \param theDegMax maximum degree of the resulting BSpline surface
+ * \param theDMax specifies maximum value of the GeomPlate_PlateG0Criterion criterion.
* \return New GEOM_Object, containing the created shape.
*/
- GEOM_Object MakeSmoothingSurface (in ListOfGO thelPoints);
+ GEOM_Object MakeSmoothingSurface (in ListOfGO thelPoints,
+ in long theNbMax,
+ in long theDegMax,
+ in double theDMax);
/*@@ insert new functions before this line @@ do not remove this line @@*/
};
void Move( in object_list what,
in SALOMEDS::SObject where,
in long row );
+
+ /*!
+ * \brief Collects dependencies of the given objects from other ones
+ * \param theStudy The study in which the object is published
+ * \param theListOfEntries List of GEOM object entries in OCAF tree (not in study)
+ * \return Struct of dependent entries and its links as a byte array
+ * \note This method is supposed to be used by GUI only.
+ */
+ SALOMEDS::TMPFile GetDependencyTree(in SALOMEDS::Study theStudy,
+ in string_array theListOfEntries);
+
+ /*!
+ * \brief Fills 3 lists that is used to clean study of redundant objects:
+ * - dependencies of the given objects from other ones;
+ * - children of the given objects;
+ * - all other objects in study.
+ * \param theStudy The study in which the object was published
+ * \param theSelectedEntries List of GEOM object entries in OCAF tree
+ * \param theParentEntries List of GEOM object entries on which the given objects depend
+ * \param theSubEntries Children entries list of the given objects
+ * \param theOtherEntries List of GEOM object entries which are in the study, but not in parents and children lists
+ * \note This method is supposed to be used by GUI only.
+ */
+ void GetEntriesToCleanStudy(in SALOMEDS::Study theStudy,
+ inout string_array theSelectedEntries,
+ inout string_array theParentEntries,
+ inout string_array theSubEntries,
+ inout string_array theOtherEntries);
+
};
};