SET(GEOM_CXXFLAGS -I${GEOM_ROOT_DIR}/include/salome)
+FIND_LIBRARY(AdvancedGUI AdvancedGUI ${GEOM_ROOT_DIR}/lib/salome)
FIND_LIBRARY(BasicGUI BasicGUI ${GEOM_ROOT_DIR}/lib/salome)
FIND_LIBRARY(BlocksGUI BlocksGUI ${GEOM_ROOT_DIR}/lib/salome)
FIND_LIBRARY(BooleanGUI BooleanGUI ${GEOM_ROOT_DIR}/lib/salome)
FIND_LIBRARY(MeasureGUI MeasureGUI ${GEOM_ROOT_DIR}/lib/salome)
FIND_LIBRARY(NMTDS NMTDS ${GEOM_ROOT_DIR}/lib/salome)
FIND_LIBRARY(NMTTools NMTTools ${GEOM_ROOT_DIR}/lib/salome)
+FIND_LIBRARY(OCC2VTK OCC2VTK ${GEOM_ROOT_DIR}/lib/salome)
FIND_LIBRARY(OperationGUI OperationGUI ${GEOM_ROOT_DIR}/lib/salome)
FIND_LIBRARY(PrimitiveGUI PrimitiveGUI ${GEOM_ROOT_DIR}/lib/salome)
FIND_LIBRARY(RepairGUI RepairGUI ${GEOM_ROOT_DIR}/lib/salome)
FIND_LIBRARY(STEPImport STEPImport ${GEOM_ROOT_DIR}/lib/salome)
FIND_LIBRARY(STLExport STLExport ${GEOM_ROOT_DIR}/lib/salome)
FIND_LIBRARY(TransformationGUI TransformationGUI ${GEOM_ROOT_DIR}/lib/salome)
+FIND_LIBRARY(VTKExport VTKExport ${GEOM_ROOT_DIR}/lib/salome)
# Modified by : Alexander BORODIN (OCN) - autotools usage
# Created from configure.in.base
#
-AC_INIT([Salome2 Project GEOM module], [5.1.4], [webmaster.salome@opencascade.com], [SalomeGEOM])
+AC_INIT([Salome2 Project GEOM module], [5.1.5], [webmaster.salome@opencascade.com], [SalomeGEOM])
AC_CONFIG_AUX_DIR(adm_local/unix/config_files)
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
# chmod +x ./bin/*; \
#])
+AC_CONFIG_COMMANDS([hack_libtool],[
+sed -i "s%^CC=\"\(.*\)\"%hack_libtool (){ \n\
+ if test \"\$(echo \$[@] | grep -E '\\\-L/usr/lib(/../lib)?(64)? ')\" == \"\" \n\
+ then\n\
+ cmd=\"\1 \$[@]\"\n\
+ else\n\
+ cmd=\"\1 \"\`echo \$[@] | sed -r -e 's|(.*)-L/usr/lib(/../lib)?(64)? (.*)|\\\1\\\4 -L/usr/lib\\\3|g'\`\n\
+ fi\n\
+ \$cmd\n\
+}\n\
+CC=\"hack_libtool\"%g" libtool
+],[])
+
# This list is initiated using autoscan and must be updated manually
# when adding a new file <filename>.in to manage. When you execute
# autoscan, the Makefile list is generated in the output file configure.scan.
idl/Makefile \
Makefile \
])
-
-AC_HACK_LIBTOOL
PAPEROPT_a4 = -D latex_paper_size=a4
ALLSPHINXOPTS = -d doctrees $(PAPEROPT_a4) $(SPHINXOPTS) $(SOURCEDIR)
-SPHINX_PYTHONPATH = $(prefix)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(KERNEL_ROOT_DIR)/bin/salome:$(KERNEL_ROOT_DIR)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(OMNIORB_ROOT)/lib/python$(PYTHON_VERSION)/site-packages
+SPHINX_PYTHONPATH = $(prefix)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(prefix)/lib64/python$(PYTHON_VERSION)/site-packages/salome:$(KERNEL_ROOT_DIR)/bin/salome:$(KERNEL_ROOT_DIR)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(KERNEL_ROOT_DIR)/lib64/python$(PYTHON_VERSION)/site-packages/salome:$(OMNIORB_ROOT)/lib/python$(PYTHON_VERSION)/site-packages:$(OMNIORB_ROOT)/lib64/python$(PYTHON_VERSION)/site-packages
SPHINX_LD_LIBRARY_PATH = $(KERNEL_ROOT_DIR)/lib/salome:$(OMNIORB_ROOT)/lib
\page create_edge_page Edge
-\n To create an \b Edge in the <b>Main Menu</b> select <b>New Entity- > Build - > Edge</b>
+To create an \b Edge, in the <b>Main Menu</b> select <b>New Entity >
+Build > Edge</b>
-\n You can create an \b Edge from two points (\b Point1 and \b Point2), being the first and the last vertices of the edge.
+There are two ways to create an edge. In both cases the \b Result
+will be a \b GEOM_Object (EDGE).
-The \b Result will be a \b GEOM_Object (EDGE).
+Firstly, you can create an \b Edge by specifying two points (\b Point1 and
+\b Point2), which are the first and the last vertices of the edge.
-<b>TUI Command:</b> <em>geompy.MakeEdge(Vertex1, Vertex2),</em> where
-Vertex1 and Vertex2 are correspondingly the first and the last vertex
-of the edge.
+<b>TUI Command:</b> <em>geompy.MakeEdge(Vertex1, Vertex2)</em><br>
+<b>Arguments:</b> Name + 2 vertices (Vertex1 and Vertex2 are
+correspondingly the first and the last vertex of the edge).
-<b>Arguments:</b> Name + 2 vertices.
+\image html edge1.png "Create edge by two points"
-\image html neo-obj2.png
+Secondly, you can create an \b Edge by specifying a single wire.
-\n <b>Example:</b>
+In this mode the following use cases are possible:
+- All edges that form the wire lie on the same geometrical curve
+(i.e. curve(edge1) == curve(edge2)).
+- The edges that form the wire lie on analytical curves of the same
+type, for example, segments of line, arcs, etc. In this case, the
+algorithm checks geometrical coincidence of these curves using
+a certain tolerance. If the curves are coinciding in terms of the given
+tolerance, the resulting edge is built as if on a single curve.
+- The edges that form the wire have the same tangency in the connection
+points. In this case the curves are interpolated by the single
+b-spline curve with sufficient precision. The resulting edge will
+be built on this curve.
+
+The case when the edges that form the wire have different tangency in
+the connection points (sharp bend) is not processed.
+
+<b>TUI Command:</b> <em>geompy.MakeEdgeWire(Wire, LinearTolerance, AngularTolerance)</em><br>
+<b>Arguments:</b> Name + 1 wire + Linear Tolerance + Angular Tolerance
+(tolerance values are used to check coincidence of the underlying curves).
+
+\image html edge2.png "Create edge from wire"
+
+<b>Example:</b>
\image html edgesn.png "Edge"
Our <b>TUI Scripts</b> provide you with useful examples of creation of
\ref tui_creation_edge "Advanced Geometric Objects".
-*/
\ No newline at end of file
+*/
\n <b> Both Directions </b> checkbox allows extruiding the source
object both forward and backward.
\n <b>TUI Command:</b> <em>geompy.MakePrismVecH(Base, Vector, Height)</em>
-\n <b>Arguments:</b> Name + 1 shape (vertex, edge, planar wire, face or
-shell) serving as base object + 1 vector (for direction of the
+\n <b>Arguments:</b> Name + one or several shapes (vertex, edge, planar wire, face or
+shell) serving as base objects + 1 vector (for direction of the
extrusion) + 1 value (dimension).
\image html extrusion1.png
\n <b> Both Directions </b> checkbox allows extruiding the source
object both forward and backward.
\n <b>TUI Command:</b> <em>geompy.MakePrism(Base, Point1, Point2)</em>
-\n <b>Arguments:</b> Name + 1 shape (vertex, edge, planar wire, face or
-shell) serving as base object + 2 vertices.
+\n <b>Arguments:</b> Name + one or several shapes (vertex, edge, planar wire, face or
+shell) serving as base objects + 2 vertices.
\image html extrusion2.png
<b>Both Directions</b> checkbox allows extruding the
source objects both forward and backward.
\n <b>TUI Command:</b> <em>geompy.MakePrismDXDYDZ(Base, dx, dy, dz)</em>
-\n <b>Arguments:</b> Name + 1 shape (vertex, edge, planar wire, face or
-shell) serving as base object + 3 axis directions.
+\n <b>Arguments:</b> Name + one or several shapes (vertex, edge, planar wire, face or
+shell) serving as base objects + 3 axis directions.
\image html extrusion3.png
To generate a \b Filling in the <b>Main Menu</b> select <b>New Entity - > Generation - > Filling</b>
-To create a curving face using several edges you need to define the
+To create a curvilinear face from several edges you need to define the
following parameters:
\n <b>Input Compound</b> - the list of edges/wires used for creation
-of the surface. Before perform filling algorithm each wire from
-compound is converted to one edge created on BSpline curve built using
-curves from all edges from wire.
+of the surface. To prepare for the filling each wire of the compound
+is converted to an edge created on a BSpline curve built using curves
+from all edges of the wire.
\n \b Minimum and <b>Maximum Degree</b> of equation of the resulting
BSpline or Besier curves describing the surface;
\n \b Tolerance for \b 2D and for \b 3D - minimum distance between the
created surface and the reference edge;
-\n <b>Number of
-Iterations</b> - defines the maximum number of iterations. The
+\n <b>Number of Iterations</b> - defines the maximum number of iterations. The
iterations are repeated until the required tolerance is reached. So, a
greater number of iterations allows producing a better surface.
\n <b>Method</b> - Kind of method to perform filling operation
-1. Default - standard behaviour
-2. Use edges orientation - orientation of edges are used: if edge is
-reversed curve from this edge is reversed before using in filling
+1. Default - the standard behaviour.
+2. Use edges orientation - the edges orientation is used: if an edge is
+reversed, the curve from this edge is reversed before being used by the filling
algorithm.
-3. Auto-correct edges orientation - change orientation of curves using
-minimization of sum of distances between ends points of edges.
+3. Auto-correct edges orientation - curves orientation is changed to
+minimize the sum of distances between ends points of edges.
\n <b>Approximation</b> - if checked, BSpline curves are generated in
the process of surface construction (using
GeomAPI_PointsToBSplineSurface functionality). By default the surface
is created using Besier curves. The usage of <b>Approximation</b>
-makes the algorithm work slower, but allows building the surface for
-rather complex cases.
+slows the algorithm, but allows building the surface for complex cases.
\n The \b Result of the operation will be a GEOM_Object (face).
\n <b>TUI Command:</b> <em>geompy.MakeFilling(Edges, MinDegree, MaxDegree, Tol2D, Tol3D, NbIter)</em>
\n <b>Arguments:</b> Name + 1 List of edges + 7 Parameters
-(Min. degree, Max. degree, 2D tolerance, 3D tolerance, Number of iterations, Method, Approximation).
+(Min. degree, Max. degree, Number of iterations, 2D tolerance, 3D
+tolerance, Number of iterations, Method, Approximation).
\image html filling.png
Almost all geometry module functionalities are accessible via
\subpage geompy_page "Geometry module Python Interface"
-\n Have a look also at the
-<a href="../../gui/GEOM/geompypkg_page.html"> documentation of the GEOM python packages</a>
+Also it can be useful to have a look at the \subpage geompypkg_page "documentation on GEOM python packages".
\image html image3.png "Example of Geometry module usage for engineering tasks"
\n The \b Result will be a \b GEOM_Object.
-\n This functionality tries to set new value of tolerance for the
- given shape. But the final tolerance value depends also on the
- initial shape topology (regards existing gaps) in order to obtain
- valid resulting shape.
+\n This functionality tries to set a new value of tolerance for the
+ given shape. However, the final tolerance value also depends on the
+ initial shape topology (takes into consideration the existing gaps) to obtain
+ a valid resulting shape.
\n Example of usage:
<ol>
-<li>Try a partition on objects obj1 and obj2.</li>
+<li>Partition objects obj1 and obj2.</li>
<li>Partition fails.</li>
<li>Perform Limit Tolerance on objects obj1 and obj2.</li>
-<li>Try again the partition.</li>
+<li>Try to partition them again.</li>
</ol>
See also \ref tui_limit_tolerance "TUI example".
\n <b>TUI Command:</b> <em>geompy.LimitTolerance(Shape, Tolerance),</em>
where \em Shape is a shape with presumably incorrect tolerance, \em
- Tolerance is a desired value of tolerance.
+ Tolerance is the required tolerance value.
-Our <b>TUI Scripts</b> provide you with useful examples of the use of
+Our <b>TUI Scripts</b> provide you with useful examples of
\ref tui_limit_tolerance "Repairing Operations".
*/
\n To produce a <b>Simple Multi Translation</b> (in one direction) you
need to indicate an \b Object to be translated, a \b Vector of
translation, a \b Step of translation and a <b>Number of Times</b> the
-Object should be duplicated.
+Object should be duplicated. 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>TUI Command:</b> <em>geompy.MakeMultiTranslation1D(Shape, Dir,
Step, NbTimes)</em>
\n <b>Arguments:</b> Name + 1 shape + 1 vector (for direction) + 1
\n To produce a <b>Double Multi Translation</b> (in two directions) you need to
indicate an \b Object to be translated, and, for both axes, a \b
Vector of translation, a \b Step of translation and a <b>Number of Times</b> the shape must be duplicated.
+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>TUI Command:</b> <em>geompy.MakeMultiTranslation2D(Shape, Dir1,
Step1, NbTimes1, Dir2, Step2, NbTimes2),</em> where \em Shape is a shape
\page partition_page Partition
-\n To produce a \b Partition in the <b>Main Menu</b> select <b>Operations - > Partition</b>
+To produce a \b Partition in the <b>Main Menu</b> select <b>Operations - > Partition</b>
-\n This operation builds a compound by intersection of several shapes
+This operation builds a compound by intersection of several shapes
with a set of tool objects or with a plane.
-\n The \b Result will be any \b GEOM_Object.
+The \b Result will be a \b GEOM_Object.
<br><h2>Intersection of two shapes.</h2>
\image html partition1.png
-\n <b>Arguments:</b> Name + 2 lists of shapes (the shapes from the
+<b>Arguments:</b> Name + 2 lists of shapes (the shapes from the
first list will be intersected with the shapes from the second list) +
Resulting Type of shape.
-\n As far as the intersection of two objects can produce any type of
+As far as the intersection of two objects can produce any type of
geometrical objects, <b>Resulting type</b> box allows choosing the
preferrable result, i.e. a solid, a shell, a list of faces, etc.
-\n<b>Resulting type</b> has to be equal or lower than the type of the
+
+The <b>Resulting type</b> has to be equal or lower than the type of the
\em Objects. In other words, if the \em Objects don't contain any
shape of this type, Partition fails.
<b>Keep shapes of lower type</b> checkbox manages standalone shapes of
type other than the \em Limit. If it is checked, lower dimension
objects will be preserved, else they will be lost.
-\n For example, you do a partition of a box (Solid) and a face (Face)
-without any tool. If you choose Resulting Type "Solid", you will
-obtain a compound of two solids (let's the box will be splitted by the
-face on two parts), but if you will also check <b>Keep shapes of lower
-type</b> checkbox, you will obtain a compound of two solids and one
-face (the face will have a hole where the original face lays inside
-the box, see corresponding \ref partition_picture_3 "picture" below).
-\n <b>Advanced option:</b>
+For example, you partition a box (Solid) and a face (Face)
+without any tool (the box is split in two parts by the shape). If you
+choose the Resulting Type "Solid", you will
+obtain a compound of two solids, but if you also check <b>Keep shapes of lower
+type</b> checkbox, you will obtain a compound of two solids and one
+face (there will be a hole in the resulting face, where the original
+face intersects with the box, see the corresponding \ref partition_picture_3 "picture" below).
+
+<b>No sub-shapes intersection (Compounds only)</b> check box affects
+only input shapes of the Compound type. If this option is switched off (default
+behavior) each input compound will be automatically exploded into
+sub-shapes and the intersection between these shapes will be also
+computed. If this option is switched on, the intersection between
+sub-shapes will not be performed. In this case the Partition algorithm
+will work faster, but the result might differ from the default behavior.
+
+ <b>Advanced option:</b>
\ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments".
-\note Partition is a kind of complex operation, result of it depends
- on the initial shapes quality. Sometimes, if partition fails,
- some healing operations could help. Try <b>Shape Processing</b>
- and <b>Limit Tolerance</b> in such cases. See also \ref
- tui_limit_tolerance "TUI example" of shape healing.
+\note Partition is a complex operation, so its result of it depends
+ on the quality of the initial shapes. Sometimes, if partition fails,
+ such healing operations as <b>Shape Processing</b>
+ and <b>Limit Tolerance</b> can help to attune source shapes to obtain correct result of the Partition.
+ See also \ref tui_limit_tolerance "TUI example" of shape healing.
-\n <b>TUI Command:</b> <em>geompy.MakePartition(ListOfShapes,
-ListOfTools, ListOfKeepInside, ListOfRemoveInside, Limit, RemoveWebs,
-ListOfMaterials, KeepNonlimitShapes),</em> where where \em
-ListOfShapes is a list of shapes to be intersected, \em ListOfTools is
-a list of shapes to intersect the shapes from ListOfShapes, \em Limit
-is a Type of resulting shapes and \em KeepNonlimitShapes is a flag
-that allows to preserve standalone shapes of low dimension (than
-Limit) in the result.
+<b>TUI Command (with sub-shapes intersection):</b>
-\n Since the implementation of a new version of PartitionAlgo other
-parameters are ignored by the current functionality and remain there
-only to support the old scripts.
+<em>geompy.MakePartition(ListOfShapes, ListOfTools, ListOfKeepInside,
+ListOfRemoveInside, Limit, RemoveWebs, ListOfMaterials,
+KeepNonlimitShapes)</em>
+<b>TUI Command (without sub-shapes intersection):</b>
+
+<em>geompy.MakePartitionNonSelfIntersectedShape(ListOfShapes,
+ListOfTools, ListOfKeepInside, ListOfRemoveInside, Limit, RemoveWebs,
+ListOfMaterials, KeepNonlimitShapes)</em>
+
+Here,
+- \em ListOfShapes is a list of shapes to be intersected
+- \em ListOfTools is a list of shapes to intersect the shapes from
+\em ListOfShapes
+- \em Limit is a Type of resulting shapes
+- \em KeepNonlimitShapes is a flag that allows to preserve standalone
+shapes of low dimension (than \em Limit) in the result.
+- Other parameters are obsolete and kept only for compatibility with
+previous versions of SALOME.
<br><h2>Intersection of a Shape and a Plane.</h2>
\image html partition2.png
-\n <b>Arguments:</b> Name + a list of shapes which will be intersected
-+ 1 cutting plane.
+<b>Arguments:</b> Name + 1 shape to be intersected + 1 cutting plane.
-\n <b>Advanced option:</b>
- \ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments".
+<b>Advanced option:</b>
+\ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments".
+
+<b>TUI Command:</b>
-\n <b>TUI Command:</b> <em> geompy.MakeHalfPartition(Shapes,
-Plane),</em> where \em Shapes are a list of Shapes to be intersected
-and \em Plane is a Tool shape, to intersect the \em Shapes.
+<em>geompy.MakeHalfPartition(Shape, Plane)</em>, where:
+- \em Shape is a source shape to be intersected by the \em Plane
+- \em Plane is a tool shape, to intersect the \em Shape.
-\n <b>Example:</b>
+<b>Examples:</b>
\image html partitionsn1.png "Box intersected by a plane"
\image html partitionsn2.png "Result of intersection"
\anchor partition_picture_3
-\image html partitionsn3.png "Result of intersection of a box and a plane (both as \em Objects, no tools) with Resulting type \em Solid and checked \em Keep \em shapes \em of \em lower \em type"
+\image html partitionsn3.png "Result of intersection of a box and a
+plane (both as \em Objects, no tools) with the Resulting type \em Solid and checked <em> "Keep shapes of lower type"</em>
-Our <b>TUI Scripts</b> provide you with useful examples of the use of
-\ref tui_partition "Basic Operations".
+Our <b>TUI Scripts</b> provide you with useful examples of \ref tui_partition "Basic Operations".
*/
etc), \em Values is a list of values of parameters placed in the same
order as in the list of Parameters.
-\note <b>Shape Processing</b> is usefull not only on invalid shapes,
- but sometimes also on shapes, that are classified as valid by
- the <b>Check</b> functionality. Use it, if some operation (for
+\note <b>Shape Processing</b> is useful not only on invalid shapes,
+ but also on the shapes, that are classified as valid by
+ the <b>Check</b> functionality. Use it, if an operation (for
example, <b>Partition</b>) fails.
Example of usage:
<ol>
- <li>Try a partition on objects obj1 and obj2.</li>
+ <li>Try to partition objects obj1 and obj2.</li>
<li>Partition fails.</li>
<li>Perform Shape Processing on objects obj1 and obj2.</li>
- <li>Try again the partition.</li>
+ <li>Try to partition them again.</li>
</ol>
See also \ref tui_limit_tolerance "TUI example".
\image html transformation2.png
-\n Finally you can define an \b Object and the vector. The object will be translated by the length of the vector.
+\n Finally you can define an \b Object and a vector. The 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>TUI Command:</b> <em>geompy.MakeTranslationVector(Object, Vector)</em>
\n <b>Activate Distance</b> checkbox and <b>Distance</b> field allow defining the custom distance of translation.
\n <b>TUI Command </b> for translation by vector and custom distance: <em>geompy.MakeTranslationVectorDistance(Object, Vector, Distance)</em>
import salome
gg = salome.ImportComponentGUI("GEOM")
+#
+# create edge by two points
+#
+
# create vertices
p0 = geompy.MakeVertex(0. , 0. , 0. )
pxyz = geompy.MakeVertex(100., 100., 100.)
edge = geompy.MakeEdge(p0, pxyz)
# add object in the study
-id_edge = geompy.addToStudy(edge,"Edge")
+id_edge = geompy.addToStudy(edge,"Edge_1")
+
+# display an edge
+gg.createAndDisplayGO(id_edge)
+
+#
+# create edge from wire
+#
+
+# create a circle
+c = geompy.MakeCircle(None, None, 100)
+
+# create a wire
+w = geompy.MakeWire([c], 1e-07)
+
+# create an edge from wire
+edge = geompy.MakeEdgeWire(w)
+
+# add object in the study
+id_edge = geompy.addToStudy(edge,"Edge_2")
# display an edge
gg.createAndDisplayGO(id_edge)
+
\endcode
\anchor tui_creation_wire
*/
GEOM_Object MakeEdge (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
+ /*!
+ * Create an edge from specified wire.
+ * \param theWire source Wire.
+ * \param theLinearTolerance linear tolerance value
+ * \param theAngularTolerance angular tolerance value
+ * \return New GEOM_Object, containing the created edge.
+ */
+ GEOM_Object MakeEdgeWire (in GEOM_Object theWire,
+ in double theLinearTolerance,
+ in double theAngularTolerance);
+
/*!
* Create a wire from the set of edges and wires.
* \param theEdgesAndWires List of edge and/or wires.
boxdxyz.png \
build_compound.png \
build_edge.png \
+build_edge_wire.png \
build_face.png \
build_shell.png \
build_solid.png \
GroupPntVecR = new DlgRef_2Sel1Spin( centralWidget() );
GroupPntVecR->GroupBox1->setTitle( tr( "GEOM_ARGUMENTS" ) );
- GroupPntVecR->TextLabel1->setText( tr( "GEOM_CENTER_POINT" ) + " (Origin by default)" );
- GroupPntVecR->TextLabel2->setText( tr( "GEOM_VECTOR" ) + " (Z axis by default)" );
+ GroupPntVecR->TextLabel1->setText( tr( "GEOM_CENTER_POINT" ) + " " + tr( "GEOM_CENTER_DEFAULT" ) );
+ GroupPntVecR->TextLabel2->setText( tr( "GEOM_VECTOR" ) + " " + tr( "GEOM_AXIS_DEFAULT" ) );
GroupPntVecR->TextLabel3->setText( tr( "GEOM_RADIUS" ) );
GroupPntVecR->PushButton1->setIcon( image1 );
GroupPntVecR->PushButton2->setIcon( image1 );
//=================================================================================
BasicGUI_PointDlg::BasicGUI_PointDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
bool modal, Qt::WindowFlags fl )
- : GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
+ : GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl ),
+ myBusy ( false )
{
QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_POINT") ) );
QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_POINT_EDGE" ) ) );
if ( aShape.IsNull() || aShape.ShapeType() != myNeedType)
return;
+ myBusy = true;
+
if ( id == GEOM_POINT_XYZ ) {
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
GroupXYZ->SpinBox_DX->setValue( aPnt.X() );
myFace = aSelectedObject;
GroupOnSurface->LineEdit1->setText( aName );
}
+ myBusy = false;
}
}
GroupLineIntersection->LineEdit2->setEnabled(true);
}
send->setDown(true);
+
+ if ( ( send == GroupLineIntersection->PushButton1 ||
+ send == GroupLineIntersection->PushButton2 ) && !myBusy )
+ SelectionIntoArgument();
}
GEOM::GEOM_Object_var myLine1;
GEOM::GEOM_Object_var myLine2;
+ bool myBusy;
+
DlgRef_3Spin* GroupXYZ;
DlgRef_1Sel3Spin* GroupRefPoint;
DlgRef_1Sel1Spin* GroupOnCurve;
globalSelection( GEOM_ALLSHAPES );
initName( tr( "GEOM_COMPOUND" ) );
+ SelectionIntoArgument();
}
#include <LightApp_SelectionMgr.h>
#include <GEOMImpl_Types.hxx>
+#include <TColStd_IndexedMapOfInteger.hxx>
//=================================================================================
// class : BuildGUI_EdgeDlg()
BuildGUI_EdgeDlg::BuildGUI_EdgeDlg (GeometryGUI* theGeometryGUI, QWidget* parent)
: GEOMBase_Skeleton(theGeometryGUI, parent)
{
- QPixmap image0 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_BUILD_EDGE")));
- QPixmap image1 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_SELECT")));
+ QPixmap image0 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_SELECT")));
+ QPixmap image1 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_BUILD_EDGE")));
+ QPixmap image2 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_BUILD_EDGE_WIRE")));
setWindowTitle(tr("GEOM_EDGE_TITLE"));
/***************************************************************/
mainFrame()->GroupConstructors->setTitle(tr("GEOM_EDGE"));
- mainFrame()->RadioButton1->setIcon(image0);
- mainFrame()->RadioButton2->setAttribute(Qt::WA_DeleteOnClose);
- mainFrame()->RadioButton2->close();
- mainFrame()->RadioButton3->setAttribute(Qt::WA_DeleteOnClose);
+ mainFrame()->RadioButton1->setIcon(image1);
+ mainFrame()->RadioButton2->setIcon(image2);
+ mainFrame()->RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
mainFrame()->RadioButton3->close();
- GroupPoints = new DlgRef_2Sel(centralWidget());
+ // two points
+ GroupPoints = new DlgRef_2Sel(centralWidget());
GroupPoints->GroupBox1->setTitle(tr("GEOM_POINTS"));
GroupPoints->TextLabel1->setText(tr("GEOM_POINT_I").arg(1));
GroupPoints->TextLabel2->setText(tr("GEOM_POINT_I").arg(2));
- GroupPoints->PushButton1->setIcon(image1);
- GroupPoints->PushButton2->setIcon(image1);
-
+ GroupPoints->PushButton1->setIcon(image0);
+ GroupPoints->PushButton2->setIcon(image0);
GroupPoints->LineEdit1->setReadOnly(true);
GroupPoints->LineEdit2->setReadOnly(true);
+ // wire
+
+ GroupWire = new DlgRef_1Sel2Spin(centralWidget());
+ GroupWire->GroupBox1->setTitle(tr("GEOM_WIRE"));
+ GroupWire->TextLabel1->setText(tr("GEOM_WIRE"));
+ GroupWire->PushButton1->setIcon(image0);
+ GroupWire->LineEdit1->setReadOnly(true);
+ GroupWire->TextLabel2->setText( tr( "GEOM_LINEAR_TOLERANCE" ) );
+ GroupWire->TextLabel3->setText( tr( "GEOM_ANGULAR_TOLERANCE" ) );
+ double SpecificStep = 0.0001;
+ double prec1 = Precision::Confusion();
+ double prec2 = Precision::Angular();
+ initSpinBox(GroupWire->SpinBox_DX, prec1, MAX_NUMBER, SpecificStep, "len_tol_precision" );
+ initSpinBox(GroupWire->SpinBox_DY, prec2, MAX_NUMBER, SpecificStep, "ang_tol_precision" );
+ GroupWire->SpinBox_DX->setValue(prec1);
+ GroupWire->SpinBox_DY->setValue(prec2);
+
+ // layout
+
QVBoxLayout* layout = new QVBoxLayout(centralWidget());
layout->setMargin(0); layout->setSpacing(6);
layout->addWidget(GroupPoints);
+ layout->addWidget(GroupWire);
/***************************************************************/
setHelpFileName("create_edge_page.html");
- // Initialisation
+ // initialisation
Init();
}
void BuildGUI_EdgeDlg::Init()
{
// init variables
- GroupPoints->LineEdit1->setReadOnly(true);
- GroupPoints->LineEdit2->setReadOnly(true);
-
- GroupPoints->LineEdit1->setText("");
- GroupPoints->LineEdit2->setText("");
- myPoint1 = myPoint2 = GEOM::GEOM_Object::_nil();
- myOkPoint1 = myOkPoint2 = false;
+ myPoint1 = myPoint2 = myWire = GEOM::GEOM_Object::_nil();
+ myEditCurrentArgument = GroupPoints->LineEdit1;
+ GroupPoints->PushButton1->setDown(true);
+ globalSelection(); // close local contexts, if any
+ localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
// signals and slots connections
+ connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) );
+ connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
+
+ connect( this, SIGNAL( constructorsClicked( int ) ), this, SLOT( ConstructorsClicked( int ) ) );
+
connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk()));
connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
connect(GroupPoints->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
+ connect(GroupWire->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
connect(GroupPoints->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
+ connect(GroupWire->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
+
+ connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
+ this, SLOT( SelectionIntoArgument() ) );
initName(tr("GEOM_EDGE"));
- GroupPoints->PushButton1->click();
- SelectionIntoArgument();
+ ConstructorsClicked( 0 );
}
//=================================================================================
return false;
initName();
- // activate selection and connect selection manager
- GroupPoints->PushButton1->click();
+
+ myEditCurrentArgument->setText( "" );
+ ConstructorsClicked( getConstructorId() );
+
return true;
}
+//=================================================================================
+// function : ConstructorsClicked()
+// purpose : Radio button management
+//=================================================================================
+void BuildGUI_EdgeDlg::ConstructorsClicked( int constructorId )
+{
+ switch ( constructorId ) {
+ case 0:
+ {
+ globalSelection(); // close local contexts, if any
+ localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
+
+ myEditCurrentArgument = GroupPoints->LineEdit1;
+ GroupPoints->LineEdit1->setText( "" );
+ GroupPoints->LineEdit2->setText( "" );
+ myPoint1 = GEOM::GEOM_Object::_nil();
+ myPoint2 = GEOM::GEOM_Object::_nil();
+ GroupPoints->PushButton1->setDown(true);
+ GroupPoints->PushButton2->setDown(false);
+ GroupPoints->LineEdit1->setEnabled(true);
+ GroupPoints->LineEdit2->setEnabled(false);
+ GroupPoints->show();
+ GroupWire->hide();
+ break;
+ }
+ case 1:
+ {
+ globalSelection(); // close local contexts, if any
+ localSelection( GEOM::GEOM_Object::_nil(), TopAbs_WIRE );
+
+ myEditCurrentArgument = GroupWire->LineEdit1;
+ GroupWire->LineEdit1->setText("");
+ myWire = GEOM::GEOM_Object::_nil();
+ GroupWire->PushButton1->setDown(true);
+ GroupWire->LineEdit1->setEnabled(true);
+ GroupPoints->hide();
+ GroupWire->show();
+ break;
+ }
+ }
+
+ qApp->processEvents();
+ updateGeometry();
+ resize( minimumSizeHint() );
+ SelectionIntoArgument();
+}
+
//=================================================================================
// function : SelectionIntoArgument()
// purpose : Called when selection is changed or on dialog initialization or activation
aSelMgr->selectedObjects(aSelList);
if (aSelList.Extent() != 1) {
- if (myEditCurrentArgument == GroupPoints->LineEdit1)
- myOkPoint1 = false;
- else if (myEditCurrentArgument == GroupPoints->LineEdit2)
- myOkPoint2 = false;
+ if (myEditCurrentArgument == GroupPoints->LineEdit1) myPoint1 = GEOM::GEOM_Object::_nil();
+ else if (myEditCurrentArgument == GroupPoints->LineEdit2) myPoint2 = GEOM::GEOM_Object::_nil();
+ else if (myEditCurrentArgument == GroupWire->LineEdit1) myWire = GEOM::GEOM_Object::_nil();
+ displayPreview();
return;
}
// nbSel == 1
Standard_Boolean testResult = Standard_False;
GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
- if (!testResult || aSelectedObject->_is_nil())
- return;
-
- myEditCurrentArgument->setText(GEOMBase::GetName(aSelectedObject));
- // clear selection
- disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
- myGeomGUI->getApp()->selectionMgr()->clearSelected();
- connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
- this, SLOT(SelectionIntoArgument()));
-
- if (myEditCurrentArgument == GroupPoints->LineEdit1) {
- myPoint1 = aSelectedObject;
- myOkPoint1 = true;
- if (!myOkPoint2)
- GroupPoints->PushButton2->click();
- }
- else if (myEditCurrentArgument == GroupPoints->LineEdit2) {
- myPoint2 = aSelectedObject;
- myOkPoint2 = true;
- if (!myOkPoint1)
- GroupPoints->PushButton1->click();
+ if ( testResult && !aSelectedObject->_is_nil() ) {
+ QString aName = GEOMBase::GetName( aSelectedObject );
+ TopAbs_ShapeEnum aNeedType = myEditCurrentArgument == GroupWire->LineEdit1 ? TopAbs_WIRE : TopAbs_VERTEX;
+
+ TopoDS_Shape aShape;
+ if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) && !aShape.IsNull() ) {
+ TColStd_IndexedMapOfInteger aMap;
+ aSelMgr->GetIndexes( aSelList.First(), aMap );
+ if ( aMap.Extent() == 1 ) { // Local Selection
+ int anIndex = aMap( 1 );
+ aName += ( aNeedType == TopAbs_WIRE ? QString( ":wire_%1" ).arg( anIndex ) : QString( ":vertex_%1" ).arg( anIndex ) );
+
+ //Find SubShape Object in Father
+ GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObject, aName );
+ if ( CORBA::is_nil( aFindedObject ) ) { // Object not found in study
+ GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
+ aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex );
+ }
+ else {
+ aSelectedObject = aFindedObject; // get Object from study
+ }
+ }
+ else { // Global Selection
+ if ( aShape.ShapeType() != aNeedType ) {
+ aSelectedObject = GEOM::GEOM_Object::_nil();
+ aName = "";
+ }
+ }
+ }
+
+ myEditCurrentArgument->setText( aName );
+
+ if (!aSelectedObject->_is_nil()) { // clear selection if something selected
+ globalSelection();
+ localSelection( GEOM::GEOM_Object::_nil(), aNeedType );
+ }
+
+ if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) {
+ myPoint1 = aSelectedObject;
+ if ( !myPoint1->_is_nil() && myPoint2->_is_nil() )
+ GroupPoints->PushButton2->click();
+ }
+ else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) {
+ myPoint2 = aSelectedObject;
+ if ( !myPoint2->_is_nil() && myPoint1->_is_nil() )
+ GroupPoints->PushButton1->click();
+ }
+ else if ( myEditCurrentArgument == GroupWire->LineEdit1 ) {
+ myWire = aSelectedObject;
+ }
}
displayPreview();
void BuildGUI_EdgeDlg::SetEditCurrentArgument()
{
QPushButton* send = (QPushButton*)sender();
- //globalSelection();//??
if (send == GroupPoints->PushButton1) {
myEditCurrentArgument = GroupPoints->LineEdit1;
GroupPoints->PushButton1->setDown(false);
GroupPoints->LineEdit1->setEnabled(false);
}
+ else if (send == GroupWire->PushButton1) {
+ myEditCurrentArgument = GroupWire->LineEdit1;
+ }
// enable line edit
myEditCurrentArgument->setEnabled(true);
myEditCurrentArgument->setFocus();
- // after setFocus(), because it will be setDown(false) when loses focus
send->setDown(true);
-
- disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
- globalSelection(GEOM_POINT);
- connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
- this, SLOT(SelectionIntoArgument()));
-
- // seems we need it only to avoid preview disappearing, caused by selection mode change
displayPreview();
}
void BuildGUI_EdgeDlg::LineEditReturnPressed()
{
QLineEdit* send = (QLineEdit*)sender();
- if (send == GroupPoints->LineEdit1 || send == GroupPoints->LineEdit2) {
+ if (send == GroupPoints->LineEdit1 || send == GroupPoints->LineEdit2 || send == GroupWire->LineEdit1 ) {
myEditCurrentArgument = send;
GEOMBase_Skeleton::LineEditReturnPressed();
}
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) );
- displayPreview();
+ ConstructorsClicked( getConstructorId() );
}
//=================================================================================
// function : isValid
// purpose :
//=================================================================================
-bool BuildGUI_EdgeDlg::isValid (QString&)
+bool BuildGUI_EdgeDlg::isValid (QString& msg)
{
- return myOkPoint1 && myOkPoint2;
+ bool ok = false;
+ if ( getConstructorId() == 0 ) {
+ ok = !myPoint1->_is_nil() && !myPoint2->_is_nil();
+ }
+ else {
+ ok = !myWire->_is_nil();
+ ok = ok && GroupWire->SpinBox_DX->isValid( msg, !IsPreview() );
+ ok = ok && GroupWire->SpinBox_DY->isValid( msg, !IsPreview() );
+ }
+ return ok;
}
//=================================================================================
//=================================================================================
bool BuildGUI_EdgeDlg::execute (ObjectList& objects)
{
+ bool res = false;
+ GEOM::GEOM_Object_var anObj;
+
GEOM::GEOM_IShapesOperations_var anOper = GEOM::GEOM_IShapesOperations::_narrow( getOperation() );
- GEOM::GEOM_Object_var anObj = anOper->MakeEdge(myPoint1, myPoint2);
- if (!anObj->_is_nil())
- objects.push_back(anObj._retn());
+ switch ( getConstructorId() ) {
+ case 0 :
+ {
+ anObj = anOper->MakeEdge( myPoint1, myPoint2 );
+ res = true;
+ break;
+ }
+ case 1:
+ {
+ double aLinearTolerance = GroupWire->SpinBox_DX->value();
+ double anAngularTolerance = GroupWire->SpinBox_DY->value();
+
+ QStringList aParameters;
+ aParameters << GroupWire->SpinBox_DX->text();
+ aParameters << GroupWire->SpinBox_DY->text();
+
+ anObj = anOper->MakeEdgeWire( myWire, aLinearTolerance, anAngularTolerance );
+
+ if ( !anObj->_is_nil() && !IsPreview() )
+ anObj->SetParameters( aParameters.join(":").toLatin1().constData() );
+
+ res = true;
+ break;
+ }
+ }
- return true;
+ if ( !anObj->_is_nil() ) objects.push_back( anObj._retn() );
+
+ return res;
+}
+
+//=================================================================================
+// function : addSubshapeToStudy
+// purpose : virtual method to add new SubObjects if local selection
+//=================================================================================
+void BuildGUI_EdgeDlg::addSubshapesToStudy()
+{
+ QMap<QString, GEOM::GEOM_Object_var> objMap;
+ switch ( getConstructorId() ) {
+ case 0 :
+ objMap[GroupPoints->LineEdit1->text()] = myPoint1;
+ objMap[GroupPoints->LineEdit2->text()] = myPoint2;
+ break;
+ case 1 :
+ objMap[GroupWire->LineEdit1->text()] = myWire;
+ break;
+ }
+ addSubshapesToFather( objMap );
}
#include <GEOMBase_Skeleton.h>
+class DlgRef_1Sel2Spin;
class DlgRef_2Sel;
//=================================================================================
virtual GEOM::GEOM_IOperations_ptr createOperation();
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
+ virtual void addSubshapesToStudy();
private:
void Init();
void enterEvent( QEvent* );
private:
- GEOM::GEOM_Object_var myPoint1, myPoint2; /* Points containing the edge */
- bool myOkPoint1; /* true when myPoint is defined */
- bool myOkPoint2;
+ GEOM::GEOM_Object_var myPoint1, myPoint2; /* Points containing the edge */
+ GEOM::GEOM_Object_var myWire; /* Wire */
DlgRef_2Sel* GroupPoints;
+ DlgRef_1Sel2Spin* GroupWire;
private slots:
+ void ConstructorsClicked( int );
void ClickOnOk();
bool ClickOnApply();
void ActivateThisDialog();
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
initName( tr( "GEOM_SOLID" ) );
+ SelectionIntoArgument();
}
{
}
+//////////////////////////////////////////
+// DlgRef_2Sel1List2Check
+//////////////////////////////////////////
+
+DlgRef_2Sel1List2Check::DlgRef_2Sel1List2Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+ setupUi( this );
+}
+
+DlgRef_2Sel1List2Check::~DlgRef_2Sel1List2Check()
+{
+}
+
//////////////////////////////////////////
// DlgRef_2Sel1List
//////////////////////////////////////////
~DlgRef_2Sel1List1Check();
};
+//////////////////////////////////////////
+// DlgRef_2Sel1List2Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Sel1List2Check_QTD.h"
+
+class DLGREF_EXPORT DlgRef_2Sel1List2Check : public QWidget,
+ public Ui::DlgRef_2Sel1List2Check_QTD
+{
+ Q_OBJECT
+
+public:
+ DlgRef_2Sel1List2Check( QWidget* = 0, Qt::WindowFlags = 0 );
+ ~DlgRef_2Sel1List2Check();
+};
+
//////////////////////////////////////////
// DlgRef_2Sel1List
//////////////////////////////////////////
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_2Sel1List2Check_QTD</class>
+ <widget class="QWidget" name="DlgRef_2Sel1List2Check_QTD">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>127</width>
+ <height>140</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string/>
+ </property>
+ <layout class="QGridLayout">
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QGroupBox" name="GroupBox1">
+ <property name="title">
+ <string/>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="TextLabel1">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL1</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QPushButton" name="PushButton1">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QLineEdit" name="LineEdit1"/>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="TextLabel2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL2</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QPushButton" name="PushButton2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <widget class="QLineEdit" name="LineEdit2"/>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="TextLabel3">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL3</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" colspan="2">
+ <widget class="QComboBox" name="ComboBox1">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" colspan="3">
+ <widget class="QCheckBox" name="CheckButton1">
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0" colspan="3">
+ <widget class="QCheckBox" name="CheckButton2">
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <tabstops>
+ <tabstop>PushButton1</tabstop>
+ <tabstop>LineEdit1</tabstop>
+ <tabstop>PushButton2</tabstop>
+ <tabstop>LineEdit2</tabstop>
+ <tabstop>ComboBox1</tabstop>
+ <tabstop>CheckButton1</tabstop>
+ <tabstop>CheckButton2</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
ui_DlgRef_1SelExt_QTD.h \
ui_DlgRef_1Spin_QTD.h \
ui_DlgRef_2Sel1List1Check_QTD.h \
+ ui_DlgRef_2Sel1List2Check_QTD.h \
ui_DlgRef_2Sel1List_QTD.h \
ui_DlgRef_2Sel1Spin2Check_QTD.h \
ui_DlgRef_2Sel1Spin_QTD.h \
GEOM_Engine::~GEOM_Engine()
{
GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient It(_objects);
+ std::list< Handle(GEOM_Object) > objs;
for(; It.More(); It.Next())
- {
- RemoveObject(Handle(GEOM_Object)::DownCast(It.Value()));
- }
+ objs.push_back( Handle(GEOM_Object)::DownCast(It.Value()) );
+ std::list< Handle(GEOM_Object) >::iterator objit;
+ for(objit = objs.begin(); objit != objs.end(); ++objit)
+ RemoveObject(*objit);
//Close all documents not closed
for(Interface_DataMapIteratorOfDataMapOfIntegerTransient anItr(_mapIDDocument); anItr.More(); anItr.Next())
Handle(GEOM_Function) aFunction = theObject->GetFunction(1);
GEOM_ISubShape aSSI (aFunction);
Handle(GEOM_Function) aMainShape = aSSI.GetMainShape();
- aMainShape->RemoveSubShapeReference(aFunction);
+ //If main shape is not null, then remove
+ if(!aMainShape.IsNull())
+ aMainShape->RemoveSubShapeReference(aFunction);
}
int nb = theObject->GetNbFunctions();
//
#include <GEOMAlgo_WESCorrector.ixx>
+#include <Geom_Surface.hxx>
+
+#include <TopLoc_Location.hxx>
#include <TopoDS.hxx>
+
#include <TopoDS_Shape.hxx>
#include <TopoDS_Wire.hxx>
#include <TopoDS_Face.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
+#include <BRepAdaptor_Surface.hxx>
#include <TopTools_IndexedMapOfOrientedShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <GEOMAlgo_WireSplitter.hxx>
#include <GEOMAlgo_WESScaler.hxx>
-
static
void MakeWire(const TopTools_ListOfShape& aLE,
TopoDS_Wire& newWire);
-//modified by NIZNHY-PKV Thu Jun 10 11:26:55 2010f
+
static
Standard_Boolean IsToScale(const TopoDS_Face& aF,
Standard_Real& aScale);
-//modified by NIZNHY-PKV Thu Jun 10 11:27:02 2010t
+
//=======================================================================
// function:
// purpose:
}
//
if (bRegular) {
- TopExp::MapShapesAndAncestors(aER, TopAbs_VERTEX, TopAbs_EDGE, aMVER);
+ //modified by NIZNHY-PKV Wed Oct 20 14:45:52 2010f
+ const TopoDS_Edge& aEx=*((TopoDS_Edge*)&aER);
+ if (!BRep_Tool::Degenerated(aEx)) {
+ TopExp::MapShapesAndAncestors(aER, TopAbs_VERTEX, TopAbs_EDGE, aMVER);
+ }
+ //
+ //TopExp::MapShapesAndAncestors(aER, TopAbs_VERTEX, TopAbs_EDGE, aMVER);
+ //modified by NIZNHY-PKV Wed Oct 20 14:46:48 2010t
}
}//for (j=1; j<=aNbC; ++j) {
//
GEOMAlgo_WESScaler aWSC;
//
const TopoDS_Face& aF=myWES->Face();
- //modified by NIZNHY-PKV Thu Jun 10 11:27:45 2010f
+ //
bToScale=IsToScale(aF, aScale);
- //modified by NIZNHY-PKV Thu Jun 10 11:27:49 2010t
//
myNewWES.SetFace(aF);
aCBIt.Initialize(myConnexityBlocks);
//
GEOMAlgo_WireSplitter aWS;
//
- //modified by NIZNHY-PKV Thu Jun 10 10:40:43 2010f
if(bToScale) {
TopoDS_Shape aE;
TopTools_ListIteratorOfListOfShape aIt;
myNewWES.AddShape (aW);
}
}//if(bToScale)
- //modified by NIZNHY-PKV Thu Jun 10 10:40:48 2010t
//
else {
aWS.SetFace(aF);
}
}
//
-//modified by NIZNHY-PKV Thu Jun 10 11:14:09 2010f
-#include <Geom_Surface.hxx>
-#include <TopLoc_Location.hxx>
-#include <BRepAdaptor_Surface.hxx>
//=======================================================================
//function : IsToScale
}
return bRet;
}
-//modified by NIZNHY-PKV Thu Jun 10 11:14:12 2010t
// function : GetIORFromObject()
// purpose : returns IOR of a given GEOM_Object
//=======================================================================
-char* GEOMBase::GetIORFromObject( const GEOM::GEOM_Object_ptr& theObject )
+QString GEOMBase::GetIORFromObject( const GEOM::GEOM_Object_ptr& theObject )
{
if ( CORBA::is_nil( theObject ) )
return NULL;
static GEOM::GEOM_Object_ptr GetObjectFromIOR(const char* theIOR);
- static char* GetIORFromObject(const GEOM::GEOM_Object_ptr& theObject);
+ static QString GetIORFromObject(const GEOM::GEOM_Object_ptr& theObject);
/* Geometry */
static bool VertexToPoint(const TopoDS_Shape& S, gp_Pnt& P);
void GEOMBase_Helper::erase( GEOM::GEOM_Object_ptr object, const bool updateView )
{
if ( !object->_is_nil() ) {
- std::string entry = getEntry( object );
+ QString entry = getEntry( object );
getDisplayer()->Erase( new SALOME_InteractiveObject(
- entry.c_str(), "GEOM", strdup( GEOMBase::GetName( object ).toLatin1().constData() ) ), true, updateView );
+ entry.toLatin1().constData(),
+ "GEOM", strdup( GEOMBase::GetName( object ).toLatin1().constData() ) ), true, updateView );
}
}
// Enable activisation of selection
getDisplayer()->SetToActivate( true );
- std::string entry = getEntry( object );
+ QString entry = getEntry( object );
getDisplayer()->Redisplay(new SALOME_InteractiveObject
- (entry.c_str(), "GEOM", strdup(GEOMBase::GetName(object).toLatin1().constData())), false);
+ (entry.toLatin1().constData(), "GEOM", strdup(GEOMBase::GetName(object).toLatin1().constData())), false);
}
if ( withChildren ) {
(GeometryGUI::ClientSObjectToObject(anIt->Value()));
if ( !CORBA::is_nil( aChild ) ) {
if ( !aChild->_is_nil() ) {
- std::string entry = getEntry( aChild );
+ QString entry = getEntry( aChild );
getDisplayer()->Redisplay( new SALOME_InteractiveObject(
- entry.c_str(), "GEOM", strdup( GEOMBase::GetName( aChild ).toLatin1().constData() ) ), false );
+ entry.toLatin1().constData(), "GEOM", strdup( GEOMBase::GetName( aChild ).toLatin1().constData() ) ), false );
}
}
}
GEOM::GEOM_Object_ptr anObj = *anIter;
if ( anObj->_is_nil() )
continue;
- std::string aEntry = getEntry( anObj );
- if ( aEntry != "" )
+ QString anEntry = getEntry( anObj );
+ if ( anEntry != "" )
aListOfIO.Append( new SALOME_InteractiveObject(
- aEntry.c_str(), "GEOM", strdup( GEOMBase::GetName( anObj ).toLatin1().constData() ) ) );
+ anEntry.toLatin1().constData(), "GEOM", strdup( GEOMBase::GetName( anObj ).toLatin1().constData() ) ) );
}
getDisplayer()->LocalSelection( aListOfIO, theMode );
// Function : getEntry
// Purpose :
//================================================================
-char* GEOMBase_Helper::getEntry( GEOM::GEOM_Object_ptr object ) const
+QString GEOMBase_Helper::getEntry( GEOM::GEOM_Object_ptr object ) const
{
SalomeApp_Study* study = getStudy();
if ( study ) {
- char * objIOR = GEOMBase::GetIORFromObject( object );
- std::string IOR( objIOR );
- free( objIOR );
- if ( IOR != "" ) {
- _PTR(SObject) SO ( study->studyDS()->FindObjectIOR( IOR ) );
- if ( SO ) {
- return (char*) TCollection_AsciiString((char*)SO->GetID().c_str()).ToCString();
- }
+ QString objIOR = GEOMBase::GetIORFromObject( object );
+ if ( objIOR != "" ) {
+ _PTR(SObject) SO ( study->studyDS()->FindObjectIOR( objIOR.toLatin1().constData() ) );
+ if ( SO )
+ return QString::fromStdString(SO->GetID());
}
}
- return (char*)"";
+ return "";
}
//================================================================
ObjectList::iterator anIter;
for ( anIter = objects.begin(); anIter != objects.end(); ++anIter )
{
- std::string entry = getEntry( *anIter );
- QString aEntry( entry.c_str() );
- LightApp_DataOwner* anOwher = new LightApp_DataOwner( aEntry );
+ QString anEntry = getEntry( *anIter );
+ LightApp_DataOwner* anOwher = new LightApp_DataOwner( anEntry );
aList.append( anOwher );
}
dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
_PTR(Study) aDStudy = appStudy->studyDS();
- std::string IOR = GEOMBase::GetIORFromObject( theFather );
- _PTR(SObject) SObj ( aDStudy->FindObjectIOR( IOR ) );
+ QString IOR = GEOMBase::GetIORFromObject( theFather );
+ _PTR(SObject) SObj ( aDStudy->FindObjectIOR( IOR.toLatin1().constData() ) );
bool inStudy = false;
GEOM::GEOM_Object_var aReturnObject;
if ( !anOp->_is_nil() ) {
GEOM::GEOM_Object_var aFatherObj = anOp->GetMainShape( it.value() );
if ( !aFatherObj->_is_nil() ) {
- std::string aFatherEntry = getEntry( aFatherObj );
+ QString aFatherEntry = getEntry( aFatherObj );
if ( aFatherEntry != "") { // additional checking that object is valid 0020598 EDF 1191
GEOM::GEOM_Object_var aFindedObject = findObjectInFather(aFatherObj, it.key().toLatin1().data() );
//Add Object to study if its not exist
- if ( aFindedObject->_is_nil() )
+ if ( aFindedObject->_is_nil() )
GeometryGUI::GetGeomGen()->AddInStudy(GeometryGUI::ClientStudyToStudy(aDStudy),
it.value(), it.key().toLatin1().data(), aFatherObj );
}
SUIT_Desktop* getDesktop() const;
private:
- char* getEntry ( GEOM::GEOM_Object_ptr ) const;
+ QString getEntry( GEOM::GEOM_Object_ptr ) const;
void clearShapeBuffer( GEOM::GEOM_Object_ptr );
private:
<source>ICON_DLG_BUILD_EDGE</source>
<translation>build_edge.png</translation>
</message>
+ <message>
+ <source>ICON_DLG_BUILD_EDGE_WIRE</source>
+ <translation>build_edge_wire.png</translation>
+ </message>
<message>
<source>ICON_DLG_BUILD_FACE</source>
<translation>build_face.png</translation>
<source>GEOM_CENTER</source>
<translation>Center</translation>
</message>
+ <message>
+ <source>GEOM_CENTER_DEFAULT</source>
+ <translation>(Origin by default)</translation>
+ </message>
<message>
<source>GEOM_CENTER_POINT</source>
<translation>Center Point</translation>
</message>
+
<message>
<source>GEOM_CENTRAL_POINT</source>
<translation>Central Point</translation>
</message>
<message>
<source>GEOM_EXTRUSION_BSV</source>
- <translation>Base Shape + Vector</translation>
+ <translation>Base Shapes + Vector</translation>
</message>
<message>
<source>GEOM_EXTRUSION_BSV_2P</source>
- <translation>Base Shape + 2 Points</translation>
+ <translation>Base Shapes + 2 Points</translation>
</message>
<message>
<source>GEOM_EXTRUSION_DXDYDZ</source>
- <translation>Base Shape + DX DY DZ Vector</translation>
+ <translation>Base Shapes + DX DY DZ Vector</translation>
</message>
<message>
<source>GEOM_EXTRUSION_TITLE</source>
<source>GEOM_TOLERANCE</source>
<translation>Tolerance</translation>
</message>
+ <message>
+ <source>GEOM_LINEAR_TOLERANCE</source>
+ <translation>Linear Tolerance</translation>
+ </message>
+ <message>
+ <source>GEOM_ANGULAR_TOLERANCE</source>
+ <translation>Angular Tolerance</translation>
+ </message>
<message>
<source>GEOM_TOLERANCE_CONSTR</source>
<translation>Object And Its Tolerances</translation>
<source>GEOM_VECTOR</source>
<translation>Vector</translation>
</message>
+ <message>
+ <source>GEOM_AXIS_DEFAULT</source>
+ <translation>(Z axis by default)</translation>
+ </message>
+
<message>
<source>GEOM_VECTOR_LENGTH</source>
<translation>Vector Length :</translation>
<source>GEOM_KEEP_NONLIMIT_SHAPES</source>
<translation>Keep shapes of lower type</translation>
</message>
+ <message>
+ <source>GEOM_NO_SELF_INTERSECTION</source>
+ <translation>No sub-shapes intersection (Compounds only)</translation>
+ </message>
<message>
<source>GEOM_CENTER_2POINTS</source>
<translation>Center and two points</translation>
<source>JUNCTION_FACE_3</source>
<translation>Junction 3</translation>
</message>
+ <message>
+ <source>GEOM_PLUGINS_OTHER</source>
+ <translation>Other</translation>
+ </message>
</context>
<context>
<name>BasicGUI_CurveDlg</name>
<source>REMOVE</source>
<translation>Remove</translation>
</message>
+ <message>
+ <source>SHOW_ONLY_SELECTED</source>
+ <translation>Show only selected</translation>
+ </message>
+ <message>
+ <source>HIDE_SELECTED</source>
+ <translation>Hide selected</translation>
+ </message>
+ <message>
+ <source>SHOW_ALL_SUB_SHAPES</source>
+ <translation>Show all sub-shapes</translation>
+ </message>
<message>
<source>SELECT_ALL</source>
<translation>Select All</translation>
</message>
<message>
<source>CLOSE_CONTOUR_NEW_OBJ_NAME</source>
- <translation>FermerContour</translation>
+ <translation>ContourFerme</translation>
</message>
<message>
<source>DEP_OBJECT</source>
<message>
<source>ERROR_SHAPE_TYPE</source>
<translation>Le type de l'objet choisi n'est pas correct!
-Choisissez face, coque ou solide et essayez de nouveau</translation>
+Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
</message>
<message>
<source> iErr : 10</source>
</message>
<message>
<source> iErr : 12</source>
- <translation>Un type de sous-forme pas authorisé</translation>
+ <translation>Type d'objet non autoriqé</translation>
</message>
<message>
<source> iErr : 13</source>
- <translation>Cet état n'est pas authorisé</translation>
+ <translation>Cet état n'est pas autorisé</translation>
</message>
<message>
<source> iErr : 15</source>
- <translation>Ce type de surface n'est pas authorisé</translation>
+ <translation>Ce type de surface n'est pas autorisé</translation>
</message>
<message>
<source> iErr : 20</source>
</message>
<message>
<source>GEOM_ARC_TITLE</source>
- <translation>Construction Arc </translation>
+ <translation>Construction d'un arc </translation>
</message>
<message>
<source>GEOM_ARGUMENTS</source>
</message>
<message>
<source>GEOM_AXE_MIRROR</source>
- <translation>Axe Miroir</translation>
+ <translation>Axe de symétrie</translation>
</message>
<message>
<source>GEOM_AXIS</source>
</message>
<message>
<source>GEOM_BLOCK</source>
- <translation>Solide Hexahédral</translation>
+ <translation>Solide Hexaédrique</translation>
</message>
<message>
<source>GEOM_BLOCKS_COMPOUND</source>
</message>
<message>
<source>GEOM_BLOCK_TITLE</source>
- <translation>Construction d'un Solide Hexahédral </translation>
+ <translation>Construction d'un solide hexaédrique</translation>
</message>
<message>
<source>GEOM_BNDBOX</source>
- <translation>Boîte Englonante</translation>
+ <translation>Boîte Englobante</translation>
</message>
<message>
<source>GEOM_BNDBOX_OBJDIM</source>
</message>
<message>
<source>GEOM_BOX_TITLE</source>
- <translation>Construction d'une Boite </translation>
+ <translation>Construction d'une Boîte </translation>
</message>
<message>
<source>GEOM_BSplineRestriction</source>
</message>
<message>
<source>GEOM_BUT_CLOSE_SKETCH</source>
- <translation>Renfermer le Contour</translation>
+ <translation>Fermer le contour et valider</translation>
</message>
<message>
<source>GEOM_BUT_END_SKETCH</source>
- <translation>Valider le Contour</translation>
+ <translation>Valider l'esquisse</translation>
</message>
<message>
<source>GEOM_BUT_EXPLODE</source>
- <translation>&Eclatement</translation>
+ <translation>&Eclater</translation>
</message>
<message>
<source>GEOM_BUT_HELP</source>
<source>GEOM_CENTER</source>
<translation>Centre</translation>
</message>
+ <message>
+ <source>GEOM_CENTER_DEFAULT</source>
+ <translation> (Origine par défaut)</translation>
+ </message>
<message>
<source>GEOM_CENTER_POINT</source>
<translation>Point Central </translation>
</message>
<message>
<source>GEOM_CHAMFER_TITLE</source>
- <translation>Construction d'un Chanfrain</translation>
+ <translation>Construction d'un Chanfrein</translation>
</message>
<message>
<source>GEOM_CHANGE_ORIENTATION</source>
- <translation>Les objets à changer l'orientation</translation>
+ <translation>Objets à modifier</translation>
</message>
<message>
<source>GEOM_CHANGE_ORIENTATION_TITLE</source>
</message>
<message>
<source>GEOM_CHECK_BLOCKS_COMPOUND</source>
- <translation>Check and Improve Blocks Compound</translation>
+ <translation>Controler un Assemblage de Blocs</translation>
</message>
<message>
<source>GEOM_CHECK_BLOCKS_COMPOUND_FAILED</source>
- <translation>Vérification n'a pas abouti</translation>
+ <translation>La vérification n'a pas abouti</translation>
</message>
<message>
<source>GEOM_CHECK_BLOCKS_COMPOUND_ERRORS</source>
</message>
<message>
<source>GEOM_CHECK_BLOCKS_COMPOUND_HAS_ERRORS</source>
- <translation>Il y a d'erreurs dans l'Assemblage des Bloques</translation>
+ <translation>L'Assemblage de Blocs contient des erreurs</translation>
</message>
<message>
<source>GEOM_CHECK_BLOCKS_COMPOUND_HAS_NO_ERRORS</source>
- <translation>Il n'y a pas d'erreurs dans l'Assemblage des Bloques</translation>
+ <translation>L'Assemblage de Blocs n'a pas d'erreur</translation>
</message>
<message>
<source>GEOM_CHECK_BLOCKS_COMPOUND_SUBSHAPES</source>
- <translation>Sous-Formes augmentées</translation>
+ <translation>Sous-objets incriminés</translation>
</message>
<message>
<source>GEOM_CHECK_INFOS</source>
</message>
<message>
<source>GEOM_CHECK_SHAPE</source>
- <translation>Vérifier la forme</translation>
+ <translation>Contrôler un objet</translation>
</message>
<message>
<source>GEOM_CHECK_TITLE</source>
- <translation>Vérifier l'Information de la Forme</translation>
+ <translation>Contrôler la validité de l'objet</translation>
</message>
<message>
<source>GEOM_CIRCLE</source>
</message>
<message>
<source>GEOM_CIRCLE_TITLE</source>
- <translation>Construction d'un Circle </translation>
+ <translation>Construction d'un Cercle</translation>
</message>
<message>
<source>GEOM_CLOSECONTOUR_TITLE</source>
</message>
<message>
<source>GEOM_CMASS</source>
- <translation>Centre de la Masse</translation>
+ <translation>Centre de Gravité</translation>
</message>
<message>
<source>GEOM_CMASS_TITLE</source>
- <translation>Construction du Centre de la Masse </translation>
+ <translation>Construction du Centre de Gravité</translation>
</message>
<message>
<source>GEOM_COMMON</source>
- <translation>Commun</translation>
+ <translation>Intersection</translation>
</message>
<message>
<source>GEOM_COMMON_TITLE</source>
- <translation>Commun de deux Objets</translation>
+ <translation>Intersection de deux Objets</translation>
</message>
<message>
<source>GEOM_COMPOUND</source>
</message>
<message>
<source>GEOM_CONFIRM_INFO</source>
- <translation>La forme contient %1 sous-formes !</translation>
+ <translation>L'objet contient %1 sous-objets !</translation>
</message>
<message>
<source>GEOM_COOR</source>
</message>
<message>
<source>GEOM_CREATE_SINGLE_SOLID</source>
- <translation>Créer un solide</translation>
+ <translation>Créer un solide unique</translation>
</message>
<message>
<source>GEOM_CURVE</source>
</message>
<message>
<source>GEOM_DETECT</source>
- <translation>Detecter</translation>
+ <translation>Détecter</translation>
</message>
<message>
<source>GEOM_DIAGONAL_POINTS</source>
</message>
<message>
<source>GEOM_DropSmallEdges</source>
- <translation>OmettreArêtesMineures</translation>
+ <translation>ArêtesMineuresOmises</translation>
</message>
<message>
<source>GEOM_EDGE</source>
</message>
<message>
<source>GEOM_ELLIPSE_ERROR_1</source>
- <translation>Impossible de créer un ellipse: le rayon mineur est plus que le rayon majeur.</translation>
+ <translation>Impossible de créer un ellipse: le demi petit axe est plus grand que le demi grand axe.</translation>
</message>
<message>
<source>GEOM_ELLIPSE_TITLE</source>
- <translation>Construction d'un Ellipse </translation>
+ <translation>Construction d'une Ellipse </translation>
</message>
<message>
<source>GEOM_END_LCS</source>
</message>
<message>
<source>GEOM_EXTRUSION_BSV</source>
- <translation>Forme de Base + Vecteur</translation>
+ <translation>Formes de Base + Vecteur</translation>
</message>
<message>
<source>GEOM_EXTRUSION_BSV_2P</source>
- <translation>Forme de Base + 2 Points</translation>
+ <translation>Formes de Base + 2 Points</translation>
</message>
<message>
<source>GEOM_EXTRUSION_DXDYDZ</source>
- <translation>Forme de Base + Vecteur DX DY DZ</translation>
+ <translation>Formes de Base + Vecteur DX DY DZ</translation>
</message>
<message>
<source>GEOM_EXTRUSION_TITLE</source>
</message>
<message>
<source>GEOM_GCS</source>
- <translation>Système de Coordonnées Globale</translation>
+ <translation>Système de Coordonnées Global</translation>
</message>
<message>
<source>GEOM_LCS</source>
- <translation>Système de Coordonnées Locale</translation>
+ <translation>Système de Coordonnées Local</translation>
</message>
<message>
<source>GEOM_FACES</source>
</message>
<message>
<source>GEOM_FACE_OPT</source>
- <translation>Privilégier la création d'une face planaire</translation>
+ <translation>Privilégier la création d'une face plane</translation>
</message>
<message>
<source>GEOM_FACE_OR_LCS</source>
</message>
<message>
<source>GEOM_FREE_BOUNDS_ERROR</source>
- <translation>L'objet n'est pas choisi</translation>
+ <translation>L'objet n'est pas sélectionné</translation>
</message>
<message>
<source>GEOM_FREE_BOUNDS_MSG</source>
</message>
<message>
<source>GEOM_FUSE</source>
- <translation>Fusion</translation>
+ <translation>Union</translation>
</message>
<message>
<source>GEOM_FUSE_TITLE</source>
- <translation>Fusionner deux Objets</translation>
+ <translation>Réunir deux Objets</translation>
</message>
<message>
<source>GEOM_FixFaceSize</source>
- <translation>FixerFaceTaille</translation>
+ <translation>TailleFaceRepare</translation>
</message>
<message>
<source>GEOM_FixShape</source>
- <translation>FixerForme</translation>
+ <translation>ObjetRepare</translation>
</message>
<message>
<source>GEOM_GLUE</source>
- <translation>Coller</translation>
+ <translation>Recoller</translation>
</message>
<message>
<source>GEOM_GLUE_TITLE</source>
- <translation>Coller des faces</translation>
+ <translation>Recollement de faces</translation>
</message>
<message>
<source>GEOM_LIMIT_TOLERANCE_TITLE</source>
- <translation>Tolérance limite</translation>
+ <translation>Limiter la tolérance</translation>
</message>
<message>
<source>GEOM_HEIGHT</source>
</message>
<message>
<source>GEOM_IDENTICAL_NAMES_SELECT_BY_MOUSE</source>
- <translation>Noms Identiques : choisir par souris !</translation>
+ <translation>Noms Identiques : sélectionner à la souris !</translation>
</message>
<message>
<source>GEOM_IMPORT</source>
</message>
<message>
<source>GEOM_INCORRECT_INPUT</source>
- <translation>Les données d'entrée ne sont pas correctes!</translation>
+ <translation>Les données d'entrée ne sont pas valides!</translation>
</message>
<message>
<source>GEOM_INERTIA_CONSTR</source>
</message>
<message>
<source>GEOM_INERTIA_TITLE</source>
- <translation>Calcul d'Inertie</translation>
+ <translation>Calcul de l'Inertie</translation>
</message>
<message>
<source>GEOM_INF_LOADED</source>
- <translation>Fichier %1 est ouvert.</translation>
+ <translation>Le fichier %1 est ouvert.</translation>
</message>
<message>
<source>GEOM_INTERNAL_WIRES</source>
</message>
<message>
<source>GEOM_KEEP_OBJECT</source>
- <translation>Préserver l'Objet</translation>
+ <translation>Garder l'Objet</translation>
</message>
<message>
<source>GEOM_LENGTH</source>
</message>
<message>
<source>GEOM_MEN_ISOS</source>
- <translation>Choisir le numéro d'Isolignes</translation>
+ <translation>Choisir le nombre d'Isolignes</translation>
</message>
<message>
<source>GEOM_MEN_ISOU</source>
</message>
<message>
<source>GEOM_MEN_WIREFRAME</source>
- <translation>Contours</translation>
+ <translation>Filaire</translation>
</message>
<message>
<source>GEOM_MEN_X</source>
</message>
<message>
<source>GEOM_NAME_INCORRECT</source>
- <translation>Le nom de l'Objet n'est pas trouvé</translation>
+ <translation>Le nom de l'Objet n'a pas été trouvé</translation>
</message>
<message>
<source>GEOM_NB_BLOCKS_NO_OTHERS</source>
- <translation>Il y a %1 bloques spécifiées et PAS d'autres solides</translation>
+ <translation>Il y a %1 bloques spécifiés et PAS d'autres solides</translation>
</message>
<message>
<source>GEOM_NB_BLOCKS_SOME_OTHERS</source>
- <translation>Il y a %1 bloques spécifiées et un nombre d'autres solides</translation>
+ <translation>Il y a %1 bloques spécifiés et d'autres solides</translation>
</message>
<message>
<source>GEOM_NB_TIMES</source>
</message>
<message>
<source>GEOM_NUM_SPLIT_POINTS</source>
- <translation>Numéro de points de coupage</translation>
+ <translation>Nombre de points de découpe</translation>
</message>
<message>
<source>GEOM_OBJECT</source>
</message>
<message>
<source>GEOM_OFFSET_TITLE</source>
- <translation>Surface de Décalage</translation>
+ <translation>Décaler une surface</translation>
</message>
<message>
<source>GEOM_OPERATIONS</source>
</message>
<message>
<source>GEOM_ORIENTATION_OPT</source>
- <translation>Invertir l'Orientation et simuler les vecturs normaux</translation>
+ <translation>Inverser l'Orientation et simuler les vecteurs normaux</translation>
</message>
<message>
<source>GEOM_ORIENTATION_TITLE</source>
</message>
<message>
<source>GEOM_POINT_ON_EDGE</source>
- <translation>Point sur l'Arête</translation>
+ <translation>Créer un point sur une arête</translation>
</message>
<message>
<source>GEOM_POINT_ON_FACE</source>
- <translation>Point sur la Face</translation>
+ <translation>Créer un point sur une face</translation>
</message>
<message>
<source>GEOM_PARAM_VALUE</source>
</message>
<message>
<source>GEOM_WRN_PARTITION_RESULT_EMPTY</source>
- <translation>The partition result is empty, please verify the reconstruction limit parameter.</translation>
+ <translation>Le résultat de la partition est vide, verifiez le paramètre limite de reconstruction</translation>
</message>
<message>
<source>GEOM_PARTITION_HALFSPACE</source>
</message>
<message>
<source>GEOM_PARTITION_TITLE</source>
- <translation>Partition d'un Objet avec Outil</translation>
+ <translation>Partition d'un Objet avec un Outil</translation>
</message>
<message>
<source>GEOM_PATH_OBJECT</source>
- <translation>Chemin à l'Objet</translation>
+ <translation>Chemin</translation>
</message>
<message>
<source>GEOM_PIPE</source>
</message>
<message>
<source>GEOM_SEGMENT</source>
- <translation>Segment d'une ligne droite</translation>
+ <translation>Segment de droite</translation>
</message>
<message>
<source>GEOM_SELECT_UNPUBLISHED_EDGES</source>
</message>
<message>
<source>GEOM_POLYLINE</source>
- <translation>Polyline</translation>
+ <translation>Ligne brisée</translation>
</message>
<message>
<source>GEOM_POSITION</source>
- <translation>Location</translation>
+ <translation>Position</translation>
</message>
<message>
<source>GEOM_POSITION_TITLE</source>
</message>
<message>
<source>GEOM_PROPAGATE</source>
- <translation>Propaguer</translation>
+ <translation>Propager</translation>
</message>
<message>
<source>GEOM_PROPAGATE_TITLE</source>
- <translation>Propaguer</translation>
+ <translation>Propager</translation>
</message>
<message>
<source>GEOM_PROPERTIES</source>
</message>
<message>
<source>GEOM_PROPERTIES_CONSTR</source>
- <translation>L'Objet et ses Propriétés</translation>
+ <translation>Objet et ses Propriétés</translation>
</message>
<message>
<source>GEOM_PROPERTIES_SURFACE</source>
- <translation>Surface est :</translation>
+ <translation>Surface :</translation>
</message>
<message>
<source>GEOM_PROPERTIES_TITLE</source>
- <translation>Information sur les Propriétés de Base</translation>
+ <translation>Propriétés de Base</translation>
</message>
<message>
<source>GEOM_PROPERTIES_VOLUME</source>
- <translation>Volume est :</translation>
+ <translation>Volume :</translation>
</message>
<message>
<source>GEOM_PRP_ABORT</source>
- <translation>Opération est annulée</translation>
+ <translation>L'Opération a été annulée</translation>
</message>
<message>
<source>GEOM_PRP_COMMAND</source>
</message>
<message>
<source>GEOM_PRP_DONE</source>
- <translation>Opération aboutie</translation>
+ <translation>L'Opération a abouti</translation>
</message>
<message>
<source>GEOM_PRP_EXPORT</source>
</message>
<message>
<source>GEOM_PRP_LOADING</source>
- <translation>Ouvrir %1 ...</translation>
+ <translation>Charger %1 ...</translation>
</message>
<message>
<source>GEOM_PRP_MIN_DIST</source>
</message>
<message>
<source>GEOM_PRP_NOT_FOR_VTK_VIEWER</source>
- <translation>Interdit au visualisateur VTK</translation>
+ <translation>Interdit dans le visualiseur VTK</translation>
</message>
<message>
<source>GEOM_PRP_NULLSHAPE</source>
</message>
<message>
<source>GEOM_PRP_SELECT_EDGE</source>
- <translation>Choisissez les arêtes et cliquez Appliquer</translation>
+ <translation>Choisissez les arêtes et cliquez sur Appliquer</translation>
</message>
<message>
<source>GEOM_PRP_SELECT_FACE</source>
- <translation>Choisissez les faces à supprimer et cliquez Oui/Appliquer</translation>
+ <translation>Choisissez les faces à supprimer et cliquez sur Oui/Appliquer</translation>
</message>
<message>
<source>GEOM_PRP_SELECT_FIRST</source>
</message>
<message>
<source>GEOM_PRP_SELECT_SUBSHAPES</source>
- <translation>Choisissez les Sous-Formes</translation>
+ <translation>Choisissez les Sous-Objets</translation>
</message>
<message>
<source>GEOM_PRP_SHAPE_IN_STUDY</source>
</message>
<message>
<source>GEOM_RADIUS_MAJOR</source>
- <translation>Rayon Majeur :</translation>
+ <translation>Demi grand axe :</translation>
</message>
<message>
<source>GEOM_RADIUS_MINOR</source>
- <translation>Rayon Mineur :</translation>
+ <translation>Demi petit axe :</translation>
</message>
<message>
<source>GEOM_RECONSTRUCTION_LIMIT</source>
</message>
<message>
<source>GEOM_REQUIRED_NUM_SEGMENTS</source>
- <translation>Le nombre de segments approprié</translation>
+ <translation>Nombre de segments requis</translation>
</message>
<message>
<source>GEOM_REVERSE</source>
- <translation>Invertir</translation>
+ <translation>Inverser</translation>
</message>
<message>
<source>GEOM_REVERSE_DIRECTION</source>
- <translation>Direction Invertie</translation>
+ <translation>Inverser la direction</translation>
</message>
<message>
<source>GEOM_REVERSE_PLANE</source>
- <translation>Invertir le normal du plan</translation>
+ <translation>Inverser la normale du plan</translation>
</message>
<message>
<source>GEOM_REVERSE_U</source>
- <translation>Invertir U</translation>
+ <translation>Inverser U</translation>
</message>
<message>
<source>GEOM_REVERSE_V</source>
- <translation>Invertir V</translation>
+ <translation>inverser V</translation>
</message>
<message>
<source>GEOM_REVERSE_VECTOR</source>
- <translation>Invertir un Vecteur</translation>
+ <translation>Inverser un vecteur</translation>
</message>
<message>
<source>GEOM_REVOLUTION</source>
</message>
<message>
<source>GEOM_REVOLUTION_TITLE</source>
- <translation>Construction par Révolution</translation>
+ <translation>Construction par révolution</translation>
</message>
<message>
<source>GEOM_ROTATION</source>
</message>
<message>
<source>GEOM_ROTATION_TITLE</source>
- <translation>Rotation d'un Objet</translation>
+ <translation>Rotation d'un objet</translation>
</message>
<message>
<source>GEOM_SCALE</source>
</message>
<message>
<source>GEOM_SCALE_TITLE</source>
- <translation>Redimensionner un Objet</translation>
+ <translation>Redimensionner un objet</translation>
</message>
<message>
<source>GEOM_SECTION</source>
</message>
<message>
<source>GEOM_SECTION_TITLE</source>
- <translation>Section de deux Objets</translation>
+ <translation>Section de deux objets</translation>
</message>
<message>
<source>GEOM_SELECTED_FACE</source>
- <translation>Face Sélectionnée </translation>
+ <translation>Face sélectionnée </translation>
</message>
<message>
<source>GEOM_SELECTED_OBJECTS</source>
- <translation>Objets Sélectionnées</translation>
+ <translation>Objets sélectionnés</translation>
</message>
<message>
<source>GEOM_SELECTED_SHAPE</source>
- <translation>Forme Sélectionné </translation>
+ <translation>Forme sélectionnée </translation>
</message>
<message>
<source>GEOM_SELECTION</source>
</message>
<message>
<source>GEOM_SEWING_TITLE</source>
- <translation>Couture Topologique</translation>
+ <translation>Couture topologique</translation>
</message>
<message>
<source>GEOM_SHAPE</source>
</message>
<message>
<source>GEOM_SHAPEPROCESS_TITLE</source>
- <translation>Traitement de Formes</translation>
+ <translation>Traitement de formes</translation>
</message>
<message>
<source>GEOM_SHAPES</source>
</message>
<message>
<source>GEOM_SHELL_TITLE</source>
- <translation>Construction d'une Coque</translation>
+ <translation>Construction d'une coque</translation>
</message>
<message>
<source>GEOM_SKETCHER_ABS</source>
- <translation>Absolues</translation>
+ <translation>Absolu</translation>
</message>
<message>
<source>GEOM_SKETCHER_ANGLE</source>
</message>
<message>
<source>GEOM_SKETCHER_APPLY</source>
- <translation>Applquer</translation>
+ <translation>Appliquer</translation>
</message>
<message>
<source>GEOM_SKETCHER_ARC</source>
</message>
<message>
<source>GEOM_SKETCHER_EL</source>
- <translation>Type d'Elément </translation>
+ <translation>Type d'élément </translation>
</message>
<message>
<source>GEOM_SKETCHER_RESTORE</source>
</message>
<message>
<source>GEOM_SKETCHER_REL</source>
- <translation>Relatives</translation>
+ <translation>Relatif</translation>
</message>
<message>
<source>GEOM_SKETCHER_SEGMENT</source>
</message>
<message>
<source>GEOM_SKETCHER_TITLE</source>
- <translation>Construction d'un Contour 2D </translation>
+ <translation>Construction d'une esquisse 2D </translation>
</message>
<message>
<source>GEOM_3DSKETCHER_TITLE</source>
- <translation>Construction d'un Contour 3D </translation>
+ <translation>Construction d'une esquisse 3D </translation>
</message>
<message>
<source>GEOM_SKETCHER_TYPE</source>
</message>
<message>
<source>GEOM_SKETCHER_UNDO</source>
- <translation>Défaire</translation>
+ <translation>Revenir</translation>
</message>
<message>
<source>GEOM_SKETCHER_VALUES</source>
</message>
<message>
<source>GEOM_3DSKETCHER</source>
- <translation>Contour 3D</translation>
+ <translation>Esquisse 3D</translation>
</message>
<message>
<source>GEOM_COORDINATES_TYPE</source>
- <translation>Type de Coordonnées</translation>
+ <translation>Type de coordonnées</translation>
</message>
<message>
<source>GEOM_SOLID</source>
</message>
<message>
<source>GEOM_SOLID_TITLE</source>
- <translation>Construction d'un Solide</translation>
+ <translation>Construction d'un solide</translation>
</message>
<message>
<source>GEOM_SPHERE</source>
</message>
<message>
<source>GEOM_SPHERE_RO</source>
- <translation>Rayon d'Origine</translation>
+ <translation>Rayon (centre à l'origine)</translation>
</message>
<message>
<source>GEOM_SPHERE_TITLE</source>
- <translation>Construction d'une Sphère</translation>
+ <translation>Construction d'une sphère</translation>
</message>
<message>
<source>GEOM_SPLINE</source>
</message>
<message>
<source>GEOM_SPLINE_TITLE</source>
- <translation>Construction d'un Spline</translation>
+ <translation>Construction d'un spline</translation>
</message>
<message>
<source>GEOM_START_LCS</source>
</message>
<message>
<source>GEOM_SUBSHAPE_SELECT</source>
- <translation>Choisir les Sous-Formes</translation>
+ <translation>Choisir les sous-objets</translation>
</message>
<message>
<source>GEOM_SUBSHAPE_TITLE</source>
- <translation>Sélection des Sous-formes</translation>
+ <translation>Sélection des sous-objets</translation>
</message>
<message>
<source>GEOM_SUBSHAPE_TYPE</source>
- <translation>Type des Sous-formes:</translation>
+ <translation>Type des sous-objets:</translation>
</message>
<message>
<source>GEOM_SUB_SHAPE</source>
- <translation>Sous-Formes</translation>
+ <translation>Sous-objets</translation>
</message>
<message>
<source>GEOM_SUPPRESSHOLE_FACE_SHELL</source>
</message>
<message>
<source>GEOM_SUPPRESS_RESULT</source>
- <translation>Supprimer le Résultat</translation>
+ <translation>Supprimer le résultat</translation>
</message>
<message>
<source>GEOM_SUPPRESS_RESULT_INSIDE</source>
</message>
<message>
<source>GEOM_SUPRESSFACE_TITLE</source>
- <translation>Supprimer les Faces d'un Objet</translation>
+ <translation>Supprimer les faces d'un objet</translation>
</message>
<message>
<source>GEOM_SURFACE_CONTINUTY</source>
- <translation>Continuité des Surfaces</translation>
+ <translation>Continuité des surfaces</translation>
</message>
<message>
<source>GEOM_SURFACE_MODE</source>
</message>
<message>
<source>GEOM_SURFCONE</source>
- <translation>Face Conique </translation>
+ <translation>Face conique </translation>
</message>
<message>
<source>GEOM_SURFCYLINDER</source>
- <translation>Face Cylindrique </translation>
+ <translation>Face cylindrique </translation>
</message>
<message>
<source>GEOM_SURFSPHERE</source>
- <translation>Face Sphèrique</translation>
+ <translation>Face sphérique</translation>
</message>
<message>
<source>GEOM_SURFTORUS</source>
- <translation>Face Toroïdal </translation>
+ <translation>Face toroïdale </translation>
</message>
<message>
<source>GEOM_SameParameter</source>
<source>GEOM_TOLERANCE</source>
<translation>Tolérance</translation>
</message>
+ <message>
+ <source>GEOM_LINEAR_TOLERANCE</source>
+ <translation>Tolérance linéaire</translation>
+ </message>
+ <message>
+ <source>GEOM_ANGULAR_TOLERANCE</source>
+ <translation>Tolérance angulaire</translation>
+ </message>
<message>
<source>GEOM_TOLERANCE_CONSTR</source>
- <translation>Objet et ses Tolérances</translation>
+ <translation>Objet et ses tolérances</translation>
</message>
<message>
<source>GEOM_TOLERANCE_EDGE</source>
</message>
<message>
<source>GEOM_TOLERANCE_TITLE</source>
- <translation>Tolérance Maximale </translation>
+ <translation>Tolérance maximale </translation>
</message>
<message>
<source>GEOM_TOLERANCE_VERTEX</source>
</message>
<message>
<source>GEOM_TOOL_OBJECT</source>
- <translation>Objet Outil </translation>
+ <translation>Objet outil </translation>
</message>
<message>
<source>GEOM_TOOL_OBJECTS</source>
- <translation>Objets Outils </translation>
+ <translation>Objets outils </translation>
</message>
<message>
<source>GEOM_TORUS</source>
</message>
<message>
<source>GEOM_TORUS_TITLE</source>
- <translation>Construction d'un Tore </translation>
+ <translation>Construction d'un tore </translation>
</message>
<message>
<source>GEOM_TRANSLATION</source>
</message>
<message>
<source>GEOM_TRANSLATION_COOR</source>
- <translation>Translation avec Coordonnées</translation>
+ <translation>Translation avec coordonnées</translation>
</message>
<message>
<source>GEOM_TRANSLATION_TITLE</source>
- <translation>Translation d'un Objet</translation>
+ <translation>Translation d'un objet</translation>
</message>
<message>
<source>GEOM_TRANSPARENCY_OPAQUE</source>
</message>
<message>
<source>GEOM_TRIHEDRON</source>
- <translation>Trihèdre</translation>
+ <translation>Trièdre</translation>
</message>
<message>
<source>GEOM_ToBezier</source>
<source>GEOM_VECTOR</source>
<translation>Vecteur</translation>
</message>
+ <message>
+ <source>GEOM_AXIS_DEFAULT</source>
+ <translation> (Axe Z par défaut)</translation>
+ </message>
<message>
<source>GEOM_VECTOR_LENGTH</source>
- <translation>Longueur du Vecteur :</translation>
+ <translation>Longueur d'un vecteur :</translation>
</message>
<message>
<source>GEOM_VECTOR_TITLE</source>
- <translation>Construction d'un Vecteur </translation>
+ <translation>Construction d'un vecteur </translation>
</message>
<message>
<source>GEOM_VECTOR_U</source>
</message>
<message>
<source>GEOM_VERTEX</source>
- <translation>Point</translation>
+ <translation>Sommet</translation>
</message>
<message>
<source>GEOM_VERTEXES</source>
- <translation>Points</translation>
+ <translation>Sommets</translation>
</message>
<message>
<source>GEOM_WATER_DENSITY</source>
- <translation>Densité de l'Eau :</translation>
+ <translation>Densité de l'eau :</translation>
</message>
<message>
<source>GEOM_WEIGHT</source>
</message>
<message>
<source>GEOM_WHATIS</source>
- <translation>Qu'est-ce que c'est</translation>
+ <translation>Qu'est-ce que c'est ?</translation>
</message>
<message>
<source>GEOM_WHATIS_OBJECT</source>
- <translation>Objet et son Information Topologique </translation>
+ <translation>Objet et ses caractéristiques topologiques </translation>
</message>
<message>
<source>GEOM_WHATIS_TITLE</source>
- <translation>Qu'est-ce que c'est</translation>
+ <translation>Qu'est-ce que c'est ?</translation>
</message>
<message>
<source>GEOM_WIRE</source>
</message>
<message>
<source>GEOM_WIRE_CONNECT</source>
- <translation>Création d'un contour à partir des contours/arêtes connectés</translation>
+ <translation>Création d'un contour à partir de contours/arêtes connecté(e)s</translation>
</message>
<message>
<source>GEOM_WIRE_TITLE</source>
- <translation>Création d'un Contour</translation>
+ <translation>Création d'un contour</translation>
</message>
<message>
<source>GEOM_WPLANE</source>
- <translation>Plan de Travail</translation>
+ <translation>Plan de travail</translation>
</message>
<message>
<source>GEOM_WPLANE_FACE</source>
- <translation>Plan, Face Planaire ou SCL</translation>
+ <translation>Plan, Face plane ou SCL</translation>
</message>
<message>
<source>GEOM_WPLANE_ORIGIN</source>
</message>
<message>
<source>GEOM_WPLANE_TITLE</source>
- <translation>Sélection du Plan de Travail</translation>
+ <translation>Sélection du plan de travail</translation>
</message>
<message>
<source>GEOM_WPLANE_VECTOR</source>
</message>
<message>
<source>GEOM_WRN_RADIUS_NULL</source>
- <translation>Le Rayon est nul</translation>
+ <translation>Le rayon est nul</translation>
</message>
<message>
<source>GEOM_WRN_WARNING</source>
- <translation>Avertissement</translation>
+ <translation>Attention</translation>
</message>
<message>
<source>WRN_SHAPE_UNCLOSED</source>
- <translation>Impossible de créer un solide à partir de la forme non-fermée %1</translation>
+ <translation>Impossible de créer un solide à partir d'une forme non-fermée %1</translation>
</message>
<message>
<source>GEOM_X</source>
</message>
<message>
<source>GLUE_NEW_OBJ_NAME</source>
- <translation>Coller</translation>
+ <translation>Recollement</translation>
</message>
<message>
<source>LIMIT_TOLERANCE_NEW_OBJ_NAME</source>
</message>
<message>
<source>MEN_ALL_SEL_ONLY</source>
- <translation>Choisir Tous</translation>
+ <translation>Sélectionner tout</translation>
</message>
<message>
<source>MEN_ARC</source>
</message>
<message>
<source>MEN_BASIC</source>
- <translation>de Base</translation>
+ <translation>Objets de base</translation>
</message>
<message>
<source>MEN_BASIC_PROPS</source>
- <translation>Propriétés de Base </translation>
+ <translation>Propriétés de base </translation>
</message>
<message>
<source>MEN_BLOCKS</source>
- <translation>Bloques</translation>
+ <translation>Blocs</translation>
</message>
<message>
<source>MEN_BND_BOX</source>
- <translation>Boîte Englobante</translation>
+ <translation>Boîte englobante</translation>
</message>
<message>
<source>MEN_BOOLEAN</source>
- <translation>Booléen</translation>
+ <translation>Opérations booléennes</translation>
</message>
<message>
<source>MEN_BOX</source>
</message>
<message>
<source>MEN_CHANGE_ORIENTATION</source>
- <translation>Changer l'Orientation</translation>
+ <translation>Changer l'orientation</translation>
</message>
<message>
<source>MEN_CHECK</source>
- <translation>Vérifier une Forme</translation>
+ <translation>Contrôler un objet</translation>
</message>
<message>
<source>MEN_CHECK_COMPOUND</source>
- <translation>Vérifier un Assemblage de Bloques</translation>
+ <translation>Contrôler un assemblage de blocs</translation>
</message>
<message>
<source>MEN_CHECK_FREE_BNDS</source>
- <translation>Vérifier les Contours Libres</translation>
+ <translation>Contrôler les contours libres</translation>
</message>
<message>
<source>MEN_CHECK_FREE_FACES</source>
- <translation>Vérifier les Faces Libres</translation>
+ <translation>Contrôler les faces libres</translation>
</message>
<message>
<source>MEN_CHECK_GEOMETRY</source>
- <translation>Vérifier la Géométrie</translation>
+ <translation>Contrôler la géométrie</translation>
</message>
<message>
<source>MEN_CIRCLE</source>
- <translation>Circle</translation>
+ <translation>Cercle</translation>
</message>
<message>
<source>MEN_CLIPPING</source>
- <translation>Diapason de Clippage</translation>
+ <translation>Plage de découpe</translation>
</message>
<message>
<source>MEN_CLOSE_CONTOUR</source>
- <translation>Fermer le Contour</translation>
+ <translation>Fermer le contour</translation>
</message>
<message>
<source>MEN_COMMON</source>
- <translation>Commun</translation>
+ <translation>Intersection</translation>
</message>
<message>
<source>MEN_COMPOUND</source>
</message>
<message>
<source>MEN_DISPLAY</source>
- <translation>Visualiser</translation>
+ <translation>Afficher</translation>
</message>
<message>
<source>MEN_DISK</source>
</message>
<message>
<source>MEN_DISPLAY_ALL</source>
- <translation>Visualiser Tous</translation>
+ <translation>Afficher tout</translation>
</message>
<message>
<source>MEN_DISPLAY_MODE</source>
- <translation>Mode de Visualisation</translation>
+ <translation>Mode de visualisation</translation>
</message>
<message>
<source>MEN_DISPLAY_ONLY</source>
- <translation>Visualiser Seul</translation>
+ <translation>Afficher uniquement</translation>
</message>
<message>
<source>MEN_EDGE</source>
</message>
<message>
<source>MEN_ERASE_ALL</source>
- <translation>Cacher Tous</translation>
+ <translation>Cacher tout</translation>
</message>
<message>
<source>MEN_EXPLODE</source>
- <translation>Eclatement</translation>
+ <translation>Eclater</translation>
</message>
<message>
<source>MEN_EXPLODE_BLOCKS</source>
- <translation>Eclater en Bloques</translation>
+ <translation>Eclater en blocs</translation>
</message>
<message>
<source>MEN_EXPORT</source>
</message>
<message>
<source>MEN_FILLING</source>
- <translation>Remplissage</translation>
+ <translation>Nappe</translation>
</message>
<message>
<source>MEN_FUSE</source>
- <translation>Fusion</translation>
+ <translation>Union</translation>
</message>
<message>
<source>MEN_GENERATION</source>
</message>
<message>
<source>MEN_GLUE_FACES</source>
- <translation>Coller les Faces</translation>
+ <translation>Recoller les faces</translation>
</message>
<message>
<source>MEN_GROUP</source>
</message>
<message>
<source>MEN_GROUP_CREATE</source>
- <translation>Créer une Groupe</translation>
+ <translation>Créer une groupe</translation>
</message>
<message>
<source>MEN_GROUP_EDIT</source>
</message>
<message>
<source>MEN_RELOAD_IMPORTED</source>
- <translation>Rouvrir de la Disque</translation>
+ <translation>Recharger à partir du disque</translation>
</message>
<message>
<source>MEN_HEX_SOLID</source>
- <translation>Solid Hexahédral </translation>
+ <translation>Solid hexaédrique</translation>
</message>
<message>
<source>MEN_IMPORT</source>
</message>
<message>
<source>MEN_LOCAL_CS</source>
- <translation>Système de Coordonnées Locale </translation>
+ <translation>Système de coordonnées local </translation>
</message>
<message>
<source>MEN_MASS_CENTER</source>
- <translation>Centre de la Masse</translation>
+ <translation>Centre de gravité</translation>
</message>
<message>
<source>MEN_MEASURES</source>
- <translation>Informations</translation>
+ <translation>Mesures</translation>
</message>
<message>
<source>MEN_MIN_DIST</source>
- <translation>Distance Minimale </translation>
+ <translation>Distance minimale </translation>
</message>
<message>
<source>MEN_MIRROR</source>
- <translation>Image Miroir</translation>
+ <translation>Symétrie</translation>
</message>
<message>
<source>MEN_MODIFY_LOCATION</source>
- <translation>Modifer la Location</translation>
+ <translation>Modifer la position</translation>
</message>
<message>
<source>MEN_MUL_ROTATION</source>
- <translation>Multi-Rotation</translation>
+ <translation>Multi-rotation</translation>
</message>
<message>
<source>MEN_MUL_TRANSFORM</source>
- <translation>Multi-Transformation</translation>
+ <translation>Multi-transformation</translation>
</message>
<message>
<source>MEN_MUL_TRANSLATION</source>
- <translation>Multi-Translation</translation>
+ <translation>Multi-translation</translation>
</message>
<message>
<source>MEN_NEW_ENTITY</source>
- <translation>Entité Nouvelle</translation>
+ <translation>Nouvel objet</translation>
</message>
<message>
<source>MEN_OFFSET</source>
- <translation>Surface de Décalage</translation>
+ <translation>Décaler une surface</translation>
</message>
<message>
<source>MEN_OPERATIONS</source>
</message>
<message>
<source>MEN_ORIGIN_AND_VECTORS</source>
- <translation>Vecteurs de Base et d'Origine</translation>
+ <translation>Vecteurs de base et origine</translation>
</message>
<message>
<source>MEN_PARTITION</source>
</message>
<message>
<source>MEN_PIPE</source>
- <translation>Extrusion au long d'un Chemin</translation>
+ <translation>Extrusion suivant un chemin</translation>
</message>
<message>
<source>MEN_PLANE</source>
</message>
<message>
<source>MEN_POINT_COORDS</source>
- <translation>Coordonnées d'un Point </translation>
+ <translation>Coordonnées d'un point </translation>
</message>
<message>
<source>MEN_POINT_ON_EDGE</source>
- <translation>Ajouter un Point sur l'Arête</translation>
+ <translation>Ajouter un point sur l'arête</translation>
</message>
<message>
<source>MEN_POP_COLOR</source>
</message>
<message>
<source>MEN_POP_CREATE_GROUP</source>
- <translation>Créer un Groupe</translation>
+ <translation>Créer un groupe</translation>
</message>
<message>
<source>MEN_POP_SHOW_CHILDREN</source>
</message>
<message>
<source>MEN_POP_DEFLECTION</source>
- <translation>Coefficient de Déflection</translation>
+ <translation>Coefficient de déformation</translation>
</message>
<message>
<source>MEN_POP_RENAME</source>
</message>
<message>
<source>MEN_POP_WIREFRAME</source>
- <translation>Contour</translation>
+ <translation>Filaire</translation>
</message>
<message>
<source>MEN_POP_VECTORS</source>
- <translation>Montrer la Direction de l'Arête</translation>
+ <translation>Montrer l'orientation de l'arête</translation>
</message>
<message>
<source>MEN_PREFERENCES</source>
</message>
<message>
<source>MEN_PROPAGATE</source>
- <translation>Propaguer</translation>
+ <translation>Propager</translation>
</message>
<message>
<source>MEN_Q_FACE</source>
- <translation>Face Quadrangulaire </translation>
+ <translation>Face quadrangulaire </translation>
</message>
<message>
<source>MEN_REPAIR</source>
- <translation>Reparer</translation>
+ <translation>Réparer</translation>
</message>
<message>
<source>MEN_REVOLUTION</source>
</message>
<message>
<source>MEN_SCALE</source>
- <translation>Transformation par </translation>
+ <translation>Redimensionner</translation>
</message>
<message>
<source>MEN_SECTION</source>
</message>
<message>
<source>MEN_SELECT_ONLY</source>
- <translation>Choisir seul</translation>
+ <translation>Sélectionner uniquement</translation>
</message>
<message>
<source>MEN_SEWING</source>
</message>
<message>
<source>MEN_SHADING_COLOR</source>
- <translation>Couleur d'Ombrage</translation>
+ <translation>Couleur d'ombrage</translation>
</message>
<message>
<source>MEN_SHAPE_PROCESS</source>
- <translation>Traitement de Forme</translation>
+ <translation>Traitement de forme</translation>
</message>
<message>
<source>MEN_SHELL</source>
</message>
<message>
<source>MEN_SKETCH</source>
- <translation>Contour 2D</translation>
+ <translation>Esquisse 2D</translation>
</message>
<message>
<source>MEN_3DSKETCH</source>
- <translation>Contour 3D</translation>
+ <translation>Esquisse 3D</translation>
</message>
<message>
<source>MEN_SOLID</source>
</message>
<message>
<source>MEN_STEP_VALUE</source>
- <translation>Valeur de Pas</translation>
+ <translation>Valeur du pas</translation>
</message>
<message>
<source>MEN_SUPPERSS_HOLES</source>
- <translation>Supprimer les Trous</translation>
+ <translation>Supprimer les trous</translation>
</message>
<message>
<source>MEN_SUPPRESS_FACES</source>
- <translation>Supprimer les Faces</translation>
+ <translation>Supprimer des faces</translation>
</message>
<message>
<source>MEN_SUPPRESS_INT_WIRES</source>
- <translation>Supprimer les Contours Internes</translation>
+ <translation>Supprimer des contours Internes</translation>
</message>
<message>
<source>MEN_TOLERANCE</source>
</message>
<message>
<source>MEN_WHAT_IS</source>
- <translation>Qu'est-ce que c'est</translation>
+ <translation>Qu'est-ce que c'est ?</translation>
</message>
<message>
<source>MEN_WIRE</source>
</message>
<message>
<source>MEN_VECTOR_MODE_ON</source>
- <translation>Montrer la Direction de l'Arête</translation>
+ <translation>Montrer l'orientation de l'arête</translation>
</message>
<message>
<source>MEN_VECTOR_MODE_OFF</source>
- <translation>Cacher la Direction de l'Arête</translation>
+ <translation>Cacher l'orientation de l'arête</translation>
</message>
<message>
<source>MEN_WIREFRAME</source>
- <translation>Contour</translation>
+ <translation>Filaire</translation>
</message>
<message>
<source>MEN_WIRE_SEL_ONLY</source>
</message>
<message>
<source>MEN_WORK_PLANE</source>
- <translation>Plan de Travail</translation>
+ <translation>Plan de travail</translation>
</message>
<message>
<source>MEN_POP_POINT_MARKER</source>
- <translation>Repère Point </translation>
+ <translation>Marqueur de point</translation>
</message>
<message>
<source>NAME_LBL</source>
</message>
<message>
<source>NON_GEOM_OBJECTS_SELECTED</source>
- <translation>Dans la sélection il y a d'objets n'appartenant pas au composant %1.</translation>
+ <translation>Il y a des objets n'appartenant pas au composant %1 dans la sélection </translation>
</message>
<message>
<source>PREF_DEFLECTION</source>
- <translation>Coefficient de Déflection</translation>
+ <translation>Coefficient de déformation</translation>
</message>
<message>
<source>GEOM_PREF_def_precision</source>
- <translation>Précision de défaut</translation>
+ <translation>Précision par défaut</translation>
</message>
<message>
<source>GEOM_PREF_length_precision</source>
</message>
<message>
<source>GEOM_PREF_ang_tol_precision</source>
- <translation>Tolérance de Précision Angulaire</translation>
+ <translation>Précision de la tolérance angulaire</translation>
</message>
<message>
<source>GEOM_PREF_weight_precision</source>
- <translation>Précision de Poids </translation>
+ <translation>Précision de poids </translation>
</message>
<message>
<source>GEOM_PREF_density_precision</source>
- <translation>Précision de Densité </translation>
+ <translation>Précision de densité </translation>
</message>
<message>
<source>GEOM_PREF_parametric_precision</source>
- <translation>Précision Paramétrique</translation>
+ <translation>Précision paramétrique</translation>
</message>
<message>
<source>GEOM_PREF_param_tol_precision</source>
- <translation>Tolérance de Précision Paramétrique</translation>
+ <translation>Tolérance de précision paramétrique</translation>
</message>
<message>
<source>PREF_AUTO_CREATE</source>
</message>
<message>
<source>PREF_DISPLAY_MODE</source>
- <translation>Mode de visualisation de défault</translation>
+ <translation>Mode de visualisation par défaut</translation>
</message>
<message>
<source>PREF_FREE_BOUND_COLOR</source>
- <translation>Couleur des Contours Libres</translation>
+ <translation>Couleur des contours libres</translation>
</message>
<message>
<source>PREF_GROUP_ORIGIN_AND_BASE_VECTORS</source>
- <translation>Vecteurs d'origine et de base</translation>
+ <translation>Vecteurs de base et origine</translation>
</message>
<message>
<source>PREF_GROUP_GENERAL</source>
</message>
<message>
<source>PREF_GROUP_OCCVIEWER</source>
- <translation>Visualisateur OCC 3d</translation>
+ <translation>Visualiseur OCC 3d</translation>
</message>
<message>
<source>GEOM_PREF_GROUP_PRECISION</source>
</message>
<message>
<source>PREF_GROUP_VERTEX</source>
- <translation>Repère des points</translation>
+ <translation>Marqueurs de points</translation>
</message>
<message>
<source>PREF_ISOS_COLOR</source>
</message>
<message>
<source>PREF_SHADING_COLOR</source>
- <translation>Couleur d'Ombrage de Défault</translation>
+ <translation>Couleur d'ombrage par défaut</translation>
</message>
<message>
<source>PREF_STEP_VALUE</source>
- <translation>Valeur de pas pour les boîtes d'incrément</translation>
+ <translation>Valeur du pas pour les boîtes d'incrément</translation>
</message>
<message>
<source>PREF_TAB_SETTINGS</source>
</message>
<message>
<source>PREF_WIREFRAME_COLOR</source>
- <translation>Couleur des contours de défaut</translation>
+ <translation>Couleur des contours par défaut</translation>
</message>
<message>
<source>PROCESS_SHAPE_NEW_OBJ_NAME</source>
- <translation>FormeTraitement</translation>
+ <translation>FormeRetraitée</translation>
</message>
<message>
<source>REMOVE_HOLES_NEW_OBJ_NAME</source>
</message>
<message>
<source>STB_ALL_SEL_ONLY</source>
- <translation>Choisir tous les Objets</translation>
+ <translation>Choisir tous les objets</translation>
</message>
<message>
<source>STB_ARC</source>
</message>
<message>
<source>STB_ARCHIMEDE</source>
- <translation>Opération Archimède </translation>
+ <translation>Opération archimède </translation>
</message>
<message>
<source>STB_BASIC_PROPS</source>
- <translation>Montrer les propriétés de base de l'Objet</translation>
+ <translation>Montrer les propriétés de base de l'objet</translation>
</message>
<message>
<source>STB_BND_BOX</source>
</message>
<message>
<source>STB_CHAMFER</source>
- <translation>Créer un Chanfrein</translation>
+ <translation>Créer un chanfrein</translation>
</message>
<message>
<source>STB_CHANGE_ORIENTATION</source>
</message>
<message>
<source>STB_CHECK</source>
- <translation>Valider une forme</translation>
+ <translation>Contrôler une forme</translation>
</message>
<message>
<source>STB_CHECK_COMPOUND</source>
- <translation>Valider un assemlage de bloques</translation>
+ <translation>Contrôler un assemlage de blocs</translation>
</message>
<message>
<source>STB_CHECK_FREE_BNDS</source>
- <translation>Vérifier les Contours Libres</translation>
+ <translation>Vérifier les contours libres</translation>
</message>
<message>
<source>STB_CHECK_FREE_FACES</source>
- <translation>Vérifier les Faces Libres</translation>
+ <translation>Contrôler les faces libres</translation>
</message>
<message>
<source>STB_CHECK_GEOMETRY</source>
- <translation>Vérifier la Géométrie</translation>
+ <translation>Contrôler la géométrie</translation>
</message>
<message>
<source>STB_CIRCLE</source>
- <translation>Créer un circle</translation>
+ <translation>Créer un cercle</translation>
</message>
<message>
<source>STB_CLIPPING</source>
- <translation>Diapason de Clippage</translation>
+ <translation>Intervalle de découpe</translation>
</message>
<message>
<source>STB_CLOSE_CONTOUR</source>
</message>
<message>
<source>STB_COMMON</source>
- <translation>Commun</translation>
+ <translation>Intersection</translation>
</message>
<message>
<source>STB_COMPOUND</source>
</message>
<message>
<source>STB_COMPOUND_SEL_ONLY</source>
- <translation>Ne choisir que des Assemblages</translation>
+ <translation>Ne choisir que des assemblages</translation>
</message>
<message>
<source>STB_CONE</source>
</message>
<message>
<source>STB_DISPLAY</source>
- <translation>Visualiser les objets</translation>
+ <translation>Afficher les objets</translation>
</message>
<message>
<source>STB_DISPLAY_ALL</source>
- <translation>Visualiser tous</translation>
+ <translation>Afficher tout</translation>
</message>
<message>
<source>STB_DISPLAY_ONLY</source>
- <translation>Visualiser seul</translation>
+ <translation>Afficher uniquement</translation>
</message>
<message>
<source>STB_EDGE</source>
</message>
<message>
<source>STB_EDGE_SEL_ONLY</source>
- <translation>Ne choisir que des Arêtes</translation>
+ <translation>Ne choisir que des arêtes</translation>
</message>
<message>
<source>STB_ELLIPSE</source>
</message>
<message>
<source>STB_ERASE_ALL</source>
- <translation>Cacher tous</translation>
+ <translation>Cacher tout</translation>
</message>
<message>
<source>STB_EXPLODE</source>
- <translation>Eclatement</translation>
+ <translation>Eclater</translation>
</message>
<message>
<source>STB_EXPLODE_BLOCKS</source>
- <translation>Eclater en Bloques</translation>
+ <translation>Eclater en Blocs</translation>
</message>
<message>
<source>STB_EXPORT</source>
</message>
<message>
<source>STB_FACE_SEL_ONLY</source>
- <translation>Ne choisir que des Faces</translation>
+ <translation>Ne choisir que des faces</translation>
</message>
<message>
<source>STB_FILLET</source>
</message>
<message>
<source>STB_FILLING</source>
- <translation>Créer un remplissage</translation>
+ <translation>Créer une nappe</translation>
</message>
<message>
<source>STB_FUSE</source>
- <translation>Fusion</translation>
+ <translation>Union</translation>
</message>
<message>
<source>STB_GLUE_FACES</source>
- <translation>Coller les faces</translation>
+ <translation>Recoller les faces</translation>
</message>
<message>
<source>STB_GROUP_CREATE</source>
</message>
<message>
<source>STB_RELOAD_IMPORTED</source>
- <translation>Recharger la forme importée de sa place d'origine sur la disque</translation>
+ <translation>Recharger l'objet importé depuis le disque</translation>
</message>
<message>
<source>STB_HEX_SOLID</source>
- <translation>Solide Hexahédral </translation>
+ <translation>Solide hexaédrique</translation>
</message>
<message>
<source>STB_IMPORT</source>
</message>
<message>
<source>STB_ISOS</source>
- <translation>Définir le numéro d'isolignes</translation>
+ <translation>Définir le nombre d'isolignes</translation>
</message>
<message>
<source>STB_LINE</source>
</message>
<message>
<source>STB_MASS_CENTER</source>
- <translation>Calculer le centre de la masse de l'objet</translation>
+ <translation>Calculer le centre de gravité de l'objet</translation>
</message>
<message>
<source>STB_MIN_DIST</source>
</message>
<message>
<source>STB_MODIFY_LOCATION</source>
- <translation>Modifier la location d'un objet</translation>
+ <translation>Modifier la position d'un objet</translation>
</message>
<message>
<source>STB_MUL_ROTATION</source>
</message>
<message>
<source>STB_OFFSET</source>
- <translation>Surface de Décalage </translation>
+ <translation>Décaler une surface </translation>
</message>
<message>
<source>STB_ORIGIN_AND_VECTORS</source>
- <translation>Créer les Vecteurs de l'origine et de base </translation>
+ <translation>Créer les vecterurs de base et l'origine</translation>
</message>
<message>
<source>STB_PARTITION</source>
</message>
<message>
<source>STB_PIPE</source>
- <translation>Créer un objet par l'extrusion au long d'un chemin</translation>
+ <translation>Créer un objet par extrusion suivant un chemin</translation>
</message>
<message>
<source>STB_PLANE</source>
</message>
<message>
<source>STB_POP_DEFLECTION</source>
- <translation>Coefficient de Déflection</translation>
+ <translation>Coefficient de déformation</translation>
</message>
<message>
<source>STB_POP_RENAME</source>
</message>
<message>
<source>STB_PROPAGATE</source>
- <translation>Propaguer</translation>
+ <translation>Propager</translation>
</message>
<message>
<source>STB_Q_FACE</source>
- <translation>Face Quadrangulaire </translation>
+ <translation>Face quadrangulaire </translation>
</message>
<message>
<source>STB_REVOLUTION</source>
</message>
<message>
<source>STB_VECTOR_MODE</source>
- <translation>Changer le Mode de Présentation des arêtes</translation>
+ <translation>Changer le mode de représentation des arêtes</translation>
</message>
<message>
<source>STB_SHADING_COLOR</source>
- <translation>Définir le Couleur d'Ombrage</translation>
+ <translation>Définir la couleur d'ombrage</translation>
</message>
<message>
<source>STB_SHAPE_PROCESS</source>
</message>
<message>
<source>STB_SHELL_SEL_ONLY</source>
- <translation>Ne choisir que des Coques</translation>
+ <translation>Ne choisir que des coques</translation>
</message>
<message>
<source>STB_SKETCH</source>
- <translation>Créer un contour 2D</translation>
+ <translation>Créer une esquisse 2D</translation>
</message>
<message>
<source>STB_3DSKETCH</source>
- <translation>Créer un contour 3D</translation>
+ <translation>Créer une esquisse 3D</translation>
</message>
<message>
<source>STB_SOLID</source>
</message>
<message>
<source>STB_SOLID_SEL_ONLY</source>
- <translation>Ne choisir que des Solides</translation>
+ <translation>Ne choisir que des solides</translation>
</message>
<message>
<source>STB_SPHERE</source>
</message>
<message>
<source>STB_STEP_VALUE</source>
- <translation>Définir le valeur de pas</translation>
+ <translation>Définir le valeur du pas</translation>
</message>
<message>
<source>STB_SUPPERSS_HOLES</source>
</message>
<message>
<source>STB_VERTEX_SEL_ONLY</source>
- <translation>Ne choisir que des Points</translation>
+ <translation>Ne choisir que des points</translation>
</message>
<message>
<source>STB_WHAT_IS</source>
- <translation>Qu'est-ce que c'est</translation>
+ <translation>Qu'est-ce que c'est ?</translation>
</message>
<message>
<source>STB_WIRE</source>
</message>
<message>
<source>STB_WIRE_SEL_ONLY</source>
- <translation>Ne choisir que des Contours</translation>
+ <translation>Ne choisir que des contours</translation>
</message>
<message>
<source>STB_WORK_PLANE</source>
</message>
<message>
<source>STB_POP_POINT_MARKER</source>
- <translation>Définir un Point Repère</translation>
+ <translation>Définir un marqueur de point</translation>
</message>
<message>
<source>SUPPRESS_RESULT</source>
- <translation>Supprimer le Résultat</translation>
+ <translation>Supprimer le résultat</translation>
</message>
<message>
<source>SUPRESS_FACE_NEW_OBJ_NAME</source>
- <translation>SupprimerFaces</translation>
+ <translation>FacesSupprimees</translation>
</message>
<message>
<source>ShHealOper_ErrorExecution_msg</source>
</message>
<message>
<source>TOOL_BASIC</source>
- <translation>de Base</translation>
+ <translation>Objets de base</translation>
</message>
<message>
<source>TOOL_BOOLEAN</source>
- <translation>Opérations Booléennes </translation>
+ <translation>Opérations booléennes </translation>
</message>
<message>
<source>TOOL_GENERATION</source>
</message>
<message>
<source>TOP_BND_BOX</source>
- <translation>Boîte Englobante</translation>
+ <translation>Boîte englobante</translation>
</message>
<message>
<source>TOP_BOX</source>
- <translation>Créer une Boîte</translation>
+ <translation>Créer une boîte</translation>
</message>
<message>
<source>TOP_CHAMFER</source>
- <translation>Chanfrain</translation>
+ <translation>Chanfrein</translation>
</message>
<message>
<source>TOP_CHANGE_ORIENTATION</source>
</message>
<message>
<source>TOP_CHECK</source>
- <translation>Valider l'Objet</translation>
+ <translation>Valider l'objet</translation>
</message>
<message>
<source>TOP_CHECK_COMPOUND</source>
- <translation>Valider l'assemblage de bloques</translation>
+ <translation>Valider l'assemblage de blocs</translation>
</message>
<message>
<source>TOP_CHECK_FREE_BNDS</source>
- <translation>Valider les Contours Libres</translation>
+ <translation>Valider les contours libres</translation>
</message>
<message>
<source>TOP_CHECK_FREE_FACES</source>
- <translation>Valider les Faces Libres</translation>
+ <translation>Contrôler les faces libres</translation>
</message>
<message>
<source>TOP_CHECK_GEOMETRY</source>
- <translation>Valider la Géométrie</translation>
+ <translation>Contrôler la géométrie</translation>
</message>
<message>
<source>TOP_CIRCLE</source>
- <translation>Créer un circle</translation>
+ <translation>Créer un cercle</translation>
</message>
<message>
<source>TOP_CLIPPING</source>
- <translation>Diapason de Clipage</translation>
+ <translation>Intervalle de découpe</translation>
</message>
<message>
<source>TOP_CLOSE_CONTOUR</source>
</message>
<message>
<source>TOP_COMMON</source>
- <translation>Commun</translation>
+ <translation>Intersection</translation>
</message>
<message>
<source>TOP_COMPOUND</source>
</message>
<message>
<source>TOP_DISPLAY</source>
- <translation>Montrer</translation>
+ <translation>Afficher</translation>
</message>
<message>
<source>TOP_DISPLAY_ALL</source>
- <translation>Montrer Tous</translation>
+ <translation>Afficher tout</translation>
</message>
<message>
<source>TOP_DISPLAY_ONLY</source>
- <translation>Montrer Seul</translation>
+ <translation>Afficher uniquement</translation>
</message>
<message>
<source>TOP_EDGE</source>
</message>
<message>
<source>TOP_ERASE_ALL</source>
- <translation>Cacher tous</translation>
+ <translation>Cacher tout</translation>
</message>
<message>
<source>TOP_EXPLODE</source>
- <translation>Eclatement</translation>
+ <translation>Eclater</translation>
</message>
<message>
<source>TOP_EXPLODE_BLOCKS</source>
- <translation>Eclater en Bloques</translation>
+ <translation>Eclater en blocs</translation>
</message>
<message>
<source>TOP_EXPORT</source>
- <translation>Exporter une géométrie au fichier BREP</translation>
+ <translation>Exporter une géométrie au format BREP</translation>
</message>
<message>
<source>TOP_EXTRUSION</source>
</message>
<message>
<source>TOP_FILLING</source>
- <translation>Créer un remplissage</translation>
+ <translation>Créer une nappe</translation>
</message>
<message>
<source>TOP_FUSE</source>
- <translation>Fusion</translation>
+ <translation>Union</translation>
</message>
<message>
<source>TOP_GLUE_FACES</source>
- <translation>Coller les faces</translation>
+ <translation>Recoller les faces</translation>
</message>
<message>
<source>TOP_GROUP_CREATE</source>
</message>
<message>
<source>TOP_HEX_SOLID</source>
- <translation>Solide Hexahédral </translation>
+ <translation>Solide hexaédrique</translation>
</message>
<message>
<source>TOP_IMPORT</source>
- <translation>Importer une géométry du fichier BREP</translation>
+ <translation>Importer une géométry d'un fichier BREP</translation>
</message>
<message>
<source>TOP_INERTIA</source>
</message>
<message>
<source>TOP_ISOS</source>
- <translation>Définir le numéro des isolignes</translation>
+ <translation>Définir le nombre d'isolignes</translation>
</message>
<message>
<source>TOP_LINE</source>
</message>
<message>
<source>TOP_MASS_CENTER</source>
- <translation>Centre de la masse</translation>
+ <translation>Centre de gravité</translation>
</message>
<message>
<source>TOP_MIN_DIST</source>
- <translation>Distance Minimale </translation>
+ <translation>Distance minimale </translation>
</message>
<message>
<source>TOP_MIRROR</source>
- <translation>Image Miroir</translation>
+ <translation>Symétrie</translation>
</message>
<message>
<source>TOP_MODIFY_LOCATION</source>
- <translation>Modifer la location</translation>
+ <translation>Modifer la position</translation>
</message>
<message>
<source>TOP_MUL_ROTATION</source>
- <translation>Multi-Rotation</translation>
+ <translation>Multi-rotation</translation>
</message>
<message>
<source>TOP_MUL_TRANSFORM</source>
</message>
<message>
<source>TOP_MUL_TRANSLATION</source>
- <translation>Multi-Translation</translation>
+ <translation>Multi-translation</translation>
</message>
<message>
<source>TOP_OFFSET</source>
- <translation>Surface de Décalage </translation>
+ <translation>Décaler une surface </translation>
</message>
<message>
<source>TOP_ORIGIN_AND_VECTORS</source>
- <translation>Créer l'origine et les Vecteurs de base</translation>
+ <translation>Créer l'origine et les vecteurs de base</translation>
</message>
<message>
<source>TOP_PARTITION</source>
</message>
<message>
<source>TOP_PIPE</source>
- <translation>Extrusion au long d'un chemin</translation>
+ <translation>Extrusion suivant un chemin</translation>
</message>
<message>
<source>TOP_PLANE</source>
</message>
<message>
<source>TOP_POP_CREATE_GROUP</source>
- <translation>Créer un Groupe</translation>
+ <translation>Créer un groupe</translation>
</message>
<message>
<source>TOP_POP_SHOW_CHILDREN</source>
- <translation>Montrer les Enfants</translation>
+ <translation>Montrer les enfants</translation>
</message>
<message>
<source>TOP_POP_HIDE_CHILDREN</source>
</message>
<message>
<source>TOP_POP_DEFLECTION</source>
- <translation>Coefficient de Déflection </translation>
+ <translation>Coefficient de déformation </translation>
</message>
<message>
<source>TOP_POP_RENAME</source>
</message>
<message>
<source>TOP_PROPAGATE</source>
- <translation>Propaguer</translation>
+ <translation>Propager</translation>
</message>
<message>
<source>TOP_Q_FACE</source>
- <translation>Face Quadrangulaire </translation>
+ <translation>Face quadrangulaire </translation>
</message>
<message>
<source>TOP_REVOLUTION</source>
</message>
<message>
<source>TOP_SCALE</source>
- <translation>Redimentionnement</translation>
+ <translation>Redimensionner</translation>
</message>
<message>
<source>TOP_SECTION</source>
</message>
<message>
<source>TOP_SKETCH</source>
- <translation>Contour 2D </translation>
+ <translation>Esquisse 2D</translation>
</message>
<message>
<source>TOP_3DSKETCH</source>
- <translation>Contour 3D</translation>
+ <translation>Esquisse 3D</translation>
</message>
<message>
<source>TOP_SOLID</source>
</message>
<message>
<source>TOP_STEP_VALUE</source>
- <translation>Définir la valeur de pas</translation>
+ <translation>Définir la valeur du pas</translation>
</message>
<message>
<source>TOP_SUPPERSS_HOLES</source>
</message>
<message>
<source>TOP_WHAT_IS</source>
- <translation>Qu'est-ce que c'est</translation>
+ <translation>Qu'est-ce que c'est ?</translation>
</message>
<message>
<source>TOP_WIRE</source>
</message>
<message>
<source>TOP_POP_POINT_MARKER</source>
- <translation>Repère d'un Point</translation>
+ <translation>Marqueur de point</translation>
</message>
<message>
<source>WRN_NOT_IMPLEMENTED</source>
</message>
<message>
<source>NOT_FOUND_ANY</source>
- <translation>Pas une seule entité a été trouvée</translation>
+ <translation>Aucune entité n'a été trouvée</translation>
</message>
<message>
<source>GEOM_FACE_I</source>
</message>
<message>
<source>GEOM_BOTHWAY</source>
- <translation>Toutes les deux directions</translation>
+ <translation>Dans les deux directions</translation>
</message>
<message>
<source>GEOM_NORMALE</source>
- <translation>Normale à une Face</translation>
+ <translation>Normale à une face</translation>
</message>
<message>
<source>GEOM_VECTOR_NORMALE</source>
</message>
<message>
<source>GEOM_CHAMFER_EDGE</source>
- <translation>Chanfrein sur les Arêtes choisies</translation>
+ <translation>Chanfrein sur les arêtes choisies</translation>
</message>
<message>
<source>SELECTED_EDGE</source>
</message>
<message>
<source>GEOM_NORMALE_TITLE</source>
- <translation>Créer un Vecteur Normal à une Face</translation>
+ <translation>Créer un vecteur normal à une face</translation>
</message>
<message>
<source>GEOM_MEASURE_ANGLE_TITLE</source>
- <translation>Angle entre deux Arêtes/Lignes/Vecteurs Droits</translation>
+ <translation>Angle entre deux arêtes/lignes/vecteurs droits</translation>
</message>
<message>
<source>GEOM_MEASURE_ANGLE_ANGLE</source>
</message>
<message>
<source>GEOM_MEASURE_ANGLE_OBJ</source>
- <translation>Objets et Résultats</translation>
+ <translation>Objets et résultats</translation>
</message>
<message>
<source>GEOM_MEASURE_ANGLE_IS</source>
- <translation>Angle en degrées :</translation>
+ <translation>Angle en degrés :</translation>
</message>
<message>
<source>GEOM_LINE_INTERSECTION</source>
- <translation>Point sur l'Intersection des Lignes</translation>
+ <translation>Point à l'Intersection de deux lignes</translation>
</message>
<message>
<source>GEOM_KEEP_NONLIMIT_SHAPES</source>
<translation>Préserver les formes inférieures</translation>
</message>
+ <message>
+ <source>GEOM_NO_SELF_INTERSECTION</source>
+ <translation>Pas d'intersection des sous-formes (assemblages seuls)</translation>
+ </message>
<message>
<source>GEOM_CENTER_2POINTS</source>
<translation>Centre et deux points</translation>
</message>
<message>
<source>GEOM_REMOVE_EXTRA_EDGES_TITLE</source>
- <translation>Supprimer les arêtes supplémentaires</translation>
+ <translation>Supprimer les arêtes inutiles</translation>
</message>
<message>
<source>GEOM_REMOVE_EXTRA_EDGES</source>
- <translation>L'Objet pour suppimer les arêtes supplémentaires</translation>
+ <translation>Objet dont on suppime les arêtes inutiles</translation>
</message>
<message>
<source>GEOM_RMEE_UNION_FACES</source>
</message>
<message>
<source>TOP_REMOVE_EXTRA_EDGES</source>
- <translation>Suppimer les Arêtes Supplémentaires</translation>
+ <translation>Suppimer les arêtes inutiles</translation>
</message>
<message>
<source>MEN_REMOVE_EXTRA_EDGES</source>
- <translation>Suppimer les Arêtes Supplémentaires</translation>
+ <translation>Suppimer les arêtes inutiles</translation>
</message>
<message>
<source>STB_REMOVE_EXTRA_EDGES</source>
- <translation>Suppimer les Arêtes Supplémentaires</translation>
+ <translation>Suppimer les arêtes inutiles</translation>
</message>
<message>
<source>TOP_NORMALE</source>
- <translation>Vecteur Normal à une Face</translation>
+ <translation>Vecteur normal à une face</translation>
</message>
<message>
<source>MEN_NORMALE</source>
- <translation>Vecteur Normal à une Face</translation>
+ <translation>Vecteur normal à une face</translation>
</message>
<message>
<source>STB_NORMALE</source>
- <translation>Calculer le Vecteur Normal à une Face</translation>
+ <translation>Vecteur normal à une face</translation>
</message>
<message>
<source>TOP_MEASURE_ANGLE</source>
</message>
<message>
<source>TOP_POP_DISABLE_AUTO_COLOR</source>
- <translation>Désactiver le Couleur Automatique</translation>
+ <translation>Désactiver le couleur automatique</translation>
</message>
<message>
<source>MEN_POP_DISABLE_AUTO_COLOR</source>
- <translation>Désactiver le Couleur Automatique</translation>
+ <translation>Désactiver le couleur automatique</translation>
</message>
<message>
<source>STB_POP_DISABLE_AUTO_COLOR</source>
- <translation>Désactiver le Couleur Automatique</translation>
+ <translation>Désactiver le couleur automatique</translation>
</message>
<message>
<source>GEOM_RESULT_NAME_GRP</source>
- <translation>Nom du Résultat</translation>
+ <translation>Nom du résultat</translation>
</message>
<message>
<source>GEOM_RESULT_NAME_LBL</source>
</message>
<message>
<source>GEOM_FILLING_AUTO</source>
- <translation>Auto-corrger l'orientation des arêtes</translation>
+ <translation>Auto-corriger l'orientation des arêtes</translation>
</message>
<message>
<source>GEOM_WRN_NO_APPROPRIATE_SELECTION</source>
</message>
<message>
<source>GEOM_SHAPES_ON_SHAPE_CSHAPE</source>
- <translation>Le Solide à vérifier</translation>
+ <translation>Le solide de contrôle</translation>
</message>
<message>
<source>GEOM_SHAPES_ON_SHAPE_STATE</source>
</message>
<message>
<source>GEOM_KIND_OF_SHAPE</source>
- <translation>Type d'Objet :</translation>
+ <translation>Type d'objet :</translation>
</message>
<message>
<source>GEOM_CLOSED</source>
</message>
<message>
<source>GEOM_CLOSEDUNCLOSED</source>
- <translation>Il n'est pas défini, si l'objet est fermé ou ouvert. Possiblement, il y a un erreur.</translation>
+ <translation>Il n'est pas défini, si l'objet est fermé ou ouvert. , il y a potentiellement une erreur.</translation>
</message>
<message>
<source>GEOM_DISK_CIRCLE</source>
</message>
<message>
<source>GEOM_DISK_ELLIPSE</source>
- <translation>Face Elliptique </translation>
+ <translation>Face elliptique </translation>
</message>
<message>
<source>GEOM_PLANAR_FACE</source>
- <translation>Face Planaire </translation>
+ <translation>Face plane</translation>
</message>
<message>
<source>GEOM_PLANAR_EDGE_WIRE</source>
- <translation>Contour avec des Arêtes Planaires</translation>
+ <translation>Contour avec des arêtes planes</translation>
</message>
<message>
<source>GEOM_POLYGON</source>
</message>
<message>
<source>GEOM_NORMAL</source>
- <translation>Direction Normale</translation>
+ <translation>Direction normale</translation>
</message>
<message>
<source>GEOM_DIRECTION</source>
</message>
<message>
<source>GEOM_SCALE_FACTOR_X</source>
- <translation>Facteur de Redimentionnnement à l'axe X :</translation>
+ <translation>Facteur de redimensionnnement suivant X :</translation>
</message>
<message>
<source>GEOM_SCALE_FACTOR_Y</source>
- <translation>Facteur de Redimentionnnement à l'axe Y :</translation>
+ <translation>Facteur de redimensionnnement suivant Y :</translation>
</message>
<message>
<source>GEOM_SCALE_FACTOR_Z</source>
- <translation>Facteur de Redimentionnnement à l'axe Z :</translation>
+ <translation>Facteur de redimensionnnement suivant Z :</translation>
</message>
<message>
<source>GEOM_STATE_IN</source>
</message>
<message>
<source>GEOM_RESTORE_SUB_SHAPES</source>
- <translation>Importer à partir des arguments les paramètres de la présentation et les sous-formes</translation>
+ <translation>Importer les paramètres de la présentation et les sous-objets</translation>
</message>
<message>
<source>GEOM_RSS_ADD_FREFIX</source>
- <translation>Ajouter un préfixe aux noms des sous-formes restaurées</translation>
+ <translation>Ajouter un préfixe aux noms des sous-objets restaurés</translation>
</message>
<message>
<source>GEOM_ALL_IMPORT_FILES</source>
</message>
<message>
<source>GEOM_IMPORT_ERRORS</source>
- <translation>L'importation s'est finie avec des erreurs:</translation>
+ <translation>L'import s'est fini avec des erreurs:</translation>
</message>
<message>
<source>GEOM_PUBLISH_NAMED_SHAPES</source>
</message>
<message>
<source>GEOM_SCALE_DIMENSIONS</source>
- <translation>Voulez-vous prendre les unités en consiération?
+ <translation>Voulez-vous prendre les unités en considération?
Sinon les dimensions seront préservées sans modifications.</translation>
</message>
<message>
<source>GEOM_ADVANCED</source>
- <translation>Forme Avancée : type %1</translation>
+ <translation>Objet géométrique avancé : type %1</translation>
</message>
<message>
<source>GEOM_PRECISION_HINT</source>
</message>
<message>
<source>TOP_PIPETSHAPE</source>
- <translation>Créer un Tuyau TForme</translation>
+ <translation>Créer un tuyau en T</translation>
</message>
<message>
<source>MEN_PIPETSHAPE</source>
- <translation>Tuyau TForme</translation>
+ <translation>Tuyau en T</translation>
</message>
<message>
<source>STB_PIPETSHAPE</source>
- <translation>Créer un Nouveau Tuyau TForme</translation>
+ <translation>Créer un nouveau tuyau en T</translation>
</message>
<message>
<source>GEOM_ADVANCED_201</source>
- <translation>Tuyau TForme</translation>
+ <translation>Tuyau en T</translation>
</message>
<message>
<source>HALF_LENGTH_MAIN_PIPE</source>
- <translation>Demi-longueur du Tuyau Principal </translation>
+ <translation>Demi-longueur du tuyau principal </translation>
</message>
<message>
<source>HALF_LENGTH_INCIDENT_PIPE</source>
- <translation>Demi-longueur du Tuyau Incident</translation>
+ <translation>Demi-longueur du tuyau incident</translation>
</message>
<message>
<source>CIRCULAR_QUARTER_PIPE</source>
</message>
<message>
<source>FLANGE</source>
- <translation>Flange</translation>
+ <translation>Collerette</translation>
</message>
<message>
<source>CHAMFER_OR_FILLET</source>
- <translation>Chanfrein ou Congé</translation>
+ <translation>Chanfrein ou congé</translation>
</message>
<message>
<source>CHAMFER</source>
<source>JUNCTION_FACE_3</source>
<translation>Jonction 3</translation>
</message>
+ <message>
+ <source>GEOM_PLUGINS_OTHER</source>
+ <translation>Autre</translation>
+ </message>
</context>
<context>
<name>BasicGUI_CurveDlg</name>
<name>BasicGUI_EllipseDlg</name>
<message>
<source>GEOM_VECTOR_MAJOR</source>
- <translation>Axe Majeur</translation>
+ <translation>Grand Axe</translation>
</message>
<message>
<source>ORIGIN_DEFAULT</source>
- <translation>Origine de défaut</translation>
+ <translation>Origine par défaut</translation>
</message>
<message>
<source>X_AXIS_DEFAULT</source>
- <translation>Axe X de défaut</translation>
+ <translation>Axe X par défaut</translation>
</message>
<message>
<source>Z_AXIS_DEFAULT</source>
- <translation>Axe Z de défaut</translation>
+ <translation>Axe Z par défaut</translation>
</message>
</context>
<context>
<name>BasicGUI_MarkerDlg</name>
<message>
<source>CAPTION</source>
- <translation>Construction d'un SC Local</translation>
+ <translation>Construction d'un S.C. local</translation>
</message>
<message>
<source>DX</source>
<name>BlocksGUI_ExplodeDlg</name>
<message>
<source>NB_FACES_MAX</source>
- <translation>Numéro maximal des faces</translation>
+ <translation>Nombre de faces maximal</translation>
</message>
<message>
<source>NB_FACES_MIN</source>
- <translation>Numéro minimal des faces</translation>
+ <translation>Nombre de faces maximal</translation>
</message>
</context>
<context>
</message>
<message>
<source>VERTEX_1</source>
- <translation>Point 1</translation>
+ <translation>Sommet 1</translation>
</message>
<message>
<source>VERTEX_2</source>
- <translation>Point 2</translation>
+ <translation>Sommet 2</translation>
</message>
<message>
<source>VERTEX_3</source>
- <translation>Point 3</translation>
+ <translation>Sommet 3</translation>
</message>
<message>
<source>VERTEX_4</source>
- <translation>Point 4</translation>
+ <translation>Sommet 4</translation>
</message>
</context>
<context>
<message>
<source>CANNOT_CLOSE</source>
<translation>Il est impossible de fermer le contour
-Le numéro de points du contour n'est pas suffisant</translation>
+Le nombre de points n'est pas suffisant</translation>
</message>
</context>
<context>
<name>EntityGUI_SubShapeDlg</name>
<message>
<source>NO_SUBSHAPES_SELECTED</source>
- <translation>Choisissez une ou plusieurs sous-formes</translation>
+ <translation>Choisissez un ou plusieurs sous-objets</translation>
</message>
</context>
<context>
</message>
<message>
<source>EMPTY_LIST</source>
- <translation>Choisissez une ou plus de sous-formes à placer dans le groupe</translation>
+ <translation>Choisissez un ou plusieurs sous-objets à placer dans le groupe</translation>
</message>
<message>
<source>EMPTY_NAME</source>
- <translation>Le nom de groupe est vide. Indiquez un nom correcte</translation>
+ <translation>Le nom de groupe est vide. Indiquez un nom valide</translation>
</message>
<message>
<source>GROUP_NAME</source>
- <translation>Npm du Groupe</translation>
+ <translation>Nom du Groupe</translation>
</message>
<message>
<source>GROUP_PREFIX</source>
</message>
<message>
<source>MAIN_SHAPE</source>
- <translation>La Forme Principale </translation>
+ <translation>Objet Principal </translation>
</message>
<message>
<source>MAIN_SUB_SHAPES</source>
- <translation>La Forme Principale et ces Sous-Formes</translation>
+ <translation>Objet principal et objets secondaires</translation>
</message>
<message>
<source>NO_GROUP</source>
</message>
<message>
<source>NO_MAIN_OBJ</source>
- <translation>Choisissez l'objet principal</translation>
+ <translation>Choisissez un objet principal</translation>
</message>
<message>
<source>REMOVE</source>
<translation>Supprimer</translation>
</message>
+ <message>
+ <source>SHOW_ONLY_SELECTED</source>
+ <translation>Afficher uniquement la sélection</translation>
+ </message>
+ <message>
+ <source>HIDE_SELECTED</source>
+ <translation>Cacher la sélection</translation>
+ </message>
+ <message>
+ <source>SHOW_ALL_SUB_SHAPES</source>
+ <translation>Afficher tous les sous-objets</translation>
+ </message>
<message>
<source>SELECT_ALL</source>
- <translation>Choisir Tous</translation>
+ <translation>Tout sélectionner</translation>
</message>
<message>
<source>SHAPE_SEL_RESTR</source>
- <translation>Sélection Limité de la Forme Principale</translation>
+ <translation>Restriction de la sélection</translation>
</message>
<message>
<source>SHAPE_TYPE</source>
- <translation>Type de la Forme </translation>
+ <translation>Type d'objet</translation>
</message>
<message>
<source>NO_RESTR</source>
</message>
<message>
<source>GEOM_PARTS_OF_SHAPE2</source>
- <translation>Parties Géométriques de la Seconde Forme</translation>
+ <translation>Parties Géométriques de l'Objet Secondaire </translation>
</message>
<message>
<source>SUBSHAPES_OF_SHAPE2</source>
- <translation>Seules les Sous-Formes de la Seconde Forme</translation>
+ <translation>Sous-Objets de l'Objet Secondaire Uniquement</translation>
</message>
<message>
<source>SECOND_SHAPE</source>
- <translation>Seconde Forme</translation>
+ <translation>Objet secondaire</translation>
</message>
</context>
<context>
</message>
<message>
<source>COORDINATES</source>
- <translation>Le Point et ces coordonnées</translation>
+ <translation>Le Point et ses coordonnées</translation>
</message>
<message>
<source>POINT</source>
</message>
<message>
<source>SELECTED_FACES</source>
- <translation>Les Faces Choisies</translation>
+ <translation>Faces sélectionnées</translation>
</message>
</context>
<context>
<name>OperationGUI_FilletDlg</name>
<message>
<source>SELECTED_EDGES</source>
- <translation>Les arêtes choisies</translation>
+ <translation>Arêtes sélectionnées</translation>
</message>
<message>
<source>SELECTED_FACES</source>
- <translation>Les Faces Choisies</translation>
+ <translation>Faces sélectionnées</translation>
</message>
</context>
<context>
</message>
<message>
<source>NUMBER_CLOSED</source>
- <translation>Numéro de contours libres fermés</translation>
+ <translation>Nombre de contours libres fermés</translation>
</message>
<message>
<source>NUMBER_OPEN</source>
- <translation>Numéro de contours libres ouverts</translation>
+ <translation>Nombre de contours libres ouverts</translation>
</message>
</context>
<context>
<name>RepairGUI_GlueDlg</name>
<message>
<source>FACES_FOR_GLUING_ARE_DETECTED</source>
- <translation>Il y a %1 face(s) à coller surlignées en couleur rouge.
-Fermez cette boîte d'alerte et choisissez les faces à coller</translation>
+ <translation>Il y a %1 face(s) à recoller surlignées en couleur rouge.
+Fermez cette boîte d'alerte et choisissez les faces à recoller</translation>
</message>
<message>
<source>GLUE_FACES</source>
- <translation>Coller les faces</translation>
+ <translation>Recollement de faces</translation>
</message>
<message>
<source>SELECT_FACES</source>
</message>
<message>
<source>THERE_ARE_NO_FACES_FOR_GLUING</source>
- <translation>Il n'y a pas de Faces à Coller</translation>
+ <translation>Il n'y a pas de faces à coller</translation>
</message>
</context>
<context>
</message>
<message>
<source>TIME_CONSUMING</source>
- <translation>L'activarion de cette option peut résulter en une perte de temps à l'entrée de certaines formes.
-Voudriez-vous continuer?</translation>
+ <translation>L'activation de cette option peut résulter en une perte de temps sur certains objets.
+Voulez-vous continuer?</translation>
</message>
</context>
<context>
<name>GEOMToolsGUI_DeleteDlg</name>
<message>
<source>GEOM_REALLY_DELETE</source>
- <translation>Est-ce que vous voulez supprimer %1 objet(s)?</translation>
+ <translation>Voulez-vous vraiment supprimer %1 objet(s)?</translation>
</message>
<message>
<source>GEOM_REALLY_DELETE_ALL</source>
- <translation>Est-ce que vous voulez de supprimer tous les objets?</translation>
+ <translation>Voulez-vous vraiment supprimer tous les objets?</translation>
</message>
<message>
<source>GEOM_DELETE_OBJECTS</source>
<name>GEOMToolsGUI_DeflectionDlg</name>
<message>
<source>GEOM_DEFLECTION_TLT</source>
- <translation>Choisir la déflection d'un Objet</translation>
+ <translation>Choisir le degré de déformation d'un objet</translation>
</message>
<message>
<source>GEOM_DEFLECTION</source>
- <translation>Déflection :</translation>
+ <translation>Déformation :</translation>
</message>
</context>
<context>
<name>GEOMToolsGUI_MarkerDlg</name>
<message>
<source>SET_MARKER_TLT</source>
- <translation>Définir le Repère de Point</translation>
+ <translation>Définir le Marqueur de Point</translation>
</message>
<message>
<source>STANDARD_MARKER</source>
<name>AdvancedGUI_PipeTShapeDlg</name>
<message>
<source>GEOM_PIPE_TSHAPE_TITLE</source>
- <translation>Construction d'un Tuyau TForme </translation>
+ <translation>Construction d'un Tuyau en T</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE</source>
- <translation>TuyauTForme</translation>
+ <translation>TuyauT</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_MPIPE</source>
- <translation>Tuyau Principal</translation>
+ <translation>Tuyau principal</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_R</source>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_IPIPE</source>
- <translation>Tuyau Incident</translation>
+ <translation>Tuyau incident</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_CHAMFER</source>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_HEX</source>
- <translation>Préparer pour un maillage hexagonal</translation>
+ <translation>Préparer pour un maillage hexaédrique</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION</source>
PyErr_Print();
else
{
- PyObject* result=PyObject_CallMethod( pluginsmanager, (char*)"initialize", (char*)"isss",1,"geom","New Entity","Other");
+ PyObject* result=PyObject_CallMethod( pluginsmanager, (char*)"initialize", (char*)"isss",1,"geom",tr("MEN_NEW_ENTITY").toStdString().c_str(),tr("GEOM_PLUGINS_OTHER").toStdString().c_str());
if(result==NULL)
PyErr_Print();
Py_XDECREF(result);
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#include <Standard_Stream.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <GeomFill_Generator.hxx>
+#include <gce_MakePln.hxx>
+
#include <Precision.hxx>
#include <gp_Pnt.hxx>
+#include <gp_Pln.hxx>
#include <TColgp_Array1OfPnt.hxx>
#include <StdFail_NotDone.hxx>
const Standard_Boolean isPlanarWanted,
TopoDS_Shape& theResult)
{
- // try to build face on plane or on any surface under the edges of the wire
- BRepBuilderAPI_MakeFace MK (theWire, isPlanarWanted);
- if (MK.IsDone()) {
- theResult = MK.Shape();
- return;
+ // Workaround for Mantis issue 0020956
+ if (isPlanarWanted) {
+ // Count the number of points in the wire.
+ // Collect the first three points.
+ gp_Pnt p1, p2, p3;
+ bool is3Pnts(false);
+ bool p1set(false), p2set(false), p3set(false);
+ BRepTools_WireExplorer wexpl(theWire);
+ for (; wexpl.More(); wexpl.Next()) {
+ if (!p1set) {
+ p1set = true;
+ p1 = BRep_Tool::Pnt(wexpl.CurrentVertex());
+ }
+ else if (!p2set) {
+ p2set = true;
+ p2 = BRep_Tool::Pnt(wexpl.CurrentVertex());
+ }
+ else if (!p3set) {
+ p3set = true;
+ is3Pnts = true;
+ p3 = BRep_Tool::Pnt(wexpl.CurrentVertex());
+ }
+ else {
+ is3Pnts = false;
+ break;
+ }
+ }
+
+ // Construct a plane for the case of three points in the wire.
+ gp_Pln plane;
+ if (is3Pnts) {
+ gce_MakePln mkPln(p1, p2, p3);
+ if (mkPln.IsDone()) {
+ plane = mkPln.Value();
+ }
+ else {
+ is3Pnts = false;
+ }
+ }
+
+ // Construct a face based on the plane (in case of three points in the wire) or
+ // allow MakeFace to build the plane itself (in case of the number of points is greater than 3).
+ if (is3Pnts) {
+ BRepBuilderAPI_MakeFace MK (plane, theWire, isPlanarWanted);
+ if (MK.IsDone()) {
+ theResult = MK.Shape();
+ return;
+ }
+ }
+ else {
+ BRepBuilderAPI_MakeFace MK (theWire, isPlanarWanted);
+ if (MK.IsDone()) {
+ theResult = MK.Shape();
+ return;
+ }
+ }
+ }
+ else {
+ // try to build face on plane or on any surface under the edges of the wire
+ BRepBuilderAPI_MakeFace MK (theWire, isPlanarWanted);
+ if (MK.IsDone()) {
+ theResult = MK.Shape();
+ return;
+ }
}
if (!isPlanarWanted) {
-// Copyright (C) 2007-2010 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.
-//
-// 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
-//
-
-// File : GEOMImpl_Fillet1d.cxx
-// Module : GEOMImpl
-//
-#include "GEOMImpl_Fillet1d.hxx"
-
-#include <BRep_Tool.hxx>
-#include <BRepAdaptor_Curve.hxx>
-#include <BRepBuilderAPI_MakeEdge.hxx>
-#include <ElCLib.hxx>
-#include <ElSLib.hxx>
-#include <gp_Circ.hxx>
-#include <Geom2d_Line.hxx>
-#include <Geom2dAPI_ProjectPointOnCurve.hxx>
-#include <Geom2dAPI_InterCurveCurve.hxx>
-#include <GeomAPI_ProjectPointOnCurve.hxx>
-#include <GeomProjLib.hxx>
-#include <Geom_Circle.hxx>
-#include <Precision.hxx>
-#include <TColStd_ListIteratorOfListOfReal.hxx>
-
-/**
- * class GEOMImpl_Fillet1d
- */
-
-
-//=======================================================================
-//function : Constructor
-//purpose :
-//=======================================================================
-GEOMImpl_Fillet1d::GEOMImpl_Fillet1d(const TopoDS_Edge& theEdge1,
- const TopoDS_Edge& theEdge2,
- const gp_Pln& thePlane)
-: myEdgesExchnged( Standard_False )
-{
- myPlane = new Geom_Plane(thePlane);
-
- BRepAdaptor_Curve aBAC1(theEdge1);
- BRepAdaptor_Curve aBAC2(theEdge2);
- if (aBAC1.GetType() < aBAC2.GetType())
- { // first curve must be more complicated
- myEdge1 = theEdge2;
- myEdge2 = theEdge1;
- myEdgesExchnged = Standard_True;
- }
- else
- {
- myEdge1 = theEdge1;
- myEdge2 = theEdge2;
- }
-
- Handle(Geom_Curve) aCurve1 = BRep_Tool::Curve(myEdge1, myStart1, myEnd1);
- Handle(Geom_Curve) aCurve2 = BRep_Tool::Curve(myEdge2, myStart2, myEnd2);
-
- myCurve1 = GeomProjLib::Curve2d(aCurve1, myStart1, myEnd1, myPlane);
- myCurve2 = GeomProjLib::Curve2d(aCurve2, myStart2, myEnd2, myPlane);
-
- while (myCurve1->IsPeriodic() && myStart1 >= myEnd1)
- myEnd1 += myCurve1->Period();
- while (myCurve2->IsPeriodic() && myStart2 >= myEnd2)
- myEnd2 += myCurve2->Period();
-
- if (aBAC1.GetType() == aBAC2.GetType())
- {
- if (myEnd2 - myStart2 < myEnd1 - myStart1)
- { // first curve must be parametrically shorter
- TopoDS_Edge anEdge = myEdge1;
- myEdge1 = myEdge2;
- myEdge2 = anEdge;
- Handle(Geom2d_Curve) aCurve = myCurve1;
- myCurve1 = myCurve2;
- myCurve2 = aCurve;
- Standard_Real a = myStart1;
- myStart1 = myStart2;
- myStart2 = a;
- a = myEnd1;
- myEnd1 = myEnd2;
- myEnd2 = a;
- myEdgesExchnged = Standard_True;
- }
- }
-}
-
-//=======================================================================
-//function : isRadiusIntersected
-//purpose : local function
-//=======================================================================
-static Standard_Boolean isRadiusIntersected(const Handle(Geom2d_Curve)& theCurve,
- const gp_Pnt2d theStart,
- const gp_Pnt2d theEnd,
- const Standard_Boolean theStartConnected)
-{
- const Standard_Real aTol = Precision::Confusion();
- const Standard_Real anAngTol = Precision::Angular();
- Geom2dAPI_InterCurveCurve anInter(theCurve, new Geom2d_Line(theStart,
- gp_Dir2d(gp_Vec2d(theStart, theEnd))), aTol);
- Standard_Integer a;
- gp_Pnt2d aPoint;
- for(a = anInter.NbPoints(); a > 0; a--)
- {
- aPoint = anInter.Point(a);
- if ( aPoint.Distance(theStart) < aTol && !theStartConnected )
- return Standard_True;
- if (aPoint.Distance(theEnd) < aTol * 200)
- return Standard_True;
- if (gp_Vec2d(aPoint, theStart).IsOpposite(gp_Vec2d(aPoint, theEnd), anAngTol))
- return Standard_True;
- }
- Handle(Geom2d_Curve) aCurve;
- for(a = anInter.NbSegments(); a > 0; a--)
- {
- 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;
- }
- return Standard_False;
-}
-
-
-//=======================================================================
-//function : fillPoint
-//purpose :
-//=======================================================================
-void GEOMImpl_Fillet1d::fillPoint(GEOMImpl_Fillet1dPoint* thePoint)
-{
- gp_Pnt2d aPoint;
- gp_Vec2d aVec;
- const Standard_Real aTol = Precision::Confusion();
- myCurve1->D1(thePoint->GetParam(), aPoint, aVec);
- if (aVec.SquareMagnitude() < aTol)
- return;
-
- gp_Vec2d aPerp(((myStartSide)?-1:1) * aVec.Y(), ((myStartSide)?1:-1) * aVec.X());
- aPerp.Normalize();
- aPerp.Multiply(myRadius);
- gp_Pnt2d aCenter = aPoint.Translated(aPerp);
- thePoint->SetCenter(aCenter);
-
- // on the intersection point
- Standard_Boolean aValid = Standard_True;
- Geom2dAPI_ProjectPointOnCurve aProjInt(aPoint, myCurve2);
- if (aProjInt.NbPoints() && aPoint.Distance(aProjInt.NearestPoint()) < aTol)
- aValid = Standard_False;
- else
- aValid = !isRadiusIntersected(myCurve2, aPoint, aCenter, Standard_True);
-
- Geom2dAPI_ProjectPointOnCurve aProj(aCenter, myCurve2);
- Standard_Integer a, aNB = aProj.NbPoints();
- for(a = aNB; a > 0; a--)
- {
- if (aPoint.Distance(aProj.Point(a)) < aTol)
- continue;
-
- Standard_Boolean aValid2 = aValid;
- if (aValid2)
- aValid2 = !isRadiusIntersected(myCurve1, aCenter, aProj.Point(a), Standard_False);
-
- // checking the right parameter
- Standard_Real aParam = aProj.Parameter(a);
- while(myCurve2->IsPeriodic() && aParam < myStart2)
- aParam += myCurve2->Period();
-
- thePoint->AddValue(aProj.Distance(a) * aProj.Distance(a) - myRadius * myRadius,
- (aParam >= myStart2 && aParam <= myEnd2 && aValid2));
- if (fabs(fabs(aProj.Distance(a)) - myRadius) < aTol)
- thePoint->SetParam2(aParam);
- }
-}
-
-//=======================================================================
-//function : fillDiff
-//purpose :
-//=======================================================================
-void GEOMImpl_Fillet1d::fillDiff(GEOMImpl_Fillet1dPoint* thePoint, Standard_Real theDiffStep, Standard_Boolean theFront)
-{
- GEOMImpl_Fillet1dPoint* aDiff =
- new GEOMImpl_Fillet1dPoint(thePoint->GetParam() + (theFront?(theDiffStep):(-theDiffStep)));
- fillPoint(aDiff);
- if (!thePoint->ComputeDifference(aDiff))
- {
- aDiff->SetParam(thePoint->GetParam() + (theFront?(-theDiffStep):(theDiffStep)));
- fillPoint(aDiff);
- thePoint->ComputeDifference(aDiff);
- }
- delete aDiff;
-}
-
-//=======================================================================
-//function : Perform
-//purpose :
-//=======================================================================
-Standard_Boolean GEOMImpl_Fillet1d::Perform(const Standard_Real theRadius)
-{
- myResultParams.Clear();
- myResultOrientation.Clear();
-
- Standard_Real aNBSteps = 100;
- Geom2dAdaptor_Curve aGAC(myCurve1);
- switch (aGAC.GetType())
- {
- case GeomAbs_Line:
- aNBSteps = 2;
- break;
- case GeomAbs_Circle:
- aNBSteps = 4;
- break;
- case GeomAbs_Ellipse:
- aNBSteps = 5;
- break;
- case GeomAbs_BezierCurve:
- case GeomAbs_BSplineCurve:
- aNBSteps = 2 + aGAC.Degree() * aGAC.NbPoles();
- break;
- default: // unknown: maximum
- aNBSteps = 100;
- }
-
- myRadius = theRadius;
- Standard_Real aParam, aStep, aDStep;
- aStep = (myEnd1 - myStart1) / aNBSteps;
- aDStep = aStep/1000.;
-
- Standard_Integer aCycle;
- for(aCycle = 2, myStartSide = Standard_False; aCycle; myStartSide = !myStartSide, aCycle--)
- {
- GEOMImpl_Fillet1dPoint *aLeft = NULL, *aRight = NULL;
-
- for(aParam = myStart1 + aStep; aParam < myEnd1 || fabs(myEnd1 - aParam) < Precision::Confusion(); aParam += aStep)
- {
- if (!aLeft)
- {
- aLeft = new GEOMImpl_Fillet1dPoint(aParam - aStep);
- fillPoint(aLeft);
- fillDiff(aLeft, aDStep, Standard_True);
- }
-
- aRight = new GEOMImpl_Fillet1dPoint(aParam);
- fillPoint(aRight);
- fillDiff(aRight, aDStep, Standard_False);
-
- aLeft->FilterPoints(aRight);
- performNewton(aLeft, aRight);
-
- delete aLeft;
- aLeft = aRight;
- }
- delete aLeft;
- }
-
- if (myResultParams.Extent())
- return Standard_True;
-
- return Standard_False;
-}
-
-//=======================================================================
-//function : processPoint
-//purpose :
-//=======================================================================
-Standard_Boolean GEOMImpl_Fillet1d::processPoint(GEOMImpl_Fillet1dPoint* theLeft,
- GEOMImpl_Fillet1dPoint* theRight,
- Standard_Real theParameter)
-{
- if (theParameter >= theLeft->GetParam() && theParameter < theRight->GetParam())
- {
- Standard_Real aDX = theRight->GetParam() - theLeft->GetParam();
- if (theParameter - theLeft->GetParam() < aDX / 100.)
- {
- theParameter = theLeft->GetParam() + aDX / 100.;
- }
- if (theRight->GetParam() - theParameter < aDX / 100.)
- {
- theParameter = theRight->GetParam() - aDX / 100.;
- }
-
- GEOMImpl_Fillet1dPoint* aPoint1 = theLeft->Copy();
- GEOMImpl_Fillet1dPoint* aPoint2 = new GEOMImpl_Fillet1dPoint(theParameter);
- fillPoint(aPoint2);
- fillDiff(aPoint2, aDX / 1000., Standard_True);
-
- aPoint1->FilterPoints(aPoint2);
- performNewton(aPoint1, aPoint2);
- aPoint2->FilterPoints(theRight);
- performNewton(aPoint2, theRight);
-
- delete aPoint1;
- delete aPoint2;
- return Standard_True;
- }
-
- return Standard_False;
-}
-
-//=======================================================================
-//function : performNewton
-//purpose :
-//=======================================================================
-void GEOMImpl_Fillet1d::performNewton(GEOMImpl_Fillet1dPoint* theLeft,
- GEOMImpl_Fillet1dPoint* theRight)
-{
- Standard_Integer a;
- // check the left: if this is solution store it and remove it from the list of researching points of theLeft
- a = theLeft->HasSolution(myRadius);
- if (a)
- {
- if (theLeft->IsValid(a))
- {
- myResultParams.Append(theLeft->GetParam());
- myResultOrientation.Append(myStartSide);
- }
- return;
- }
-
- Standard_Real aDX = theRight->GetParam() - theLeft->GetParam();
- if ( aDX < Precision::Confusion() / 1000000.)
- {
- a = theRight->HasSolution(myRadius);
- if (a)
- if (theRight->IsValid(a))
- {
- myResultParams.Append(theRight->GetParam());
- myResultOrientation.Append(myStartSide);
- }
- return;
- }
-
- for(a = 1; a <= theLeft->GetNBValues(); a++)
- {
- Standard_Integer aNear = theLeft->GetNear(a);
-
- Standard_Real aA = (theRight->GetDiff(aNear) - theLeft->GetDiff(a)) / aDX;
- Standard_Real aB = theLeft->GetDiff(a) - aA * theLeft->GetParam();
- Standard_Real aC = theLeft->GetValue(a) - theLeft->GetDiff(a) * theLeft->GetParam() +
- aA * theLeft->GetParam() * theLeft->GetParam() / 2.0;
- Standard_Real aDet = aB * aB - 2.0 * aA * aC;
-
- if ( fabs(aDet) < gp::Resolution() )
- continue;
-
- if (fabs(aA) < Precision::Confusion())
- { // linear case
- if (fabs(aB) > 10e-20)
- {
- Standard_Real aX0 = - aC / aB; // use extremum
- if (aX0 > theLeft->GetParam() && aX0 < theRight->GetParam())
- processPoint(theLeft, theRight, aX0);
- }
- else
- {
- processPoint(theLeft, theRight, theLeft->GetParam() + aDX / 2.0); // linear division otherwise
- }
- }
- else
- {
- if (fabs(aB) > fabs(aDet * 1000000.))
- { // possible floating point operations accurancy errors
- processPoint(theLeft, theRight, theLeft->GetParam() + aDX / 2.0); // linear division otherwise
- }
- else
- {
- if (aDet > 0)
- { // two solutions
- aDet = sqrt(aDet);
- Standard_Boolean aRes = processPoint(theLeft, theRight, (- aB + aDet) / aA);
- if (!aRes)
- aRes = processPoint(theLeft, theRight, (- aB - aDet) / aA);
- if (!aRes)
- processPoint(theLeft, theRight, theLeft->GetParam() + aDX / 2.0); // linear division otherwise
- }
- else
- {
- Standard_Real aX0 = - aB / aA; // use extremum
- if (aX0 > theLeft->GetParam() && aX0 < theRight->GetParam())
- processPoint(theLeft, theRight, aX0);
- else
- processPoint(theLeft, theRight, theLeft->GetParam() + aDX / 2.0); // linear division otherwise
- }
- }
- }
- }
-}
-
-//=======================================================================
-//function : Result
-//purpose :
-//=======================================================================
-TopoDS_Edge GEOMImpl_Fillet1d::Result(const gp_Pnt& thePoint,
- TopoDS_Edge& theEdge1,
- TopoDS_Edge& theEdge2)
-{
- TopoDS_Edge aResult;
- gp_Pnt2d aTargetPoint2d;
- Standard_Real aX, aY;
- ElSLib::PlaneParameters(myPlane->Pln().Position(), thePoint, aX, aY);
- aTargetPoint2d.SetCoord(aX, aY);
-
- // choose the nearest circle
- Standard_Real aDistance, aP;
- GEOMImpl_Fillet1dPoint *aNearest;
- Standard_Integer a;
- TColStd_ListIteratorOfListOfReal anIter(myResultParams);
- for(aNearest = NULL, a = 1; anIter.More(); anIter.Next(), a++)
- {
- myStartSide = (myResultOrientation.Value(a)) ? Standard_True : Standard_False;
- GEOMImpl_Fillet1dPoint *aPoint = new GEOMImpl_Fillet1dPoint(anIter.Value());
- fillPoint(aPoint);
- if (!aPoint->HasSolution(myRadius))
- continue;
- aP = fabs(aPoint->GetCenter().Distance(aTargetPoint2d) - myRadius);
- if (!aNearest || aP < aDistance)
- {
- aNearest = aPoint;
- aDistance = aP;
- }
- else
- {
- delete aPoint;
- }
- }
-
- if (!aNearest)
- return aResult;
-
- // create circle edge
- gp_Pnt aCenter = ElSLib::PlaneValue(aNearest->GetCenter().X(),
- aNearest->GetCenter().Y(),
- myPlane->Pln().Position());
- Handle(Geom_Circle) aCircle =
- new Geom_Circle(gp_Ax2(aCenter, myPlane->Pln().Axis().Direction()), myRadius);
- gp_Pnt2d aPoint2d1, aPoint2d2;
- myCurve1->D0(aNearest->GetParam(), aPoint2d1);
- myCurve2->D0(aNearest->GetParam2(), aPoint2d2);
- gp_Pnt aPoint1 = ElSLib::PlaneValue(aPoint2d1.X(), aPoint2d1.Y(), myPlane->Pln().Position());
- gp_Pnt aPoint2 = ElSLib::PlaneValue(aPoint2d2.X(), aPoint2d2.Y(), myPlane->Pln().Position());
-
- GeomAPI_ProjectPointOnCurve aProj(thePoint, aCircle);
- Standard_Real aTarGetParam = aProj.LowerDistanceParameter();
- gp_Pnt aPointOnCircle = aProj.NearestPoint();
-
- // Check extrema point manually, because there is a bug in Open CASCADE
- // in calculation of nearest point to a circle near the parameter 0.0
- gp_Pnt p0 = ElCLib::Value(0.0, aCircle->Circ());
- if (p0.Distance(thePoint) < aPointOnCircle.Distance(thePoint))
- {
- aTarGetParam = 0.0;
- aPointOnCircle = p0;
- }
-
- aProj.Perform(aPoint1);
- Standard_Real aParam1 = aProj.LowerDistanceParameter();
- aProj.Perform(aPoint2);
- Standard_Real aParam2 = aProj.LowerDistanceParameter();
- Standard_Boolean aIsOut = ((aParam1 < aTarGetParam && aParam2 < aTarGetParam) ||
- (aParam1 > aTarGetParam && aParam2 > aTarGetParam));
- if (aParam1 > aParam2)
- aIsOut = !aIsOut;
- BRepBuilderAPI_MakeEdge aBuilder(aCircle->Circ(),
- aIsOut ? aParam2 : aParam1,
- aIsOut? aParam1 : aParam2);
- aResult = aBuilder.Edge();
-
- // divide edges
- Standard_Real aStart, anEnd;
- Handle(Geom_Curve) aCurve = BRep_Tool::Curve(myEdge1, aStart, anEnd);
- gp_Vec aDir;
- aCurve->D1(aNearest->GetParam(), aPoint1, aDir);
-
- gp_Vec aCircleDir;
- aCircle->D1(aParam1, aPoint1, aCircleDir);
- if ((aCircleDir.Angle(aDir) > PI / 2.0) ^ aIsOut)
- aStart = aNearest->GetParam();
- else
- anEnd = aNearest->GetParam();
-
- //Check the case when start and end are identical. This happens
- //when the edge decreases to size 0. Old ww5 allows such
- //cases. So we are again bug compatible
- if (fabs(aStart - anEnd) < Precision::PConfusion()/*gp::Resolution()*/)
- anEnd = 0.01;
- //Divide edge
- BRepBuilderAPI_MakeEdge aDivider1(aCurve, aStart, anEnd);
- if (myEdgesExchnged)
- theEdge2 = aDivider1.Edge();
- else
- theEdge1 = aDivider1.Edge();
-
-
- aCurve = BRep_Tool::Curve(myEdge2, aStart, anEnd);
- aCurve->D1(aNearest->GetParam2(), aPoint2, aDir);
-
- aCircle->D1(aParam2, aPoint2, aCircleDir);
- if ((aCircleDir.Angle(aDir) > PI / 2.0) ^ (!aIsOut))
- aStart = aNearest->GetParam2();
- else
- anEnd = aNearest->GetParam2();
-
- //Check the case when start and end are identical. This happens
- //when the edge decreases to size 0. Old ww5 allows such
- //cases. So we are again bug compatible
- if (fabs(aStart - anEnd) < Precision::PConfusion()/*gp::Resolution()*/)
- anEnd = 0.01;
- BRepBuilderAPI_MakeEdge aDivider2(aCurve, aStart, anEnd);
- if (myEdgesExchnged)
- theEdge1 = aDivider2.Edge();
- else
- theEdge2 = aDivider2.Edge();
-
- delete aNearest;
- return aResult;
-}
-
-//=======================================================================
-//function : AddValue
-//purpose :
-//=======================================================================
-void GEOMImpl_Fillet1dPoint::AddValue(Standard_Real theValue, Standard_Boolean theValid)
-{
- Standard_Integer a;
- for(a = 1; a <= myV.Length(); a++)
- {
- if (theValue < myV.Value(a))
- {
- myV.InsertBefore(a, theValue);
- myValid.InsertBefore(a, (Standard_Integer)theValid);
- return;
- }
- }
- myV.Append(theValue);
- myValid.Append((Standard_Integer)theValid);
-}
-
-//=======================================================================
-//function : ComputeDifference
-//purpose :
-//=======================================================================
-Standard_Boolean GEOMImpl_Fillet1dPoint::ComputeDifference(GEOMImpl_Fillet1dPoint* thePoint)
-{
- Standard_Integer a;
- Standard_Boolean aDiffsSet = (myD.Length() != 0);
- Standard_Real aDX = thePoint->GetParam() - myParam, aDY;
- if (thePoint->myV.Length() == myV.Length())
- { // absolutely the same points
- for(a = 1; a <= myV.Length(); a++)
- {
- aDY = thePoint->myV.Value(a) - myV.Value(a);
- if ( aDiffsSet )
- myD.SetValue(a, fabs(aDX) > gp::Resolution() ? (aDY/aDX) : 0);
- else
- myD.Append( fabs(aDX) > gp::Resolution() ? (aDY/aDX) : 0);
- }
- return Standard_True;
- }
- // between the diffeerent points searching for nearest analogs
- Standard_Integer b;
- for(a = 1; a <= myV.Length(); a++)
- {
- for(b = 1; b <= thePoint->myV.Length(); b++)
- {
- if (b == 1 || fabs(thePoint->myV.Value(b) - myV.Value(a)) < fabs(aDY))
- aDY = thePoint->myV.Value(b) - myV.Value(a);
- }
- if (aDiffsSet)
- {
- if ( fabs(aDX) > gp::Resolution() && fabs(aDY / aDX) < fabs(myD.Value(a)))
- myD.SetValue(a, aDY / aDX);
- else
- myD.SetValue(a, 0);
- }
- else
- {
- myD.Append( fabs(aDX) > gp::Resolution() ? aDY/aDX : 0);
- }
- }
-
- return Standard_False;
-}
-
-//=======================================================================
-//function : FilterPoints
-//purpose :
-//=======================================================================
-void GEOMImpl_Fillet1dPoint::FilterPoints(GEOMImpl_Fillet1dPoint* thePoint)
-{
- Standard_Integer a, b;
- TColStd_SequenceOfReal aDiffs;
- Standard_Real aY, aY2, aDX = thePoint->GetParam() - myParam;
- for(a = 1; a <= myV.Length(); a++)
- {
- // searching for near point from thePoint
- Standard_Integer aNear = 0;
- Standard_Real aDiff = aDX * 10000.;
- aY = myV.Value(a) + myD.Value(a) * aDX;
- for(b = 1; b <= thePoint->myV.Length(); b++)
- {
- // calculate hypothesis value of the Y2 with the constant first and second derivative
- aY2 = aY + aDX * (thePoint->myD.Value(b) - myD.Value(a)) / 2.0;
- if (aNear == 0 || fabs(aY2 - thePoint->myV.Value(b)) < fabs(aDiff))
- {
- aNear = b;
- aDiff = aY2 - thePoint->myV.Value(b);
- }
- }//for b...
-
- if (aNear)
- {
- if (myV.Value(a) * thePoint->myV.Value(aNear) > 0)
- {// the same sign at the same sides of the interval
- if (myV.Value(a) * myD.Value(a) > 0)
- {
- if (fabs(myD.Value(a)) > Precision::Confusion())
- aNear = 0;
- }
- else
- {
- if (fabs(myV.Value(a)) > fabs(thePoint->myV.Value(aNear)))
- if (thePoint->myV.Value(aNear) * thePoint->myD.Value(aNear) < 0 &&
- fabs(thePoint->myD.Value(aNear)) > Precision::Confusion())
- {
- aNear = 0;
- }
- }
- }
- }
-
- if (aNear)
- {
- if (myV.Value(a) * thePoint->myV.Value(aNear) > 0)
- {
- if ((myV.Value(a) + myD.Value(a) * aDX) * myV.Value(a) > Precision::Confusion() &&
- (thePoint->myV.Value(aNear) + thePoint->myD.Value(aNear) * aDX) * thePoint->myV.Value(aNear) > Precision::Confusion())
- {
- aNear = 0;
- }
- }
- }
-
- if (aNear)
- {
- if ( fabs(aDX) < gp::Resolution() || fabs(aDiff / aDX) > 1.e+7)
- {
- aNear = 0;
- }
- }
-
- if (aNear == 0)
- { // there is no near: remove it from the list
- myV.Remove(a);
- myD.Remove(a);
- myValid.Remove(a);
- a--;
- }
- else
- {
- Standard_Boolean aFound = Standard_False;
- for(b = 1; b <= myNear.Length(); b++)
- {
- if (myNear.Value(b) == aNear)
- {
- if (fabs(aDiffs.Value(b)) < fabs(aDiff))
- { // return this 'near'
- aFound = Standard_True;
- myV.Remove(a);
- myD.Remove(a);
- myValid.Remove(a);
- a--;
- break;
- }
- else
- { // remove the old 'near'
- myV.Remove(b);
- myD.Remove(b);
- myValid.Remove(b);
- myNear.Remove(b);
- aDiffs.Remove(b);
- a--;
- break;
- }
- }
- }//for b...
- if (!aFound)
- {
- myNear.Append(aNear);
- aDiffs.Append(aDiff);
- }
- }
- }//for a...
-}
-
-//=======================================================================
-//function : Copy
-//purpose :
-//=======================================================================
-GEOMImpl_Fillet1dPoint* GEOMImpl_Fillet1dPoint::Copy()
-{
- GEOMImpl_Fillet1dPoint* aCopy = new GEOMImpl_Fillet1dPoint(myParam);
- Standard_Integer a;
- for(a = 1; a <= myV.Length(); a++)
- {
- aCopy->myV.Append(myV.Value(a));
- aCopy->myD.Append(myD.Value(a));
- aCopy->myValid.Append(myValid.Value(a));
- }
- return aCopy;
-}
-
-//=======================================================================
-//function : HasSolution
-//purpose :
-//=======================================================================
-Standard_Integer GEOMImpl_Fillet1dPoint::HasSolution(const Standard_Real theRadius)
-{
- Standard_Integer a;
- for(a = 1; a <= myV.Length(); a++)
- {
- if (fabs(sqrt(fabs(fabs(myV.Value(a)) + theRadius * theRadius)) - theRadius) < Precision::Confusion() / 10.)
- return a;
- }
- return 0;
-}
-
-//=======================================================================
-//function : RemoveSolution
-//purpose :
-//=======================================================================
-void GEOMImpl_Fillet1dPoint::RemoveSolution(Standard_Integer theIndex)
-{
- myV.Remove(theIndex);
- myD.Remove(theIndex);
- myValid.Remove(theIndex);
- myNear.Remove(theIndex);
-}
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE\r
+//\r
+// This library is free software; you can redistribute it and/or\r
+// modify it under the terms of the GNU Lesser General Public\r
+// License as published by the Free Software Foundation; either\r
+// version 2.1 of the License.\r
+//\r
+// This library is distributed in the hope that it will be useful,\r
+// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
+// Lesser General Public License for more details.\r
+//\r
+// You should have received a copy of the GNU Lesser General Public\r
+// License along with this library; if not, write to the Free Software\r
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
+//\r
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com\r
+//\r
+\r
+// File : GEOMImpl_Fillet1d.cxx\r
+// Module : GEOMImpl\r
+//\r
+#include "GEOMImpl_Fillet1d.hxx"\r
+\r
+#include <BRep_Tool.hxx>\r
+#include <BRepAdaptor_Curve.hxx>\r
+#include <BRepBuilderAPI_MakeEdge.hxx>\r
+#include <ElCLib.hxx>\r
+#include <ElSLib.hxx>\r
+#include <gp_Circ.hxx>\r
+#include <Geom2d_Line.hxx>\r
+#include <Geom2dAPI_ProjectPointOnCurve.hxx>\r
+#include <Geom2dAPI_InterCurveCurve.hxx>\r
+#include <GeomAPI_ProjectPointOnCurve.hxx>\r
+#include <GeomProjLib.hxx>\r
+#include <Geom_Circle.hxx>\r
+#include <Precision.hxx>\r
+#include <TColStd_ListIteratorOfListOfReal.hxx>\r
+\r
+/**\r
+ * class GEOMImpl_Fillet1d\r
+ */\r
+\r
+\r
+//=======================================================================\r
+//function : Constructor\r
+//purpose : \r
+//=======================================================================\r
+GEOMImpl_Fillet1d::GEOMImpl_Fillet1d(const TopoDS_Edge& theEdge1,\r
+ const TopoDS_Edge& theEdge2,\r
+ const gp_Pln& thePlane)\r
+: myEdgesExchnged( Standard_False )\r
+{\r
+ myPlane = new Geom_Plane(thePlane);\r
+\r
+ BRepAdaptor_Curve aBAC1(theEdge1);\r
+ BRepAdaptor_Curve aBAC2(theEdge2);\r
+ if (aBAC1.GetType() < aBAC2.GetType()) \r
+ { // first curve must be more complicated\r
+ myEdge1 = theEdge2;\r
+ myEdge2 = theEdge1;\r
+ myEdgesExchnged = Standard_True;\r
+ } \r
+ else\r
+ {\r
+ myEdge1 = theEdge1;\r
+ myEdge2 = theEdge2;\r
+ }\r
+\r
+ Handle(Geom_Curve) aCurve1 = BRep_Tool::Curve(myEdge1, myStart1, myEnd1);\r
+ Handle(Geom_Curve) aCurve2 = BRep_Tool::Curve(myEdge2, myStart2, myEnd2);\r
+\r
+ myCurve1 = GeomProjLib::Curve2d(aCurve1, myStart1, myEnd1, myPlane);\r
+ myCurve2 = GeomProjLib::Curve2d(aCurve2, myStart2, myEnd2, myPlane);\r
+\r
+ while (myCurve1->IsPeriodic() && myStart1 >= myEnd1)\r
+ myEnd1 += myCurve1->Period();\r
+ while (myCurve2->IsPeriodic() && myStart2 >= myEnd2)\r
+ myEnd2 += myCurve2->Period();\r
+ \r
+ if (aBAC1.GetType() == aBAC2.GetType()) \r
+ {\r
+ if (myEnd2 - myStart2 < myEnd1 - myStart1) \r
+ { // first curve must be parametrically shorter\r
+ TopoDS_Edge anEdge = myEdge1;\r
+ myEdge1 = myEdge2;\r
+ myEdge2 = anEdge;\r
+ Handle(Geom2d_Curve) aCurve = myCurve1;\r
+ myCurve1 = myCurve2;\r
+ myCurve2 = aCurve;\r
+ Standard_Real a = myStart1;\r
+ myStart1 = myStart2;\r
+ myStart2 = a;\r
+ a = myEnd1;\r
+ myEnd1 = myEnd2;\r
+ myEnd2 = a;\r
+ myEdgesExchnged = Standard_True;\r
+ }\r
+ }\r
+}\r
+\r
+//=======================================================================\r
+//function : isRadiusIntersected\r
+//purpose : local function\r
+//=======================================================================\r
+static Standard_Boolean isRadiusIntersected(const Handle(Geom2d_Curve)& theCurve,\r
+ const gp_Pnt2d theStart,\r
+ const gp_Pnt2d theEnd,\r
+ const Standard_Boolean theStartConnected) \r
+{\r
+ const Standard_Real aTol = Precision::Confusion();\r
+ const Standard_Real anAngTol = Precision::Angular();\r
+ Geom2dAPI_InterCurveCurve anInter(theCurve, new Geom2d_Line(theStart,\r
+ gp_Dir2d(gp_Vec2d(theStart, theEnd))), aTol);\r
+ Standard_Integer a;\r
+ gp_Pnt2d aPoint;\r
+ for(a = anInter.NbPoints(); a > 0; a--) \r
+ {\r
+ aPoint = anInter.Point(a);\r
+ if ( aPoint.Distance(theStart) < aTol && !theStartConnected )\r
+ return Standard_True;\r
+ if (aPoint.Distance(theEnd) < aTol * 200)\r
+ return Standard_True;\r
+ if (gp_Vec2d(aPoint, theStart).IsOpposite(gp_Vec2d(aPoint, theEnd), anAngTol)) \r
+ return Standard_True;\r
+ }\r
+ Handle(Geom2d_Curve) aCurve;\r
+ for(a = anInter.NbSegments(); a > 0; a--) \r
+ {\r
+ anInter.Segment(a, aCurve);\r
+ aPoint = aCurve->Value(aCurve->FirstParameter());\r
+ if (aPoint.Distance(theStart) < aTol) \r
+ if (!theStartConnected) \r
+ return Standard_True;\r
+ if (aPoint.Distance(theEnd) < aTol) \r
+ return Standard_True;\r
+ if (gp_Vec2d(aPoint, theStart).IsOpposite(gp_Vec2d(aPoint, theEnd), anAngTol)) \r
+ return Standard_True;\r
+ aPoint = aCurve->Value(aCurve->LastParameter());\r
+ if (aPoint.Distance(theStart) < aTol) \r
+ if (!theStartConnected) \r
+ return Standard_True;\r
+ if (aPoint.Distance(theEnd) < aTol) \r
+ return Standard_True;\r
+ if (gp_Vec2d(aPoint, theStart).IsOpposite(gp_Vec2d(aPoint, theEnd), anAngTol)) \r
+ return Standard_True;\r
+ }\r
+ return Standard_False;\r
+}\r
+\r
+\r
+//=======================================================================\r
+//function : fillPoint\r
+//purpose : \r
+//=======================================================================\r
+void GEOMImpl_Fillet1d::fillPoint(GEOMImpl_Fillet1dPoint* thePoint) \r
+{\r
+ gp_Pnt2d aPoint;\r
+ gp_Vec2d aVec;\r
+ const Standard_Real aTol = Precision::Confusion();\r
+ myCurve1->D1(thePoint->GetParam(), aPoint, aVec);\r
+ if (aVec.SquareMagnitude() < aTol) \r
+ return;\r
+ \r
+ gp_Vec2d aPerp(((myStartSide)?-1:1) * aVec.Y(), ((myStartSide)?1:-1) * aVec.X());\r
+ aPerp.Normalize();\r
+ aPerp.Multiply(myRadius);\r
+ gp_Pnt2d aCenter = aPoint.Translated(aPerp);\r
+ thePoint->SetCenter(aCenter);\r
+\r
+ // on the intersection point\r
+ Standard_Boolean aValid = Standard_True;\r
+ Geom2dAPI_ProjectPointOnCurve aProjInt(aPoint, myCurve2);\r
+ if (aProjInt.NbPoints() && aPoint.Distance(aProjInt.NearestPoint()) < aTol) \r
+ aValid = Standard_False;\r
+ else \r
+ aValid = !isRadiusIntersected(myCurve2, aPoint, aCenter, Standard_True);\r
+ \r
+ Geom2dAPI_ProjectPointOnCurve aProj(aCenter, myCurve2);\r
+ Standard_Integer a, aNB = aProj.NbPoints();\r
+ for(a = aNB; a > 0; a--) \r
+ {\r
+ if (aPoint.Distance(aProj.Point(a)) < aTol) \r
+ continue;\r
+ \r
+ Standard_Boolean aValid2 = aValid;\r
+ if (aValid2) \r
+ aValid2 = !isRadiusIntersected(myCurve1, aCenter, aProj.Point(a), Standard_False);\r
+\r
+ // checking the right parameter\r
+ Standard_Real aParam = aProj.Parameter(a);\r
+ while(myCurve2->IsPeriodic() && aParam < myStart2)\r
+ aParam += myCurve2->Period();\r
+\r
+ thePoint->AddValue(aProj.Distance(a) * aProj.Distance(a) - myRadius * myRadius,\r
+ (aParam >= myStart2 && aParam <= myEnd2 && aValid2));\r
+ if (fabs(fabs(aProj.Distance(a)) - myRadius) < aTol)\r
+ thePoint->SetParam2(aParam);\r
+ }\r
+}\r
+\r
+//=======================================================================\r
+//function : fillDiff\r
+//purpose : \r
+//=======================================================================\r
+void GEOMImpl_Fillet1d::fillDiff(GEOMImpl_Fillet1dPoint* thePoint, Standard_Real theDiffStep, Standard_Boolean theFront) \r
+{\r
+ GEOMImpl_Fillet1dPoint* aDiff =\r
+ new GEOMImpl_Fillet1dPoint(thePoint->GetParam() + (theFront?(theDiffStep):(-theDiffStep)));\r
+ fillPoint(aDiff);\r
+ if (!thePoint->ComputeDifference(aDiff))\r
+ {\r
+ aDiff->SetParam(thePoint->GetParam() + (theFront?(-theDiffStep):(theDiffStep)));\r
+ fillPoint(aDiff);\r
+ thePoint->ComputeDifference(aDiff);\r
+ }\r
+ delete aDiff;\r
+}\r
+\r
+//=======================================================================\r
+//function : Perform\r
+//purpose : \r
+//=======================================================================\r
+Standard_Boolean GEOMImpl_Fillet1d::Perform(const Standard_Real theRadius) \r
+{\r
+ myDegreeOfRecursion = 0;\r
+ myResultParams.Clear();\r
+ myResultOrientation.Clear();\r
+\r
+ Standard_Real aNBSteps = 100;\r
+ Geom2dAdaptor_Curve aGAC(myCurve1);\r
+ switch (aGAC.GetType()) \r
+ {\r
+ case GeomAbs_Line:\r
+ aNBSteps = 2;\r
+ break;\r
+ case GeomAbs_Circle:\r
+ aNBSteps = 4;\r
+ break;\r
+ case GeomAbs_Ellipse:\r
+ aNBSteps = 5;\r
+ break;\r
+ case GeomAbs_BezierCurve:\r
+ case GeomAbs_BSplineCurve:\r
+ aNBSteps = 2 + aGAC.Degree() * aGAC.NbPoles();\r
+ break;\r
+ default: // unknown: maximum\r
+ aNBSteps = 100;\r
+ }\r
+\r
+ myRadius = theRadius;\r
+ Standard_Real aParam, aStep, aDStep;\r
+ aStep = (myEnd1 - myStart1) / aNBSteps;\r
+ aDStep = aStep/1000.;\r
+\r
+ Standard_Integer aCycle;\r
+ for(aCycle = 2, myStartSide = Standard_False; aCycle; myStartSide = !myStartSide, aCycle--) \r
+ {\r
+ GEOMImpl_Fillet1dPoint *aLeft = NULL, *aRight = NULL;\r
+ \r
+ for(aParam = myStart1 + aStep; aParam < myEnd1 || fabs(myEnd1 - aParam) < Precision::Confusion(); aParam += aStep) \r
+ {\r
+ if (!aLeft) \r
+ {\r
+ aLeft = new GEOMImpl_Fillet1dPoint(aParam - aStep);\r
+ fillPoint(aLeft);\r
+ fillDiff(aLeft, aDStep, Standard_True);\r
+ }\r
+ \r
+ aRight = new GEOMImpl_Fillet1dPoint(aParam);\r
+ fillPoint(aRight);\r
+ fillDiff(aRight, aDStep, Standard_False);\r
+ \r
+ aLeft->FilterPoints(aRight);\r
+ performNewton(aLeft, aRight);\r
+ \r
+ delete aLeft;\r
+ aLeft = aRight;\r
+ }\r
+ delete aLeft;\r
+ }\r
+\r
+ if (myResultParams.Extent()) \r
+ return Standard_True;\r
+ \r
+ return Standard_False;\r
+}\r
+\r
+//=======================================================================\r
+//function : processPoint\r
+//purpose : \r
+//=======================================================================\r
+Standard_Boolean GEOMImpl_Fillet1d::processPoint(GEOMImpl_Fillet1dPoint* theLeft,\r
+ GEOMImpl_Fillet1dPoint* theRight,\r
+ Standard_Real theParameter) \r
+{\r
+ if (theParameter >= theLeft->GetParam() && theParameter < theRight->GetParam()) \r
+ {\r
+ Standard_Real aDX = theRight->GetParam() - theLeft->GetParam();\r
+ if (theParameter - theLeft->GetParam() < aDX / 100.) \r
+ {\r
+ theParameter = theLeft->GetParam() + aDX / 100.;\r
+ }\r
+ if (theRight->GetParam() - theParameter < aDX / 100.)\r
+ {\r
+ theParameter = theRight->GetParam() - aDX / 100.;\r
+ }\r
+\r
+ // Protection on infinite loop.\r
+ myDegreeOfRecursion++;\r
+ Standard_Real diffx = 0.001 * aDX;\r
+ if (myDegreeOfRecursion > 1000)\r
+ {\r
+ diffx *= 10.0;\r
+ if (myDegreeOfRecursion > 10000)\r
+ {\r
+ diffx *= 10.0;\r
+ if (myDegreeOfRecursion > 100000)\r
+ {\r
+ return Standard_True;\r
+ }\r
+ }\r
+ }\r
+\r
+ GEOMImpl_Fillet1dPoint* aPoint1 = theLeft->Copy();\r
+ GEOMImpl_Fillet1dPoint* aPoint2 = new GEOMImpl_Fillet1dPoint(theParameter);\r
+ fillPoint(aPoint2);\r
+ fillDiff(aPoint2, diffx, Standard_True);\r
+ \r
+ aPoint1->FilterPoints(aPoint2);\r
+ performNewton(aPoint1, aPoint2);\r
+ aPoint2->FilterPoints(theRight);\r
+ performNewton(aPoint2, theRight);\r
+\r
+ delete aPoint1;\r
+ delete aPoint2;\r
+ return Standard_True;\r
+ }\r
+\r
+ return Standard_False;\r
+}\r
+\r
+//=======================================================================\r
+//function : performNewton\r
+//purpose : \r
+//=======================================================================\r
+void GEOMImpl_Fillet1d::performNewton(GEOMImpl_Fillet1dPoint* theLeft,\r
+ GEOMImpl_Fillet1dPoint* theRight)\r
+{\r
+ Standard_Integer a;\r
+ // check the left: if this is solution store it and remove it from the list of researching points of theLeft\r
+ a = theLeft->HasSolution(myRadius);\r
+ if (a) \r
+ {\r
+ if (theLeft->IsValid(a)) \r
+ {\r
+ myResultParams.Append(theLeft->GetParam());\r
+ myResultOrientation.Append(myStartSide);\r
+ }\r
+ return;\r
+ }\r
+\r
+ Standard_Real aDX = theRight->GetParam() - theLeft->GetParam();\r
+ if ( aDX < Precision::Confusion() / 1000000.) \r
+ {\r
+ a = theRight->HasSolution(myRadius);\r
+ if (a)\r
+ if (theRight->IsValid(a)) \r
+ {\r
+ myResultParams.Append(theRight->GetParam());\r
+ myResultOrientation.Append(myStartSide);\r
+ }\r
+ return;\r
+ }\r
+\r
+ for(a = 1; a <= theLeft->GetNBValues(); a++) \r
+ {\r
+ Standard_Integer aNear = theLeft->GetNear(a);\r
+ \r
+ Standard_Real aA = (theRight->GetDiff(aNear) - theLeft->GetDiff(a)) / aDX;\r
+ Standard_Real aB = theLeft->GetDiff(a) - aA * theLeft->GetParam();\r
+ Standard_Real aC = theLeft->GetValue(a) - theLeft->GetDiff(a) * theLeft->GetParam() + \r
+ aA * theLeft->GetParam() * theLeft->GetParam() / 2.0;\r
+ Standard_Real aDet = aB * aB - 2.0 * aA * aC;\r
+\r
+ if ( fabs(aDet) < gp::Resolution() )\r
+ continue;\r
+ \r
+ if (fabs(aA) < Precision::Confusion()) \r
+ { // linear case\r
+ if (fabs(aB) > 10e-20) \r
+ {\r
+ Standard_Real aX0 = - aC / aB; // use extremum\r
+ if (aX0 > theLeft->GetParam() && aX0 < theRight->GetParam())\r
+ processPoint(theLeft, theRight, aX0);\r
+ }\r
+ else \r
+ {\r
+ processPoint(theLeft, theRight, theLeft->GetParam() + aDX / 2.0); // linear division otherwise\r
+ }\r
+ } \r
+ else\r
+ {\r
+ if (fabs(aB) > fabs(aDet * 1000000.)) \r
+ { // possible floating point operations accurancy errors\r
+ processPoint(theLeft, theRight, theLeft->GetParam() + aDX / 2.0); // linear division otherwise\r
+ } \r
+ else\r
+ {\r
+ if (aDet > 0) \r
+ { // two solutions\r
+ aDet = sqrt(aDet);\r
+ Standard_Boolean aRes = processPoint(theLeft, theRight, (- aB + aDet) / aA);\r
+ if (!aRes) \r
+ aRes = processPoint(theLeft, theRight, (- aB - aDet) / aA);\r
+ if (!aRes) \r
+ processPoint(theLeft, theRight, theLeft->GetParam() + aDX / 2.0); // linear division otherwise\r
+ } \r
+ else \r
+ {\r
+ Standard_Real aX0 = - aB / aA; // use extremum\r
+ if (aX0 > theLeft->GetParam() && aX0 < theRight->GetParam())\r
+ processPoint(theLeft, theRight, aX0);\r
+ else \r
+ processPoint(theLeft, theRight, theLeft->GetParam() + aDX / 2.0); // linear division otherwise\r
+ }\r
+ }\r
+ }\r
+ }\r
+}\r
+\r
+//=======================================================================\r
+//function : Result\r
+//purpose : \r
+//=======================================================================\r
+TopoDS_Edge GEOMImpl_Fillet1d::Result(const gp_Pnt& thePoint,\r
+ TopoDS_Edge& theEdge1,\r
+ TopoDS_Edge& theEdge2) \r
+{\r
+ TopoDS_Edge aResult;\r
+ gp_Pnt2d aTargetPoint2d;\r
+ Standard_Real aX, aY;\r
+ ElSLib::PlaneParameters(myPlane->Pln().Position(), thePoint, aX, aY);\r
+ aTargetPoint2d.SetCoord(aX, aY);\r
+ \r
+ // choose the nearest circle\r
+ Standard_Real aDistance, aP;\r
+ GEOMImpl_Fillet1dPoint *aNearest;\r
+ Standard_Integer a;\r
+ TColStd_ListIteratorOfListOfReal anIter(myResultParams);\r
+ for(aNearest = NULL, a = 1; anIter.More(); anIter.Next(), a++) \r
+ {\r
+ myStartSide = (myResultOrientation.Value(a)) ? Standard_True : Standard_False;\r
+ GEOMImpl_Fillet1dPoint *aPoint = new GEOMImpl_Fillet1dPoint(anIter.Value());\r
+ fillPoint(aPoint);\r
+ if (!aPoint->HasSolution(myRadius)) \r
+ continue;\r
+ aP = fabs(aPoint->GetCenter().Distance(aTargetPoint2d) - myRadius);\r
+ if (!aNearest || aP < aDistance) \r
+ {\r
+ aNearest = aPoint;\r
+ aDistance = aP;\r
+ } \r
+ else \r
+ {\r
+ delete aPoint;\r
+ }\r
+ }\r
+ \r
+ if (!aNearest) \r
+ return aResult;\r
+ \r
+ // create circle edge\r
+ gp_Pnt aCenter = ElSLib::PlaneValue(aNearest->GetCenter().X(),\r
+ aNearest->GetCenter().Y(),\r
+ myPlane->Pln().Position());\r
+ Handle(Geom_Circle) aCircle =\r
+ new Geom_Circle(gp_Ax2(aCenter, myPlane->Pln().Axis().Direction()), myRadius);\r
+ gp_Pnt2d aPoint2d1, aPoint2d2;\r
+ myCurve1->D0(aNearest->GetParam(), aPoint2d1);\r
+ myCurve2->D0(aNearest->GetParam2(), aPoint2d2);\r
+ gp_Pnt aPoint1 = ElSLib::PlaneValue(aPoint2d1.X(), aPoint2d1.Y(), myPlane->Pln().Position());\r
+ gp_Pnt aPoint2 = ElSLib::PlaneValue(aPoint2d2.X(), aPoint2d2.Y(), myPlane->Pln().Position());\r
+\r
+ GeomAPI_ProjectPointOnCurve aProj(thePoint, aCircle);\r
+ Standard_Real aTarGetParam = aProj.LowerDistanceParameter();\r
+ gp_Pnt aPointOnCircle = aProj.NearestPoint();\r
+\r
+ // Check extrema point manually, because there is a bug in Open CASCADE\r
+ // in calculation of nearest point to a circle near the parameter 0.0\r
+ gp_Pnt p0 = ElCLib::Value(0.0, aCircle->Circ());\r
+ if (p0.Distance(thePoint) < aPointOnCircle.Distance(thePoint))\r
+ {\r
+ aTarGetParam = 0.0;\r
+ aPointOnCircle = p0;\r
+ }\r
+\r
+ aProj.Perform(aPoint1);\r
+ Standard_Real aParam1 = aProj.LowerDistanceParameter();\r
+ aProj.Perform(aPoint2);\r
+ Standard_Real aParam2 = aProj.LowerDistanceParameter();\r
+ Standard_Boolean aIsOut = ((aParam1 < aTarGetParam && aParam2 < aTarGetParam) || \r
+ (aParam1 > aTarGetParam && aParam2 > aTarGetParam));\r
+ if (aParam1 > aParam2) \r
+ aIsOut = !aIsOut;\r
+ BRepBuilderAPI_MakeEdge aBuilder(aCircle->Circ(),\r
+ aIsOut ? aParam2 : aParam1,\r
+ aIsOut? aParam1 : aParam2);\r
+ aResult = aBuilder.Edge();\r
+\r
+ // divide edges\r
+ Standard_Real aStart, anEnd;\r
+ Handle(Geom_Curve) aCurve = BRep_Tool::Curve(myEdge1, aStart, anEnd);\r
+ gp_Vec aDir;\r
+ aCurve->D1(aNearest->GetParam(), aPoint1, aDir);\r
+\r
+ gp_Vec aCircleDir;\r
+ aCircle->D1(aParam1, aPoint1, aCircleDir);\r
+ if ((aCircleDir.Angle(aDir) > PI / 2.0) ^ aIsOut)\r
+ aStart = aNearest->GetParam();\r
+ else\r
+ anEnd = aNearest->GetParam();\r
+\r
+ if (fabs(aStart - anEnd) > Precision::Confusion())\r
+ {\r
+ //Divide edge\r
+ BRepBuilderAPI_MakeEdge aDivider1(aCurve, aStart, anEnd);\r
+ if (myEdgesExchnged) \r
+ theEdge2 = aDivider1.Edge();\r
+ else \r
+ theEdge1 = aDivider1.Edge();\r
+ }\r
+\r
+ aCurve = BRep_Tool::Curve(myEdge2, aStart, anEnd);\r
+ aCurve->D1(aNearest->GetParam2(), aPoint2, aDir);\r
+ \r
+ aCircle->D1(aParam2, aPoint2, aCircleDir);\r
+ if ((aCircleDir.Angle(aDir) > PI / 2.0) ^ (!aIsOut))\r
+ aStart = aNearest->GetParam2();\r
+ else\r
+ anEnd = aNearest->GetParam2();\r
+\r
+ if (fabs(aStart - anEnd) > Precision::Confusion())\r
+ {\r
+ BRepBuilderAPI_MakeEdge aDivider2(aCurve, aStart, anEnd);\r
+ if (myEdgesExchnged) \r
+ theEdge1 = aDivider2.Edge();\r
+ else \r
+ theEdge2 = aDivider2.Edge();\r
+ }\r
+\r
+ delete aNearest;\r
+ return aResult;\r
+}\r
+\r
+//=======================================================================\r
+//function : AddValue\r
+//purpose : \r
+//=======================================================================\r
+void GEOMImpl_Fillet1dPoint::AddValue(Standard_Real theValue, Standard_Boolean theValid) \r
+{\r
+ Standard_Integer a;\r
+ for(a = 1; a <= myV.Length(); a++) \r
+ {\r
+ if (theValue < myV.Value(a)) \r
+ {\r
+ myV.InsertBefore(a, theValue);\r
+ myValid.InsertBefore(a, (Standard_Integer)theValid);\r
+ return;\r
+ }\r
+ }\r
+ myV.Append(theValue);\r
+ myValid.Append((Standard_Integer)theValid);\r
+}\r
+\r
+//=======================================================================\r
+//function : ComputeDifference\r
+//purpose : \r
+//=======================================================================\r
+Standard_Boolean GEOMImpl_Fillet1dPoint::ComputeDifference(GEOMImpl_Fillet1dPoint* thePoint) \r
+{\r
+ Standard_Integer a;\r
+ Standard_Boolean aDiffsSet = (myD.Length() != 0);\r
+ Standard_Real aDX = thePoint->GetParam() - myParam, aDY;\r
+ if (thePoint->myV.Length() == myV.Length()) \r
+ { // absolutely the same points\r
+ for(a = 1; a <= myV.Length(); a++) \r
+ {\r
+ aDY = thePoint->myV.Value(a) - myV.Value(a);\r
+ if ( aDiffsSet ) \r
+ myD.SetValue(a, fabs(aDX) > gp::Resolution() ? (aDY/aDX) : 0);\r
+ else\r
+ myD.Append( fabs(aDX) > gp::Resolution() ? (aDY/aDX) : 0);\r
+ }\r
+ return Standard_True;\r
+ }\r
+ // between the diffeerent points searching for nearest analogs\r
+ Standard_Integer b;\r
+ for(a = 1; a <= myV.Length(); a++) \r
+ {\r
+ for(b = 1; b <= thePoint->myV.Length(); b++) \r
+ {\r
+ if (b == 1 || fabs(thePoint->myV.Value(b) - myV.Value(a)) < fabs(aDY))\r
+ aDY = thePoint->myV.Value(b) - myV.Value(a);\r
+ }\r
+ if (aDiffsSet) \r
+ {\r
+ if ( fabs(aDX) > gp::Resolution() && fabs(aDY / aDX) < fabs(myD.Value(a)))\r
+ myD.SetValue(a, aDY / aDX);\r
+ else\r
+ myD.SetValue(a, 0);\r
+ } \r
+ else \r
+ {\r
+ myD.Append( fabs(aDX) > gp::Resolution() ? aDY/aDX : 0);\r
+ }\r
+ }\r
+ \r
+ return Standard_False;\r
+}\r
+\r
+//=======================================================================\r
+//function : FilterPoints\r
+//purpose : \r
+//=======================================================================\r
+void GEOMImpl_Fillet1dPoint::FilterPoints(GEOMImpl_Fillet1dPoint* thePoint) \r
+{\r
+ Standard_Integer a, b;\r
+ TColStd_SequenceOfReal aDiffs;\r
+ Standard_Real aY, aY2, aDX = thePoint->GetParam() - myParam;\r
+ for(a = 1; a <= myV.Length(); a++) \r
+ {\r
+ // searching for near point from thePoint\r
+ Standard_Integer aNear = 0;\r
+ Standard_Real aDiff = aDX * 10000.;\r
+ aY = myV.Value(a) + myD.Value(a) * aDX;\r
+ for(b = 1; b <= thePoint->myV.Length(); b++) \r
+ {\r
+ // calculate hypothesis value of the Y2 with the constant first and second derivative\r
+ aY2 = aY + aDX * (thePoint->myD.Value(b) - myD.Value(a)) / 2.0;\r
+ if (aNear == 0 || fabs(aY2 - thePoint->myV.Value(b)) < fabs(aDiff)) \r
+ {\r
+ aNear = b;\r
+ aDiff = aY2 - thePoint->myV.Value(b);\r
+ }\r
+ }//for b...\r
+\r
+ if (aNear) \r
+ {\r
+ if (myV.Value(a) * thePoint->myV.Value(aNear) > 0) \r
+ {// the same sign at the same sides of the interval\r
+ if (myV.Value(a) * myD.Value(a) > 0) \r
+ {\r
+ if (fabs(myD.Value(a)) > Precision::Confusion()) \r
+ aNear = 0;\r
+ } \r
+ else \r
+ {\r
+ if (fabs(myV.Value(a)) > fabs(thePoint->myV.Value(aNear)))\r
+ if (thePoint->myV.Value(aNear) * thePoint->myD.Value(aNear) < 0 &&\r
+ fabs(thePoint->myD.Value(aNear)) > Precision::Confusion())\r
+ {\r
+ aNear = 0;\r
+ }\r
+ }\r
+ }\r
+ }\r
+\r
+ if (aNear) \r
+ {\r
+ if (myV.Value(a) * thePoint->myV.Value(aNear) > 0) \r
+ {\r
+ if ((myV.Value(a) + myD.Value(a) * aDX) * myV.Value(a) > Precision::Confusion() &&\r
+ (thePoint->myV.Value(aNear) + thePoint->myD.Value(aNear) * aDX) * thePoint->myV.Value(aNear) > Precision::Confusion())\r
+ {\r
+ aNear = 0;\r
+ }\r
+ }\r
+ }\r
+ \r
+ if (aNear)\r
+ {\r
+ if ( fabs(aDX) < gp::Resolution() || fabs(aDiff / aDX) > 1.e+7) \r
+ {\r
+ aNear = 0;\r
+ }\r
+ }\r
+\r
+ if (aNear == 0) \r
+ { // there is no near: remove it from the list\r
+ myV.Remove(a);\r
+ myD.Remove(a);\r
+ myValid.Remove(a);\r
+ a--;\r
+ } \r
+ else \r
+ {\r
+ Standard_Boolean aFound = Standard_False;\r
+ for(b = 1; b <= myNear.Length(); b++) \r
+ {\r
+ if (myNear.Value(b) == aNear) \r
+ {\r
+ if (fabs(aDiffs.Value(b)) < fabs(aDiff)) \r
+ { // return this 'near'\r
+ aFound = Standard_True;\r
+ myV.Remove(a);\r
+ myD.Remove(a);\r
+ myValid.Remove(a);\r
+ a--;\r
+ break;\r
+ } \r
+ else \r
+ { // remove the old 'near'\r
+ myV.Remove(b);\r
+ myD.Remove(b);\r
+ myValid.Remove(b);\r
+ myNear.Remove(b);\r
+ aDiffs.Remove(b);\r
+ a--;\r
+ break;\r
+ }\r
+ }\r
+ }//for b...\r
+ if (!aFound) \r
+ {\r
+ myNear.Append(aNear);\r
+ aDiffs.Append(aDiff);\r
+ }\r
+ }\r
+ }//for a...\r
+}\r
+\r
+//=======================================================================\r
+//function : Copy\r
+//purpose : \r
+//=======================================================================\r
+GEOMImpl_Fillet1dPoint* GEOMImpl_Fillet1dPoint::Copy() \r
+{\r
+ GEOMImpl_Fillet1dPoint* aCopy = new GEOMImpl_Fillet1dPoint(myParam);\r
+ Standard_Integer a;\r
+ for(a = 1; a <= myV.Length(); a++) \r
+ {\r
+ aCopy->myV.Append(myV.Value(a));\r
+ aCopy->myD.Append(myD.Value(a));\r
+ aCopy->myValid.Append(myValid.Value(a));\r
+ }\r
+ return aCopy;\r
+}\r
+\r
+//=======================================================================\r
+//function : HasSolution\r
+//purpose : \r
+//=======================================================================\r
+Standard_Integer GEOMImpl_Fillet1dPoint::HasSolution(const Standard_Real theRadius) \r
+{\r
+ Standard_Integer a;\r
+ for(a = 1; a <= myV.Length(); a++) \r
+ {\r
+ if (fabs(sqrt(fabs(fabs(myV.Value(a)) + theRadius * theRadius)) - theRadius) < Precision::Confusion() / 10.) \r
+ return a;\r
+ }\r
+ return 0;\r
+}\r
+\r
+//=======================================================================\r
+//function : RemoveSolution\r
+//purpose : \r
+//=======================================================================\r
+void GEOMImpl_Fillet1dPoint::RemoveSolution(Standard_Integer theIndex)\r
+{\r
+ myV.Remove(theIndex);\r
+ myD.Remove(theIndex);\r
+ myValid.Remove(theIndex);\r
+ myNear.Remove(theIndex);\r
+}\r
-// Copyright (C) 2007-2010 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.
-//
-// 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
-//
-
-// File : GEOMImpl_Fillet1d.hxx
-// Module : GEOMImpl
-//
-#ifndef _GEOMImpl_Fillet1d_HeaderFile
-#define _GEOMImpl_Fillet1d_HeaderFile
-
-#include <gp_Pnt.hxx>
-#include <Geom_Plane.hxx>
-#include <Geom2d_Curve.hxx>
-
-#include <TopoDS_Edge.hxx>
-#include <TColStd_ListOfReal.hxx>
-#include <TColStd_SequenceOfReal.hxx>
-#include <TColStd_SequenceOfInteger.hxx>
-
-class GEOMImpl_Fillet1dPoint;
-
-/**
-* GEOMImpl_Fillet1d is 1D fillet algorithm on two planar edges with given radius
-*/
-
-class GEOMImpl_Fillet1d
-{
-public:
- //! Constructor
- //! The fillet 1D algorithm initialise by two edges and plane
- Standard_EXPORT GEOMImpl_Fillet1d(const TopoDS_Edge& theEdge1,
- const TopoDS_Edge& theEdge2,
- const gp_Pln& thePlane);
- //! Makes fillet with given radius
- //! @returns Standard_True, if at least one result computed
- Standard_EXPORT Standard_Boolean Perform(const Standard_Real theRadius);
- //! Returns result fillet edge and modified edges as out parameters
- Standard_EXPORT TopoDS_Edge Result(const gp_Pnt& thePoint, TopoDS_Edge& theEdge1, TopoDS_Edge& theEdge2);
-
-private:
- //! private methods
- void fillPoint(GEOMImpl_Fillet1dPoint*);
- void fillDiff(GEOMImpl_Fillet1dPoint*, Standard_Real, Standard_Boolean);
- void performNewton(GEOMImpl_Fillet1dPoint*, GEOMImpl_Fillet1dPoint*);
- Standard_Boolean processPoint(GEOMImpl_Fillet1dPoint*, GEOMImpl_Fillet1dPoint*, Standard_Real);
-
-
-private:
- //! private fields
- TopoDS_Edge myEdge1, myEdge2;
- Handle(Geom_Plane) myPlane;
- Handle(Geom2d_Curve) myCurve1, myCurve2;
- Standard_Real myStart1, myEnd1, myStart2, myEnd2, myRadius;
- TColStd_ListOfReal myResultParams;
- TColStd_SequenceOfInteger myResultOrientation;
- Standard_Boolean myStartSide, myEdgesExchnged;
-};
-
-
-/**
-* GEOMImpl_Fillet1dPoint is an internal class for 1D fillet algorithm
-* to store and compare computed solutions on edges
-*/
-
-class GEOMImpl_Fillet1dPoint
-{
-public:
- //! Puiblic methods
-
- //! Constructor
- Standard_EXPORT GEOMImpl_Fillet1dPoint(Standard_Real theParam)
- {myParam = theParam;}
-
- //! Make copy of point
- //!WARNING: Copies only field values: myParam, myV, myD, myValid
- Standard_EXPORT GEOMImpl_Fillet1dPoint* Copy(); // warning: this is not the full copy!
-
- //! Set/Get parameter
- Standard_EXPORT inline void SetParam(Standard_Real theParam)
- {myParam = theParam;}
- Standard_EXPORT inline Standard_Real GetParam() const
- {return myParam;}
- Standard_EXPORT inline void SetParam2(const Standard_Real theParam2)
- {myParam2 = theParam2;}
- Standard_EXPORT inline Standard_Real GetParam2()
- { return myParam2 ; }
-
- //! Returns validity
- Standard_EXPORT inline Standard_Boolean IsValid(int theIndex)
- {return (Standard_Boolean)myValid.Value(theIndex);}
-
- //! Get values
- Standard_EXPORT inline Standard_Integer GetNBValues() {return myV.Length();}
- Standard_EXPORT inline Standard_Real GetValue(Standard_Integer theIndex)
- {return myV.Value(theIndex);}
- Standard_EXPORT inline Standard_Real GetDiff(Standard_Integer theIndex)
- {return myD.Value(theIndex);}
- Standard_EXPORT inline Standard_Integer GetNear(Standard_Integer theIndex)
- {return myNear.Value(theIndex);}
-
- //! Set/Get center point
- Standard_EXPORT inline void SetCenter(const gp_Pnt2d thePoint)
- {myCenter = thePoint;}
- Standard_EXPORT inline const gp_Pnt2d GetCenter()
- {return myCenter;}
-
- Standard_EXPORT void AddValue(Standard_Real theValue, Standard_Boolean theIsValid);
-
- //! compute difference between this and given point
- Standard_EXPORT Standard_Boolean ComputeDifference(GEOMImpl_Fillet1dPoint*);
- Standard_EXPORT void FilterPoints(GEOMImpl_Fillet1dPoint*);
-
- //! Check is point contains solution and returns the index of them if any
- Standard_EXPORT Standard_Integer HasSolution(Standard_Real theRadius);
- //! Remove solution by index
- void RemoveSolution(Standard_Integer theIndex);
-
-private:
- //! Private fields
- gp_Pnt2d myCenter;
- Standard_Real myParam, myParam2;
- TColStd_SequenceOfReal myV, myD;
- TColStd_SequenceOfInteger myValid, myNear;
-};
-
-#endif
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE\r
+//\r
+// This library is free software; you can redistribute it and/or\r
+// modify it under the terms of the GNU Lesser General Public\r
+// License as published by the Free Software Foundation; either\r
+// version 2.1 of the License.\r
+//\r
+// This library is distributed in the hope that it will be useful,\r
+// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
+// Lesser General Public License for more details.\r
+//\r
+// You should have received a copy of the GNU Lesser General Public\r
+// License along with this library; if not, write to the Free Software\r
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
+//\r
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com\r
+//\r
+\r
+// File : GEOMImpl_Fillet1d.hxx\r
+// Module : GEOMImpl\r
+//\r
+#ifndef _GEOMImpl_Fillet1d_HeaderFile\r
+#define _GEOMImpl_Fillet1d_HeaderFile\r
+\r
+#include <gp_Pnt.hxx>\r
+#include <Geom_Plane.hxx>\r
+#include <Geom2d_Curve.hxx>\r
+\r
+#include <TopoDS_Edge.hxx>\r
+#include <TColStd_ListOfReal.hxx>\r
+#include <TColStd_SequenceOfReal.hxx>\r
+#include <TColStd_SequenceOfInteger.hxx>\r
+\r
+class GEOMImpl_Fillet1dPoint;\r
+\r
+/**\r
+* GEOMImpl_Fillet1d is 1D fillet algorithm on two planar edges with given radius\r
+*/\r
+\r
+class GEOMImpl_Fillet1d \r
+{\r
+public:\r
+ //! Constructor\r
+ //! The fillet 1D algorithm initialise by two edges and plane\r
+ Standard_EXPORT GEOMImpl_Fillet1d(const TopoDS_Edge& theEdge1,\r
+ const TopoDS_Edge& theEdge2,\r
+ const gp_Pln& thePlane);\r
+ //! Makes fillet with given radius\r
+ //! @returns Standard_True, if at least one result computed\r
+ Standard_EXPORT Standard_Boolean Perform(const Standard_Real theRadius);\r
+ //! Returns result fillet edge and modified edges as out parameters\r
+ Standard_EXPORT TopoDS_Edge Result(const gp_Pnt& thePoint, TopoDS_Edge& theEdge1, TopoDS_Edge& theEdge2);\r
+\r
+private:\r
+ //! private methods\r
+ void fillPoint(GEOMImpl_Fillet1dPoint*);\r
+ void fillDiff(GEOMImpl_Fillet1dPoint*, Standard_Real, Standard_Boolean);\r
+ void performNewton(GEOMImpl_Fillet1dPoint*, GEOMImpl_Fillet1dPoint*);\r
+ Standard_Boolean processPoint(GEOMImpl_Fillet1dPoint*, GEOMImpl_Fillet1dPoint*, Standard_Real);\r
+\r
+\r
+private:\r
+ //! private fields\r
+ TopoDS_Edge myEdge1, myEdge2;\r
+ Handle(Geom_Plane) myPlane;\r
+ Handle(Geom2d_Curve) myCurve1, myCurve2;\r
+ Standard_Real myStart1, myEnd1, myStart2, myEnd2, myRadius;\r
+ TColStd_ListOfReal myResultParams;\r
+ TColStd_SequenceOfInteger myResultOrientation;\r
+ Standard_Boolean myStartSide, myEdgesExchnged;\r
+ Standard_Integer myDegreeOfRecursion;\r
+};\r
+\r
+\r
+/**\r
+* GEOMImpl_Fillet1dPoint is an internal class for 1D fillet algorithm\r
+* to store and compare computed solutions on edges\r
+*/\r
+\r
+class GEOMImpl_Fillet1dPoint\r
+{\r
+public:\r
+ //! Puiblic methods\r
+\r
+ //! Constructor\r
+ Standard_EXPORT GEOMImpl_Fillet1dPoint(Standard_Real theParam)\r
+ {myParam = theParam;}\r
+ \r
+ //! Make copy of point\r
+ //!WARNING: Copies only field values: myParam, myV, myD, myValid\r
+ Standard_EXPORT GEOMImpl_Fillet1dPoint* Copy(); // warning: this is not the full copy! \r
+\r
+ //! Set/Get parameter\r
+ Standard_EXPORT inline void SetParam(Standard_Real theParam)\r
+ {myParam = theParam;}\r
+ Standard_EXPORT inline Standard_Real GetParam() const\r
+ {return myParam;}\r
+ Standard_EXPORT inline void SetParam2(const Standard_Real theParam2)\r
+ {myParam2 = theParam2;}\r
+ Standard_EXPORT inline Standard_Real GetParam2()\r
+ { return myParam2 ; }\r
+\r
+ //! Returns validity \r
+ Standard_EXPORT inline Standard_Boolean IsValid(int theIndex)\r
+ {return (Standard_Boolean)myValid.Value(theIndex);}\r
+\r
+ //! Get values\r
+ Standard_EXPORT inline Standard_Integer GetNBValues() {return myV.Length();}\r
+ Standard_EXPORT inline Standard_Real GetValue(Standard_Integer theIndex)\r
+ {return myV.Value(theIndex);}\r
+ Standard_EXPORT inline Standard_Real GetDiff(Standard_Integer theIndex)\r
+ {return myD.Value(theIndex);}\r
+ Standard_EXPORT inline Standard_Integer GetNear(Standard_Integer theIndex)\r
+ {return myNear.Value(theIndex);}\r
+\r
+ //! Set/Get center point\r
+ Standard_EXPORT inline void SetCenter(const gp_Pnt2d thePoint)\r
+ {myCenter = thePoint;}\r
+ Standard_EXPORT inline const gp_Pnt2d GetCenter()\r
+ {return myCenter;}\r
+\r
+ Standard_EXPORT void AddValue(Standard_Real theValue, Standard_Boolean theIsValid);\r
+\r
+ //! compute difference between this and given point\r
+ Standard_EXPORT Standard_Boolean ComputeDifference(GEOMImpl_Fillet1dPoint*);\r
+ Standard_EXPORT void FilterPoints(GEOMImpl_Fillet1dPoint*);\r
+ \r
+ //! Check is point contains solution and returns the index of them if any\r
+ Standard_EXPORT Standard_Integer HasSolution(Standard_Real theRadius); \r
+ //! Remove solution by index\r
+ void RemoveSolution(Standard_Integer theIndex);\r
+\r
+private:\r
+ //! Private fields\r
+ gp_Pnt2d myCenter;\r
+ Standard_Real myParam, myParam2;\r
+ TColStd_SequenceOfReal myV, myD;\r
+ TColStd_SequenceOfInteger myValid, myNear;\r
+};\r
+\r
+#endif\r
// check if face edges modified,
// if yes, than map to original edges (from vertex-edges list), because edges can be modified before
- if (!aModifE1.IsNull() && !aModifE1.IsSame( anEdge1 ))
+ if (aModifE1.IsNull() || !anEdge1.IsSame( aModifE1 ))
addEdgeRelation( anEdgeToEdgeMap, TopoDS::Edge(aVertexEdges.First()), aModifE1 );
- if (!aModifE2.IsNull() && !aModifE2.IsSame( anEdge2 ))
+ if (aModifE2.IsNull() || !anEdge2.IsSame( aModifE2 ))
addEdgeRelation( anEdgeToEdgeMap, TopoDS::Edge(aVertexEdges.Last()), aModifE2 );
}
TopoDS_Shape anEdge = anExp.Current();
if ( !anEdgeToEdgeMap.IsBound( anEdge ) )
aListOfNewEdge.Append( anEdge );
- else
+ else if (!anEdgeToEdgeMap.Find( anEdge ).IsNull())
aListOfNewEdge.Append( anEdgeToEdgeMap.Find( anEdge ) );
}
#include <BRepAlgo.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
#include <BRep_Builder.hxx>
+#include <BRepBuilderAPI_Copy.hxx>
#include <TopAbs.hxx>
#include <TopoDS.hxx>
GEOMImpl_IFilling IF (aFunction);
Handle(GEOM_Function) aShapeFunction = IF.GetShape();
if (aShapeFunction.IsNull()) return 0;
- TopoDS_Shape aShape = aShapeFunction->GetValue();
+ TopoDS_Shape aShape;
+
+ BRepBuilderAPI_Copy Copy(aShapeFunction->GetValue());
+ if( Copy.IsDone() )
+ aShape = Copy.Shape();
+
if (aShape.IsNull() || aShape.ShapeType() != TopAbs_COMPOUND) return 0;
Standard_Integer mindeg = IF.GetMinDeg();
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-
// File : GEOMImpl_IAdvancedOperations.cxx
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
-//
#include <Standard_Stream.hxx>
#include "GEOMImpl_Types.hxx"
#include "GEOMImpl_IBlocksOperations.hxx"
#include "GEOMImpl_I3DPrimOperations.hxx"
#include "GEOMImpl_ILocalOperations.hxx"
+#include "GEOMImpl_IHealingOperations.hxx"
#include "GEOMImpl_Gen.hxx"
*/
//=============================================================================
GEOMImpl_IAdvancedOperations::GEOMImpl_IAdvancedOperations(GEOM_Engine* theEngine, int theDocID) :
- GEOM_IOperations(theEngine, theDocID)
+ GEOM_IOperations(theEngine, theDocID)
{
MESSAGE("GEOMImpl_IAdvancedOperations::GEOMImpl_IAdvancedOperations");
myBasicOperations = new GEOMImpl_IBasicOperations(GetEngine(), GetDocID());
myBlocksOperations = new GEOMImpl_IBlocksOperations(GetEngine(), GetDocID());
my3DPrimOperations = new GEOMImpl_I3DPrimOperations(GetEngine(), GetDocID());
myLocalOperations = new GEOMImpl_ILocalOperations(GetEngine(), GetDocID());
+ myHealingOperations = new GEOMImpl_IHealingOperations(GetEngine(), GetDocID());
}
//=============================================================================
delete myBlocksOperations;
delete my3DPrimOperations;
delete myLocalOperations;
+ delete myHealingOperations;
}
//=============================================================================
*/
//=============================================================================
gp_Trsf GEOMImpl_IAdvancedOperations::GetPositionTrsf(double theL1, double theL2,
- Handle(GEOM_Object) theP1,
- Handle(GEOM_Object) theP2,
- Handle(GEOM_Object) theP3)
+ Handle(GEOM_Object) theP1,
+ Handle(GEOM_Object) theP2,
+ Handle(GEOM_Object) theP3)
{
// Old Local Coordinates System oldLCS
gp_Pnt P0(0, 0, 0);
*/
//=============================================================================
bool GEOMImpl_IAdvancedOperations::CheckCompatiblePosition(double& theL1, double& theL2,
- Handle(GEOM_Object) theP1,
- Handle(GEOM_Object) theP2,
- Handle(GEOM_Object) theP3,
- double theTolerance)
+ Handle(GEOM_Object) theP1,
+ Handle(GEOM_Object) theP2,
+ Handle(GEOM_Object) theP3,
+ double theTolerance)
{
SetErrorCode(KO);
gp_Pnt P1 = BRep_Tool::Pnt(TopoDS::Vertex(theP1->GetValue()));
//
if (fabs(newL1 - theL1) > Precision::Approximation()) {
if ( (newL1 * (1 - theTolerance) -theL1 <= Precision::Approximation()) &&
- (newL1 * (1 + theTolerance) -theL1 >= Precision::Approximation()) ) {
+ (newL1 * (1 + theTolerance) -theL1 >= Precision::Approximation()) ) {
// std::cerr << "theL1 = newL1" << std::endl;
theL1 = newL1;
} else {
//
if (fabs(newL2 - theL2) > Precision::Approximation()) {
if ( (newL2 * (1 - theTolerance) -theL2 <= Precision::Approximation()) &&
- (newL2 * (1 + theTolerance) -theL2 >= Precision::Approximation()) ) {
+ (newL2 * (1 + theTolerance) -theL2 >= Precision::Approximation()) ) {
theL2 = newL2;
} else {
theL2 = -1;
*/
//=============================================================================
bool GEOMImpl_IAdvancedOperations::MakeGroups(Handle(GEOM_Object) theShape, int shapeType,
- double theR1, double theW1, double theL1,
- double theR2, double theW2, double theL2,
- Handle(TColStd_HSequenceOfTransient) theSeq,
- gp_Trsf aTrsf)
+ double theR1, double theW1, double theL1,
+ double theR2, double theW2, double theL2,
+ Handle(TColStd_HSequenceOfTransient) theSeq,
+ gp_Trsf aTrsf)
{
SetErrorCode(KO);
}
gp_Trsf aTrsfInv = aTrsf.Inverted();
-
+
int expectedGroups = 0;
if (shapeType == TSHAPE_BASIC)
if (Abs(theR2+theW2-theR1-theW1) <= Precision::Approximation())
expectedGroups = 11;
else if (shapeType == TSHAPE_CHAMFER || shapeType == TSHAPE_FILLET)
expectedGroups = 12;
-
+
double aR1Ext = theR1 + theW1;
double aR2Ext = theR2 + theW2;
-
+
/////////////////////////
//// Groups of Faces ////
/////////////////////////
BRepBuilderAPI_Transform aTransformationBox(aBox->GetValue(), aTrsf, Standard_False);
TopoDS_Shape aBoxShapeTrsf = aTransformationBox.Shape();
aBox->GetLastFunction()->SetValue(aBoxShapeTrsf);
-
+
// Get the shell of the box
- Handle(GEOM_Object) aShell = Handle(GEOM_Object)::DownCast(myShapesOperations->MakeExplode(aBox, TopAbs_SHELL, true)->Value(1));
+ Handle(GEOM_Object) aShell = Handle(GEOM_Object)::DownCast
+ (myShapesOperations->MakeExplode(aBox, TopAbs_SHELL, true)->Value(1));
aBox->GetLastFunction()->SetDescription("");
aShell->GetLastFunction()->SetDescription("");
// Get the common shapes between shell and shape
}
aCommonCompound->GetLastFunction()->SetDescription("");
// Explode the faces of common shapes => 3 faces
- Handle(TColStd_HSequenceOfTransient) aCommonFaces = myShapesOperations->MakeExplode(aCommonCompound, TopAbs_FACE, true);
+ Handle(TColStd_HSequenceOfTransient) aCommonFaces =
+ myShapesOperations->MakeExplode(aCommonCompound, TopAbs_FACE, true);
aCommonCompound->GetLastFunction()->SetDescription("");
std::list<Handle(GEOM_Object)> aCompoundOfFacesList;
-
+
for (int i=0 ; i<= aCommonFaces->Length()-4 ; i+=4) {
std::list<Handle(GEOM_Object)> aFacesList;
for (int j = 1 ; j <= 4 ; j++) {
Handle(GEOM_Object) aFace = Handle(GEOM_Object)::DownCast(aCommonFaces->Value(i+j)); // Junction faces
if (!aFace.IsNull()) {
- aFace->GetLastFunction()->SetDescription("");
- aFacesList.push_back(aFace);
+ aFace->GetLastFunction()->SetDescription("");
+ aFacesList.push_back(aFace);
}
}
Handle(GEOM_Object) aCompoundOfFaces = myShapesOperations->MakeCompound(aFacesList);
aCompoundOfFacesList.pop_front();
// == END
//
-
-
+
+
// Uncomment the following lines when GetInPlace bug is solved
// == BEGIN
// Handle(GEOM_Object) aP1 = myBasicOperations->MakePointXYZ(-theL1, 0, 0);
// aPln1->GetLastFunction()->SetDescription("");
// aPln2->GetLastFunction()->SetDescription("");
// aPln3->GetLastFunction()->SetDescription("");
-//
+//
// BRepBuilderAPI_Transform aTransformation1(aPln1->GetValue(), aTrsf, Standard_False);
// TopoDS_Shape aTrsf_Shape1 = aTransformation1.Shape();
// aPln1->GetLastFunction()->SetValue(aTrsf_Shape1);
// aPln3->GetLastFunction()->SetValue(aTrsf_Shape3);
// == END
//
-
+
Handle(GEOM_Object) junctionFaces1 = myShapesOperations->GetInPlace(theShape, aPln1);
if (junctionFaces1.IsNull())
- junctionFaces1 = myShapesOperations->GetShapesOnShapeAsCompound(aPln1, theShape, TopAbs_FACE, GEOMAlgo_ST_ONIN);
+ junctionFaces1 = myShapesOperations->GetShapesOnShapeAsCompound
+ (aPln1, theShape, TopAbs_FACE, GEOMAlgo_ST_ONIN);
if (!junctionFaces1.IsNull()) {
junctionFaces1->GetLastFunction()->SetDescription("");
junctionFaces1->SetName("JUNCTION_FACE_1");
}
Handle(GEOM_Object) junctionFaces2 = myShapesOperations->GetInPlace(theShape, aPln2);
if (junctionFaces2.IsNull())
- junctionFaces2 = myShapesOperations->GetShapesOnShapeAsCompound(aPln2, theShape, TopAbs_FACE, GEOMAlgo_ST_ONIN);
+ junctionFaces2 = myShapesOperations->GetShapesOnShapeAsCompound
+ (aPln2, theShape, TopAbs_FACE, GEOMAlgo_ST_ONIN);
if (!junctionFaces2.IsNull()) {
junctionFaces2->GetLastFunction()->SetDescription("");
junctionFaces2->SetName("JUNCTION_FACE_2");
}
Handle(GEOM_Object) junctionFaces3 = myShapesOperations->GetInPlace(theShape, aPln3);
if (junctionFaces3.IsNull())
- junctionFaces3 = myShapesOperations->GetShapesOnShapeAsCompound(aPln3, theShape, TopAbs_FACE, GEOMAlgo_ST_ONIN);
+ junctionFaces3 = myShapesOperations->GetShapesOnShapeAsCompound
+ (aPln3, theShape, TopAbs_FACE, GEOMAlgo_ST_ONIN);
if (!junctionFaces3.IsNull()) {
junctionFaces3->GetLastFunction()->SetDescription("");
junctionFaces3->SetName("JUNCTION_FACE_3");
// return false;
}
// Comment the following lines when GetInPlace bug is solved
- // == BEGIN
+ // == BEGIN
}
// == END
/////////////////////////
// Result of propagate
Handle(GEOM_Function) aFunction = theShape->GetLastFunction();
-
+
TCollection_AsciiString theDesc = aFunction->GetDescription();
Handle(TColStd_HSequenceOfTransient) aSeqPropagate = myBlocksOperations->Propagate(theShape);
if (aSeqPropagate.IsNull() || aSeqPropagate->Length() == 0) {
Standard_Integer nbEdges, aNbGroups = aSeqPropagate->Length();
// Recover previous description to get rid of Propagate dump
aFunction->SetDescription(theDesc);
-
+
bool addGroup;
bool circularFoundAndAdded = false;
bool incidentPipeFound = false;
bool flangeFound = false;
bool flangeFoundAndAdded = false;
bool chamferOrFilletFound = false;
-
+
for (int i=1 ; i<= aNbGroups; i++) {
addGroup = false;
-
+
Handle(GEOM_Object) aGroup = Handle(GEOM_Object)::DownCast(aSeqPropagate->Value(i));
if(aGroup.IsNull())
continue;
-
+
TopoDS_Shape aGroupShape = aGroup->GetValue();
BRepBuilderAPI_Transform aTransformationShapeInv(aGroupShape, aTrsfInv, Standard_False);
TopoDS_Shape aGroupShapeTrsfInv = aTransformationShapeInv.Shape();
-
+
TopTools_IndexedMapOfShape anEdgesMap;
TopExp::MapShapes(aGroupShapeTrsfInv,TopAbs_EDGE, anEdgesMap);
nbEdges = anEdgesMap.Extent();
if (shapeType == TSHAPE_BASIC) {
if ((nbEdges == 21) || /*R1Ext = R2Ext*/(nbEdges == 17)){
- addGroup = true;
- aGroup->SetName("THICKNESS");
+ addGroup = true;
+ aGroup->SetName("THICKNESS");
}
else if (nbEdges == 6) {
- if (!circularFoundAndAdded) {
- circularFoundAndAdded = true;
- addGroup = true;
- aGroup->SetName("CIRCULAR_QUARTER_PIPE");
- }
+ if (!circularFoundAndAdded) {
+ circularFoundAndAdded = true;
+ addGroup = true;
+ aGroup->SetName("CIRCULAR_QUARTER_PIPE");
+ }
}
else if (nbEdges == 8) {
- incidentPipeFound = true;
- mainPipeFound = false;
- radialFound =false;
- flangeFound = false;
-
- TopExp_Explorer Ex(aGroupShapeTrsfInv,TopAbs_VERTEX);
- while (Ex.More()) {
- gp_Pnt aP = BRep_Tool::Pnt(TopoDS::Vertex(Ex.Current()));
- double x=aP.X(), y=aP.Y(), z=aP.Z();
-
-
- if ((Abs(x) > aR2Ext + Precision::Confusion()) ||
- (Abs(y) > aR2Ext + Precision::Confusion())) {
- incidentPipeFound = false;
- }
-
- if ( z < -Precision::Confusion()) {
- // length of main pipe
- mainPipeFound = true;
- if (!mainPipeFoundAndAdded) {
- mainPipeFoundAndAdded = true;
- addGroup = true;
- aGroup->SetName("HALF_LENGTH_MAIN_PIPE");
- }
- }
-
- else if (Abs(x) > (theL1-Precision::Confusion())) {
- // discretisation circulaire
- radialFound = true;
- if (!circularFoundAndAdded) {
- circularFoundAndAdded = true;
- addGroup = true;
- aGroup->SetName("CIRCULAR_QUARTER_PIPE");
- }
- }
+ incidentPipeFound = true;
+ mainPipeFound = false;
+ radialFound =false;
+ flangeFound = false;
+
+ TopExp_Explorer Ex(aGroupShapeTrsfInv,TopAbs_VERTEX);
+ while (Ex.More()) {
+ gp_Pnt aP = BRep_Tool::Pnt(TopoDS::Vertex(Ex.Current()));
+ double x=aP.X(), y=aP.Y(), z=aP.Z();
+
+
+ if ((Abs(x) > aR2Ext + Precision::Confusion()) ||
+ (Abs(y) > aR2Ext + Precision::Confusion())) {
+ incidentPipeFound = false;
+ }
+
+ if ( z < -Precision::Confusion()) {
+ // length of main pipe
+ mainPipeFound = true;
+ if (!mainPipeFoundAndAdded) {
+ mainPipeFoundAndAdded = true;
+ addGroup = true;
+ aGroup->SetName("HALF_LENGTH_MAIN_PIPE");
+ }
+ }
+
+ else if (Abs(x) > (theL1-Precision::Confusion())) {
+ // discretisation circulaire
+ radialFound = true;
+ if (!circularFoundAndAdded) {
+ circularFoundAndAdded = true;
+ addGroup = true;
+ aGroup->SetName("CIRCULAR_QUARTER_PIPE");
+ }
+ }
Ex.Next();
- }
- if (incidentPipeFound) {
- addGroup = true;
- aGroup->SetName("HALF_LENGTH_INCIDENT_PIPE");
- }
- if (!addGroup && (!incidentPipeFound &&
- !radialFound &&
- !mainPipeFound &&
- !flangeFound)) {
- // Flange (collerette)
- flangeFound = true;
- addGroup = true;
- aGroup->SetName("FLANGE");
- }
+ }
+ if (incidentPipeFound) {
+ addGroup = true;
+ aGroup->SetName("HALF_LENGTH_INCIDENT_PIPE");
+ }
+ if (!addGroup && (!incidentPipeFound &&
+ !radialFound &&
+ !mainPipeFound &&
+ !flangeFound)) {
+ // Flange (collerette)
+ flangeFound = true;
+ addGroup = true;
+ aGroup->SetName("FLANGE");
+ }
}
else
- continue;
+ continue;
}
else if (shapeType == TSHAPE_CHAMFER || shapeType == TSHAPE_FILLET) {
if (nbEdges == 25) {
- addGroup = true;
- aGroup->SetName("THICKNESS");
+ addGroup = true;
+ aGroup->SetName("THICKNESS");
}
else if ((nbEdges == 10) || (nbEdges == 6)) {
- if (!circularFoundAndAdded) {
- addGroup = true;
- circularFoundAndAdded = true;
- aGroup->SetName("CIRCULAR_QUARTER_PIPE");
- }
+ if (!circularFoundAndAdded) {
+ addGroup = true;
+ circularFoundAndAdded = true;
+ aGroup->SetName("CIRCULAR_QUARTER_PIPE");
+ }
}
else if (nbEdges == 8) {
- incidentPipeFound = true;
- mainPipeFound = true;
- flangeFound = false;
-
- TopExp_Explorer Ex(aGroupShapeTrsfInv,TopAbs_VERTEX);
- while (Ex.More()) {
- gp_Pnt aP = BRep_Tool::Pnt(TopoDS::Vertex(Ex.Current()));
- double x=aP.X(), y=aP.Y(), z=aP.Z();
-
- // tuy_princ_long_avant & tuy_princ_long_apres
- bool isMain = (((z < Precision::Confusion()) || (x < Precision::Confusion())) &&
- ((y <= aR1Ext + Precision::Confusion()) ||
- (y <= -(aR1Ext + Precision::Confusion())) ||
- (y <= theR1 + Precision::Confusion()) ||
- (y == -(theR1 + Precision::Confusion()))));
-
-
- if (!isMain) {
- mainPipeFound = false;
- }
-
- // collerette
- if (z < Precision::Confusion()) {
- flangeFound = true;
- if (!flangeFoundAndAdded) {
- flangeFoundAndAdded = true;
- addGroup = true;
- aGroup->SetName("FLANGE");
- }
- }
-
- // tuyau incident
- if ((Abs(x) > aR2Ext + Precision::Confusion()) ||
- (Abs(y) > aR2Ext + Precision::Confusion())) {
- incidentPipeFound = false;
- }
- Ex.Next();
- }
- if (mainPipeFound) {
- addGroup = true;
- aGroup->SetName("HALF_LENGTH_MAIN_PIPE");
- }
- if (incidentPipeFound) {
- addGroup = true;
- aGroup->SetName("HALF_LENGTH_INCIDENT_PIPE");
- }
- if (!addGroup && (!incidentPipeFound &&
- !mainPipeFound &&
- !flangeFound &&
- !chamferOrFilletFound)) {
- addGroup = true;
- chamferOrFilletFound = true;
- if (shapeType == TSHAPE_CHAMFER)
- aGroup->SetName("CHAMFER");
- else
- aGroup->SetName("FILLET");
- }
+ incidentPipeFound = true;
+ mainPipeFound = true;
+ flangeFound = false;
+
+ TopExp_Explorer Ex(aGroupShapeTrsfInv,TopAbs_VERTEX);
+ while (Ex.More()) {
+ gp_Pnt aP = BRep_Tool::Pnt(TopoDS::Vertex(Ex.Current()));
+ double x=aP.X(), y=aP.Y(), z=aP.Z();
+
+ // tuy_princ_long_avant & tuy_princ_long_apres
+ bool isMain = (((z < Precision::Confusion()) || (x < Precision::Confusion())) &&
+ ((y <= aR1Ext + Precision::Confusion()) ||
+ (y <= -(aR1Ext + Precision::Confusion())) ||
+ (y <= theR1 + Precision::Confusion()) ||
+ (y == -(theR1 + Precision::Confusion()))));
+
+ if (!isMain) {
+ mainPipeFound = false;
+ }
+
+ // collerette
+ if (z < Precision::Confusion()) {
+ flangeFound = true;
+ if (!flangeFoundAndAdded) {
+ flangeFoundAndAdded = true;
+ addGroup = true;
+ aGroup->SetName("FLANGE");
+ }
+ }
+
+ // tuyau incident
+ if ((Abs(x) > aR2Ext + Precision::Confusion()) ||
+ (Abs(y) > aR2Ext + Precision::Confusion())) {
+ incidentPipeFound = false;
+ }
+ Ex.Next();
+ }
+ if (mainPipeFound) {
+ addGroup = true;
+ aGroup->SetName("HALF_LENGTH_MAIN_PIPE");
+ }
+ if (incidentPipeFound) {
+ addGroup = true;
+ aGroup->SetName("HALF_LENGTH_INCIDENT_PIPE");
+ }
+ if (!addGroup && (!incidentPipeFound &&
+ !mainPipeFound &&
+ !flangeFound &&
+ !chamferOrFilletFound)) {
+ addGroup = true;
+ chamferOrFilletFound = true;
+ if (shapeType == TSHAPE_CHAMFER)
+ aGroup->SetName("CHAMFER");
+ else
+ aGroup->SetName("FILLET");
+ }
}
else
- continue;
+ continue;
}
// Add group to the list
if (addGroup)
return true;
}
-bool GEOMImpl_IAdvancedOperations::MakePipeTShapePartition(Handle(GEOM_Object) theShape,
- double theR1, double theW1, double theL1,
- double theR2, double theW2, double theL2,
- double theH, double theW,
- double theRF, bool isNormal)
+bool GEOMImpl_IAdvancedOperations::MakePipeTShapePartition(Handle(GEOM_Object) theShape,
+ double theR1, double theW1, double theL1,
+ double theR2, double theW2, double theL2,
+ double theH, double theW,
+ double theRF, bool isNormal)
{
SetErrorCode(KO);
box_i->GetLastFunction()->SetDescription("");
box_i = myTransformOperations->TranslateDXDYDZ(box_i, -theR2, -theR2, 0);
box_i->GetLastFunction()->SetDescription("");
-
+
Handle(GEOM_Function) aFunction = theShape->GetLastFunction();
TCollection_AsciiString theDesc = aFunction->GetDescription();
- Handle(TColStd_HSequenceOfTransient) edges_i = myShapesOperations->GetShapesOnBox(box_i, theShape, TopAbs_EDGE, GEOMAlgo_ST_IN);
+ Handle(TColStd_HSequenceOfTransient) edges_i =
+ myShapesOperations->GetShapesOnBox(box_i, theShape, TopAbs_EDGE, GEOMAlgo_ST_IN);
// Recover previous description to get rid of Propagate dump
aFunction->SetDescription(theDesc);
if (edges_i.IsNull() || edges_i->Length() == 0) {
// search for vertices located on both internal pipes
aFunction = theShape->GetLastFunction();
theDesc = aFunction->GetDescription();
- Handle(TColStd_HSequenceOfTransient) vertices_i = myShapesOperations->GetShapesOnBox(box_i, theShape, TopAbs_VERTEX, GEOMAlgo_ST_ONIN);
+ Handle(TColStd_HSequenceOfTransient) vertices_i =
+ myShapesOperations->GetShapesOnBox(box_i, theShape, TopAbs_VERTEX, GEOMAlgo_ST_ONIN);
// Recover previous description to get rid of Propagate dump
aFunction->SetDescription(theDesc);
if (vertices_i.IsNull() || vertices_i->Length() == 0) {
gp_Pnt aP = BRep_Tool::Pnt(aVertex);
if (Abs(aP.X()) <= Precision::Confusion()) {
if (Abs(aP.Y()) - theR2 <= Precision::Confusion())
- vi1 = v;
+ vi1 = v;
} else if (Abs(aP.Y()) <= Precision::Confusion()) {
if (Abs(aP.X()) - theR1 <= Precision::Confusion())
- vi2 = v;
+ vi2 = v;
}
}
std::list<Handle(GEOM_Object)> theShapes;
-
+
if (isNormal) {
Handle(GEOM_Object) ve1, ve2;
// Common edges on external cylinder
aFunction = theShape->GetLastFunction();
theDesc = aFunction->GetDescription();
- Handle(TColStd_HSequenceOfTransient) edges_e = myShapesOperations->GetShapesOnBox(box_e, theShape, TopAbs_EDGE, GEOMAlgo_ST_IN);
+ Handle(TColStd_HSequenceOfTransient) edges_e =
+ myShapesOperations->GetShapesOnBox(box_e, theShape, TopAbs_EDGE, GEOMAlgo_ST_IN);
// Recover previous description to get rid of Propagate dump
aFunction->SetDescription(theDesc);
if (edges_e.IsNull() || edges_e->Length() == 0) {
// search for vertices located on both external pipes
aFunction = theShape->GetLastFunction();
theDesc = aFunction->GetDescription();
- Handle(TColStd_HSequenceOfTransient) vertices_e = myShapesOperations->GetShapesOnBox(box_e, theShape, TopAbs_VERTEX, GEOMAlgo_ST_ONIN);
+ Handle(TColStd_HSequenceOfTransient) vertices_e =
+ myShapesOperations->GetShapesOnBox(box_e, theShape, TopAbs_VERTEX, GEOMAlgo_ST_ONIN);
// Recover previous description to get rid of Propagate dump
aFunction->SetDescription(theDesc);
if (vertices_e.IsNull() || vertices_e->Length() == 0) {
TopoDS_Vertex aVertex = TopoDS::Vertex(v->GetValue());
gp_Pnt aP = BRep_Tool::Pnt(aVertex);
if (Abs(aP.X()) <= Precision::Confusion()) {
- if (Abs(aP.Y()) - theR2 > Precision::Confusion())
- ve1 = v;
+ if (Abs(aP.Y()) - theR2 > Precision::Confusion())
+ ve1 = v;
} else if (Abs(aP.Y()) <= Precision::Confusion()) {
- if (Abs(aP.X()) - theR2 > Precision::Confusion())
- ve2 = v;
+ if (Abs(aP.X()) - theR2 > Precision::Confusion())
+ ve2 = v;
}
}
Handle(GEOM_Object) edge_e1, edge_e2;
#endif
edge_e1 = myBasicOperations->MakeLineTwoPnt(ve1, vi1);
if (edge_e1.IsNull()) {
- SetErrorCode("Edge 1 could not be built");
- return false;
+ SetErrorCode("Edge 1 could not be built");
+ return false;
}
} catch (Standard_Failure) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
#endif
edge_e2 = myBasicOperations->MakeLineTwoPnt(ve2, vi2);
if (edge_e2.IsNull()) {
- SetErrorCode("Edge 2 could not be built");
- return false;
+ SetErrorCode("Edge 2 could not be built");
+ return false;
}
} catch (Standard_Failure) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
SetErrorCode(aFail->GetMessageString());
return false;
}
-
+
edge_e1->GetLastFunction()->SetDescription("");
edge_e2->GetLastFunction()->SetDescription("");
double ZX=0, ZY=0;
std::vector<int> LX;
std::vector<int> LY;
- Handle(GEOM_Object) box_e = my3DPrimOperations->MakeBoxDXDYDZ(theVertCylinderRadius, theVertCylinderRadius, theHoriCylinderRadius);
+ Handle(GEOM_Object) box_e = my3DPrimOperations->MakeBoxDXDYDZ
+ (theVertCylinderRadius, theVertCylinderRadius, theHoriCylinderRadius);
box_e->GetLastFunction()->SetDescription("");
- box_e = myTransformOperations->TranslateDXDYDZ(box_e, -theVertCylinderRadius, -theVertCylinderRadius, 0);
+ box_e = myTransformOperations->TranslateDXDYDZ
+ (box_e, -theVertCylinderRadius, -theVertCylinderRadius, 0);
box_e->GetLastFunction()->SetDescription("");
aFunction = theShape->GetLastFunction();
theDesc = aFunction->GetDescription();
- Handle(TColStd_HSequenceOfTransient) extremVertices = myShapesOperations->GetShapesOnBox(box_e, theShape, TopAbs_VERTEX, GEOMAlgo_ST_ONIN);
+ Handle(TColStd_HSequenceOfTransient) extremVertices =
+ myShapesOperations->GetShapesOnBox(box_e, theShape, TopAbs_VERTEX, GEOMAlgo_ST_ONIN);
// Recover previous description to get rid of Propagate dump
aFunction->SetDescription(theDesc);
-
+
if (extremVertices.IsNull() || extremVertices->Length() == 0) {
if (theRF == 0)
- SetErrorCode("Vertices on chamfer not found");
+ SetErrorCode("Vertices on chamfer not found");
else
- SetErrorCode("Vertices on fillet not found");
+ SetErrorCode("Vertices on fillet not found");
return false;
}
-
+
theShapes.push_back(theShape);
theShapes.push_back(box_e);
if (extremVertices->Length() != 6) {
SetErrorCode("Bad number of vertices on chamfer found");
return false;
}
-
+
for (int i=1; i<=extremVertices->Length(); i++){
Handle(GEOM_Object) aV = Handle(GEOM_Object)::DownCast(extremVertices->Value(i));
aV->GetLastFunction()->SetDescription("");
gp_Pnt aP = BRep_Tool::Pnt(TopoDS::Vertex(aV->GetValue()));
if (Abs(aP.X()) <= Precision::Confusion()) {
- if (Abs(aP.Y()) - theR2 > Precision::Confusion()) {
- LX.push_back(i);
- if (aP.Z()-ZX > Precision::Confusion()) {
- ZX = aP.Z();
- PZX = i;
- }
- }
+ if (Abs(aP.Y()) - theR2 > Precision::Confusion()) {
+ LX.push_back(i);
+ if (aP.Z()-ZX > Precision::Confusion()) {
+ ZX = aP.Z();
+ PZX = i;
+ }
+ }
}
else {
- if (Abs(aP.X()) - theR2 > Precision::Confusion()) {
- LY.push_back(i);
- if (aP.Z() - ZY > Precision::Confusion()) {
- ZY = aP.Z();
- PZY = i;
- }
- }
+ if (Abs(aP.X()) - theR2 > Precision::Confusion()) {
+ LY.push_back(i);
+ if (aP.Z() - ZY > Precision::Confusion()) {
+ ZY = aP.Z();
+ PZY = i;
+ }
+ }
}
}
return false;
}
Cote_1->GetLastFunction()->SetDescription("");
-
+
Handle(GEOM_Object) Cote_2 = myBasicOperations->MakeLineTwoPnt(vi2, P3);
if (Cote_2.IsNull()) {
SetErrorCode("Impossible to build edge in thickness");
return false;
}
edge_chan_princ->GetLastFunction()->SetDescription("");
-
+
Handle(GEOM_Object) edge_chan_inc = myBlocksOperations->GetEdge(theShape, P2, P4);
if (edge_chan_inc.IsNull()) {
SetErrorCode("Impossible to find edge on incident pipe");
edgeList1.push_back(Cote_1);
edgeList1.push_back(arete_intersect_int);
edgeList1.push_back(Cote_2);
-
+
// std::cerr << "Creating wire 1" << std::endl;
wire_t = myShapesOperations->MakeWire(edgeList1, 1e-7);
if (wire_t.IsNull()) {
return false;
}
wire_t->GetLastFunction()->SetDescription("");
-
+
// std::cerr << "Creating face 1" << std::endl;
face_t = myShapesOperations->MakeFace(wire_t, false);
if (face_t.IsNull()) {
}
face_t->GetLastFunction()->SetDescription("");
theShapes.push_back(face_t);
-
+
gp_Pnt aP2 = BRep_Tool::Pnt(TopoDS::Vertex(P2->GetValue()));
gp_Pnt aP5 = BRep_Tool::Pnt(TopoDS::Vertex(vi1->GetValue()));
double deltaZ = aP2.Z() - aP5.Z();
return false;
}
Cote_3->GetLastFunction()->SetDescription("");
-
+
// std::cerr << "Creating new line 2 from 2 previous points" << std::endl;
Handle(GEOM_Object) Cote_4 = myBasicOperations->MakeLineTwoPnt(P6bis, P4);
if (Cote_4.IsNull()) {
return false;
}
Cote_4->GetLastFunction()->SetDescription("");
-
+
// std::cerr << "Creating new line 3 from 2 previous points" << std::endl;
Handle(GEOM_Object) Cote_5 = myBasicOperations->MakeLineTwoPnt(P5bis, P6bis);
if (Cote_4.IsNull()) {
}
Cote_5->GetLastFunction()->SetDescription("");
- std::list<Handle(GEOM_Object)> edgeList2;
- edgeList2.push_back(edge_chan_inc);
- edgeList2.push_back(Cote_3);
- edgeList2.push_back(Cote_5);
- edgeList2.push_back(Cote_4);
+ //std::list<Handle(GEOM_Object)> edgeList2;
+ //edgeList2.push_back(edge_chan_inc);
+ //edgeList2.push_back(Cote_3);
+ //edgeList2.push_back(Cote_5);
+ //edgeList2.push_back(Cote_4);
// std::cerr << "Creating wire 2" << std::endl;
- wire_t2 = myShapesOperations->MakeWire(edgeList2, 1e-7);
- if (wire_t2.IsNull()) {
- SetErrorCode("Impossible to build wire");
- return false;
- }
- wire_t2->GetLastFunction()->SetDescription("");
+ //wire_t2 = myShapesOperations->MakeWire(edgeList2, 1e-7);
+ //if (wire_t2.IsNull()) {
+ // SetErrorCode("Impossible to build wire");
+ // return false;
+ //}
+ //wire_t2->GetLastFunction()->SetDescription("");
// std::cerr << "Creating face 2" << std::endl;
- face_t2 = myShapesOperations->MakeFace(wire_t2, false);
+ //face_t2 = myShapesOperations->MakeFace(wire_t2, false);
+ face_t2 = my3DPrimOperations->MakePrismVecH(edge_chan_inc, Cote_4, - 2.0*theR2);
if (face_t2.IsNull()) {
SetErrorCode("Impossible to build face");
return false;
theShapes.push_back(aPlnOZ);
theShapes.push_back(aPlnOXZ);
-
+ // Partition
Handle(TColStd_HSequenceOfTransient) partitionShapes = new TColStd_HSequenceOfTransient;
Handle(TColStd_HSequenceOfTransient) theTools = new TColStd_HSequenceOfTransient;
Handle(TColStd_HSequenceOfTransient) theKeepInside = new TColStd_HSequenceOfTransient;
if (!isNormal)
theTools->Append(face_t2);
- Handle(GEOM_Object) Te3 = myBooleanOperations->MakePartition(partitionShapes, theTools, theKeepInside, theRemoveInside, TopAbs_SOLID, false, theMaterials, 0, false);
+ Handle(GEOM_Object) Te3 = myBooleanOperations->MakePartition
+ (partitionShapes, theTools, theKeepInside, theRemoveInside,
+ TopAbs_SOLID, false, theMaterials, 0, false);
if (Te3.IsNull()) {
SetErrorCode("Impossible to build partition of TShape");
// Handle(GEOM_Object) aCompound = myShapesOperations->MakeCompound(theShapes);
}
TopoDS_Shape aShape = Te3->GetValue();
theShape->GetLastFunction()->SetValue(aShape);
-
+
SetErrorCode(OK);
return true;
}
// Mirror and glue faces
-bool GEOMImpl_IAdvancedOperations::MakePipeTShapeMirrorAndGlue(Handle(GEOM_Object) theShape,
- double theR1, double theW1, double theL1,
- double theR2, double theW2, double theL2)
+bool GEOMImpl_IAdvancedOperations::MakePipeTShapeMirrorAndGlue(Handle(GEOM_Object) theShape,
+ double theR1, double theW1, double theL1,
+ double theR2, double theW2, double theL2)
{
SetErrorCode(KO);
-
+
// Useful values
double aSize = 2*(theL1 + theL2);
double aR1Ext = theR1 + theW1;
//=============================================================================
Handle(TColStd_HSequenceOfTransient)
GEOMImpl_IAdvancedOperations::MakePipeTShape(double theR1, double theW1, double theL1,
- double theR2, double theW2, double theL2,
- bool theHexMesh)
+ double theR2, double theW2, double theL2,
+ bool theHexMesh)
{
MESSAGE("GEOMImpl_IAdvancedOperations::MakePipeTShape");
SetErrorCode(KO);
SetErrorCode(aFail->GetMessageString());
return NULL;
}
-
+
if (theHexMesh) {
if (!MakePipeTShapePartition(aShape, theR1, theW1, theL1, theR2, theW2, theL2))
return NULL;
aListRes.Trunc(aListRes.Length() - 2);
//Make a Python command
- GEOM::TPythonDump(aFunction) << "[" << aShape << ", " << aListRes.ToCString() << "] = geompy.MakePipeTShape("
- << theR1 << ", " << theW1 << ", " << theL1 << ", " << theR2 << ", " << theW2 << ", " << theL2 << ", "
- << theHexMesh << ")";
+ GEOM::TPythonDump(aFunction)
+ << "[" << aShape << ", " << aListRes.ToCString() << "] = geompy.MakePipeTShape("
+ << theR1 << ", " << theW1 << ", " << theL1 << ", " << theR2 << ", " << theW2 << ", " << theL2 << ", "
+ << theHexMesh << ")";
}
/*
* Get the groups: END
*/
else {
//Make a Python command
- GEOM::TPythonDump(aFunction) << "[" << aShape << "] = geompy.MakePipeTShape(" << theR1 << ", " << theW1 << ", "
- << theL1 << ", " << theR2 << ", " << theW2 << ", " << theL2 << ", " << theHexMesh << ")";
+ GEOM::TPythonDump(aFunction)
+ << "[" << aShape << "] = geompy.MakePipeTShape(" << theR1 << ", " << theW1 << ", "
+ << theL1 << ", " << theR2 << ", " << theW2 << ", " << theL2 << ", " << theHexMesh << ")";
}
SetErrorCode(OK);
//=============================================================================
Handle(TColStd_HSequenceOfTransient)
GEOMImpl_IAdvancedOperations::MakePipeTShapeWithPosition(double theR1, double theW1, double theL1,
- double theR2, double theW2, double theL2,
- bool theHexMesh,
- Handle(GEOM_Object) theP1,
- Handle(GEOM_Object) theP2,
- Handle(GEOM_Object) theP3)
+ double theR2, double theW2, double theL2,
+ bool theHexMesh,
+ Handle(GEOM_Object) theP1,
+ Handle(GEOM_Object) theP2,
+ Handle(GEOM_Object) theP3)
{
SetErrorCode(KO);
//Add a new object
SetErrorCode(aFail->GetMessageString());
return NULL;
}
-
+
if (theHexMesh) {
if (!MakePipeTShapePartition(aShape, theR1, theW1, theL1, theR2, theW2, theL2))
return NULL;
aListRes.Trunc(aListRes.Length() - 2);
//Make a Python command
- GEOM::TPythonDump(aFunction) << "[" << aShape << ", " << aListRes.ToCString() << "] = geompy.MakePipeTShape("
- << theR1 << ", " << theW1 << ", " << theL1 << ", " << theR2 << ", " << theW2 << ", " << theL2 << ", "
- << theHexMesh << ", " << theP1 << ", " << theP2 << ", " << theP3 << ")";
+ GEOM::TPythonDump(aFunction)
+ << "[" << aShape << ", " << aListRes.ToCString() << "] = geompy.MakePipeTShape("
+ << theR1 << ", " << theW1 << ", " << theL1 << ", " << theR2 << ", " << theW2 << ", " << theL2 << ", "
+ << theHexMesh << ", " << theP1 << ", " << theP2 << ", " << theP3 << ")";
}
//
// Get the groups: END
else {
//Make a Python command
- GEOM::TPythonDump(aFunction) << "[" << aShape << "] = geompy.MakePipeTShape(" << theR1 << ", " << theW1 << ", "
- << theL1 << ", " << theR2 << ", " << theW2 << ", " << theL2 << ", " << theHexMesh << ", " << theP1
- << ", " << theP2 << ", " << theP3 << ")";
+ GEOM::TPythonDump(aFunction)
+ << "[" << aShape << "] = geompy.MakePipeTShape(" << theR1 << ", " << theW1 << ", "
+ << theL1 << ", " << theR2 << ", " << theW2 << ", " << theL2 << ", " << theHexMesh << ", " << theP1
+ << ", " << theP2 << ", " << theP3 << ")";
}
SetErrorCode(OK);
//=============================================================================
Handle(TColStd_HSequenceOfTransient)
GEOMImpl_IAdvancedOperations::MakePipeTShapeChamfer(double theR1, double theW1, double theL1,
- double theR2, double theW2, double theL2,
- double theH, double theW,
- bool theHexMesh)
+ double theR2, double theW2, double theL2,
+ double theH, double theW,
+ bool theHexMesh)
{
SetErrorCode(KO);
//Add a new object
box_e->GetLastFunction()->SetDescription("");
box_e = myTransformOperations->TranslateDXDYDZ(box_e, -(theR2+theW2), -(theR2+theW2), 0);
box_e->GetLastFunction()->SetDescription("");
-
- Handle(TColStd_HSequenceOfInteger) edges_e = myShapesOperations->GetShapesOnBoxIDs(box_e, aShape, TopAbs_EDGE, GEOMAlgo_ST_IN);
+
+ Handle(TColStd_HSequenceOfInteger) edges_e =
+ myShapesOperations->GetShapesOnBoxIDs(box_e, aShape, TopAbs_EDGE, GEOMAlgo_ST_IN);
box_e->GetLastFunction()->SetDescription("");
if (edges_e.IsNull() || edges_e->Length() == 0) {
iv ++;
gp_Pnt aPt = BRep_Tool::Pnt(TopoDS::Vertex(Ex.Current()));
if (Abs(aPt.Z() - (theR1+theW1)) <= Precision::Confusion()) {
- nbEdgesInChamfer ++;
- theEdges.push_back(edgeID);
+ nbEdgesInChamfer ++;
+ theEdges.push_back(edgeID);
}
Ex.Next();
}
return NULL;
}
aChamfer->GetLastFunction()->SetDescription("");
-
+
TopoDS_Shape aChamferShape = aChamfer->GetValue();
aFunction->SetValue(aChamferShape);
// END of chamfer
//
// Get the groups: BEGIN
//
- // if (!MakeGroups(aShape, TSHAPE_CHAMFER, theR1, theW1, theL1, theR2, theW2, theL2, aSeq, gp_Trsf())) {
- // //Make a Python command
- // GEOM::TPythonDump(aFunction) << "[" << aShape << "] = geompy.MakePipeTShapeChamfer(" << theR1 << ", " << theW1
- // << ", " << theL1 << ", " << theR2 << ", " << theW2 << ", " << theL2 << ", " << theH << ", " << theW
- // << ", " << theHexMesh << ")";
- // }
- // else {
+ //if (!MakeGroups(aShape, TSHAPE_CHAMFER, theR1, theW1, theL1, theR2, theW2, theL2, aSeq, gp_Trsf())) {
+ // //Make a Python command
+ // GEOM::TPythonDump(aFunction)
+ // << "[" << aShape << "] = geompy.MakePipeTShapeChamfer(" << theR1 << ", " << theW1
+ // << ", " << theL1 << ", " << theR2 << ", " << theW2 << ", " << theL2 << ", " << theH << ", " << theW
+ // << ", " << theHexMesh << ")";
+ //}
+ //else {
try {
if (!MakeGroups(aShape, TSHAPE_CHAMFER, theR1, theW1, theL1, theR2, theW2, theL2, aSeq, gp_Trsf()))
return NULL;
aListRes.Trunc(aListRes.Length() - 2);
//Make a Python command
- GEOM::TPythonDump(aFunction) << "[" << aShape << ", " << aListRes.ToCString()
- << "] = geompy.MakePipeTShapeChamfer(" << theR1 << ", " << theW1 << ", " << theL1 << ", " << theR2
- << ", " << theW2 << ", " << theL2 << ", " << theH << ", " << theW << ", " << theHexMesh << ")";
- // }
+ GEOM::TPythonDump(aFunction)
+ << "[" << aShape << ", " << aListRes.ToCString()
+ << "] = geompy.MakePipeTShapeChamfer(" << theR1 << ", " << theW1 << ", " << theL1 << ", " << theR2
+ << ", " << theW2 << ", " << theL2 << ", " << theH << ", " << theW << ", " << theHexMesh << ")";
+ //}
}
//
// Get the groups: END
//
else {
//Make a Python command
- GEOM::TPythonDump(aFunction) << "[" << aShape << "] = geompy.MakePipeTShapeChamfer(" << theR1 << ", " << theW1
- << ", " << theL1 << ", " << theR2 << ", " << theW2 << ", " << theL2 << ", " << theH << ", " << theW
- << ", " << theHexMesh << ")";
+ GEOM::TPythonDump(aFunction)
+ << "[" << aShape << "] = geompy.MakePipeTShapeChamfer(" << theR1 << ", " << theW1
+ << ", " << theL1 << ", " << theR2 << ", " << theW2 << ", " << theL2 << ", " << theH << ", " << theW
+ << ", " << theHexMesh << ")";
}
SetErrorCode(OK);
//=============================================================================
Handle(TColStd_HSequenceOfTransient)
GEOMImpl_IAdvancedOperations::MakePipeTShapeChamferWithPosition(double theR1, double theW1, double theL1,
- double theR2, double theW2, double theL2,
- double theH, double theW,
- bool theHexMesh,
- Handle(GEOM_Object) theP1,
- Handle(GEOM_Object) theP2,
- Handle(GEOM_Object) theP3)
+ double theR2, double theW2, double theL2,
+ double theH, double theW,
+ bool theHexMesh,
+ Handle(GEOM_Object) theP1,
+ Handle(GEOM_Object) theP2,
+ Handle(GEOM_Object) theP3)
{
SetErrorCode(KO);
//Add a new object
box_e->GetLastFunction()->SetDescription("");
box_e = myTransformOperations->TranslateDXDYDZ(box_e, -(theR2+theW2), -(theR2+theW2), 0);
box_e->GetLastFunction()->SetDescription("");
-
- Handle(TColStd_HSequenceOfInteger) edges_e = myShapesOperations->GetShapesOnBoxIDs(box_e, aShape, TopAbs_EDGE, GEOMAlgo_ST_IN);
+
+ Handle(TColStd_HSequenceOfInteger) edges_e =
+ myShapesOperations->GetShapesOnBoxIDs(box_e, aShape, TopAbs_EDGE, GEOMAlgo_ST_IN);
box_e->GetLastFunction()->SetDescription("");
if (edges_e.IsNull() || edges_e->Length() == 0) {
while (Ex.More()) {
gp_Pnt aPt = BRep_Tool::Pnt(TopoDS::Vertex(Ex.Current()));
if (Abs(aPt.Z() - (theR1+theW1)) <= Precision::Confusion()) {
- nbEdgesInChamfer ++;
- theEdges.push_back(edgeID);
+ nbEdgesInChamfer ++;
+ theEdges.push_back(edgeID);
}
Ex.Next();
}
return NULL;
}
aChamfer->GetLastFunction()->SetDescription("");
-
+
TopoDS_Shape aChamferShape = aChamfer->GetValue();
aFunction->SetValue(aChamferShape);
// END of chamfer
-
+
if (theHexMesh) {
if (!MakePipeTShapePartition(aShape, theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, 0, false))
return NULL;
aListRes.Trunc(aListRes.Length() - 2);
//Make a Python command
- GEOM::TPythonDump(aFunction) << "[" << aShape << ", " << aListRes.ToCString()
- << "] = geompy.MakePipeTShapeChamfer(" << theR1 << ", " << theW1 << ", " << theL1 << ", " << theR2
- << ", " << theW2 << ", " << theL2 << ", " << theH << ", " << theW << ", " << theHexMesh << ", "
- << theP1 << ", " << theP2 << ", " << theP3 << ")";
+ GEOM::TPythonDump(aFunction)
+ << "[" << aShape << ", " << aListRes.ToCString()
+ << "] = geompy.MakePipeTShapeChamfer(" << theR1 << ", " << theW1 << ", " << theL1 << ", " << theR2
+ << ", " << theW2 << ", " << theL2 << ", " << theH << ", " << theW << ", " << theHexMesh << ", "
+ << theP1 << ", " << theP2 << ", " << theP3 << ")";
}
/*
* Get the groups: END
*/
else {
//Make a Python command
- GEOM::TPythonDump(aFunction) << "[" << aShape << "] = geompy.MakePipeTShapeChamfer(" << theR1 << ", " << theW1
- << ", " << theL1 << ", " << theR2 << ", " << theW2 << ", " << theL2 << ", " << theH << ", " << theW
- << ", " << theHexMesh << ", " << theP1 << ", " << theP2 << ", " << theP3 << ")";
+ GEOM::TPythonDump(aFunction)
+ << "[" << aShape << "] = geompy.MakePipeTShapeChamfer(" << theR1 << ", " << theW1
+ << ", " << theL1 << ", " << theR2 << ", " << theW2 << ", " << theL2 << ", " << theH << ", " << theW
+ << ", " << theHexMesh << ", " << theP1 << ", " << theP2 << ", " << theP3 << ")";
}
SetErrorCode(OK);
//=============================================================================
Handle(TColStd_HSequenceOfTransient)
GEOMImpl_IAdvancedOperations::MakePipeTShapeFillet(double theR1, double theW1, double theL1,
- double theR2, double theW2, double theL2,
- double theRF, bool theHexMesh)
+ double theR2, double theW2, double theL2,
+ double theRF, bool theHexMesh)
{
SetErrorCode(KO);
//Add a new object
box_e->GetLastFunction()->SetDescription("");
box_e = myTransformOperations->TranslateDXDYDZ(box_e, -(theR2+theW2), -(theR2+theW2), 0);
box_e->GetLastFunction()->SetDescription("");
-
- Handle(TColStd_HSequenceOfInteger) edges_e = myShapesOperations->GetShapesOnBoxIDs(box_e, aShape, TopAbs_EDGE, GEOMAlgo_ST_IN);
+
+ Handle(TColStd_HSequenceOfInteger) edges_e =
+ myShapesOperations->GetShapesOnBoxIDs(box_e, aShape, TopAbs_EDGE, GEOMAlgo_ST_IN);
box_e->GetLastFunction()->SetDescription("");
if (edges_e.IsNull() || edges_e->Length() == 0) {
while (Ex.More()) {
gp_Pnt aPt = BRep_Tool::Pnt(TopoDS::Vertex(Ex.Current()));
if (Abs(aPt.Z() - (theR1+theW1)) <= Precision::Confusion()) {
- nbEdgesInFillet ++;
- theEdges.push_back(edgeID);
+ nbEdgesInFillet ++;
+ theEdges.push_back(edgeID);
}
Ex.Next();
}
return NULL;
}
if (aFillet.IsNull()) {
-// SetErrorCode("Fillet can not be computed on the given shape with the given parameters");
+ //SetErrorCode("Fillet can not be computed on the given shape with the given parameters");
SetErrorCode(myLocalOperations->GetErrorCode());
return NULL;
}
aFillet->GetLastFunction()->SetDescription("");
-
+
TopoDS_Shape aFilletShape = aFillet->GetValue();
aFunction->SetValue(aFilletShape);
// END of fillet
+ // BEGIN: Limit tolerances (debug)
+ Handle(GEOM_Object) aCorr1 = myHealingOperations->LimitTolerance(aShape, 1e-07);
+ TopoDS_Shape aCorr1Shape = aCorr1->GetValue();
+ aShape->GetLastFunction()->SetValue(aCorr1Shape);
+ aCorr1->GetLastFunction()->SetDescription("");
+ // END: Limit tolerances (debug)
+
if (theHexMesh) {
if (!MakePipeTShapePartition(aShape, theR1, theW1, theL1, theR2, theW2, theL2, 0, 0, theRF, false))
return NULL;
aListRes.Trunc(aListRes.Length() - 2);
//Make a Python command
- GEOM::TPythonDump(aFunction) << "[" << aShape << ", " << aListRes.ToCString()
- << "] = geompy.MakePipeTShapeFillet(" << theR1 << ", " << theW1 << ", " << theL1 << ", " << theR2
- << ", " << theW2 << ", " << theL2 << ", " << theRF << ", " << theHexMesh << ")";
+ GEOM::TPythonDump(aFunction)
+ << "[" << aShape << ", " << aListRes.ToCString()
+ << "] = geompy.MakePipeTShapeFillet(" << theR1 << ", " << theW1 << ", " << theL1 << ", " << theR2
+ << ", " << theW2 << ", " << theL2 << ", " << theRF << ", " << theHexMesh << ")";
}
/*
* Get the groups: END
*/
else {
//Make a Python command
- GEOM::TPythonDump(aFunction) << "[" << aShape << "] = geompy.MakePipeTShapeFillet(" << theR1 << ", " << theW1
- << ", " << theL1 << ", " << theR2 << ", " << theW2 << ", " << theL2 << ", " << theRF << ", "
- << theHexMesh << ")";
+ GEOM::TPythonDump(aFunction)
+ << "[" << aShape << "] = geompy.MakePipeTShapeFillet(" << theR1 << ", " << theW1
+ << ", " << theL1 << ", " << theR2 << ", " << theW2 << ", " << theL2 << ", " << theRF << ", "
+ << theHexMesh << ")";
}
-
SetErrorCode(OK);
return aSeq;
-
}
//=============================================================================
//=============================================================================
Handle(TColStd_HSequenceOfTransient)
GEOMImpl_IAdvancedOperations::MakePipeTShapeFilletWithPosition(double theR1, double theW1, double theL1,
- double theR2, double theW2, double theL2,
- double theRF, bool theHexMesh,
- Handle(GEOM_Object) theP1,
- Handle(GEOM_Object) theP2,
- Handle(GEOM_Object) theP3)
+ double theR2, double theW2, double theL2,
+ double theRF, bool theHexMesh,
+ Handle(GEOM_Object) theP1,
+ Handle(GEOM_Object) theP2,
+ Handle(GEOM_Object) theP3)
{
SetErrorCode(KO);
//Add a new object
box_e->GetLastFunction()->SetDescription("");
box_e = myTransformOperations->TranslateDXDYDZ(box_e, -(theR2+theW2), -(theR2+theW2), 0);
box_e->GetLastFunction()->SetDescription("");
-
- Handle(TColStd_HSequenceOfInteger) edges_e = myShapesOperations->GetShapesOnBoxIDs(box_e, aShape, TopAbs_EDGE, GEOMAlgo_ST_IN);
+
+ Handle(TColStd_HSequenceOfInteger) edges_e =
+ myShapesOperations->GetShapesOnBoxIDs(box_e, aShape, TopAbs_EDGE, GEOMAlgo_ST_IN);
box_e->GetLastFunction()->SetDescription("");
if (edges_e.IsNull() || edges_e->Length() == 0) {
while (Ex.More()) {
gp_Pnt aPt = BRep_Tool::Pnt(TopoDS::Vertex(Ex.Current()));
if (Abs(aPt.Z() - (theR1+theW1)) <= Precision::Confusion()) {
- nbEdgesInFillet ++;
- theEdges.push_back(edgeID);
+ nbEdgesInFillet ++;
+ theEdges.push_back(edgeID);
}
Ex.Next();
}
return NULL;
}
aFillet->GetLastFunction()->SetDescription("");
-
+
TopoDS_Shape aFilletShape = aFillet->GetValue();
aFunction->SetValue(aFilletShape);
// END of fillet
+ // BEGIN: Limit tolerances (debug)
+ Handle(GEOM_Object) aCorr1 = myHealingOperations->LimitTolerance(aShape, 1e-07);
+ TopoDS_Shape aCorr1Shape = aCorr1->GetValue();
+ aShape->GetLastFunction()->SetValue(aCorr1Shape);
+ aCorr1->GetLastFunction()->SetDescription("");
+ // END: Limit tolerances (debug)
+
if (theHexMesh) {
if (!MakePipeTShapePartition(aShape, theR1, theW1, theL1, theR2, theW2, theL2, 0, 0, theRF, false))
return NULL;
aListRes.Trunc(aListRes.Length() - 2);
//Make a Python command
- GEOM::TPythonDump(aFunction) << "[" << aShape << ", " << aListRes.ToCString()
- << "] = geompy.MakePipeTShapeFillet(" << theR1 << ", " << theW1 << ", " << theL1 << ", " << theR2
- << ", " << theW2 << ", " << theL2 << ", " << theRF << ", " << theHexMesh << ", " << theP1 << ", "
- << theP2 << ", " << theP3 << ")";
+ GEOM::TPythonDump(aFunction)
+ << "[" << aShape << ", " << aListRes.ToCString()
+ << "] = geompy.MakePipeTShapeFillet(" << theR1 << ", " << theW1 << ", " << theL1 << ", " << theR2
+ << ", " << theW2 << ", " << theL2 << ", " << theRF << ", " << theHexMesh << ", " << theP1 << ", "
+ << theP2 << ", " << theP3 << ")";
}
/*
* Get the groups: END
*/
else {
//Make a Python command
- GEOM::TPythonDump(aFunction) << "[" << aShape << "] = geompy.MakePipeTShapeFillet(" << theR1 << ", " << theW1
- << ", " << theL1 << ", " << theR2 << ", " << theW2 << ", " << theL2 << ", " << theRF << ", "
- << theHexMesh << ", " << theP1 << ", " << theP2 << ", " << theP3 << ")";
+ GEOM::TPythonDump(aFunction)
+ << "[" << aShape << "] = geompy.MakePipeTShapeFillet(" << theR1 << ", " << theW1
+ << ", " << theL1 << ", " << theR2 << ", " << theW2 << ", " << theL2 << ", " << theRF << ", "
+ << theHexMesh << ", " << theP1 << ", " << theP2 << ", " << theP3 << ")";
}
SetErrorCode(OK);
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-
// File : GEOMImpl_IAdvancedOperations.hxx
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
-//
+
#ifndef _GEOMImpl_IAdvancedOperations_HXX_
#define _GEOMImpl_IAdvancedOperations_HXX_
class GEOMImpl_IBlocksOperations;
class GEOMImpl_I3DPrimOperations;
class GEOMImpl_ILocalOperations;
+class GEOMImpl_IHealingOperations;
class GEOMImpl_IAdvancedOperations: public GEOM_IOperations {
private:
bool MakePipeTShapePartition(Handle(GEOM_Object) theShape,
- double theR1, double theW1, double theL1,
- double theR2, double theW2, double theL2,
- double theH = 0, double theW = 0,
- double theRF = 0, bool isNormal = true);
+ double theR1, double theW1, double theL1,
+ double theR2, double theW2, double theL2,
+ double theH = 0, double theW = 0,
+ double theRF = 0, bool isNormal = true);
bool MakePipeTShapeMirrorAndGlue(Handle(GEOM_Object) theShape,
- double theR1, double theW1, double theL1,
- double theR2, double theW2, double theL2);
+ double theR1, double theW1, double theL1,
+ double theR2, double theW2, double theL2);
bool MakeGroups(Handle(GEOM_Object) theShape, int shapType,
- double theR1, double theW1, double theL1,
- double theR2, double theW2, double theL2,
- Handle(TColStd_HSequenceOfTransient) theSeq,
- gp_Trsf aTrsf);
+ double theR1, double theW1, double theL1,
+ double theR2, double theW2, double theL2,
+ Handle(TColStd_HSequenceOfTransient) theSeq,
+ gp_Trsf aTrsf);
gp_Trsf GetPositionTrsf(double theL1, double theL2,
- Handle(GEOM_Object) P1 = 0,
- Handle(GEOM_Object) P2 = 0,
- Handle(GEOM_Object) P3 = 0);
+ Handle(GEOM_Object) P1 = 0,
+ Handle(GEOM_Object) P2 = 0,
+ Handle(GEOM_Object) P3 = 0);
bool CheckCompatiblePosition(double& theL1, double& theL2,
- Handle(GEOM_Object) theP1,
- Handle(GEOM_Object) theP2,
- Handle(GEOM_Object) theP3,
- double theTolerance);
+ Handle(GEOM_Object) theP1,
+ Handle(GEOM_Object) theP2,
+ Handle(GEOM_Object) theP3,
+ double theTolerance);
private:
GEOMImpl_IBasicOperations* myBasicOperations;
GEOMImpl_IBooleanOperations* myBooleanOperations;
GEOMImpl_IBlocksOperations* myBlocksOperations;
GEOMImpl_I3DPrimOperations* my3DPrimOperations;
GEOMImpl_ILocalOperations* myLocalOperations;
+ GEOMImpl_IHealingOperations* myHealingOperations;
public:
Standard_EXPORT GEOMImpl_IAdvancedOperations(GEOM_Engine* theEngine, int theDocID);
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
MakePipeTShape(double theR1, double theW1, double theL1,
- double theR2, double theW2, double theL2,
- bool theHexMesh = true);
+ double theR2, double theW2, double theL2,
+ bool theHexMesh = true);
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
MakePipeTShapeWithPosition(double theR1, double theW1, double theL1,
- double theR2, double theW2, double theL2,
- bool theHexMesh = true,
- Handle(GEOM_Object) P1 = 0,
- Handle(GEOM_Object) P2 = 0,
- Handle(GEOM_Object) P3 = 0);
+ double theR2, double theW2, double theL2,
+ bool theHexMesh = true,
+ Handle(GEOM_Object) P1 = 0,
+ Handle(GEOM_Object) P2 = 0,
+ Handle(GEOM_Object) P3 = 0);
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
MakePipeTShapeChamfer(double theR1, double theW1, double theL1,
- double theR2, double theW2, double theL2,
- double theH, double theW,
- bool theHexMesh = true);
+ double theR2, double theW2, double theL2,
+ double theH, double theW,
+ bool theHexMesh = true);
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
MakePipeTShapeChamferWithPosition(double theR1, double theW1, double theL1,
- double theR2, double theW2, double theL2,
- double theH, double theW,
- bool theHexMesh = true,
- Handle(GEOM_Object) P1 = 0,
- Handle(GEOM_Object) P2 = 0,
- Handle(GEOM_Object) P3 = 0);
+ double theR2, double theW2, double theL2,
+ double theH, double theW,
+ bool theHexMesh = true,
+ Handle(GEOM_Object) P1 = 0,
+ Handle(GEOM_Object) P2 = 0,
+ Handle(GEOM_Object) P3 = 0);
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
MakePipeTShapeFillet(double theR1, double theW1, double theL1,
- double theR2, double theW2, double theL2,
- double theRF, bool theHexMesh = true);
+ double theR2, double theW2, double theL2,
+ double theRF, bool theHexMesh = true);
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
MakePipeTShapeFilletWithPosition(double theR1, double theW1, double theL1,
- double theR2, double theW2, double theL2,
- double theRF, bool theHexMesh = true,
- Handle(GEOM_Object) P1 = 0,
- Handle(GEOM_Object) P2 = 0,
- Handle(GEOM_Object) P3 = 0);
+ double theR2, double theW2, double theL2,
+ double theRF, bool theHexMesh = true,
+ Handle(GEOM_Object) P1 = 0,
+ Handle(GEOM_Object) P2 = 0,
+ Handle(GEOM_Object) P3 = 0);
/*@@ insert new functions before this line @@ do not remove this line @@*/
};
#endif
if( sh.ShapeType()==TopAbs_SHELL || sh.ShapeType()==TopAbs_FACE ) {
// non solid case
double U1,U2,V1,V2;
- S->Bounds(U1,U2,V1,V2);
+ //S->Bounds(U1,U2,V1,V2);
+ ShapeAnalysis::GetFaceUVBounds(TopoDS::Face(tmpSh2),U1,U2,V1,V2);
Handle(Geom_RectangularTrimmedSurface) TrS1 =
new Geom_RectangularTrimmedSurface(S,U1,(U1+U2)/2.,V1,V2);
Handle(Geom_RectangularTrimmedSurface) TrS2 =
SHAPE_ARG_PLANAR = 3, // for Face
SHAPE_ARG_SUBTYPE = 4, // for Sub-shape
SHAPE_ARG_INDICES = 5, // for Sub-shape
- SHAPE_ARG_TOLERANCE = 6 // for Wire
+ SHAPE_ARG_TOLERANCE = 6, // linear tolerance (for Wire, Edge)
+ SHAPE_ARG_ANGLE_TOL = 7, // angular tolerance (for Edge)
};
GEOMImpl_IShapes(Handle(GEOM_Function) theFunction): _func(theFunction) {}
Standard_Real GetTolerance() { return _func->GetReal(SHAPE_ARG_TOLERANCE); }
+ void SetAngularTolerance(const Standard_Real theValue)
+ { _func->SetReal(SHAPE_ARG_ANGLE_TOL, theValue); }
+
+ Standard_Real GetAngularTolerance() { return _func->GetReal(SHAPE_ARG_ANGLE_TOL); }
+
private:
Handle(GEOM_Function) _func;
return anEdge;
}
+//=============================================================================
+/*!
+ * MakeEdgeWire
+ */
+//=============================================================================
+Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeEdgeWire
+ (Handle(GEOM_Object) theWire,
+ const Standard_Real theLinearTolerance,
+ const Standard_Real theAngularTolerance)
+{
+ SetErrorCode(KO);
+
+ if (theWire.IsNull()) return NULL;
+
+ //Add a new Edge object
+ Handle(GEOM_Object) anEdge = GetEngine()->AddObject(GetDocID(), GEOM_EDGE);
+
+ //Add a new Vector function
+ Handle(GEOM_Function) aFunction =
+ anEdge->AddFunction(GEOMImpl_ShapeDriver::GetID(), EDGE_WIRE);
+
+ //Check if the function is set correctly
+ if (aFunction->GetDriverGUID() != GEOMImpl_ShapeDriver::GetID()) return NULL;
+
+ GEOMImpl_IShapes aCI (aFunction);
+
+ Handle(GEOM_Function) aWire = theWire->GetLastFunction();
+
+ if (aWire.IsNull()) return NULL;
+
+ aCI.SetBase(aWire);
+ aCI.SetTolerance(theLinearTolerance);
+ aCI.SetAngularTolerance(theAngularTolerance);
+
+ //Compute the Edge value
+ try {
+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+ OCC_CATCH_SIGNALS;
+#endif
+ if (!GetSolver()->ComputeFunction(aFunction)) {
+ SetErrorCode("Shape driver failed");
+ return NULL;
+ }
+ }
+ catch (Standard_Failure) {
+ Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+ SetErrorCode(aFail->GetMessageString());
+ return NULL;
+ }
+
+ const double DEF_LIN_TOL = Precision::Confusion();
+ const double DEF_ANG_TOL = Precision::Angular();
+ //Make a Python command
+ if ( theAngularTolerance == DEF_ANG_TOL ) {
+ if ( theLinearTolerance == DEF_LIN_TOL )
+ GEOM::TPythonDump(aFunction) << anEdge << " = geompy.MakeEdgeWire("
+ << theWire << ")";
+ else
+ GEOM::TPythonDump(aFunction) << anEdge << " = geompy.MakeEdgeWire("
+ << theWire << ", " << theLinearTolerance << ")";
+ }
+ else {
+ GEOM::TPythonDump(aFunction) << anEdge << " = geompy.MakeEdgeWire("
+ << theWire << ", " << theLinearTolerance << ", "
+ << theAngularTolerance << ")";
+ }
+
+ SetErrorCode(OK);
+ return anEdge;
+}
+
//=============================================================================
/*!
* MakeWire
return MakeShape(theShapes, GEOM_SOLID, SOLID_SHELLS, "MakeSolid");
}
-//=============================================================================
-/*!
- * MakeSolidShell
- */
-//=============================================================================
-Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeSolidShell (Handle(GEOM_Object) theShell)
-{
- SetErrorCode(KO);
-
- if (theShell.IsNull()) return NULL;
-
- //Add a new Solid object
- Handle(GEOM_Object) aSolid = GetEngine()->AddObject(GetDocID(), GEOM_SOLID);
-
- //Add a new Solid function for creation of a solid from a shell
- Handle(GEOM_Function) aFunction =
- aSolid->AddFunction(GEOMImpl_ShapeDriver::GetID(), SOLID_SHELL);
- if (aFunction.IsNull()) return NULL;
-
- //Check if the function is set correctly
- if (aFunction->GetDriverGUID() != GEOMImpl_ShapeDriver::GetID()) return NULL;
-
- GEOMImpl_IShapes aCI (aFunction);
-
- Handle(GEOM_Function) aRefShell = theShell->GetLastFunction();
-
- if (aRefShell.IsNull()) return NULL;
-
- aCI.SetBase(aRefShell);
-
- //Compute the Solid value
- try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
- OCC_CATCH_SIGNALS;
-#endif
- if (!GetSolver()->ComputeFunction(aFunction)) {
- SetErrorCode("Solid driver failed");
- return NULL;
- }
- }
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
- return NULL;
- }
-
- //Make a Python command
- GEOM::TPythonDump(aFunction) << aSolid
- << " = geompy.MakeSolid(" << theShell << ")";
-
- SetErrorCode(OK);
- return aSolid;
-}
-
//=============================================================================
/*!
* MakeCompound
bool isFound = false;
Standard_Integer iType = TopAbs_SOLID;
Standard_Integer compType = TopAbs_SOLID;
- Standard_Real aWhat_Mass = 0., aWhere_Mass = 0.;
+ //Standard_Real aWhat_Mass = 0., aWhere_Mass = 0.;
Standard_Real tab_aWhat[4], tab_aWhere[4];
Standard_Real dl_l = 1e-3;
Standard_Real min_l, Tol_0D, Tol_1D, Tol_2D, Tol_3D, Tol_Mass;
else if ( iType == TopAbs_FACE ) Tol_Mass = Tol_2D;
// Compute the ShapeWhat Mass
+ /*
for ( ; Exp_aWhat.More(); Exp_aWhat.Next() ) {
if ( iType == TopAbs_VERTEX ) {
aWhat_Mass += 1;
else BRepGProp::VolumeProperties(Exp_aWhat.Current(), aProps);
aWhat_Mass += aProps.Mass();
}
+ */
// Searching for the sub-shapes inside the ShapeWhere shape
TopTools_MapOfShape map_aWhere;
if ( isFound ) {
aWhereIndex = aWhereIndices.FindIndex(Exp_aWhere.Current());
aModifiedList.Append(aWhereIndex);
- aWhere_Mass += tab_aWhere[3];
+ //aWhere_Mass += tab_aWhere[3];
isFound = false;
break;
}
}
- if ( fabs( aWhat_Mass - aWhere_Mass ) <= Tol_Mass ) break;
+ //if ( fabs( aWhat_Mass - aWhere_Mass ) <= Tol_Mass )
+ //break;
}
if (aModifiedList.Extent() == 0) { // Not found any Results
Standard_EXPORT ~GEOMImpl_IShapesOperations();
Standard_EXPORT Handle(GEOM_Object) MakeEdge (Handle(GEOM_Object) thePoint1,
- Handle(GEOM_Object) thePoint2);
+ Handle(GEOM_Object) thePoint2);
+ Standard_EXPORT Handle(GEOM_Object) MakeEdgeWire (Handle(GEOM_Object) theWire,
+ const Standard_Real theLinearTolerance,
+ const Standard_Real theAngularTolerance);
Standard_EXPORT Handle(GEOM_Object) MakeWire (std::list<Handle(GEOM_Object)> theEdgesAndWires,
const Standard_Real theTolerance);
Standard_EXPORT Handle(GEOM_Object) MakeShell (std::list<Handle(GEOM_Object)> theShapes);
- Standard_EXPORT Handle(GEOM_Object) MakeSolidShell (Handle(GEOM_Object) theShell);
-
Standard_EXPORT Handle(GEOM_Object) MakeSolidShells (std::list<Handle(GEOM_Object)> theShells);
Standard_EXPORT Handle(GEOM_Object) MakeCompound (std::list<Handle(GEOM_Object)> theShapes);
aTI.SetShape(anOriginal);
aTI.SetEndLCS(theEndLCS->GetLastFunction());
if (!theStartLCS.IsNull())
- aTI.SetStartLCS(theStartLCS->GetLastFunction());
+ aTI.SetStartLCS(theObject == theStartLCS ? anOriginal : theStartLCS->GetLastFunction());
//Compute the Position
try {
gp_Vec Vec1,Vec2;
BRepAdaptor_Surface SF (aFace);
SF.D1(pUV.X(), pUV.Y(), p1, Vec1, Vec2);
+ if (Vec1.Magnitude() < Precision::Confusion()) {
+ gp_Vec tmpV;
+ gp_Pnt tmpP;
+ SF.D1(pUV.X(), pUV.Y()-0.1, tmpP, Vec1, tmpV);
+ }
+ else if (Vec2.Magnitude() < Precision::Confusion()) {
+ gp_Vec tmpV;
+ gp_Pnt tmpP;
+ SF.D1(pUV.X()-0.1, pUV.Y(), tmpP, tmpV, Vec2);
+ }
+
gp_Vec V = Vec1.Crossed(Vec2);
Standard_Real mod = V.Magnitude();
if (mod < Precision::Confusion())
Standard_TypeMismatch::Raise
("Creation Point On Lines Intersection Aborted : Line shape is not an edge or wire");
}
+
+ if (aRefShape1.IsSame(aRefShape2))
+ Standard_ConstructionError::Raise("The lines to make intersection must be different");
+
//Calculate Lines Intersection Point
BRepExtrema_DistShapeShape dst (aRefShape1, aRefShape2);
if (dst.IsDone()) {
// OCCT Includes
#include <ShapeFix_Wire.hxx>
#include <ShapeFix_Edge.hxx>
+#include <ShapeFix_Shape.hxx>
#include <BRep_Tool.hxx>
#include <BRep_Builder.hxx>
#include <BRepClass3d_SolidClassifier.hxx>
#include <BRepBuilderAPI_MakeWire.hxx>
#include <BRepBuilderAPI_Sewing.hxx>
+#include <BRepLib.hxx>
+#include <BRepLib_MakeEdge.hxx>
+#include <BRepTools_WireExplorer.hxx>
+#include <BRepAdaptor_Curve.hxx>
#include <ShapeAnalysis_FreeBounds.hxx>
+#include <ElCLib.hxx>
#include <TopAbs.hxx>
#include <TopoDS.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_HSequenceOfShape.hxx>
+#include <TColStd_SequenceOfReal.hxx>
#include <TColStd_HSequenceOfTransient.hxx>
+#include <TColStd_Array1OfReal.hxx>
+#include <TColGeom_SequenceOfCurve.hxx>
+#include <TColGeom_Array1OfBSplineCurve.hxx>
+#include <TColGeom_HArray1OfBSplineCurve.hxx>
+
+#include <GeomAbs_CurveType.hxx>
+#include <Geom_TrimmedCurve.hxx>
+#include <GeomConvert_CompCurveToBSplineCurve.hxx>
+#include <GeomConvert.hxx>
+#include <GeomLProp.hxx>
#include <Precision.hxx>
#include <Standard_NullObject.hxx>
aShape = tds;
}
}
+ else if (aType == EDGE_WIRE) {
+ Handle(GEOM_Function) aRefBase = aCI.GetBase();
+ TopoDS_Shape aWire = aRefBase->GetValue();
+ Standard_Real LinTol = aCI.GetTolerance();
+ Standard_Real AngTol = aCI.GetAngularTolerance();
+ if (aWire.IsNull()) Standard_NullObject::Raise("Argument Wire is null");
+
+ TopoDS_Edge ResEdge;
+
+ BRepLib::BuildCurves3d(aWire);
+ Handle(ShapeFix_Shape) Fixer = new ShapeFix_Shape(aWire);
+ Fixer->SetPrecision(LinTol);
+ Fixer->SetMaxTolerance(LinTol);
+ Fixer->Perform();
+ TopoDS_Wire theWire = TopoDS::Wire(Fixer->Shape());
+
+ TColGeom_SequenceOfCurve CurveSeq;
+ TopTools_SequenceOfShape LocSeq;
+ TColStd_SequenceOfReal FparSeq;
+ TColStd_SequenceOfReal LparSeq;
+ TColStd_SequenceOfReal TolSeq;
+ GeomAbs_CurveType CurType;
+ TopoDS_Vertex FirstVertex, LastVertex;
+
+ BRepTools_WireExplorer wexp(theWire) ;
+ for (; wexp.More(); wexp.Next())
+ {
+ TopoDS_Edge anEdge = wexp.Current();
+ Standard_Real fpar, lpar;
+ TopLoc_Location aLoc;
+ Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge, aLoc, fpar, lpar);
+ if (aCurve.IsNull())
+ continue;
+
+ BRepAdaptor_Curve BAcurve(anEdge);
+ GeomAbs_CurveType aType = BAcurve.GetType();
+
+ Handle(Geom_Curve) aBasisCurve = BAcurve.Curve().Curve();
+
+ if (aBasisCurve->IsPeriodic())
+ ElCLib::AdjustPeriodic(aBasisCurve->FirstParameter(), aBasisCurve->LastParameter(),
+ Precision::PConfusion(), fpar, lpar);
+
+ if (CurveSeq.IsEmpty())
+ {
+ CurveSeq.Append(aCurve);
+ TopoDS_Shape aLocShape;
+ aLocShape.Location(aLoc);
+ aLocShape.Orientation(wexp.Orientation());
+ LocSeq.Append(aLocShape);
+ FparSeq.Append(fpar);
+ LparSeq.Append(lpar);
+ CurType = aType;
+ FirstVertex = wexp.CurrentVertex();
+ }
+ else
+ {
+ Standard_Boolean Done = Standard_False;
+ Standard_Real NewFpar, NewLpar;
+ GeomAdaptor_Curve GAprevcurve(CurveSeq.Last());
+ TopoDS_Vertex CurVertex = wexp.CurrentVertex();
+ TopoDS_Vertex CurFirstVer = TopExp::FirstVertex(anEdge);
+ TopAbs_Orientation ConnectByOrigin = (CurVertex.IsSame(CurFirstVer))? TopAbs_FORWARD : TopAbs_REVERSED;
+ if (aCurve == CurveSeq.Last())
+ {
+ NewFpar = fpar;
+ NewLpar = lpar;
+ if (aBasisCurve->IsPeriodic())
+ {
+ if (NewLpar < NewFpar)
+ NewLpar += aBasisCurve->Period();
+ if (ConnectByOrigin == TopAbs_FORWARD)
+ ElCLib::AdjustPeriodic(FparSeq.Last(),
+ FparSeq.Last() + aBasisCurve->Period(),
+ Precision::PConfusion(), NewFpar, NewLpar);
+ else
+ ElCLib::AdjustPeriodic(FparSeq.Last() - aBasisCurve->Period(),
+ FparSeq.Last(),
+ Precision::PConfusion(), NewFpar, NewLpar);
+ }
+ Done = Standard_True;
+ }
+ else if (aType == CurType &&
+ aType != GeomAbs_BezierCurve &&
+ aType != GeomAbs_BSplineCurve &&
+ aType != GeomAbs_OtherCurve)
+ {
+ switch (aType)
+ {
+ case GeomAbs_Line:
+ {
+ gp_Lin aLine = BAcurve.Line();
+ gp_Lin PrevLine = GAprevcurve.Line();
+ if (aLine.Contains(PrevLine.Location(), LinTol) &&
+ aLine.Direction().IsParallel(PrevLine.Direction(), AngTol))
+ {
+ gp_Pnt P1 = ElCLib::Value(fpar, aLine);
+ gp_Pnt P2 = ElCLib::Value(lpar, aLine);
+ NewFpar = ElCLib::Parameter(PrevLine, P1);
+ NewLpar = ElCLib::Parameter(PrevLine, P2);
+ if (NewLpar < NewFpar)
+ {
+ Standard_Real MemNewFpar = NewFpar;
+ NewFpar = NewLpar;
+ NewLpar = MemNewFpar;
+ ConnectByOrigin = TopAbs::Reverse(ConnectByOrigin);
+ }
+ Done = Standard_True;
+ }
+ break;
+ }
+ case GeomAbs_Circle:
+ {
+ gp_Circ aCircle = BAcurve.Circle();
+ gp_Circ PrevCircle = GAprevcurve.Circle();
+ if (aCircle.Location().Distance(PrevCircle.Location()) <= LinTol &&
+ Abs(aCircle.Radius() - PrevCircle.Radius()) <= LinTol &&
+ aCircle.Axis().IsParallel(PrevCircle.Axis(), AngTol))
+ {
+ if (aCircle.Axis().Direction() * PrevCircle.Axis().Direction() < 0.)
+ {
+ Standard_Real memfpar = fpar;
+ fpar = lpar;
+ lpar = memfpar;
+ ConnectByOrigin = TopAbs::Reverse(ConnectByOrigin);
+ }
+ gp_Pnt P1 = ElCLib::Value(fpar, aCircle);
+ gp_Pnt P2 = ElCLib::Value(lpar, aCircle);
+ NewFpar = ElCLib::Parameter(PrevCircle, P1);
+ NewLpar = ElCLib::Parameter(PrevCircle, P2);
+ if (NewLpar < NewFpar)
+ NewLpar += 2.*PI;
+ //Standard_Real MemNewFpar = NewFpar, MemNewLpar = NewLpar;
+ if (ConnectByOrigin == TopAbs_FORWARD)
+ ElCLib::AdjustPeriodic(FparSeq.Last(),
+ FparSeq.Last() + 2.*PI,
+ Precision::PConfusion(), NewFpar, NewLpar);
+ else
+ ElCLib::AdjustPeriodic(FparSeq.Last() - 2.*PI,
+ FparSeq.Last(),
+ Precision::PConfusion(), NewFpar, NewLpar);
+ Done = Standard_True;
+ }
+ break;
+ }
+ case GeomAbs_Ellipse:
+ {
+ gp_Elips anEllipse = BAcurve.Ellipse();
+ gp_Elips PrevEllipse = GAprevcurve.Ellipse();
+ if (anEllipse.Focus1().Distance(PrevEllipse.Focus1()) <= LinTol &&
+ anEllipse.Focus2().Distance(PrevEllipse.Focus2()) <= LinTol &&
+ Abs(anEllipse.MajorRadius() - PrevEllipse.MajorRadius()) <= LinTol &&
+ Abs(anEllipse.MinorRadius() - PrevEllipse.MinorRadius()) <= LinTol &&
+ anEllipse.Axis().IsParallel(PrevEllipse.Axis(), AngTol))
+ {
+ if (anEllipse.Axis().Direction() * PrevEllipse.Axis().Direction() < 0.)
+ {
+ Standard_Real memfpar = fpar;
+ fpar = lpar;
+ lpar = memfpar;
+ ConnectByOrigin = TopAbs::Reverse(ConnectByOrigin);
+ }
+ gp_Pnt P1 = ElCLib::Value(fpar, anEllipse);
+ gp_Pnt P2 = ElCLib::Value(lpar, anEllipse);
+ NewFpar = ElCLib::Parameter(PrevEllipse, P1);
+ NewLpar = ElCLib::Parameter(PrevEllipse, P2);
+ if (NewLpar < NewFpar)
+ NewLpar += 2.*PI;
+ if (ConnectByOrigin == TopAbs_FORWARD)
+ ElCLib::AdjustPeriodic(FparSeq.Last(),
+ FparSeq.Last() + 2.*PI,
+ Precision::PConfusion(), NewFpar, NewLpar);
+ else
+ ElCLib::AdjustPeriodic(FparSeq.Last() - 2.*PI,
+ FparSeq.Last(),
+ Precision::PConfusion(), NewFpar, NewLpar);
+ Done = Standard_True;
+ }
+ break;
+ }
+ case GeomAbs_Hyperbola:
+ {
+ gp_Hypr aHypr = BAcurve.Hyperbola();
+ gp_Hypr PrevHypr = GAprevcurve.Hyperbola();
+ if (aHypr.Focus1().Distance(PrevHypr.Focus1()) <= LinTol &&
+ aHypr.Focus2().Distance(PrevHypr.Focus2()) <= LinTol &&
+ Abs(aHypr.MajorRadius() - PrevHypr.MajorRadius()) <= LinTol &&
+ Abs(aHypr.MinorRadius() - PrevHypr.MinorRadius()) <= LinTol &&
+ aHypr.Axis().IsParallel(PrevHypr.Axis(), AngTol))
+ {
+ gp_Pnt P1 = ElCLib::Value(fpar, aHypr);
+ gp_Pnt P2 = ElCLib::Value(lpar, aHypr);
+ NewFpar = ElCLib::Parameter(PrevHypr, P1);
+ NewLpar = ElCLib::Parameter(PrevHypr, P2);
+ if (NewLpar < NewFpar)
+ {
+ Standard_Real MemNewFpar = NewFpar;
+ NewFpar = NewLpar;
+ NewLpar = MemNewFpar;
+ ConnectByOrigin = TopAbs::Reverse(ConnectByOrigin);
+ }
+ Done = Standard_True;
+ }
+ break;
+ }
+ case GeomAbs_Parabola:
+ {
+ gp_Parab aParab = BAcurve.Parabola();
+ gp_Parab PrevParab = GAprevcurve.Parabola();
+ if (aParab.Location().Distance(PrevParab.Location()) <= LinTol &&
+ aParab.Focus().Distance(PrevParab.Focus()) <= LinTol &&
+ Abs(aParab.Focal() - PrevParab.Focal()) <= LinTol &&
+ aParab.Axis().IsParallel(PrevParab.Axis(), AngTol))
+ {
+ gp_Pnt P1 = ElCLib::Value(fpar, aParab);
+ gp_Pnt P2 = ElCLib::Value(lpar, aParab);
+ NewFpar = ElCLib::Parameter(PrevParab, P1);
+ NewLpar = ElCLib::Parameter(PrevParab, P2);
+ if (NewLpar < NewFpar)
+ {
+ Standard_Real MemNewFpar = NewFpar;
+ NewFpar = NewLpar;
+ NewLpar = MemNewFpar;
+ ConnectByOrigin = TopAbs::Reverse(ConnectByOrigin);
+ }
+ Done = Standard_True;
+ }
+ break;
+ }
+ } //end of switch (aType)
+ } // end of else if (aType == CurType && ...
+ if (Done)
+ {
+ if (NewFpar < FparSeq.Last())
+ FparSeq(FparSeq.Length()) = NewFpar;
+ else
+ LparSeq(LparSeq.Length()) = NewLpar;
+ }
+ else
+ {
+ CurveSeq.Append(aCurve);
+ TopoDS_Shape aLocShape;
+ aLocShape.Location(aLoc);
+ aLocShape.Orientation(wexp.Orientation());
+ LocSeq.Append(aLocShape);
+ FparSeq.Append(fpar);
+ LparSeq.Append(lpar);
+ TolSeq.Append(BRep_Tool::Tolerance(CurVertex));
+ CurType = aType;
+ }
+ } // end of else (CurveSeq.IsEmpty()) -> not first time
+ } // end for (; wexp.More(); wexp.Next())
+
+ LastVertex = wexp.CurrentVertex();
+ TolSeq.Append(BRep_Tool::Tolerance(LastVertex));
+
+ if (!CurveSeq.IsEmpty())
+ {
+ Standard_Integer nb_curve = CurveSeq.Length(); //number of curves
+ TColGeom_Array1OfBSplineCurve tab(0,nb_curve-1); //array of the curves
+ TColStd_Array1OfReal tabtolvertex(0,nb_curve-1); //(0,nb_curve-2); //array of the tolerances
+
+ Standard_Integer i;
+
+ if (nb_curve > 1)
+ {
+ for (i = 1; i <= nb_curve; i++)
+ {
+ if (CurveSeq(i)->IsInstance(STANDARD_TYPE(Geom_TrimmedCurve)))
+ CurveSeq(i) = (*((Handle(Geom_TrimmedCurve)*)&(CurveSeq(i))))->BasisCurve();
+
+ Handle(Geom_TrimmedCurve) aTrCurve = new Geom_TrimmedCurve(CurveSeq(i), FparSeq(i), LparSeq(i));
+ tab(i-1) = GeomConvert::CurveToBSplineCurve(aTrCurve);
+ tab(i-1)->Transform(LocSeq(i).Location().Transformation());
+ GeomConvert::C0BSplineToC1BSplineCurve(tab(i-1), Precision::Confusion());
+ if (LocSeq(i).Orientation() == TopAbs_REVERSED)
+ tab(i-1)->Reverse();
+
+ //Temporary
+ //char* name = new char[100];
+ //sprintf(name, "c%d", i);
+ //DrawTrSurf::Set(name, tab(i-1));
+
+ if (i > 1)
+ tabtolvertex(i-2) = TolSeq(i-1);
+ } // end for (i = 1; i <= nb_curve; i++)
+ tabtolvertex(nb_curve-1) = TolSeq(TolSeq.Length());
+
+ Standard_Boolean closed_flag = Standard_False;
+ Standard_Real closed_tolerance = 0.;
+ if (FirstVertex.IsSame(LastVertex) &&
+ GeomLProp::Continuity(tab(0), tab(nb_curve-1),
+ tab(0)->FirstParameter(),
+ tab(nb_curve-1)->LastParameter(),
+ Standard_False, Standard_False, LinTol, AngTol) >= GeomAbs_G1)
+ {
+ closed_flag = Standard_True ;
+ closed_tolerance = BRep_Tool::Tolerance(FirstVertex);
+ }
+
+ Handle(TColGeom_HArray1OfBSplineCurve) concatcurve; //array of the concatenated curves
+ Handle(TColStd_HArray1OfInteger) ArrayOfIndices; //array of the remining Vertex
+ GeomConvert::ConcatC1(tab,
+ tabtolvertex,
+ ArrayOfIndices,
+ concatcurve,
+ closed_flag,
+ closed_tolerance); //C1 concatenation
+
+ if (concatcurve->Length() > 1)
+ {
+ GeomConvert_CompCurveToBSplineCurve Concat(concatcurve->Value(concatcurve->Lower()));
+
+ for (i = concatcurve->Lower()+1; i <= concatcurve->Upper(); i++)
+ Concat.Add( concatcurve->Value(i), LinTol, Standard_True );
+
+ concatcurve->SetValue(concatcurve->Lower(), Concat.BSplineCurve());
+ }
+
+ ResEdge = BRepLib_MakeEdge(concatcurve->Value(concatcurve->Lower()),
+ FirstVertex, LastVertex);
+ }
+ else
+ {
+ if (CurveSeq(1)->IsInstance(STANDARD_TYPE(Geom_TrimmedCurve)))
+ CurveSeq(1) = (*((Handle(Geom_TrimmedCurve)*)&(CurveSeq(i))))->BasisCurve();
+
+ CurveSeq(1)->Transform(LocSeq(1).Location().Transformation());
+ ResEdge = BRepLib_MakeEdge(CurveSeq(1),
+ FirstVertex, LastVertex,
+ FparSeq(1), LparSeq(1));
+ }
+ }
+
+ aShape = ResEdge;
+ }
if (aShape.IsNull()) return 0;
#define SUBSHAPE_NOT_SORTED 8
#define FACE_WIRES 9
#define REVERSE_ORIENTATION 10
+#define EDGE_WIRE 11
#define ARCHIMEDE_TYPE 1
return GetObject(anObject);
}
+//=============================================================================
+/*!
+ * MakeEdgeWire
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeEdgeWire
+ (GEOM::GEOM_Object_ptr theWire,
+ const CORBA::Double theLinearTolerance,
+ const CORBA::Double theAngularTolerance)
+{
+ GEOM::GEOM_Object_var aGEOMObject;
+
+ //Set a not done flag
+ GetOperations()->SetNotDone();
+
+ //Get the source wire
+ Handle(GEOM_Object) aWire = GetObjectImpl(theWire);
+
+ if (aWire.IsNull()) return aGEOMObject._retn();
+
+ //Create the Edge
+ Handle(GEOM_Object) anObject = GetOperations()->MakeEdgeWire(aWire, theLinearTolerance, theAngularTolerance);
+ if (!GetOperations()->IsDone() || anObject.IsNull())
+ return aGEOMObject._retn();
+
+ return GetObject(anObject);
+}
+
//=============================================================================
/*!
* MakeWire
Handle(GEOM_Object) aShell = GetObjectImpl(theShell);
if (aShell.IsNull()) return aGEOMObject._retn();
+ std::list<Handle(GEOM_Object)> aShapes;
+ aShapes.push_back(aShell);
+
//Create the Solid
- Handle(GEOM_Object) anObject = GetOperations()->MakeSolidShell(aShell);
+ Handle(GEOM_Object) anObject = GetOperations()->MakeSolidShells(aShapes);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GEOM::GEOM_Object_ptr MakeEdge (GEOM::GEOM_Object_ptr thePnt1,
GEOM::GEOM_Object_ptr thePnt2);
+ GEOM::GEOM_Object_ptr MakeEdgeWire (GEOM::GEOM_Object_ptr theWire,
+ const CORBA::Double theLinearTolerance,
+ const CORBA::Double theAngularTolerance);
GEOM::GEOM_Object_ptr MakeWire (const GEOM::ListOfGO& theEdgesAndWires,
const CORBA::Double theTolerance);
SUBDIRS= structelem
-salomepypkgdir = $(salomepythondir)/salome/geom
-salomepypkg_PYTHON = \
+mypkgpythondir = $(salomepythondir)/salome/geom
+mypkgpython_PYTHON = \
__init__.py \
geomtools.py
RaiseIfFailed("MakeEdge", self.ShapesOp)
return anObj
+ ## Create an edge from specified wire.
+ # @param theWire source Wire.
+ # @param theLinearTolerance linear tolerance value.
+ # @param theAngularTolerance angular tolerance value.
+ # @return New GEOM_Object, containing the created edge.
+ #
+ # @ref tui_creation_edge "Example"
+ def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12):
+ # Example: see GEOM_TestAll.py
+ anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
+ RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
+ return anObj
+
## Create a wire from the set of edges and wires.
# @param theEdgesAndWires List of edges and/or wires.
# @param theTolerance Maximum distance between vertices, that will be merged.
def AddObject(self,theGroup, theSubShapeID):
# Example: see GEOM_TestOthers.py
self.GroupOp.AddObject(theGroup, theSubShapeID)
- RaiseIfFailed("AddObject", self.GroupOp)
+ if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
+ RaiseIfFailed("AddObject", self.GroupOp)
+ pass
pass
## Removes a sub object with ID \a theSubShapeId from the group
myRestrictGroupBox->setEnabled(!CORBA::is_nil(myMainObj));
allSubs->setChecked(true);
- myShowOnlyBtn = new QPushButton(tr("Show only selected"), GroupMedium);
- myHideSelBtn = new QPushButton(tr("Hide selected"), GroupMedium);
- myShowAllBtn = new QPushButton(tr("Show all sub-shapes"), GroupMedium);
+ myShowOnlyBtn = new QPushButton(tr("SHOW_ONLY_SELECTED"), GroupMedium);
+ myHideSelBtn = new QPushButton(tr("HIDE_SELECTED"), GroupMedium);
+ myShowAllBtn = new QPushButton(tr("SHOW_ALL_SUB_SHAPES"), GroupMedium);
mySelAllBtn = new QPushButton(tr("SELECT_ALL"), GroupMedium);
myAddBtn = new QPushButton(tr("ADD"), GroupMedium);
SalomeApp_Study* study = getStudy();
if (study) {
- char* objIOR = GEOMBase::GetIORFromObject(aGroup);
- std::string IOR(objIOR);
- free(objIOR);
- if (IOR != "") {
- _PTR(SObject) SO (study->studyDS()->FindObjectIOR(IOR));
+ QString objIOR = GEOMBase::GetIORFromObject(aGroup);
+ if (objIOR != "") {
+ _PTR(SObject) SO (study->studyDS()->FindObjectIOR(objIOR.toLatin1().constData()));
if (SO) {
_PTR(StudyBuilder) aBuilder (study->studyDS()->NewBuilder());
aBuilder->SetName(SO, getNewObjectName().toLatin1().constData());
if ( CORBA::is_nil(aGeomGen) )
return false;
- char* IOR = GEOMBase::GetIORFromObject( myObj );
- GEOM::GEOM_Object_var anObject = aGeomGen->GetIORFromString(IOR);
+ QString IOR = GEOMBase::GetIORFromObject( myObj );
+ GEOM::GEOM_Object_var anObject = aGeomGen->GetIORFromString( IOR.toLatin1().constData() );
if ( CORBA::is_nil(anObject) )
return false;
{
Standard_Boolean bFlag;
Standard_Integer aNb, i, aNbB, aNbR, iFlag;
- Standard_Integer i1, i2, aNbSD, iX, j, iDS, jB, iR, k, aNbLV;
+ Standard_Integer i1, i2, aNbSD, iX, j, iDS, jB, iR, k, aNbLV, aNbLV1;
TColStd_ListIteratorOfListOfInteger aIt;
TColStd_DataMapOfIntegerInteger aMII;
- //modified by NIZNHY-PKV Mon Jan 22 15:08:00 2007f
- //TColStd_MapOfInteger aMFence;
TColStd_DataMapOfIntegerListOfInteger aMVSD;
TColStd_DataMapIteratorOfDataMapOfIntegerListOfInteger aItVSD;
- //modified by NIZNHY-PKV Mon Jan 22 10:21:50 2007t
TopTools_DataMapOfShapeInteger aMSI;
TopAbs_ShapeEnum aTi, aTj;
NMTDS_PassKeyBoolean aPKXB;
aMPKXB.Remove(aPKXB);
}
}
- aMVSD.Bind(i, aLV1);
+ //
+ //modified by NIZNHY-PKV Mon Sep 27 08:31:04 2010f
+ aNbLV1=aLV1.Extent();
+ if (aNbLV1) {
+ aMVSD.Bind(i, aLV1);
+ }
+ //aMVSD.Bind(i, aLV1);
+ //modified by NIZNHY-PKV Mon Sep 27 08:31:21 2010t
}
}//for (i=i1; i<=i2; ++i) {
}//for (iR=1; iR<aNbR; ++iR) {
const BOPTools_SplitShapesPool& aSplitShapesPool=myFiller->SplitShapesPool();
const BOPTools_ListOfPaveBlock& aSplitEdges=aSplitShapesPool(myDS->RefEdge(nED));
- Standard_Integer nV1, nV2, aNewShapeIndex;
- Standard_Real t1, t2;
+ Standard_Integer nV1, nV2, aNbPB, aNewShapeIndex;
+ Standard_Real t1, t2;
TopoDS_Edge aE, aESplit;
TopoDS_Vertex aV1, aV2;
-
+ BOPTools_ListIteratorOfListOfPaveBlock aPBIt;
+ //
const TopoDS_Edge aDE=TopoDS::Edge(myDS->Shape(nED));
const TopoDS_Face aDF=TopoDS::Face(myDS->Shape(nFD));
-
- BOPTools_ListIteratorOfListOfPaveBlock aPBIt(aSplitEdges);
-
+ //
+ //modified by NIZNHY-PKV Wed Oct 20 13:20:37 2010f
+ aNbPB=aSplitEdges.Extent();
+ if (aNbPB==1) {
+ Standard_Real aT1, aT2, dT1, dT2, aDT;
+ Handle(Geom2d_Curve) aC2D;
+ //
+ BOPTools_PaveBlock& aPB=aSplitEdges.First();
+ //
+ const BOPTools_Pave& aPave1=aPB.Pave1();
+ t1=aPave1.Param();
+ const BOPTools_Pave& aPave2=aPB.Pave2();
+ t2=aPave2.Param();
+ ////
+ nV1=aPave1.Index();
+ aV1=*((TopoDS_Vertex*)&myDS->GetShape(nV1));
+ //
+ aV2=TopExp::FirstVertex(aDE);
+ if (aV2.IsSame(aV1)) {
+ aC2D=BRep_Tool::CurveOnSurface(aDE, aDF, aT1, aT2);
+ dT1=aT1-t1;
+ if (dT1<0.) {
+ dT1=-dT1;
+ }
+ //
+ dT2=aT2-t2;
+ if (dT2<0.) {
+ dT2=-dT2;
+ }
+ aDT=Precision::PConfusion();
+ if(dT1<aDT && dT2<aDT) {
+ BOPTools_ListOfPaveBlock* pLPB=(BOPTools_ListOfPaveBlock*)&aSplitEdges;
+ pLPB->Clear();
+ return;
+ }
+ }
+ }
+ //modified by NIZNHY-PKV Wed Oct 20 13:20:39 2010t
+ //
+ aPBIt.Initialize(aSplitEdges);
for (; aPBIt.More(); aPBIt.Next()) {
BOPTools_PaveBlock& aPB=aPBIt.Value();
-// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
+// File generated by CPPExt (Value)
//
-// 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.
-//
-// 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
+// Copyright (C) 1991 - 2000 by
+// Matra Datavision SA. All rights reserved.
+//
+// Copyright (C) 2001 - 2004 by
+// Open CASCADE SA. All rights reserved.
+//
+// This file is part of the Open CASCADE Technology software.
//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
#include <NMTTools_MapIteratorOfMapOfPaveBlock.hxx>
-// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
+// File generated by CPPExt (Value)
//
-// 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.
-//
-// 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
+// Copyright (C) 1991 - 2000 by
+// Matra Datavision SA. All rights reserved.
+//
+// Copyright (C) 2001 - 2004 by
+// Open CASCADE SA. All rights reserved.
+//
+// This file is part of the Open CASCADE Technology software.
//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
#ifndef _NMTTools_MapOfPaveBlock_HeaderFile
#define _NMTTools_MapOfPaveBlock_HeaderFile
-// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
+// File generated by CPPExt (Value)
//
-// 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.
-//
-// 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
+// Copyright (C) 1991 - 2000 by
+// Matra Datavision SA. All rights reserved.
+//
+// Copyright (C) 2001 - 2004 by
+// Open CASCADE SA. All rights reserved.
+//
+// This file is part of the Open CASCADE Technology software.
//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
#include <NMTTools_MapOfPaveBlock.hxx>
--- Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
+-- Copyright (C) 2007-2008 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
--
-- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
--
-
-- File: NMTTools_PaveFiller.cdl
-- Created: Fri Dec 5 14:35:00 2003
-- Author: Peter KURNEV
Vertex from TopoDS,
Face from TopoDS,
Shape from TopoDS,
- -- Modified to add new definitions Thu Sep 14 14:35:18 2006
- -- Contribution of Samtech www.samcef.com BEGIN
Edge from TopoDS,
ListOfShape from TopTools,
DataMapOfShapeShape from TopTools,
ListOfInteger from TColStd,
- -- Contribution of Samtech www.samcef.com END
Context from IntTools,
ShrunkRange from IntTools,
ShapesDataStructure from NMTDS,
- -- Modified to add new definitions Thu Sep 14 14:35:18 2006
- -- Contribution of Samtech www.samcef.com BEGIN
PShapesDataStructure from NMTDS,
Iterator from NMTDS,
IndexedDataMapOfIndexedMapOfInteger from NMTTools,
- -- Contribution of Samtech www.samcef.com END
PIterator from NMTDS,
PInterfPool from NMTDS
IP(me:out)
returns PInterfPool from NMTDS;
--
- -- Perform the algo
- -- Modified to add new method Thu Sep 14 14:35:18 2006
- -- Contribution of Samtech www.samcef.com BEGIN
Init (me:out)
is virtual protected;
- -- Contribution of Samtech www.samcef.com END
Clear (me:out)
is virtual protected;
returns PaveBlock from BOPTools;
---C++: return const &
- --modified by NIZNHY-PKV Fri Nov 30 10:30:54 2007 f
RealPaveBlock(me:out;
aPB:PaveBlock from BOPTools;
aLB:out ListOfInteger from TColStd;
aIsCommonBlock:out Integer from Standard)
returns PaveBlock from BOPTools;
---C++: return const &
- --modified by NIZNHY-PKV Fri Nov 30 10:30:58 2007 t
RealSplitsFace (me:out;
nF2 :Integer from Standard;
MakePCurves (me:out);
- -- Modified to add new methods Thu Sep 14 14:35:18 2006
- -- Contribution of Samtech www.samcef.com BEGIN
PerformVF1(me:out)
is protected;
AloneVertices(me)
returns IndexedDataMapOfIndexedMapOfInteger from NMTTools;
---C++: return const &
- -- Contribution of Samtech www.samcef.com END
IsExistingPaveBlock (me:out;
aPB : PaveBlock from BOPTools;
aTol: Real from Standard)
returns Integer from Standard;
- -- Modified to add new method Thu Sep 14 14:35:18 2006
- -- Contribution of Samtech www.samcef.com BEGIN
SharedEdges(me:out;
nF1 :Integer from Standard;
nF2 :Integer from Standard;
aLNE :out ListOfInteger from TColStd;
aLSE :out ListOfShape from TopTools);
- -- Contribution of Samtech www.samcef.com END
FuseVertices(me;
aC:Shape from TopoDS;
aDMVV: out DataMapOfShapeShape from TopTools);
-
+ --
+ TreatPaveBlocks(me:out;
+ theLCB:out ListOfCommonBlock from NMTTools);
+
+ ChangePavePoolNew(me:out)
+ returns PavePool from BOPTools;
+ ---C++:return &
+
+ --modified by NIZNHY-PKV Thu Nov 11 08:12:50 2010f
+ CheckCoincidence (me:out;
+ aPB1 : PaveBlock from BOPTools;
+ aPB2 : PaveBlock from BOPTools)
+ returns Boolean from Standard;
+ --modified by NIZNHY-PKV Thu Nov 11 08:12:54 2010t
+
fields
myDS : PShapesDataStructure from NMTDS is protected;
myIsDone : Boolean from Standard is protected;
-// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
+// File generated by CPPExt (Value)
//
-// 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.
-//
-// 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
+// Copyright (C) 1991 - 2000 by
+// Matra Datavision SA. All rights reserved.
+//
+// Copyright (C) 2001 - 2004 by
+// Open CASCADE SA. All rights reserved.
+//
+// This file is part of the Open CASCADE Technology software.
//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
#ifndef _NMTTools_PaveFiller_HeaderFile
#define _NMTTools_PaveFiller_HeaderFile
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
#ifndef _NMTDS_PShapesDataStructure_HeaderFile
#include <NMTDS_PShapesDataStructure.hxx>
#endif
class TopTools_DataMapOfShapeShape;
+#ifndef _Standard_HeaderFile
+#include <Standard.hxx>
+#endif
+#ifndef _Standard_Macro_HeaderFile
+#include <Standard_Macro.hxx>
+#endif
+
class NMTTools_PaveFiller {
+
public:
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-
-
- Standard_EXPORT NMTTools_PaveFiller();
+ void* operator new(size_t,void* anAddress)
+ {
+ return anAddress;
+ }
+ void* operator new(size_t size)
+ {
+ return Standard::Allocate(size);
+ }
+ void operator delete(void *anAddress)
+ {
+ if (anAddress) Standard::Free((Standard_Address&)anAddress);
+ }
+ // Methods PUBLIC
+ //
+
+
+Standard_EXPORT NMTTools_PaveFiller();
Standard_EXPORT virtual ~NMTTools_PaveFiller();
-
- Standard_EXPORT void SetCompositeShape(const TopoDS_Shape& aS) ;
-
- Standard_EXPORT const TopoDS_Shape& CompositeShape() const;
-
- Standard_EXPORT NMTDS_PShapesDataStructure DS() ;
-
- Standard_EXPORT NMTDS_PIterator DSIt() ;
-
- Standard_EXPORT NMTDS_PInterfPool IP() ;
-
- Standard_EXPORT virtual void Perform() ;
-
- Standard_EXPORT Standard_Boolean IsDone() const;
-
- Standard_EXPORT const IntTools_Context& Context() const;
-
- Standard_EXPORT IntTools_Context& ChangeContext() ;
-
- Standard_EXPORT const BOPTools_PavePool& PavePool() const;
-
- Standard_EXPORT BOPTools_PavePool& ChangePavePool() ;
-
- Standard_EXPORT BOPTools_PavePool& ChangePavePoolNew() ;
-
- Standard_EXPORT const NMTTools_CommonBlockPool& CommonBlockPool() const;
-
- Standard_EXPORT NMTTools_CommonBlockPool& ChangeCommonBlockPool() ;
-
- Standard_EXPORT const BOPTools_SplitShapesPool& SplitShapesPool() const;
-
- Standard_EXPORT BOPTools_SplitShapesPool& ChangeSplitShapesPool() ;
-
- Standard_EXPORT Standard_Integer FindSDVertex(const Standard_Integer nV) const;
-
- Standard_EXPORT Standard_Integer SplitsInFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ;
-
- Standard_EXPORT Standard_Integer SplitsInFace(const Standard_Integer nE1,const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ;
-
- Standard_EXPORT Standard_Integer SplitsOnEdge(const Standard_Integer nE1,const Standard_Integer nE2,TColStd_ListOfInteger& aLs) ;
-
- Standard_EXPORT Standard_Integer SplitsOnFace(const Standard_Integer nE1,const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ;
-
- Standard_EXPORT Standard_Integer SplitsOnFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ;
-
- Standard_EXPORT Standard_Integer SplitsInFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
-
- Standard_EXPORT Standard_Integer SplitsInFace(const Standard_Integer nE1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
-
- Standard_EXPORT Standard_Integer SplitsOnEdge(const Standard_Integer nE1,const Standard_Integer nE2,BOPTools_ListOfPaveBlock& aLs) ;
-
- Standard_EXPORT Standard_Integer SplitsOnFace(const Standard_Integer nE1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
-
- Standard_EXPORT Standard_Integer SplitsOnFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
-
- Standard_EXPORT Standard_Integer SplitsFace(const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
-
- Standard_EXPORT Standard_Integer SplitsFace(const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ;
-
- Standard_EXPORT Standard_Integer CommonBlocksFace(const Standard_Integer nF,NMTTools_ListOfCommonBlock& aLCB) ;
-
- Standard_EXPORT void PrepareFace(const Standard_Integer nF,TopoDS_Face& aF) ;
-
- Standard_EXPORT const BOPTools_PaveBlock& RealPaveBlock(const BOPTools_PaveBlock& aPB) ;
-
- Standard_EXPORT const BOPTools_PaveBlock& RealPaveBlock(const BOPTools_PaveBlock& aPB,TColStd_ListOfInteger& aLB,Standard_Integer& aIsCommonBlock) ;
-
- Standard_EXPORT void RealSplitsFace(const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
-
- Standard_EXPORT Standard_Boolean HasRealSplitsInOnFace(const Standard_Integer nF1,const Standard_Integer nF2) ;
-
- Standard_EXPORT void RealSplitsInFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
-
- Standard_EXPORT void RealSplitsInFace(const Standard_Integer nE1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
-
- Standard_EXPORT void RealSplitsOnEdge(const Standard_Integer nE1,const Standard_Integer nE2,BOPTools_ListOfPaveBlock& aLs) ;
-
- Standard_EXPORT void RealSplitsOnFace(const Standard_Integer nE1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
-
- Standard_EXPORT void RealSplitsOnFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
-
- Standard_EXPORT void PrepareSetForFace(const Standard_Integer nF1,const Standard_Integer nF2,const BOPTools_ListOfPaveBlock& aLPB,BOPTools_PaveSet& aPSF) ;
-
- Standard_EXPORT void PutPaveOnCurve(const BOPTools_PaveSet& aPSF,const Standard_Real aTol,BOPTools_Curve& aBC) ;
-
- Standard_EXPORT void PutBoundPaveOnCurve(BOPTools_Curve& aBC,BOPTools_SSInterference& aFF) ;
-
- Standard_EXPORT void PutBoundPaveOnCurve(const gp_Pnt& aP,const Standard_Real aT,BOPTools_Curve& aBC,BOPTools_SSInterference& aFF) ;
-
- Standard_EXPORT Standard_Boolean FindPave(const gp_Pnt& aP,const Standard_Real aTpV,const BOPTools_PaveSet& aPS,BOPTools_Pave& aPV) ;
-
- Standard_EXPORT Standard_Integer CheckIntermediatePoint(const BOPTools_PaveBlock& aPB,const BOPTools_PaveBlock& aPBR,const Standard_Real aTol) ;
-
- Standard_EXPORT Standard_Boolean IsExistingPaveBlock(const BOPTools_PaveBlock& aPB,const BOPTools_ListOfPaveBlock& aLPB,const Standard_Real aTol) ;
-
- Standard_EXPORT void MakePCurves() ;
-
- Standard_EXPORT const NMTTools_IndexedDataMapOfIndexedMapOfInteger& AloneVertices() const;
-
- Standard_EXPORT Standard_Boolean IsExistingPaveBlock(const BOPTools_PaveBlock& aPB,const TopTools_ListOfShape& aLPB,const Standard_Real aTol) ;
-
- Standard_EXPORT Standard_Boolean CheckCoincidence(const BOPTools_PaveBlock& aPB,const BOPTools_ListOfPaveBlock& aLPB) ;
-
- Standard_EXPORT Standard_Integer CheckIntermediatePoint(const BOPTools_PaveBlock& aPB,const TopoDS_Edge& aE,const Standard_Real aTol) ;
-
- Standard_EXPORT void SharedEdges(const Standard_Integer nF1,const Standard_Integer nF2,TColStd_ListOfInteger& aLNE,TopTools_ListOfShape& aLSE) ;
-
- Standard_EXPORT void FuseVertices(const TopoDS_Shape& aC,TopTools_DataMapOfShapeShape& aDMVV) const;
+
+
+Standard_EXPORT void SetCompositeShape(const TopoDS_Shape& aS) ;
+
+
+Standard_EXPORT const TopoDS_Shape& CompositeShape() const;
+
+
+Standard_EXPORT NMTDS_PShapesDataStructure DS() ;
+
+
+Standard_EXPORT NMTDS_PIterator DSIt() ;
+
+
+Standard_EXPORT NMTDS_PInterfPool IP() ;
+
+
+Standard_EXPORT virtual void Perform() ;
+
+
+Standard_EXPORT Standard_Boolean IsDone() const;
+
+
+Standard_EXPORT const IntTools_Context& Context() const;
+
+
+Standard_EXPORT IntTools_Context& ChangeContext() ;
+
+
+Standard_EXPORT const BOPTools_PavePool& PavePool() const;
+
+
+Standard_EXPORT BOPTools_PavePool& ChangePavePool() ;
+
+
+Standard_EXPORT const NMTTools_CommonBlockPool& CommonBlockPool() const;
+
+
+Standard_EXPORT NMTTools_CommonBlockPool& ChangeCommonBlockPool() ;
+
+
+Standard_EXPORT const BOPTools_SplitShapesPool& SplitShapesPool() const;
+
+
+Standard_EXPORT BOPTools_SplitShapesPool& ChangeSplitShapesPool() ;
+
+
+Standard_EXPORT Standard_Integer FindSDVertex(const Standard_Integer nV) const;
+
+
+Standard_EXPORT Standard_Integer SplitsInFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ;
+
+
+Standard_EXPORT Standard_Integer SplitsInFace(const Standard_Integer nE1,const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ;
+
+
+Standard_EXPORT Standard_Integer SplitsOnEdge(const Standard_Integer nE1,const Standard_Integer nE2,TColStd_ListOfInteger& aLs) ;
+
+
+Standard_EXPORT Standard_Integer SplitsOnFace(const Standard_Integer nE1,const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ;
+
+
+Standard_EXPORT Standard_Integer SplitsOnFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ;
+
+
+Standard_EXPORT Standard_Integer SplitsInFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
+
+
+Standard_EXPORT Standard_Integer SplitsInFace(const Standard_Integer nE1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
+
+
+Standard_EXPORT Standard_Integer SplitsOnEdge(const Standard_Integer nE1,const Standard_Integer nE2,BOPTools_ListOfPaveBlock& aLs) ;
+
+
+Standard_EXPORT Standard_Integer SplitsOnFace(const Standard_Integer nE1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
+
+
+Standard_EXPORT Standard_Integer SplitsOnFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
+
+
+Standard_EXPORT Standard_Integer SplitsFace(const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
+
+
+Standard_EXPORT Standard_Integer SplitsFace(const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ;
+
+
+Standard_EXPORT Standard_Integer CommonBlocksFace(const Standard_Integer nF,NMTTools_ListOfCommonBlock& aLCB) ;
+
+
+Standard_EXPORT void PrepareFace(const Standard_Integer nF,TopoDS_Face& aF) ;
+
+
+Standard_EXPORT const BOPTools_PaveBlock& RealPaveBlock(const BOPTools_PaveBlock& aPB) ;
+
+
+Standard_EXPORT const BOPTools_PaveBlock& RealPaveBlock(const BOPTools_PaveBlock& aPB,TColStd_ListOfInteger& aLB,Standard_Integer& aIsCommonBlock) ;
+
+
+Standard_EXPORT void RealSplitsFace(const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
+
+
+Standard_EXPORT Standard_Boolean HasRealSplitsInOnFace(const Standard_Integer nF1,const Standard_Integer nF2) ;
+
+
+Standard_EXPORT void RealSplitsInFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
+
+
+Standard_EXPORT void RealSplitsInFace(const Standard_Integer nE1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
+
+
+Standard_EXPORT void RealSplitsOnEdge(const Standard_Integer nE1,const Standard_Integer nE2,BOPTools_ListOfPaveBlock& aLs) ;
+
+
+Standard_EXPORT void RealSplitsOnFace(const Standard_Integer nE1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
+
+
+Standard_EXPORT void RealSplitsOnFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
+
+
+Standard_EXPORT void PrepareSetForFace(const Standard_Integer nF1,const Standard_Integer nF2,const BOPTools_ListOfPaveBlock& aLPB,BOPTools_PaveSet& aPSF) ;
+
+
+Standard_EXPORT void PutPaveOnCurve(const BOPTools_PaveSet& aPSF,const Standard_Real aTol,BOPTools_Curve& aBC) ;
+
+
+Standard_EXPORT void PutBoundPaveOnCurve(BOPTools_Curve& aBC,BOPTools_SSInterference& aFF) ;
+
+
+Standard_EXPORT void PutBoundPaveOnCurve(const gp_Pnt& aP,const Standard_Real aT,BOPTools_Curve& aBC,BOPTools_SSInterference& aFF) ;
+
+
+Standard_EXPORT Standard_Boolean FindPave(const gp_Pnt& aP,const Standard_Real aTpV,const BOPTools_PaveSet& aPS,BOPTools_Pave& aPV) ;
+
+
+Standard_EXPORT Standard_Integer CheckIntermediatePoint(const BOPTools_PaveBlock& aPB,const BOPTools_PaveBlock& aPBR,const Standard_Real aTol) ;
+
+
+Standard_EXPORT Standard_Boolean IsExistingPaveBlock(const BOPTools_PaveBlock& aPB,const BOPTools_ListOfPaveBlock& aLPB,const Standard_Real aTol) ;
+
+
+Standard_EXPORT void MakePCurves() ;
+
+
+Standard_EXPORT const NMTTools_IndexedDataMapOfIndexedMapOfInteger& AloneVertices() const;
+
+
+Standard_EXPORT Standard_Boolean IsExistingPaveBlock(const BOPTools_PaveBlock& aPB,const TopTools_ListOfShape& aLPB,const Standard_Real aTol) ;
+
+
+Standard_EXPORT Standard_Boolean CheckCoincidence(const BOPTools_PaveBlock& aPB,const BOPTools_ListOfPaveBlock& aLPB) ;
+
+
+Standard_EXPORT Standard_Integer CheckIntermediatePoint(const BOPTools_PaveBlock& aPB,const TopoDS_Edge& aE,const Standard_Real aTol) ;
+
+
+Standard_EXPORT void SharedEdges(const Standard_Integer nF1,const Standard_Integer nF2,TColStd_ListOfInteger& aLNE,TopTools_ListOfShape& aLSE) ;
+
+
+Standard_EXPORT void FuseVertices(const TopoDS_Shape& aC,TopTools_DataMapOfShapeShape& aDMVV) const;
+
+
+Standard_EXPORT void TreatPaveBlocks(NMTTools_ListOfCommonBlock& theLCB) ;
+
+
+Standard_EXPORT BOPTools_PavePool& ChangePavePoolNew() ;
+
+
+Standard_EXPORT Standard_Boolean CheckCoincidence(const BOPTools_PaveBlock& aPB1,const BOPTools_PaveBlock& aPB2) ;
protected:
-
- Standard_EXPORT virtual void Init() ;
-
- Standard_EXPORT virtual void Clear() ;
-
- Standard_EXPORT virtual void PerformVV() ;
-
- Standard_EXPORT virtual void PerformVE() ;
-
- Standard_EXPORT virtual void PerformVF() ;
-
- Standard_EXPORT virtual void PerformEE() ;
-
- Standard_EXPORT virtual void PerformEF() ;
-
- Standard_EXPORT virtual void PerformFF() ;
-
- Standard_EXPORT void MakeSplitEdges() ;
-
- Standard_EXPORT virtual void PreparePaveBlocks(const TopAbs_ShapeEnum aType1,const TopAbs_ShapeEnum aType2) ;
-
- Standard_EXPORT void CorrectShrunkRanges(const Standard_Integer aSide,const BOPTools_Pave& aPave,IntTools_ShrunkRange& aSR) ;
-
- Standard_EXPORT virtual void PreparePaveBlocks(const Standard_Integer anE) ;
-
- Standard_EXPORT virtual void PrepareEdges() ;
-
- Standard_EXPORT Standard_Boolean IsSuccessorsComputed(const Standard_Integer iF1,const Standard_Integer iF2) const;
-
- Standard_EXPORT Standard_Boolean IsBlocksCoinside(const BOPTools_PaveBlock& aPB1,const BOPTools_PaveBlock& aPB2) const;
-
- Standard_EXPORT void RefinePavePool() ;
-
- Standard_EXPORT Standard_Integer CheckFacePaves(const TopoDS_Vertex& aV,const Standard_Integer nF) ;
-
- Standard_EXPORT void ReplaceCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ;
-
- Standard_EXPORT void RemoveCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ;
-
- Standard_EXPORT void SplitCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ;
-
- Standard_EXPORT void SplitCommonBlock(const NMTTools_CommonBlock& aCB,NMTTools_ListOfCommonBlock& aLCB) ;
-
- Standard_EXPORT void EECommonBlocks(const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aM) ;
-
- Standard_EXPORT void EFCommonBlocks(const BOPTools_IDMapOfPaveBlockIMapOfInteger& aMapCB) ;
-
- Standard_EXPORT void EENewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
-
- Standard_EXPORT void EENewVertices(const TopoDS_Vertex& aV,const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
-
- Standard_EXPORT void EFNewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
-
- Standard_EXPORT void EFNewVertices(const TopoDS_Vertex& aV,const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
-
- Standard_EXPORT void UpdateCommonBlocks() ;
-
- Standard_EXPORT void UpdatePaveBlocks() ;
-
- Standard_EXPORT Standard_Integer SplitIndex(const BOPTools_PaveBlock& aPB) const;
-
- Standard_EXPORT void MakeBlocks() ;
-
- Standard_EXPORT void PerformVF1() ;
-
- Standard_EXPORT void MakeAloneVertices() ;
-
- Standard_EXPORT void TreatPaveBlocks(NMTTools_ListOfCommonBlock& theLCB) ;
+ // Methods PROTECTED
+ //
+
+
+Standard_EXPORT virtual void Init() ;
+
+
+Standard_EXPORT virtual void Clear() ;
+
+
+Standard_EXPORT virtual void PerformVV() ;
+
+
+Standard_EXPORT virtual void PerformVE() ;
+
+
+Standard_EXPORT virtual void PerformVF() ;
+
+
+Standard_EXPORT virtual void PerformEE() ;
+
+
+Standard_EXPORT virtual void PerformEF() ;
+
+
+Standard_EXPORT virtual void PerformFF() ;
+
+Standard_EXPORT void MakeSplitEdges() ;
+
+Standard_EXPORT virtual void PreparePaveBlocks(const TopAbs_ShapeEnum aType1,const TopAbs_ShapeEnum aType2) ;
+
+
+Standard_EXPORT void CorrectShrunkRanges(const Standard_Integer aSide,const BOPTools_Pave& aPave,IntTools_ShrunkRange& aSR) ;
+
+
+Standard_EXPORT virtual void PreparePaveBlocks(const Standard_Integer anE) ;
+
+
+Standard_EXPORT virtual void PrepareEdges() ;
+
+
+Standard_EXPORT Standard_Boolean IsSuccessorsComputed(const Standard_Integer iF1,const Standard_Integer iF2) const;
+
+
+Standard_EXPORT Standard_Boolean IsBlocksCoinside(const BOPTools_PaveBlock& aPB1,const BOPTools_PaveBlock& aPB2) const;
+
+
+Standard_EXPORT void RefinePavePool() ;
+
+
+Standard_EXPORT Standard_Integer CheckFacePaves(const TopoDS_Vertex& aV,const Standard_Integer nF) ;
+
+
+Standard_EXPORT void ReplaceCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ;
+
+
+Standard_EXPORT void RemoveCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ;
+
+
+Standard_EXPORT void SplitCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ;
+
+
+Standard_EXPORT void SplitCommonBlock(const NMTTools_CommonBlock& aCB,NMTTools_ListOfCommonBlock& aLCB) ;
+
+
+Standard_EXPORT void EECommonBlocks(const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aM) ;
+
+
+Standard_EXPORT void EFCommonBlocks(const BOPTools_IDMapOfPaveBlockIMapOfInteger& aMapCB) ;
+
+
+Standard_EXPORT void EENewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
+
+
+Standard_EXPORT void EENewVertices(const TopoDS_Vertex& aV,const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
+
+
+Standard_EXPORT void EFNewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
+
+
+Standard_EXPORT void EFNewVertices(const TopoDS_Vertex& aV,const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
+
+
+Standard_EXPORT void UpdateCommonBlocks() ;
+
+
+Standard_EXPORT void UpdatePaveBlocks() ;
+
+
+Standard_EXPORT Standard_Integer SplitIndex(const BOPTools_PaveBlock& aPB) const;
+
+
+Standard_EXPORT void MakeBlocks() ;
+
+
+Standard_EXPORT void PerformVF1() ;
+
+
+Standard_EXPORT void MakeAloneVertices() ;
+
+
+ // Fields PROTECTED
+ //
NMTDS_PShapesDataStructure myDS;
Standard_Boolean myIsDone;
Standard_Integer myNbSources;
NMTDS_PInterfPool myIP;
-private:
+private:
+ // Methods PRIVATE
+ //
+ // Fields PRIVATE
+ //
};
// other Inline functions and methods (like "C++: function call" methods)
+//
#endif
#include <gp_Pnt.hxx>
#include <Bnd_Box.hxx>
+#include <GeomAPI_ProjectPointOnCurve.hxx>
+
#include <TColStd_MapOfInteger.hxx>
#include <TColStd_IndexedMapOfInteger.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
#include <IntTools_SequenceOfRanges.hxx>
#include <IntTools_EdgeEdge.hxx>
#include <IntTools_SequenceOfCommonPrts.hxx>
+#include <IntTools_Tools.hxx>
#include <BOPTools_Pave.hxx>
#include <BOPTools_PaveSet.hxx>
for (; myDSIt->More(); myDSIt->Next()) {
myDSIt->Current(n1, n2, bJustAdd);
anIndexIn = 0;
- //
- //if (myIntrPool->IsComputed(n1, n2)) {
- // continue;
- //}
- //
nE1=n1;
nE2=n2;
//
if(bJustAdd) {
- //myIntrPool->AddInterference (nE1, nE2, BooleanOperations_EdgeEdge, anIndexIn);
continue;
}
//
aR1 = (aEE.Order()) ? anewSR2 : anewSR1;
aR2 = (aEE.Order()) ? anewSR1 : anewSR2;
//
- //modified by NIZNHY-PKV Mon Jun 07 11:01:40 2010f
aTol=0.8*aTol;
- //modified by NIZNHY-PKV Mon Jun 07 11:01:43 2010t
bIsOnPave1=IsOnPave(aT1, aR1, aTol);
bIsOnPave2=IsOnPave(aT2, aR2, aTol);
//
aCoinsideFlag=IsBlocksCoinside(aPB1, aPB2);
//
if (aNbComPrt2>1 || !aCoinsideFlag) {
- //myIntrPool->AddInterference (aWhat, aWith, BooleanOperations_EdgeEdge, anIndexIn);
break;
}
//
void NMTTools_PaveFiller::SplitCommonBlock(const NMTTools_CommonBlock& aCB,
NMTTools_ListOfCommonBlock& aLCBx)
{
+ Standard_Boolean bIsCoincided;
Standard_Integer i, j,nE, aNbE, aNbSPBx, aNbPB, k;
BOPTools_SequenceOfPaveBlock aSPBx;
BOPTools_ListIteratorOfListOfPaveBlock anItLPB;
aNbSPBx=aSPBx.Length();
aNbPB=aNbSPBx/aNbE;
//
- //modified by NIZNHY-PKV Fri Jun 04 14:07:37 2010f
- //
Standard_Integer k1, k2, n11, n12, n21, n22;
//
for (i=1; i<=aNbPB; ++i) {
n21=aPB2.Pave1().Index();
n22=aPB2.Pave2().Index();
if ((n21==n11 && n22==n12) || (n21==n12 && n22==n11)) {
- aCBx.AddPaveBlock(aPB2);
- break;
+ //modified by NIZNHY-PKV Thu Nov 11 08:13:24 2010f
+ bIsCoincided=CheckCoincidence(aPB2, aPB1);
+ if (bIsCoincided) {
+ aCBx.AddPaveBlock(aPB2);
+ break;
+ }
+ //aCBx.AddPaveBlock(aPB2);
+ //break;
+ //modified by NIZNHY-PKV Thu Nov 11 08:13:31 2010t
}
}
}
aLCBx.Append(aCBx);
}
- /*
- for (i=1; i<=aNbPB; ++i) {
- NMTTools_CommonBlock aCBx;
- //
- aCBx.AddFaces(aLF);
- //
- for (j=1; j<=aNbE; ++j) {
- k=i+(j-1)*aNbPB;
- const BOPTools_PaveBlock& aPB=aSPBx(k);
- aCBx.AddPaveBlock(aPB);
- }
- aLCBx.Append(aCBx);
- }
- */
- //modified by NIZNHY-PKV Fri Jun 04 14:07:42 2010t
}
//=======================================================================
ProcessBlock(aPBx, aMapCB, aProcessedBlocks, aChain);
}
}
-
// Modified to provide VS interference between
// vertex as result of EE and a Face of argument
// Thu Sep 14 14:35:18 2006
}
}
// Contribution of Samtech www.samcef.com END
+//modified by NIZNHY-PKV Thu Nov 11 08:13:48 2010f
+//=======================================================================
+// function: CheckCoincidence
+// purpose:
+//=======================================================================
+Standard_Boolean NMTTools_PaveFiller::CheckCoincidence(const BOPTools_PaveBlock& aPB1,
+ const BOPTools_PaveBlock& aPB2)
+{
+ Standard_Boolean bRet;
+ Standard_Integer nE1, nE2, aNbPoints;
+ Standard_Real aT11, aT12, aT21, aT22, aT1m, aD, aTol, aT2x;
+ gp_Pnt aP1m;
+ //
+ bRet=Standard_False;
+ //
+ aT11=aPB1.Pave1().Param();
+ aT12=aPB1.Pave2().Param();
+ aT1m=IntTools_Tools::IntermediatePoint (aT11, aT12);
+ nE1=aPB1.OriginalEdge();
+ const TopoDS_Edge& aE1=(*(TopoDS_Edge*)(&myDS->Shape(nE1)));
+ BOPTools_Tools::PointOnEdge(aE1, aT1m, aP1m);
+ //
+ aT21=aPB2.Pave1().Param();
+ aT22=aPB2.Pave2().Param();
+ nE2=aPB2.OriginalEdge();
+ const TopoDS_Edge& aE2=(*(TopoDS_Edge*)(&myDS->Shape(nE2)));
+ //
+ GeomAPI_ProjectPointOnCurve& aPPC=myContext.ProjPC(aE2);
+ aPPC.Perform(aP1m);
+ aNbPoints=aPPC.NbPoints();
+ if (aNbPoints) {
+ aD=aPPC.LowerDistance();
+ //
+ aTol=BRep_Tool::Tolerance(aE1);
+ aTol=aTol+BRep_Tool::Tolerance(aE2);
+ if (aD<aTol) {
+ aT2x=aPPC.LowerDistanceParameter();
+ if (aT2x>aT21 && aT2x<aT22) {
+ return !bRet;
+ }
+ }
+ }
+ return bRet;
+}
+//modified by NIZNHY-PKV Thu Nov 11 08:13:55 2010t
-// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
+// File generated by CPPExt (Transient)
//
-// 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.
-//
-// 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
+// Copyright (C) 1991 - 2000 by
+// Matra Datavision SA. All rights reserved.
+//
+// Copyright (C) 2001 - 2004 by
+// Open CASCADE SA. All rights reserved.
+//
+// This file is part of the Open CASCADE Technology software.
//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
#ifndef _NMTTools_StdMapNodeOfMapOfPaveBlock_HeaderFile
#define _NMTTools_StdMapNodeOfMapOfPaveBlock_HeaderFile
// Type management
//
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
+ //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
protected:
-// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
+// File generated by CPPExt (Transient)
//
-// 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.
-//
-// 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
+// Copyright (C) 1991 - 2000 by
+// Matra Datavision SA. All rights reserved.
+//
+// Copyright (C) 2001 - 2004 by
+// Open CASCADE SA. All rights reserved.
+//
+// This file is part of the Open CASCADE Technology software.
//
+// This software may be distributed and/or modified under the terms and
+// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
+// and appearing in the file LICENSE included in the packaging of this file.
+//
+// This software is distributed on an "AS IS" basis, without warranty of any
+// kind, and Open CASCADE SA hereby disclaims all such warranties,
+// including without limitation, any warranties of merchantability, fitness
+// for a particular purpose or non-infringement. Please see the License for
+// the specific terms and conditions governing rights and limitations under the
+// License.
#include <NMTTools_StdMapNodeOfMapOfPaveBlock.hxx>
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
static Handle_Standard_Type _aType = new Standard_Type("NMTTools_StdMapNodeOfMapOfPaveBlock",
- sizeof(NMTTools_StdMapNodeOfMapOfPaveBlock),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
+ sizeof(NMTTools_StdMapNodeOfMapOfPaveBlock),
+ 1,
+ (Standard_Address)_Ancestors,
+ (Standard_Address)NULL);
return _aType;
}
default:
break;
}
+
+ //rnv: To fix the bug IPAL22041 TC5.1.5: "Fillet Construcion" dialog loses current selection.
+ // Restore selection of the main shape, if need,
+ // because it was canceled.
+ aSelMgr->selectedObjects(aSelList);
+ if (aSelList.Extent() == 0 && !myShape->_is_nil()) {
+ disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
+ ObjectList list;
+ list.push_back(myShape);
+ selectObjects(list);
+ connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
+ this, SLOT(SelectionIntoArgument()));
+ }
}
//=================================================================================
// function : isValid()
// purpose : Verify validity of input data
//=================================================================================
-bool OperationGUI_Fillet1d2dDlg::isValid (QString&)
+bool OperationGUI_Fillet1d2dDlg::isValid (QString& msg)
{
- return !myShape->_is_nil() && (myIs1D || myVertexes.Extent() > 0);
+ bool ok = !myShape->_is_nil();
+ ok = GroupVertexes->SpinBox_DX->isValid( msg, !IsPreview() ) && ok;
+ ok = (myIs1D || myVertexes.Extent() > 0) && ok;
+ return ok;
}
//=================================================================================
qApp->processEvents();
updateGeometry();
resize(minimumSizeHint());
- SelectionIntoArgument();
}
//=================================================================================
}
}
- // clear selection
+ // clear selection of the faces or edges
if (!(myEditCurrentArgument == Group2->LineEdit2 ||
myEditCurrentArgument == Group3->LineEdit2)) {
disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
default:
break;
}
+
+ //rnv: To fix the bug IPAL22041 TC5.1.5: "Fillet Construcion" dialog loses current selection.
+ // Restore selection of the main shape, if need,
+ // because it was canceled.
+ aSelMgr->selectedObjects(aSelList);
+ if (aSelList.Extent() == 0 && !myShape->_is_nil()) {
+ disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
+ ObjectList list;
+ list.push_back(myShape);
+ selectObjects(list);
+ connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
+ this, SLOT(SelectionIntoArgument()));
+ }
}
//=================================================================================
mainFrame()->RadioButton3->close();
// Full partition (contains half-space partition)
- GroupPoints = new DlgRef_2Sel1List1Check( centralWidget() );
+ GroupPoints = new DlgRef_2Sel1List2Check( centralWidget() );
GroupPoints->GroupBox1->setTitle( tr( "GEOM_PARTITION" ) );
GroupPoints->TextLabel1->setText( tr( "GEOM_OBJECTS" ) );
GroupPoints->TextLabel2->setText( tr( "GEOM_TOOL_OBJECTS" ) );
GroupPoints->PushButton2->setIcon( image2 );
GroupPoints->LineEdit1->setReadOnly( true );
GroupPoints->LineEdit2->setReadOnly( true );
- GroupPoints->LineEdit1->setEnabled(true);
- GroupPoints->LineEdit2->setEnabled(false);
+ GroupPoints->LineEdit1->setEnabled( true );
+ GroupPoints->LineEdit2->setEnabled( false );
GroupPoints->CheckButton1->setText( tr( "GEOM_KEEP_NONLIMIT_SHAPES" ) );
+ GroupPoints->CheckButton2->setText( tr( "GEOM_NO_SELF_INTERSECTION" ) );
QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
layout->setMargin( 0 ); layout->setSpacing( 6 );
disconnect( myGeomGUI->getApp()->selectionMgr(), 0, this, 0 );
globalSelection();
- myListShapes.length( 0 );
- myListTools.length( 0 );
- myListKeepInside.length( 0 );
- myListRemoveInside.length( 0 );
- myListMaterials.length( 0 );
+ //myListShapes.length( 0 );
+ //myListTools.length( 0 );
+ //myListKeepInside.length( 0 ); // obsolete
+ //myListRemoveInside.length( 0 ); // obsolete
+ //myListMaterials.length( 0 ); // obsolete
switch ( constructorId ) {
case 0: /*Full partition */
GroupPoints->GroupBox1->setTitle( tr( "GEOM_PARTITION" ) );
+ GroupPoints->TextLabel1->setText( tr( "GEOM_OBJECTS" ) );
GroupPoints->TextLabel2->setText( tr( "GEOM_TOOL_OBJECTS" ) );
GroupPoints->TextLabel3->show();
GroupPoints->ComboBox1->show();
GroupPoints->ComboBox1->setCurrentIndex( 0 );
GroupPoints->CheckButton1->show();
+ GroupPoints->CheckButton2->show();
GroupPoints->PushButton1->setDown( true );
GroupPoints->PushButton2->setDown( false );
GroupPoints->LineEdit1->setEnabled(true);
GroupPoints->GroupBox1->setTitle( tr( "GEOM_PARTITION_HALFSPACE" ) );
GroupPoints->TextLabel3->hide();
GroupPoints->ComboBox1->hide();
+ GroupPoints->TextLabel1->setText( tr( "GEOM_OBJECT" ) );
GroupPoints->TextLabel2->setText( tr( "GEOM_PLANE" ) );
GroupPoints->CheckButton1->hide();
+ GroupPoints->CheckButton2->hide();
GroupPoints->PushButton1->setDown( true );
GroupPoints->LineEdit1->setEnabled(true);
break;
int nbSel = GEOMBase::GetNameOfSelectedIObjects(aSelList, aString, true);
- if ( nbSel < 1 ) {
- if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) {
- myListShapes.length( 0 );
- myListMaterials.length( 0 );
+ if ( getConstructorId() == 1 ) {
+ // for half-selection, only one shape can be selected as an object
+ // and only one plane as a tool
+ if ( nbSel != 1 ) {
+ if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) {
+ myListShapes.length( 0 );
+ // myListMaterials.length( 0 ); // obsolete
+ return;
+ }
+ else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) {
+ myListTools.length( 0 );
+ return;
+ }
}
- else if ( myEditCurrentArgument == GroupPoints->LineEdit2 )
- myListTools.length( 0 );
}
-
- // One and only one plane can be selected
-
- if ( getConstructorId() == 1 &&
- myEditCurrentArgument == GroupPoints->LineEdit2 &&
- nbSel != 1 ) {
- myListTools.length( 0 );
- return;
+ else {
+ if ( nbSel < 1 ) {
+ if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) {
+ myListShapes.length( 0 );
+ //myListMaterials.length( 0 ); // obsolete
+ return;
+ }
+ else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) {
+ myListTools.length( 0 );
+ return;
+ }
+ }
}
if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) {
GEOMBase::ConvertListOfIOInListOfGO(aSelList, myListShapes, true);
- myListMaterials.length( 0 );
+ //myListMaterials.length( 0 ); // obsolete
if ( !myListShapes.length() )
return;
}
GEOMBase::ConvertListOfIOInListOfGO(aSelList, myListTools, true);
if ( !myListTools.length() )
return;
+ else if ( myListTools.length() == 1 && getConstructorId() == 1 ) {
+ GEOM::GEOM_IMeasureOperations_var mOp = getGeomEngine()->GetIMeasureOperations( getStudyId() );
+ GEOM::ListOfLong_var intList;
+ GEOM::ListOfDouble_var dblList;
+ GEOM::GEOM_IKindOfShape::shape_kind kind = mOp->KindOfShape( myListTools[0].in(), intList.out(), dblList.out() );
+ mOp->Destroy();
+ if ( kind < GEOM::GEOM_IKindOfShape::DISK_CIRCLE || kind > GEOM::GEOM_IKindOfShape::PLANAR ) {
+ myListTools.length( 0 );
+ return;
+ }
+ }
}
myEditCurrentArgument->setText( aString );
//=================================================================================
bool OperationGUI_PartitionDlg::isValid( QString& )
{
- return ( myListShapes.length() || myListTools.length() ||
- myListKeepInside.length() || myListRemoveInside.length() );
+ printf("OperationGUI_PartitionDlg::isValid:myListShapes.length()=%d\n",myListShapes.length());
+ printf("OperationGUI_PartitionDlg::isValid:myListTools.length()=%d\n",myListTools.length());
+ return ( myListShapes.length() || myListTools.length() ); // || myListKeepInside.length() || myListRemoveInside.length() // obsolete
}
bool OperationGUI_PartitionDlg::execute( ObjectList& objects )
{
bool res = false;
-
GEOM::GEOM_Object_var anObj;
- QString msg;
-
- int aLimit = GetLimit();
- int aConstructorId = getConstructorId();
- int aKeepNonlimitShapes = 0;
-
- if ( aConstructorId == 1 ) {
- aLimit = GEOM::SHAPE;
- }
- else {
- if ( GroupPoints->CheckButton1->isChecked() ) {
- aKeepNonlimitShapes = 1;
- }
- else {
- aKeepNonlimitShapes = 0;
- }
- }
- if ( isValid( msg ) ) {
- GEOM::GEOM_IBooleanOperations_var anOper = GEOM::GEOM_IBooleanOperations::_narrow(getOperation());
- anObj = anOper->MakePartition( myListShapes, myListTools,
- myListKeepInside, myListRemoveInside,
- aLimit, false, myListMaterials, aKeepNonlimitShapes );
+ int aLimit = GetLimit();
+ int aKeepNonlimitShapes = GroupPoints->CheckButton1->isChecked();
+ bool aNoSelfIntersection = GroupPoints->CheckButton2->isChecked();
+
+ GEOM::GEOM_IBooleanOperations_var anOper = GEOM::GEOM_IBooleanOperations::_narrow( getOperation() );
+
+ switch ( getConstructorId() ) {
+ case 0:
+ anObj = aNoSelfIntersection ?
+ anOper->MakePartitionNonSelfIntersectedShape( myListShapes, myListTools,
+ myListKeepInside, myListRemoveInside,
+ aLimit, false, myListMaterials, aKeepNonlimitShapes ) :
+ anOper->MakePartition( myListShapes, myListTools,
+ myListKeepInside, myListRemoveInside,
+ aLimit, false, myListMaterials, aKeepNonlimitShapes );
res = true;
+ break;
+ case 1:
+ anObj = anOper->MakeHalfPartition( myListShapes[0].in(), myListTools[0].in() );
+ res = true;
+ break;
}
if ( !anObj->_is_nil() ) {
TopoDS_Shape aShape;
- GEOMBase::GetShape(anObj, aShape, TopAbs_SHAPE);
- TopoDS_Iterator It (aShape, Standard_True, Standard_True);
- int nbSubshapes=0;
- for (; It.More(); It.Next())
+ GEOMBase::GetShape( anObj, aShape, TopAbs_SHAPE );
+ TopoDS_Iterator It( aShape, Standard_True, Standard_True );
+ int nbSubshapes = 0;
+ for ( ; It.More(); It.Next() )
nbSubshapes++;
- if (nbSubshapes)
+ if ( nbSubshapes )
objects.push_back( anObj._retn() );
else
- SUIT_MessageBox::warning(this,
- QObject::tr("GEOM_ERROR"),
- QObject::tr("GEOM_WRN_PARTITION_RESULT_EMPTY"));
+ SUIT_MessageBox::warning( this,
+ QObject::tr( "GEOM_ERROR" ),
+ QObject::tr( "GEOM_WRN_PARTITION_RESULT_EMPTY" ) );
}
-
+
return res;
}
#include <GEOMBase_Skeleton.h>
-class DlgRef_2Sel1List1Check;
+class DlgRef_2Sel1List2Check;
//=================================================================================
// class : OperationGUI_PartitionDlg
GEOM::ListOfGO myListRemoveInside;
GEOM::ListOfGO myListKeepInside;
- DlgRef_2Sel1List1Check* GroupPoints;
+ DlgRef_2Sel1List2Check* GroupPoints;
private slots:
void ClickOnOk();
initName( tr( "CHANGE_ORIENTATION_NEW_OBJ_NAME" ) );
resize(100,100);
+ SelectionIntoArgument();
}
initName( tr( "DEVIDE_EDGE_NEW_OBJECT_NAME" ) );
resize(100,100);
+ SelectionIntoArgument();
}
//=================================================================================
initName( tr( "REMOVE_EXTRA_EDGES_NEW_OBJ_NAME" ) );
resize(100,100);
+ SelectionIntoArgument();
}
initName( tr( "SEWING_NEW_OBJ_NAME" ) );
resize(100,100);
+ SelectionIntoArgument();
}
reset();
initName( tr( "PROCESS_SHAPE_NEW_OBJ_NAME" ) );
+ selectionChanged();
}
//=================================================================================
aSelMgr->clearSelected();
Standard_Boolean isOk;
- char* objIOR = GEOMBase::GetIORFromObject(myObject);
- Handle(GEOM_AISShape) aSh = GEOMBase::ConvertIORinGEOMAISShape(objIOR, isOk, true);
- free(objIOR);
+ QString objIOR = GEOMBase::GetIORFromObject(myObject);
+ Handle(GEOM_AISShape) aSh = GEOMBase::ConvertIORinGEOMAISShape(objIOR.toLatin1().constData(), isOk, true);
if (!isOk || aSh.IsNull())
return;
Handle(TCollection_HAsciiString) aName = Prod->Name();
TCollection_ExtendedString aNameExt (aName->ToCString());
+ // special check to pass names like "Open CASCADE STEP translator 6.3 1"
+ TCollection_AsciiString aSkipName ("Open CASCADE STEP translator");
+ if (aName->Length() >= aSkipName.Length()) {
+ if (aName->String().SubString(1, aSkipName.Length()).IsEqual(aSkipName))
+ continue;
+ }
+
// find target shape
Handle(Transfer_Binder) binder = TP->Find(enti);
if (binder.IsNull()) continue;
libTransformationGUI_la_LDFLAGS = \
../GEOMFiltersSelection/libGEOMFiltersSelection.la \
- ../GEOMBase/libGEOMBase.la
+ ../GEOMBase/libGEOMBase.la \
+ $(CAS_LDPATH) -lTKShHealing
+
return false;
initName();
+
+ myObjects.length(0);
+ myEditCurrentArgument = GroupPoints->LineEdit1;
+ myEditCurrentArgument->setText("");
+ myGeomGUI->getApp()->selectionMgr()->clearSelected();
+
// activate selection and connect selection manager
ConstructorsClicked(getConstructorId());
return true;
return;
}
addSubshapesToFather(objMap);
- }
+ }
}
myBase = myVector = GEOM::GEOM_Object::_nil();
+ mainFrame()->GroupBoxPublish->show();
+
// signals and slots connections
connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk()));
connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
}
addSubshapesToFather(objMap);
}
+
+//=================================================================================
+// function : restoreSubShapes
+// purpose :
+//=================================================================================
+void TransformationGUI_MultiRotationDlg::restoreSubShapes (SALOMEDS::Study_ptr theStudy,
+ SALOMEDS::SObject_ptr theSObject)
+{
+ if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
+ // we pass here the first operation argument (object) through the list of arguments
+ // because the rotation operation place its arguments in the data structure in another order,
+ // and we need to point the first argument directly
+ GEOM::ListOfGO_var anArgs = new GEOM::ListOfGO;
+ anArgs->length(1);
+ anArgs[0] = myBase;
+ getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, anArgs,
+ /*theFindMethod=*/GEOM::FSM_Transformed,
+ /*theInheritFirstArg=*/true,
+ mainFrame()->CheckBoxAddPrefix->isChecked());
+ }
+}
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
+ virtual void restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
private:
void Init();
#include <SUIT_Session.h>
#include <SUIT_ResourceMgr.h>
+#include <SUIT_Desktop.h>
+#include <SUIT_ViewWindow.h>
+#include <SUIT_ViewManager.h>
#include <SalomeApp_Application.h>
#include <LightApp_SelectionMgr.h>
+#include <GEOM_AISVector.hxx>
+#include <SOCC_Prs.h>
+#include <SOCC_ViewModel.h>
// OCCT Includes
#include <TopoDS_Shape.hxx>
#include <TopExp.hxx>
#include <TColStd_IndexedMapOfInteger.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
+#include <ShapeAnalysis_Edge.hxx>
+#include <BRep_Tool.hxx>
+#include <BRepBuilderAPI_MakeEdge.hxx>
+#include <BRep_Builder.hxx>
#include <GEOMImpl_Types.hxx>
myBase = myVectorU = myVectorV = GEOM::GEOM_Object::_nil();
+ mainFrame()->GroupBoxPublish->show();
+
// signals and slots connections
connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk()));
connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
switch (getConstructorId()) {
case 0:
if (!CORBA::is_nil(myBase) && !CORBA::is_nil(myVectorU)) {
+ createPathPreview ( myVectorU );
anObj = anOper->MultiTranslate1D(myBase, myVectorU, myStepU, myNbTimesU);
if(!IsPreview()) {
aParameters<<GroupPoints->SpinBox_DX->text();
case 1:
if (!CORBA::is_nil(myBase) && !CORBA::is_nil(myVectorU) &&
!CORBA::is_nil(myVectorV)) {
+ createPathPreview ( myVectorU );
+ createPathPreview ( myVectorV );
anObj = anOper->MultiTranslate2D(myBase,
myVectorU, myStepU, myNbTimesU,
myVectorV, myStepV, myNbTimesV);
}
addSubshapesToFather(objMap);
}
+
+//=================================================================================
+// function : restoreSubShapes
+// purpose :
+//=================================================================================
+void TransformationGUI_MultiTranslationDlg::restoreSubShapes (SALOMEDS::Study_ptr theStudy,
+ SALOMEDS::SObject_ptr theSObject)
+{
+ if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
+ // we pass here the first operation argument (object) through the list of arguments
+ // because the rotation operation place its arguments in the data structure in another order,
+ // and we need to point the first argument directly
+ GEOM::ListOfGO_var anArgs = new GEOM::ListOfGO;
+ anArgs->length(1);
+ anArgs[0] = myBase;
+ getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, anArgs,
+ /*theFindMethod=*/GEOM::FSM_Transformed,
+ /*theInheritFirstArg=*/true,
+ mainFrame()->CheckBoxAddPrefix->isChecked());
+ }
+}
+
+//=================================================================================
+// function : createPathPreview
+// purpose :
+//=================================================================================
+void TransformationGUI_MultiTranslationDlg::createPathPreview ( GEOM::GEOM_Object_var thePath )
+{
+ if ( IsPreview() ) {
+ TopoDS_Shape aShape;
+ GEOMBase::GetShape( thePath, aShape, TopAbs_SHAPE );
+ TopoDS_Edge anEdge = TopoDS::Edge( aShape );
+ ShapeAnalysis_Edge aShapeAnal;
+ TopoDS_Vertex aFirst = aShapeAnal.FirstVertex( anEdge );
+ TopoDS_Vertex aLast = aShapeAnal.LastVertex( anEdge );
+ TopoDS_Shape aVector = BRepBuilderAPI_MakeEdge(BRep_Tool::Pnt(aFirst), BRep_Tool::Pnt(aLast)).Shape();
+ const char* aName = "tmpVector";
+ Handle(GEOM_AISVector) anIO = new GEOM_AISVector( aVector, aName );
+
+ // add Prs to preview
+ SUIT_ViewWindow* vw = SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
+ SOCC_Prs* aPrs = dynamic_cast<SOCC_Prs*>(((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs(0));
+ if (aPrs)
+ aPrs->AddObject(anIO);
+ GEOMBase_Helper::displayPreview( aPrs, false, true );
+ }
+}
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
+ virtual void restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
private:
void Init();
void enterEvent( QEvent* );
+ void createPathPreview( GEOM::GEOM_Object_var );
private:
GEOM::GEOM_Object_var myBase, myVectorU, myVectorV;
// Activate Create a Copy mode
Group1->CheckButton1->setChecked(true);
- Group1->CheckButton1->setChecked(false);
CreateCopyModeChanged(true);
Init();
return false;
initName();
+
+ myObjects.length(0);
+ myEditCurrentArgument = Group1->LineEdit1;
+ myEditCurrentArgument->setText("");
+ myGeomGUI->getApp()->selectionMgr()->clearSelected();
+
// activate selection and connect selection manager
ConstructorsClicked(getConstructorId());
return true;
else
myEditCurrentArgument->setText(aName);
- if (getConstructorId() == 2)
- Group1->PushButton5->click();
+ /* if (getConstructorId() == 2)
+ Group1->PushButton5->click();*/
}
else if (myEditCurrentArgument == Group1->LineEdit2) {
if (aSelList.Extent() != 1)
case 1:
{
for (int i = 0; i < myObjects.length(); i++) {
- if (toCreateCopy)
anObj = toCreateCopy ?
anOper->PositionShapeCopy(myObjects[i], myStartLCS, myEndLCS) :
anOper->PositionShape(myObjects[i], myStartLCS, myEndLCS);
return false;
initName();
+
+ myObjects.length(0);
+ myEditCurrentArgument = GroupPoints->LineEdit1;
+ myEditCurrentArgument->setText("");
+ myGeomGUI->getApp()->selectionMgr()->clearSelected();
+
// activate selection and connect selection manager
ConstructorsClicked(getConstructorId());
return true;
{
disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
+ myPoint = GEOM::GEOM_Object::_nil();
+ LineEdit2->clear();
+
switch (constructorId) {
case 0: // translation an object by dx, dy, dz
TextLabel3->setText(tr("GEOM_SCALE_FACTOR"));
return false;
initName(tr("GEOM_SCALE"));
+
+ myObjects.length(0);
+ myEditCurrentArgument = LineEdit1;
+ myEditCurrentArgument->setText("");
+ myGeomGUI->getApp()->selectionMgr()->clearSelected();
+
// activate selection and connect selection manager
ConstructorsClicked(getConstructorId());
return true;
#include <SUIT_Session.h>
#include <SUIT_ResourceMgr.h>
+#include <SUIT_Desktop.h>
+#include <SUIT_ViewWindow.h>
+#include <SUIT_ViewManager.h>
#include <SalomeApp_Application.h>
#include <LightApp_SelectionMgr.h>
+#include <GEOM_AISVector.hxx>
+#include <SOCC_Prs.h>
+#include <SOCC_ViewModel.h>
// OCCT Includes
#include <TopoDS_Shape.hxx>
#include <TopoDS_Edge.hxx>
+#include <TopoDS_Vertex.hxx>
#include <TopoDS.hxx>
#include <TopExp.hxx>
#include <TColStd_IndexedMapOfInteger.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
+#include <ShapeAnalysis_Edge.hxx>
+#include <BRep_Tool.hxx>
+#include <BRepBuilderAPI_MakeEdge.hxx>
+#include <BRep_Builder.hxx>
#include <GEOMImpl_Types.hxx>
return false;
initName();
+
+ myObjects.length(0);
+ myEditCurrentArgument = GroupPoints->LineEdit1;
+ myEditCurrentArgument->setText("");
+ myGeomGUI->getApp()->selectionMgr()->clearSelected();
+
// activate selection and connect selection manager
ConstructorsClicked(getConstructorId());
return true;
QStringList aParameters;
aParameters<<GroupPoints->SpinBox3->text();
bool byDistance = GroupPoints->CheckBox1->isChecked();
+ createPathPreview( myVector );
+
if (byDistance) {
double aDistance = GroupPoints->SpinBox3->value();
for (int i = 0; i < myObjects.length(); i++) {
addSubshapesToFather(objMap);
}
}
+
+//=================================================================================
+// function : createPathPreview
+// purpose :
+//=================================================================================
+void TransformationGUI_TranslationDlg::createPathPreview ( GEOM::GEOM_Object_var thePath )
+{
+ if ( IsPreview() ) {
+ TopoDS_Shape aShape;
+ GEOMBase::GetShape( thePath, aShape, TopAbs_SHAPE );
+ TopoDS_Edge anEdge = TopoDS::Edge( aShape );
+ ShapeAnalysis_Edge aShapeAnal;
+ TopoDS_Vertex aFirst = aShapeAnal.FirstVertex( anEdge );
+ TopoDS_Vertex aLast = aShapeAnal.LastVertex( anEdge );
+ TopoDS_Shape aVector = BRepBuilderAPI_MakeEdge(BRep_Tool::Pnt(aFirst), BRep_Tool::Pnt(aLast)).Shape();
+ const char* aName = "tmpVector";
+ Handle(GEOM_AISVector) anIO = new GEOM_AISVector( aVector, aName );
+
+ // add Prs to preview
+ SUIT_ViewWindow* vw = SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
+ SOCC_Prs* aPrs = dynamic_cast<SOCC_Prs*>(((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs(0));
+ if (aPrs)
+ aPrs->AddObject(anIO);
+ GEOMBase_Helper::displayPreview( aPrs, false, true );
+ }
+}
private:
void Init();
void enterEvent( QEvent* );
+ void createPathPreview( GEOM::GEOM_Object_var );
private:
GEOM::ListOfGO myObjects;