Merge from branch BR_Dev_For_4_0 (from tag mergeto_BR_QT4_Dev_12Feb08)
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 10 KiB |
BIN
doc/salome/gui/GEOM/images/line1.png
Executable file
After Width: | Height: | Size: 14 KiB |
BIN
doc/salome/gui/GEOM/images/line2.png
Executable file
After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 17 KiB |
BIN
doc/salome/gui/GEOM/images/point2.png
Executable file
After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 17 KiB |
BIN
doc/salome/gui/GEOM/images/point4.png
Executable file
After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 17 KiB |
@ -5,8 +5,8 @@
|
||||
<ul>
|
||||
<li>\subpage create_extrusion_page</li>
|
||||
<li>\subpage create_revolution_page</li>
|
||||
<li>\subpage creaet_filling_page</li>
|
||||
<li>\subpage create_filling_page</li>
|
||||
<li>\subpage create_extrusion_alongpath_page</li>
|
||||
</ul>
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -12,7 +12,11 @@ solid or compsolid).
|
||||
\n Firstly, you can define the <b>Base Shape</b> (a basis of the
|
||||
extrusion), the \b Vector (a direction of the extrusion) and the \b
|
||||
Height of extrusion.
|
||||
\b <b>TUI Command:</b> <em>geompy.MakePrismVecH(Base, Vector, Height)</em>
|
||||
\n The \b Result of the operation will be a GEOM_Object (edge, face,
|
||||
shell, solid or compsolid).
|
||||
\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
|
||||
extrusion) + 1 value (dimension).
|
||||
@ -22,6 +26,8 @@ extrusion) + 1 value (dimension).
|
||||
\n Secondly, you can define the \b Extrusion by the <b>Base Shape</b>
|
||||
and the \b Start and <b>End Point</b> of the \b Vector (in this way
|
||||
you don't need to create it in advance).
|
||||
\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.
|
||||
|
@ -1,18 +1,20 @@
|
||||
/*!
|
||||
|
||||
\page creaet_filling_page Filling Surface with Edges
|
||||
\page create_filling_page Filling Surface with Edges
|
||||
|
||||
To generate a \b Filling in the <b>Main Menu</b> select <b>New Entity - > Generation - > Filling</b>
|
||||
|
||||
\n To create a curving face using several edges you need to define the
|
||||
<b>Edges Compound</b>, \b Minimum and <b>Maximum Degree</b>, \b
|
||||
Tolerance for \b 2D and for \b 3D and the <b>Number of Iterations</b>.
|
||||
Tolerance for \b 2D and for \b 3D , the <b>Number of Iterations</b>
|
||||
and <b>Approximation</b>.
|
||||
\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 + 5 Parameters
|
||||
\n <b>TUI Command:</b> <em>geompy.MakeFilling(Edges, MinDegree,
|
||||
MaxDegree, Tol2D, Tol3D, NbIter, isApprox)</em>
|
||||
\n <b>Arguments:</b> Name + 1 List of edges + 6 Parameters
|
||||
(Min. degree, Max. degree, Number of iterations, 2D tolerance, 3D
|
||||
tolerance, Number of iterations).
|
||||
tolerance, Number of iterations, Approximation).
|
||||
|
||||
\image html filling.png
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
<ul>
|
||||
<li>\ref create_extrusion_page</li>
|
||||
<li>\ref create_revolution_page</li>
|
||||
<li>\ref creaet_filling_page</li>
|
||||
<li>\ref create_filling_page</li>
|
||||
<li>\ref create_extrusion_alongpath_page</li>
|
||||
</ul>
|
||||
<li>\subpage work_with_groups_page</li>
|
||||
@ -46,4 +46,4 @@
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -4,14 +4,24 @@
|
||||
|
||||
To create a \b Line in the <b>Main Menu</b> select <b>New Entity - >Basic - > Line</b>
|
||||
|
||||
\n To create a \b Line you should define \b Point1 and \b Point2,
|
||||
which are the points through which the \b Line passes.
|
||||
\n The \b Result of the operation will be a GEOM_Object (edge).
|
||||
|
||||
There are 2 algorithms to create a \b Line in the 3D space.
|
||||
The Result of each operation will be a GEOM_Object (edge).
|
||||
|
||||
\n Firstly you can define a \b Line through \b Point1 and \b Point2,
|
||||
which are the points through which the \b Line passes.
|
||||
\n <b>TUI Command:</b> <em>geompy.MakeLineTwoPnt(Point1, Point2)</em>
|
||||
\n <b>Arguments:</b> Name + 2 vertices.
|
||||
|
||||
\image html line.png
|
||||
\image html line1.png
|
||||
|
||||
\n Secondly you can define a \b Line as intersection of \b Plane1 and
|
||||
\b Plane2.
|
||||
\n <b>TUI Command:</b> <em>geompy.MakeLineTwoFaces(myFace1, myFace2)</em>
|
||||
\n <b>Arguments:</b> Name + 2 faces.
|
||||
|
||||
\image html line2.png
|
||||
|
||||
|
||||
<b>Example:</b>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
To create a \b Point in the <b>Main Menu</b> select <b>New Entity - >
|
||||
Basic - > Point</b>
|
||||
|
||||
\n There are three algorithms to create a \b Point in the 3D space.
|
||||
\n There are four algorithms to create a \b Point in the 3D space.
|
||||
\n Each time the \b Result of the operation will be a GEOM_Object
|
||||
(vertex).
|
||||
|
||||
@ -23,9 +23,9 @@ coordinates of the old one.
|
||||
\n <b>Arguments:</b> Name + 1 reference point + 3 coordinates defining
|
||||
the position of this point regarding the reference one.
|
||||
|
||||
\image html neo-point2.png
|
||||
\image html point2.png
|
||||
|
||||
\n Finally, we can define a point by an \b Edge and a \b Parameter
|
||||
\n Thirdly, we can define a point by an \b Edge and a \b Parameter
|
||||
indicating its position on the Edge, ranging from 0.0 to 1.0. For example, 0.5 means that the
|
||||
point is located in the middle of the edge.
|
||||
\n <b>TUI Command:</b> <em>geompy.MakeVertexOnCurve(Edge,Parameter).</em>
|
||||
@ -34,6 +34,11 @@ position of the point on the given edge.
|
||||
|
||||
\image html point3.png
|
||||
|
||||
\n Finally, we can define a point by intersection of two \b Lines.
|
||||
\n <b>TUI Command:</b> <em>geompy.MakePointOnLinesIntersection(myLine1,myLine2).</em>
|
||||
\n <b>Arguments:</b> Name + 2 lines
|
||||
|
||||
\image html point4.png
|
||||
<b>Example:</b>
|
||||
|
||||
\image html points.png
|
||||
|
@ -8,6 +8,8 @@ select <b>New Entity - > Generation - > Revolution</b>
|
||||
\n To create an extruded shape by \b Revolution you need to define the
|
||||
source \b Object to rotate, the \b Axis of revolution and the \b Angle by which
|
||||
the \b Shape has to be rotated around the \b Axis (in degrees).
|
||||
\n <b> Both Directions </b> checkbox allows extruding the source
|
||||
object both forward and backward.
|
||||
\n The \b Result of the operation will be a GEOM_Object (edge, face, shell,
|
||||
solid or compsolid).
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
<ul>
|
||||
<li>\ref create_extrusion_page</li>
|
||||
<li>\ref create_revolution_page</li>
|
||||
<li>\ref creaet_filling_page</li>
|
||||
<li>\ref create_filling_page</li>
|
||||
<li>\ref create_extrusion_alongpath_page</li>
|
||||
</ul>
|
||||
<li>\ref work_with_groups_page</li>
|
||||
@ -134,4 +134,4 @@
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -902,7 +902,7 @@ module GEOM
|
||||
GEOM_Object MakeFilling (in GEOM_Object theShape,
|
||||
in long theMinDeg, in long theMaxDeg,
|
||||
in double theTol2D, in double theTol3D,
|
||||
in long theNbIter);
|
||||
in long theNbIter, in boolean theApprox);
|
||||
|
||||
/*!
|
||||
* Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
|
||||
|
@ -176,7 +176,7 @@ module GEOM
|
||||
GEOM_Object MakeFilling (in GEOM_Object theShape,
|
||||
in long theMinDeg, in long theMaxDeg,
|
||||
in double theTol2D, in double theTol3D,
|
||||
in long theNbIter) ;
|
||||
in long theNbIter, in boolean theApprox) ;
|
||||
GEOM_Object MakeThruSections(in ListOfGO theSeqSections,
|
||||
in boolean theModeSolid,
|
||||
in double thePreci,
|
||||
|
@ -8,6 +8,35 @@
|
||||
<path-prefix-list>
|
||||
</path-prefix-list>
|
||||
|
||||
<!-- Geom data types -->
|
||||
<type-list>
|
||||
<type name="BCErrorType" kind="int"/>
|
||||
<objref name="GEOM_Object" id="IDL:GEOM/GEOM_Object:1.0" />
|
||||
<objref name="GEOM_List" id="IDL:GEOM/GEOM_List:1.0" />
|
||||
<objref name="GEOM_Gen" id="IDL:GEOM/GEOM_Gen:1.0" />
|
||||
<objref name="GEOM_Shape" id="IDL:GEOM/GEOM_Object:1.0" />
|
||||
<objref name="GEOM_Superv" id="IDL:GEOM/GEOM_Superv:1.0" />
|
||||
<objref name="GEOM_IBasicOperations" id="IDL:GEOM/GEOM_IBasicOperations:1.0" />
|
||||
<objref name="GEOM_ITransformOperations" id="IDL:GEOM/GEOM_ITransformOperations:1.0" />
|
||||
<objref name="GEOM_I3DPrimOperations" id="IDL:GEOM/GEOM_I3DPrimOperations:1.0" />
|
||||
<objref name="GEOM_IShapesOperations" id="IDL:GEOM/GEOM_IShapesOperations:1.0" />
|
||||
<objref name="GEOM_IBooleanOperations" id="IDL:GEOM/GEOM_IBooleanOperations:1.0" />
|
||||
<objref name="GEOM_ICurvesOperations" id="IDL:GEOM/GEOM_ICurvesOperations:1.0" />
|
||||
<objref name="GEOM_ILocalOperations" id="IDL:GEOM/GEOM_ILocalOperations:1.0" />
|
||||
<objref name="GEOM_IHealingOperations" id="IDL:GEOM/GEOM_IHealingOperations:1.0" />
|
||||
<objref name="GEOM_IInsertOperations" id="IDL:GEOM/GEOM_IInsertOperations:1.0" />
|
||||
<objref name="GEOM_IMeasureOperations" id="IDL:GEOM/GEOM_IMeasureOperations:1.0" />
|
||||
<objref name="GEOM_IBlocksOperations" id="IDL:GEOM/GEOM_IBlocksOperations:1.0" />
|
||||
<objref name="GEOM_IGroupOperations" id="IDL:GEOM/GEOM_IGroupOperations:1.0" />
|
||||
<sequence name="ListOfLong" content="int" />
|
||||
<sequence name="ListOfGO" content="GEOM_Object" />
|
||||
<sequence name="string_array" content="string" />
|
||||
<struct name="BCError" >
|
||||
<member name="incriminated" type="ListOfLong"/>
|
||||
</struct>
|
||||
<sequence name="BCErrors" content="BCError" />
|
||||
</type-list>
|
||||
|
||||
<!-- Component list -->
|
||||
<component-list>
|
||||
<component>
|
||||
|
@ -147,6 +147,12 @@ void BooleanGUI_Dialog::Init()
|
||||
|
||||
initName( mainFrame()->GroupConstructors->title() );
|
||||
|
||||
setTabOrder( mainFrame()->GroupConstructors, mainFrame()->GroupBoxName );
|
||||
setTabOrder( mainFrame()->GroupBoxName, mainFrame()->GroupMedium );
|
||||
setTabOrder( mainFrame()->GroupMedium, mainFrame()->GroupButtons );
|
||||
|
||||
mainFrame()->RadioButton1->setFocus();
|
||||
|
||||
globalSelection( GEOM_ALLSHAPES );
|
||||
}
|
||||
|
||||
|
@ -191,6 +191,20 @@ DlgRef_1Sel4Spin::~DlgRef_1Sel4Spin()
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////
|
||||
// DlgRef_1Sel5Spin1Check
|
||||
//////////////////////////////////////////
|
||||
|
||||
DlgRef_1Sel5Spin1Check::DlgRef_1Sel5Spin1Check( QWidget* parent, Qt::WindowFlags f )
|
||||
: QWidget( parent, f )
|
||||
{
|
||||
setupUi( this );
|
||||
}
|
||||
|
||||
DlgRef_1Sel5Spin1Check::~DlgRef_1Sel5Spin1Check()
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////
|
||||
// DlgRef_1Sel5Spin
|
||||
//////////////////////////////////////////
|
||||
|
@ -226,6 +226,22 @@ public:
|
||||
~DlgRef_1Sel4Spin();
|
||||
};
|
||||
|
||||
//////////////////////////////////////////
|
||||
// DlgRef_1Sel5Spin1Check
|
||||
//////////////////////////////////////////
|
||||
|
||||
#include "ui_DlgRef_1Sel5Spin1Check_QTD.h"
|
||||
|
||||
class DLGREF_EXPORT DlgRef_1Sel5Spin1Check : public QWidget,
|
||||
public Ui::DlgRef_1Sel5Spin1Check_QTD
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DlgRef_1Sel5Spin1Check( QWidget* = 0, Qt::WindowFlags = 0 );
|
||||
~DlgRef_1Sel5Spin1Check();
|
||||
};
|
||||
|
||||
//////////////////////////////////////////
|
||||
// DlgRef_1Sel5Spin
|
||||
//////////////////////////////////////////
|
||||
|
@ -13,10 +13,22 @@
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<property name="leftMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<property name="topMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
@ -25,18 +37,28 @@
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<property name="leftMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<property name="topMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="TextLabel1" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>0</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -55,9 +77,7 @@
|
||||
<item row="0" column="1" >
|
||||
<widget class="QPushButton" name="PushButton1" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>0</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -70,9 +90,7 @@
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="TextLabel2" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>0</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -95,6 +113,11 @@
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11" />
|
||||
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
|
||||
<tabstops>
|
||||
<tabstop>PushButton1</tabstop>
|
||||
<tabstop>LineEdit1</tabstop>
|
||||
<tabstop>SpinBox_DX</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
@ -13,10 +13,22 @@
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<property name="leftMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<property name="topMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
@ -25,10 +37,22 @@
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<property name="leftMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<property name="topMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="2" column="1" colspan="2" >
|
||||
@ -43,9 +67,7 @@
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="TextLabel2" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>0</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -61,9 +83,7 @@
|
||||
<item row="3" column="0" >
|
||||
<widget class="QLabel" name="TextLabel4" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>0</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -79,9 +99,7 @@
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="TextLabel3" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>0</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -100,9 +118,7 @@
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="TextLabel1" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>0</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -118,9 +134,7 @@
|
||||
<item row="0" column="1" >
|
||||
<widget class="QPushButton" name="PushButton1" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>0</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -137,6 +151,13 @@
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11" />
|
||||
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
|
||||
<tabstops>
|
||||
<tabstop>PushButton1</tabstop>
|
||||
<tabstop>LineEdit1</tabstop>
|
||||
<tabstop>SpinBox_DX</tabstop>
|
||||
<tabstop>SpinBox_DY</tabstop>
|
||||
<tabstop>SpinBox_DZ</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
@ -13,10 +13,22 @@
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<property name="leftMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<property name="topMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
@ -25,18 +37,28 @@
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<property name="leftMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<property name="topMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="TextLabel6" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>0</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -58,18 +80,25 @@
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="TextLabel3" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>0</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -88,9 +117,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="TextLabel4" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>0</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -109,9 +136,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="TextLabel5" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>0</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -136,9 +161,7 @@
|
||||
<item row="0" column="1" >
|
||||
<widget class="QPushButton" name="PushButton1" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>0</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -151,9 +174,7 @@
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="TextLabel1" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>0</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -173,6 +194,14 @@
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11" />
|
||||
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
|
||||
<tabstops>
|
||||
<tabstop>PushButton1</tabstop>
|
||||
<tabstop>LineEdit1</tabstop>
|
||||
<tabstop>SpinBox_DX</tabstop>
|
||||
<tabstop>SpinBox_DY</tabstop>
|
||||
<tabstop>SpinBox_DZ</tabstop>
|
||||
<tabstop>SpinBox_S</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
189
src/DlgRef/DlgRef_1Sel5Spin1Check_QTD.ui
Normal file
@ -0,0 +1,189 @@
|
||||
<ui version="4.0" >
|
||||
<class>DlgRef_1Sel5Spin1Check_QTD</class>
|
||||
<widget class="QWidget" name="DlgRef_1Sel5Spin1Check_QTD" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>165</width>
|
||||
<height>125</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QGroupBox" name="GroupBox1" >
|
||||
<property name="title" >
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="TextLabel1" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="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 vsizetype="Fixed" hsizetype="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" colspan="3" >
|
||||
<layout class="QGridLayout" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="TextLabel2" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="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="0" column="1" >
|
||||
<widget class="QDoubleSpinBox" name="SpinBox1" />
|
||||
</item>
|
||||
<item row="0" column="2" >
|
||||
<widget class="QLabel" name="TextLabel3" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="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="0" column="3" >
|
||||
<widget class="QDoubleSpinBox" name="SpinBox2" />
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="TextLabel5" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>TL5</string>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QDoubleSpinBox" name="SpinBox4" />
|
||||
</item>
|
||||
<item row="1" column="2" >
|
||||
<widget class="QLabel" name="TextLabel6" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>TL6</string>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3" >
|
||||
<widget class="QDoubleSpinBox" name="SpinBox5" />
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="TextLabel4" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>TL4</string>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QDoubleSpinBox" name="SpinBox3" />
|
||||
</item>
|
||||
<item row="2" column="2" colspan="2" >
|
||||
<widget class="QCheckBox" name="CheckBox1" >
|
||||
<property name="text" >
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>PushButton1</tabstop>
|
||||
<tabstop>LineEdit1</tabstop>
|
||||
<tabstop>SpinBox1</tabstop>
|
||||
<tabstop>SpinBox2</tabstop>
|
||||
<tabstop>SpinBox4</tabstop>
|
||||
<tabstop>SpinBox5</tabstop>
|
||||
<tabstop>SpinBox3</tabstop>
|
||||
<tabstop>CheckBox1</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -13,10 +13,22 @@
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<property name="leftMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<property name="topMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
@ -25,10 +37,22 @@
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<property name="leftMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<property name="topMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="2" column="1" >
|
||||
@ -43,9 +67,7 @@
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="TextLabel2" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>0</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -61,9 +83,7 @@
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="TextLabel1" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>0</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -79,9 +99,7 @@
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="TextLabel3" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>0</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -101,6 +119,11 @@
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11" />
|
||||
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
|
||||
<tabstops>
|
||||
<tabstop>SpinBox_DX</tabstop>
|
||||
<tabstop>SpinBox_DY</tabstop>
|
||||
<tabstop>SpinBox_DZ</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
@ -13,18 +13,28 @@
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<property name="leftMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<property name="topMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QGroupBox" name="GroupBoxName" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>5</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -33,12 +43,21 @@
|
||||
<string>Result name</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="NameLabel" >
|
||||
<property name="text" >
|
||||
@ -58,9 +77,7 @@
|
||||
<item row="0" column="0" >
|
||||
<widget class="QGroupBox" name="GroupConstructors" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>5</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -69,12 +86,21 @@
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="RadioButton1" >
|
||||
<property name="text" >
|
||||
@ -109,9 +135,7 @@
|
||||
<item row="3" column="0" >
|
||||
<widget class="QGroupBox" name="GroupButtons" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>7</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -120,12 +144,21 @@
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonOk" >
|
||||
<property name="text" >
|
||||
@ -176,9 +209,7 @@
|
||||
<item row="2" column="0" >
|
||||
<widget class="QWidget" native="1" name="GroupMedium" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>7</hsizetype>
|
||||
<vsizetype>7</vsizetype>
|
||||
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -187,6 +218,17 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>RadioButton1</tabstop>
|
||||
<tabstop>RadioButton2</tabstop>
|
||||
<tabstop>RadioButton3</tabstop>
|
||||
<tabstop>RadioButton4</tabstop>
|
||||
<tabstop>ResultName</tabstop>
|
||||
<tabstop>buttonOk</tabstop>
|
||||
<tabstop>buttonApply</tabstop>
|
||||
<tabstop>buttonCancel</tabstop>
|
||||
<tabstop>buttonHelp</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
@ -50,6 +50,7 @@ UIC_FILES = \
|
||||
ui_DlgRef_1Sel3Check_QTD.h \
|
||||
ui_DlgRef_1Sel3Spin_QTD.h \
|
||||
ui_DlgRef_1Sel4Spin_QTD.h \
|
||||
ui_DlgRef_1Sel5Spin1Check_QTD.h \
|
||||
ui_DlgRef_1Sel5Spin_QTD.h \
|
||||
ui_DlgRef_1Sel_QTD.h \
|
||||
ui_DlgRef_1SelExt_QTD.h \
|
||||
|
@ -518,6 +518,13 @@ GEOM::GEOM_IOperations_ptr EntityGUI_SubShapeDlg::createOperation()
|
||||
bool EntityGUI_SubShapeDlg::isValid( QString& msg )
|
||||
{
|
||||
bool isOk = false;
|
||||
Handle(SALOME_InteractiveObject) IO = firstIObject();
|
||||
Standard_Boolean testResult;
|
||||
myObject = GEOMBase::ConvertIOinGEOMObject( IO, testResult );
|
||||
if ( !testResult || myObject->_is_nil() ) {
|
||||
updateButtonState();
|
||||
return isOk;
|
||||
}
|
||||
if ( !myObject->_is_nil() ) {
|
||||
if ( isAllSubShapes() )
|
||||
isOk = true;
|
||||
|
@ -116,6 +116,25 @@ GEOM_Engine::GEOM_Engine()
|
||||
_UndoLimit = 10;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Destructor
|
||||
*/
|
||||
GEOM_Engine::~GEOM_Engine()
|
||||
{
|
||||
GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient It(_objects);
|
||||
for(; It.More(); It.Next())
|
||||
{
|
||||
RemoveObject(Handle(GEOM_Object)::DownCast(It.Value()));
|
||||
}
|
||||
|
||||
//Close all documents not closed
|
||||
for(Interface_DataMapIteratorOfDataMapOfIntegerTransient anItr(_mapIDDocument); anItr.More(); anItr.Next())
|
||||
Close(anItr.Key());
|
||||
|
||||
_mapIDDocument.Clear();
|
||||
_objects.Clear();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* GetDocument
|
||||
@ -176,18 +195,33 @@ Handle(GEOM_Object) GEOM_Engine::GetObject(int theDocID, char* theEntry)
|
||||
//=============================================================================
|
||||
Handle(GEOM_Object) GEOM_Engine::AddObject(int theDocID, int theType)
|
||||
{
|
||||
Handle(TDocStd_Document) aDoc = GetDocument(theDocID);
|
||||
Handle(TDataStd_TreeNode) aRoot = TDataStd_TreeNode::Set(aDoc->Main());
|
||||
Handle(TDocStd_Document) aDoc = GetDocument(theDocID);
|
||||
Handle(TDataStd_TreeNode) aRoot = TDataStd_TreeNode::Set(aDoc->Main());
|
||||
|
||||
TDF_Label aChild = TDF_TagSource::NewChild(aDoc->Main());
|
||||
Handle(GEOM_Object) anObject = new GEOM_Object(aChild, theType);
|
||||
// NPAL18604: use existing label to decrease memory usage,
|
||||
// if this label has been freed (object deleted)
|
||||
bool useExisting = false;
|
||||
TDF_Label aChild;
|
||||
if (!_lastCleared.IsNull()) {
|
||||
if (_lastCleared.Root() == aDoc->Main().Root()) {
|
||||
useExisting = true;
|
||||
aChild = _lastCleared;
|
||||
_lastCleared.Nullify();
|
||||
}
|
||||
}
|
||||
if (!useExisting) {
|
||||
// create new label
|
||||
aChild = TDF_TagSource::NewChild(aDoc->Main());
|
||||
}
|
||||
|
||||
//Put an object in the map of created objects
|
||||
TCollection_AsciiString anID = BuildIDFromObject(anObject);
|
||||
if(_objects.IsBound(anID)) _objects.UnBind(anID);
|
||||
_objects.Bind(anID, anObject);
|
||||
Handle(GEOM_Object) anObject = new GEOM_Object(aChild, theType);
|
||||
|
||||
return anObject;
|
||||
//Put an object in the map of created objects
|
||||
TCollection_AsciiString anID = BuildIDFromObject(anObject);
|
||||
if(_objects.IsBound(anID)) _objects.UnBind(anID);
|
||||
_objects.Bind(anID, anObject);
|
||||
|
||||
return anObject;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -204,7 +238,21 @@ Handle(GEOM_Object) GEOM_Engine::AddSubShape(Handle(GEOM_Object) theMainShape,
|
||||
Handle(TDocStd_Document) aDoc = GetDocument(theMainShape->GetDocID());
|
||||
Handle(TDataStd_TreeNode) aRoot = TDataStd_TreeNode::Set(aDoc->Main());
|
||||
|
||||
TDF_Label aChild = TDF_TagSource::NewChild(aDoc->Main());
|
||||
// NPAL18604: use existing label to decrease memory usage,
|
||||
// if this label has been freed (object deleted)
|
||||
bool useExisting = false;
|
||||
TDF_Label aChild;
|
||||
if (!_lastCleared.IsNull()) {
|
||||
if (_lastCleared.Root() == aDoc->Main().Root()) {
|
||||
useExisting = true;
|
||||
aChild = _lastCleared;
|
||||
_lastCleared.Nullify();
|
||||
}
|
||||
}
|
||||
if (!useExisting) {
|
||||
// create new label
|
||||
aChild = TDF_TagSource::NewChild(aDoc->Main());
|
||||
}
|
||||
|
||||
Handle(GEOM_Function) aMainShape = theMainShape->GetLastFunction();
|
||||
Handle(GEOM_Object) anObject = new GEOM_Object(aChild, 28); //28 is SUBSHAPE type
|
||||
@ -258,22 +306,23 @@ Handle(GEOM_Object) GEOM_Engine::AddSubShape(Handle(GEOM_Object) theMainShape,
|
||||
//=============================================================================
|
||||
bool GEOM_Engine::RemoveObject(Handle(GEOM_Object) theObject)
|
||||
{
|
||||
if(!theObject) return false;
|
||||
if (!theObject) return false;
|
||||
|
||||
//Remove an object from the map of available objects
|
||||
TCollection_AsciiString anID = BuildIDFromObject(theObject);
|
||||
if(_objects.IsBound(anID)) _objects.UnBind(anID);
|
||||
if (_objects.IsBound(anID)) _objects.UnBind(anID);
|
||||
|
||||
int nb = theObject->GetNbFunctions();
|
||||
Handle(TDataStd_TreeNode) aNode;
|
||||
for(int i = 1; i<=nb; i++) {
|
||||
for (int i = 1; i<=nb; i++) {
|
||||
Handle(GEOM_Function) aFunction = theObject->GetFunction(i);
|
||||
if(aFunction->GetEntry().FindAttribute(GEOM_Function::GetFunctionTreeID(), aNode))
|
||||
if (aFunction->GetEntry().FindAttribute(GEOM_Function::GetFunctionTreeID(), aNode))
|
||||
aNode->Remove();
|
||||
}
|
||||
|
||||
TDF_Label aLabel = theObject->GetEntry();
|
||||
aLabel.ForgetAllAttributes(Standard_True);
|
||||
_lastCleared = aLabel;
|
||||
|
||||
theObject.Nullify();
|
||||
|
||||
@ -344,20 +393,22 @@ bool GEOM_Engine::Load(int theDocID, char* theFileName)
|
||||
//=============================================================================
|
||||
void GEOM_Engine::Close(int theDocID)
|
||||
{
|
||||
if(_mapIDDocument.IsBound(theDocID)) {
|
||||
if (_mapIDDocument.IsBound(theDocID)) {
|
||||
Handle(TDocStd_Document) aDoc = Handle(TDocStd_Document)::DownCast(_mapIDDocument(theDocID));
|
||||
|
||||
//Remove all GEOM Objects associated to the given document
|
||||
TColStd_SequenceOfAsciiString aSeq;
|
||||
GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient It(_objects);
|
||||
for(; It.More(); It.Next()) {
|
||||
TCollection_AsciiString anObjID(It.Key());
|
||||
GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient It (_objects);
|
||||
for (; It.More(); It.Next()) {
|
||||
TCollection_AsciiString anObjID (It.Key());
|
||||
Standard_Integer anID = ExtractDocID(anObjID);
|
||||
if(theDocID == anID) aSeq.Append(It.Key());
|
||||
if (theDocID == anID) aSeq.Append(It.Key());
|
||||
}
|
||||
for(Standard_Integer i=1; i<=aSeq.Length(); i++) _objects.UnBind(aSeq.Value(i));
|
||||
for (Standard_Integer i=1; i<=aSeq.Length(); i++) _objects.UnBind(aSeq.Value(i));
|
||||
|
||||
_mapIDDocument.UnBind(theDocID);
|
||||
_lastCleared.Nullify();
|
||||
|
||||
_mapIDDocument.UnBind(theDocID);
|
||||
_OCAFApp->Close(aDoc);
|
||||
aDoc.Nullify();
|
||||
}
|
||||
|
@ -30,12 +30,13 @@
|
||||
#include <TDocStd_Document.hxx>
|
||||
#include <TColStd_HArray1OfInteger.hxx>
|
||||
#include <TColStd_HSequenceOfAsciiString.hxx>
|
||||
#include <TDF_Label.hxx>
|
||||
|
||||
class GEOM_Engine
|
||||
{
|
||||
public:
|
||||
Standard_EXPORT GEOM_Engine();
|
||||
Standard_EXPORT ~GEOM_Engine() { _mapIDDocument.Clear(); _objects.Clear(); }
|
||||
Standard_EXPORT virtual ~GEOM_Engine();
|
||||
|
||||
//Retuns the engine
|
||||
Standard_EXPORT static GEOM_Engine* GetEngine();
|
||||
@ -101,6 +102,8 @@ class GEOM_Engine
|
||||
GEOM_DataMapOfAsciiStringTransient _objects;
|
||||
|
||||
Resource_DataMapOfAsciiStringAsciiString _studyEntry2NameMap;
|
||||
|
||||
TDF_Label _lastCleared;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -3014,7 +3014,8 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeFilling(GEOM::GEOM_Shape_ptr myShape,
|
||||
CORBA::Short maxdeg,
|
||||
CORBA::Double tol3d,
|
||||
CORBA::Double tol2d,
|
||||
CORBA::Short nbiter)
|
||||
CORBA::Short nbiter,
|
||||
CORBA::Boolean theApprox)
|
||||
throw (SALOME::SALOME_Exception)
|
||||
{
|
||||
Unexpect aCatch(SALOME_SalomeException);
|
||||
@ -3053,7 +3054,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeFilling(GEOM::GEOM_Shape_ptr myShape,
|
||||
Handle(GeomFill_Line) Line = new GeomFill_Line(i) ;
|
||||
|
||||
GeomFill_AppSurf App(mindeg, maxdeg, tol3d, tol2d, nbiter) ; /* user parameters */
|
||||
App.Perform(Line, Section) ;
|
||||
App.Perform(Line, Section, theApprox) ;
|
||||
|
||||
if (!App.IsDone()) {
|
||||
THROW_SALOME_CORBA_EXCEPTION("Filling aborted : non valid shape result", SALOME::BAD_PARAM);
|
||||
|
@ -3430,6 +3430,10 @@
|
||||
<source>GEOM_RESULT_NAME_LBL</source>
|
||||
<translation>Name</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>GEOM_FILLING_APPROX</source>
|
||||
<translation>Approximation</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BasicGUI_MarkerDlg</name>
|
||||
|
@ -86,6 +86,12 @@ Standard_Integer GEOMImpl_BoxDriver::Execute(TFunction_Logbook& log) const
|
||||
aShape2.ShapeType() == TopAbs_VERTEX) {
|
||||
gp_Pnt P1 = BRep_Tool::Pnt(TopoDS::Vertex(aShape1));
|
||||
gp_Pnt P2 = BRep_Tool::Pnt(TopoDS::Vertex(aShape2));
|
||||
|
||||
if (P1.X() == P2.X() || P1.Y() == P2.Y() || P1.Z() == P2.Z()) {
|
||||
StdFail_NotDone::Raise("Box can not be created, the points belong to the same plane");
|
||||
return 0;
|
||||
}
|
||||
|
||||
BRepPrimAPI_MakeBox MB (P1,P2);
|
||||
MB.Build();
|
||||
|
||||
|
@ -88,6 +88,7 @@ Standard_Integer GEOMImpl_FillingDriver::Execute(TFunction_Logbook& log) const
|
||||
Standard_Real tol3d = IF.GetTol2D();
|
||||
Standard_Real tol2d = IF.GetTol3D();
|
||||
Standard_Integer nbiter = IF.GetNbIter();
|
||||
Standard_Boolean isApprox = IF.GetApprox();
|
||||
|
||||
if (mindeg > maxdeg) {
|
||||
Standard_RangeError::Raise("Minimal degree can not be more than maximal degree");
|
||||
@ -115,7 +116,7 @@ Standard_Integer GEOMImpl_FillingDriver::Execute(TFunction_Logbook& log) const
|
||||
Handle(GeomFill_Line) Line = new GeomFill_Line(i);
|
||||
|
||||
GeomFill_AppSurf App (mindeg, maxdeg, tol3d, tol2d, nbiter); /* user parameters */
|
||||
App.Perform(Line, Section);
|
||||
App.Perform(Line, Section, isApprox);
|
||||
|
||||
if (!App.IsDone()) return 0;
|
||||
Standard_Integer UDegree, VDegree, NbUPoles, NbVPoles, NbUKnots, NbVKnots;
|
||||
|
@ -1110,7 +1110,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeSolidShell (Handle(GEOM_Obje
|
||||
//=============================================================================
|
||||
Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeFilling
|
||||
(Handle(GEOM_Object) theShape, int theMinDeg, int theMaxDeg,
|
||||
double theTol2D, double theTol3D, int theNbIter)
|
||||
double theTol2D, double theTol3D, int theNbIter, bool isApprox)
|
||||
{
|
||||
SetErrorCode(KO);
|
||||
|
||||
@ -1138,6 +1138,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeFilling
|
||||
aFI.SetTol2D(theTol2D);
|
||||
aFI.SetTol3D(theTol3D);
|
||||
aFI.SetNbIter(theNbIter);
|
||||
aFI.SetApprox(isApprox);
|
||||
|
||||
//Compute the Solid value
|
||||
try {
|
||||
@ -1159,9 +1160,13 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeFilling
|
||||
}
|
||||
|
||||
//Make a Python command
|
||||
GEOM::TPythonDump(aFunction) << aFilling << " = geompy.MakeFilling("
|
||||
GEOM::TPythonDump pd (aFunction);
|
||||
pd << aFilling << " = geompy.MakeFilling("
|
||||
<< theShape << ", " << theMinDeg << ", " << theMaxDeg << ", "
|
||||
<< theTol2D << ", " << theTol3D << ", " << theNbIter << ")";
|
||||
<< theTol2D << ", " << theTol3D << ", " << theNbIter;
|
||||
if(isApprox)
|
||||
pd << ", " << isApprox;
|
||||
pd << ")";
|
||||
|
||||
SetErrorCode(OK);
|
||||
return aFilling;
|
||||
|
@ -83,7 +83,7 @@ class GEOMImpl_I3DPrimOperations : public GEOM_IOperations {
|
||||
|
||||
Standard_EXPORT Handle(GEOM_Object) MakeSolidShell (Handle(GEOM_Object) theShell);
|
||||
|
||||
Standard_EXPORT Handle(GEOM_Object) MakeFilling (Handle(GEOM_Object) theShape, int theMinDeg, int theMaxDeg, double theTol2D, double theTol3D, int theNbIter);
|
||||
Standard_EXPORT Handle(GEOM_Object) MakeFilling (Handle(GEOM_Object) theShape, int theMinDeg, int theMaxDeg, double theTol2D, double theTol3D, int theNbIter, bool isApprox);
|
||||
|
||||
Standard_EXPORT Handle(GEOM_Object) MakeThruSections(const Handle(TColStd_HSequenceOfTransient)& theSeqSections,
|
||||
bool theModeSolid,
|
||||
|
@ -28,6 +28,7 @@
|
||||
#define FILL_ARG_TOL3D 4
|
||||
#define FILL_ARG_SHAPE 5
|
||||
#define FILL_ARG_NBITER 6
|
||||
#define FILL_ARG_APPROX 7
|
||||
|
||||
class GEOMImpl_IFilling
|
||||
{
|
||||
@ -47,6 +48,9 @@ class GEOMImpl_IFilling
|
||||
void SetNbIter(int theNbIter) { _func->SetInteger(FILL_ARG_NBITER, theNbIter); }
|
||||
int GetNbIter() { return _func->GetInteger(FILL_ARG_NBITER); }
|
||||
|
||||
void SetApprox(bool theApprox) { _func->SetInteger(FILL_ARG_APPROX, theApprox); }
|
||||
bool GetApprox() { return _func->GetInteger(FILL_ARG_APPROX); }
|
||||
|
||||
void SetShape(Handle(GEOM_Function) theShape) { _func->SetReference(FILL_ARG_SHAPE, theShape); }
|
||||
Handle(GEOM_Function) GetShape() { return _func->GetReference(FILL_ARG_SHAPE); }
|
||||
|
||||
|
@ -638,7 +638,7 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetGlueFaces
|
||||
Handle(GEOM_Function) aFunction = theShape->GetLastFunction();
|
||||
GEOM::TPythonDump pd (aFunction, /*append=*/true);
|
||||
pd << "[" << anAsciiList.ToCString();
|
||||
pd << "] = geompy.GetGlueFaces" << theShape << ", " << theTolerance << ")";
|
||||
pd << "] = geompy.GetGlueFaces(" << theShape << ", " << theTolerance << ")";
|
||||
|
||||
SetErrorCode(OK);
|
||||
|
||||
|
@ -1,18 +1,18 @@
|
||||
// Copyright (C) 2005 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
|
||||
// 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
|
||||
//
|
||||
// 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
|
||||
// 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
|
||||
@ -49,48 +49,48 @@
|
||||
//=======================================================================
|
||||
//function : GetID
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
//=======================================================================
|
||||
const Standard_GUID& GEOMImpl_RotateDriver::GetID()
|
||||
{
|
||||
static Standard_GUID aRotateDriver("FF1BBB56-5D14-4df2-980B-3A668264EA16");
|
||||
return aRotateDriver;
|
||||
return aRotateDriver;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_RotateDriver
|
||||
//purpose :
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
GEOMImpl_RotateDriver::GEOMImpl_RotateDriver()
|
||||
GEOMImpl_RotateDriver::GEOMImpl_RotateDriver()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Execute
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
//=======================================================================
|
||||
Standard_Integer GEOMImpl_RotateDriver::Execute(TFunction_Logbook& log) const
|
||||
{
|
||||
if(Label().IsNull()) return 0;
|
||||
if (Label().IsNull()) return 0;
|
||||
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
|
||||
|
||||
if(aFunction.IsNull()) return 0;
|
||||
if (aFunction.IsNull()) return 0;
|
||||
|
||||
GEOMImpl_IRotate RI(aFunction);
|
||||
gp_Trsf aTrsf;
|
||||
gp_Pnt aCP, aP1, aP2;
|
||||
Standard_Integer aType = aFunction->GetType();
|
||||
Handle(GEOM_Function) anOriginalFunction = RI.GetOriginal();
|
||||
if(anOriginalFunction.IsNull()) return 0;
|
||||
if (anOriginalFunction.IsNull()) return 0;
|
||||
TopoDS_Shape aShape, anOriginal = anOriginalFunction->GetValue();
|
||||
if(anOriginal.IsNull()) return 0;
|
||||
if (anOriginal.IsNull()) return 0;
|
||||
|
||||
if(aType == ROTATE || aType == ROTATE_COPY) {
|
||||
if (aType == ROTATE || aType == ROTATE_COPY) {
|
||||
Handle(GEOM_Function) anAxis = RI.GetAxis();
|
||||
if(anAxis.IsNull()) return 0;
|
||||
if (anAxis.IsNull()) return 0;
|
||||
TopoDS_Shape A = anAxis->GetValue();
|
||||
if(A.IsNull() || A.ShapeType() != TopAbs_EDGE) return 0;
|
||||
if (A.IsNull() || A.ShapeType() != TopAbs_EDGE) return 0;
|
||||
TopoDS_Edge anEdge = TopoDS::Edge(A);
|
||||
|
||||
gp_Pnt aP1 = BRep_Tool::Pnt(TopExp::FirstVertex(anEdge));
|
||||
@ -99,11 +99,17 @@ Standard_Integer GEOMImpl_RotateDriver::Execute(TFunction_Logbook& log) const
|
||||
gp_Ax1 anAx1(aP1, aDir);
|
||||
Standard_Real anAngle = RI.GetAngle();
|
||||
aTrsf.SetRotation(anAx1, anAngle);
|
||||
|
||||
BRepBuilderAPI_Transform aTransformation(anOriginal, aTrsf, Standard_False);
|
||||
aShape = aTransformation.Shape();
|
||||
|
||||
//NPAL18620: performance problem: multiple locations are accumulated
|
||||
// in shape and need a great time to process
|
||||
//BRepBuilderAPI_Transform aTransformation(anOriginal, aTrsf, Standard_False);
|
||||
//aShape = aTransformation.Shape();
|
||||
TopLoc_Location aLocOrig = anOriginal.Location();
|
||||
gp_Trsf aTrsfOrig = aLocOrig.Transformation();
|
||||
TopLoc_Location aLocRes (aTrsf * aTrsfOrig);
|
||||
aShape = anOriginal.Located(aLocRes);
|
||||
}
|
||||
else if(aType == ROTATE_THREE_POINTS || aType == ROTATE_THREE_POINTS_COPY) {
|
||||
else if (aType == ROTATE_THREE_POINTS || aType == ROTATE_THREE_POINTS_COPY) {
|
||||
Handle(GEOM_Function) aCentPoint = RI.GetCentPoint();
|
||||
Handle(GEOM_Function) aPoint1 = RI.GetPoint1();
|
||||
Handle(GEOM_Function) aPoint2 = RI.GetPoint2();
|
||||
@ -125,10 +131,16 @@ Standard_Integer GEOMImpl_RotateDriver::Execute(TFunction_Logbook& log) const
|
||||
gp_Ax1 anAx1(aCP, aDir);
|
||||
Standard_Real anAngle = aVec1.Angle(aVec2);
|
||||
aTrsf.SetRotation(anAx1, anAngle);
|
||||
BRepBuilderAPI_Transform aTransformation(anOriginal, aTrsf, Standard_False);
|
||||
aShape = aTransformation.Shape();
|
||||
//NPAL18620: performance problem: multiple locations are accumulated
|
||||
// in shape and need a great time to process
|
||||
//BRepBuilderAPI_Transform aTransformation(anOriginal, aTrsf, Standard_False);
|
||||
//aShape = aTransformation.Shape();
|
||||
TopLoc_Location aLocOrig = anOriginal.Location();
|
||||
gp_Trsf aTrsfOrig = aLocOrig.Transformation();
|
||||
TopLoc_Location aLocRes (aTrsf * aTrsfOrig);
|
||||
aShape = anOriginal.Located(aLocRes);
|
||||
}
|
||||
else if(aType == ROTATE_1D) {
|
||||
else if (aType == ROTATE_1D) {
|
||||
//Get direction
|
||||
Handle(GEOM_Function) anAxis = RI.GetAxis();
|
||||
if(anAxis.IsNull()) return 0;
|
||||
@ -138,27 +150,34 @@ Standard_Integer GEOMImpl_RotateDriver::Execute(TFunction_Logbook& log) const
|
||||
|
||||
gp_Pnt aP1 = BRep_Tool::Pnt(TopExp::FirstVertex(anEdge));
|
||||
gp_Pnt aP2 = BRep_Tool::Pnt(TopExp::LastVertex(anEdge));
|
||||
gp_Dir D(gp_Vec(aP1, aP2)) ;
|
||||
gp_Dir D(gp_Vec(aP1, aP2));
|
||||
|
||||
gp_Ax1 AX1(aP1, D) ;
|
||||
gp_Ax1 AX1(aP1, D);
|
||||
|
||||
Standard_Integer nbtimes = RI.GetNbIter1();
|
||||
Standard_Real angle = 360.0/nbtimes ;
|
||||
Standard_Real angle = 360.0/nbtimes;
|
||||
|
||||
TopoDS_Compound aCompound;
|
||||
BRep_Builder B;
|
||||
B.MakeCompound( aCompound );
|
||||
|
||||
|
||||
TopLoc_Location aLocOrig = anOriginal.Location();
|
||||
gp_Trsf aTrsfOrig = aLocOrig.Transformation();
|
||||
|
||||
for (int i = 0; i < nbtimes; i++ ) {
|
||||
aTrsf.SetRotation(AX1, i*angle*PI180) ;
|
||||
BRepBuilderAPI_Transform myBRepTransformation(anOriginal, aTrsf, Standard_False) ;
|
||||
B.Add( aCompound, myBRepTransformation.Shape() );
|
||||
aTrsf.SetRotation(AX1, i*angle*PI180);
|
||||
//NPAL18620: performance problem: multiple locations are accumulated
|
||||
// in shape and need a great time to process
|
||||
//BRepBuilderAPI_Transform aBRepTransformation(anOriginal, aTrsf, Standard_False);
|
||||
//B.Add(aCompound, aBRepTransformation.Shape());
|
||||
TopLoc_Location aLocRes (aTrsf * aTrsfOrig);
|
||||
B.Add(aCompound, anOriginal.Located(aLocRes));
|
||||
}
|
||||
|
||||
aShape = aCompound ;
|
||||
aShape = aCompound;
|
||||
}
|
||||
else if(aType == ROTATE_2D) {
|
||||
Standard_Real DX, DY, DZ ;
|
||||
else if (aType == ROTATE_2D) {
|
||||
Standard_Real DX, DY, DZ;
|
||||
|
||||
//Get direction
|
||||
Handle(GEOM_Function) anAxis = RI.GetAxis();
|
||||
@ -168,77 +187,81 @@ Standard_Integer GEOMImpl_RotateDriver::Execute(TFunction_Logbook& log) const
|
||||
TopoDS_Edge anEdge = TopoDS::Edge(A);
|
||||
gp_Pnt aP1 = BRep_Tool::Pnt(TopExp::FirstVertex(anEdge));
|
||||
gp_Pnt aP2 = BRep_Tool::Pnt(TopExp::LastVertex(anEdge));
|
||||
gp_Dir D(gp_Vec(aP1, aP2)) ;
|
||||
gp_Dir D(gp_Vec(aP1, aP2));
|
||||
|
||||
gp_Ax1 AX1(aP1, D) ;
|
||||
gp_Ax1 AX1(aP1, D);
|
||||
|
||||
|
||||
gp_Trsf theTransformation1 ;
|
||||
gp_Trsf theTransformation2 ;
|
||||
gp_Pnt P1 ;
|
||||
GProp_GProps System ;
|
||||
|
||||
if ( anOriginal.ShapeType() == TopAbs_VERTEX) {
|
||||
gp_Trsf aTrsf1;
|
||||
gp_Trsf aTrsf2;
|
||||
gp_Pnt P1;
|
||||
GProp_GProps System;
|
||||
|
||||
if (anOriginal.ShapeType() == TopAbs_VERTEX) {
|
||||
P1 = BRep_Tool::Pnt(TopoDS::Vertex( anOriginal ));
|
||||
}
|
||||
}
|
||||
else if ( anOriginal.ShapeType() == TopAbs_EDGE || anOriginal.ShapeType() == TopAbs_WIRE ) {
|
||||
BRepGProp::LinearProperties(anOriginal, System);
|
||||
P1 = System.CentreOfMass() ;
|
||||
P1 = System.CentreOfMass();
|
||||
}
|
||||
else if ( anOriginal.ShapeType() == TopAbs_FACE || anOriginal.ShapeType() == TopAbs_SHELL ) {
|
||||
BRepGProp::SurfaceProperties(anOriginal, System);
|
||||
P1 = System.CentreOfMass() ;
|
||||
P1 = System.CentreOfMass();
|
||||
}
|
||||
else {
|
||||
BRepGProp::VolumeProperties(anOriginal, System);
|
||||
P1 = System.CentreOfMass() ;
|
||||
P1 = System.CentreOfMass();
|
||||
}
|
||||
|
||||
|
||||
Handle(Geom_Line) Line = new Geom_Line(AX1);
|
||||
GeomAPI_ProjectPointOnCurve aPrjTool( P1, Line ) ;
|
||||
GeomAPI_ProjectPointOnCurve aPrjTool( P1, Line );
|
||||
gp_Pnt P2 = aPrjTool.NearestPoint();
|
||||
|
||||
|
||||
if ( P1.IsEqual(P2, Precision::Confusion() ) ) return 0;
|
||||
|
||||
gp_Vec Vec(P1.X()-P2.X(), P1.Y()-P2.Y(), P1.Z()-P2.Z()) ;
|
||||
|
||||
gp_Vec Vec(P1.X()-P2.X(), P1.Y()-P2.Y(), P1.Z()-P2.Z());
|
||||
Vec.Normalize();
|
||||
|
||||
|
||||
Standard_Integer nbtimes2 = RI.GetNbIter2();
|
||||
Standard_Integer nbtimes1 = RI.GetNbIter1();
|
||||
Standard_Real step = RI.GetStep();
|
||||
Standard_Real ang = RI.GetAngle();
|
||||
|
||||
gp_Vec myVec ;
|
||||
TopLoc_Location aLocOrig = anOriginal.Location();
|
||||
gp_Trsf aTrsfOrig = aLocOrig.Transformation();
|
||||
|
||||
gp_Vec aVec;
|
||||
TopoDS_Compound aCompound;
|
||||
BRep_Builder B;
|
||||
B.MakeCompound( aCompound );
|
||||
for (int i = 0; i < nbtimes2; i++ ) {
|
||||
for (int j = 0; j < nbtimes1; j++ ) {
|
||||
DX = i * step * Vec.X() ;
|
||||
DY = i * step * Vec.Y() ;
|
||||
DZ = i * step * Vec.Z() ;
|
||||
myVec.SetCoord( DX, DY, DZ ) ;
|
||||
theTransformation1.SetTranslation(myVec) ;
|
||||
theTransformation2.SetRotation(AX1, j*ang*PI180) ;
|
||||
BRepBuilderAPI_Transform myBRepTransformation1(anOriginal, theTransformation1, Standard_False) ;
|
||||
BRepBuilderAPI_Transform myBRepTransformation2(myBRepTransformation1.Shape(), theTransformation2, Standard_False) ;
|
||||
B.Add( aCompound, myBRepTransformation2.Shape() );
|
||||
DX = i * step * Vec.X();
|
||||
DY = i * step * Vec.Y();
|
||||
DZ = i * step * Vec.Z();
|
||||
aVec.SetCoord( DX, DY, DZ );
|
||||
aTrsf1.SetTranslation(aVec);
|
||||
aTrsf2.SetRotation(AX1, j*ang*PI180);
|
||||
//NPAL18620: performance problem: multiple locations are accumulated
|
||||
// in shape and need a great time to process
|
||||
//BRepBuilderAPI_Transform aBRepTrsf1 (anOriginal, aTrsf1, Standard_False);
|
||||
//BRepBuilderAPI_Transform aBRepTrsf2 (aBRepTrsf1.Shape(), aTrsf2, Standard_False);
|
||||
//B.Add(aCompound, aBRepTrsf2.Shape());
|
||||
TopLoc_Location aLocRes (aTrsf2 * aTrsf1 * aTrsfOrig);
|
||||
B.Add(aCompound, anOriginal.Located(aLocRes));
|
||||
}
|
||||
}
|
||||
|
||||
aShape = aCompound;
|
||||
|
||||
}
|
||||
else return 0;
|
||||
|
||||
|
||||
|
||||
|
||||
if (aShape.IsNull()) return 0;
|
||||
|
||||
aFunction->SetValue(aShape);
|
||||
|
||||
log.SetTouched(Label());
|
||||
log.SetTouched(Label());
|
||||
|
||||
return 1;
|
||||
}
|
||||
@ -247,17 +270,15 @@ Standard_Integer GEOMImpl_RotateDriver::Execute(TFunction_Logbook& log) const
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_RotateDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_RotateDriver_Type_()
|
||||
{
|
||||
|
||||
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver);
|
||||
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver);
|
||||
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
|
||||
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
|
||||
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
|
||||
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
|
||||
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
|
||||
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_RotateDriver",
|
||||
@ -272,8 +293,7 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_RotateDriver_Type_()
|
||||
//=======================================================================
|
||||
//function : DownCast
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
//=======================================================================
|
||||
const Handle(GEOMImpl_RotateDriver) Handle(GEOMImpl_RotateDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
|
||||
{
|
||||
Handle(GEOMImpl_RotateDriver) _anOtherObject;
|
||||
@ -284,7 +304,5 @@ const Handle(GEOMImpl_RotateDriver) Handle(GEOMImpl_RotateDriver)::DownCast(cons
|
||||
}
|
||||
}
|
||||
|
||||
return _anOtherObject ;
|
||||
return _anOtherObject;
|
||||
}
|
||||
|
||||
|
||||
|
@ -147,7 +147,7 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const
|
||||
aFW->Load(aWire);
|
||||
aFW->FixReorder();
|
||||
|
||||
if (aFW->StatusReorder(ShapeExtend_FAIL1)) {
|
||||
if (aFW->StatusReorder(ShapeExtend_FAIL1)) {
|
||||
Standard_ConstructionError::Raise("Wire construction failed: several loops detected");
|
||||
} else if (aFW->StatusReorder(ShapeExtend_FAIL)) {
|
||||
Standard_ConstructionError::Raise("Wire construction failed");
|
||||
@ -155,6 +155,13 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const
|
||||
Standard_ConstructionError::Raise("Wire construction failed: some gaps detected");
|
||||
} else {
|
||||
}
|
||||
|
||||
aFW->ClosedWireMode() = Standard_False;
|
||||
aFW->FixConnected();
|
||||
if (aFW->StatusConnected(ShapeExtend_FAIL)) {
|
||||
Standard_ConstructionError::Raise("Wire construction failed: cannot build connected wire");
|
||||
}
|
||||
|
||||
aShape = aFW->WireAPIMake();
|
||||
}
|
||||
}
|
||||
|
@ -1,18 +1,18 @@
|
||||
// Copyright (C) 2005 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
|
||||
// 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
|
||||
//
|
||||
// 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
|
||||
// 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
|
||||
@ -42,33 +42,33 @@
|
||||
//=======================================================================
|
||||
//function : GetID
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
//=======================================================================
|
||||
const Standard_GUID& GEOMImpl_TranslateDriver::GetID()
|
||||
{
|
||||
static Standard_GUID aTranslateDriver("FF1BBB03-5D14-4df2-980B-3A668264EA16");
|
||||
return aTranslateDriver;
|
||||
return aTranslateDriver;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_TranslateDriver
|
||||
//purpose :
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
GEOMImpl_TranslateDriver::GEOMImpl_TranslateDriver()
|
||||
GEOMImpl_TranslateDriver::GEOMImpl_TranslateDriver()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Execute
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
//=======================================================================
|
||||
Standard_Integer GEOMImpl_TranslateDriver::Execute(TFunction_Logbook& log) const
|
||||
{
|
||||
if(Label().IsNull()) return 0;
|
||||
if (Label().IsNull()) return 0;
|
||||
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
|
||||
|
||||
if(aFunction.IsNull()) return 0;
|
||||
if (aFunction.IsNull()) return 0;
|
||||
|
||||
GEOMImpl_ITranslate TI(aFunction);
|
||||
gp_Trsf aTrsf;
|
||||
@ -76,11 +76,11 @@ Standard_Integer GEOMImpl_TranslateDriver::Execute(TFunction_Logbook& log) const
|
||||
Standard_Integer aType = aFunction->GetType();
|
||||
|
||||
Handle(GEOM_Function) anOriginalFunction = TI.GetOriginal();
|
||||
if(anOriginalFunction.IsNull()) return 0;
|
||||
if (anOriginalFunction.IsNull()) return 0;
|
||||
TopoDS_Shape aShape, anOriginal = anOriginalFunction->GetValue();
|
||||
if(anOriginal.IsNull()) return 0;
|
||||
if (anOriginal.IsNull()) return 0;
|
||||
|
||||
if(aType == TRANSLATE_TWO_POINTS || aType == TRANSLATE_TWO_POINTS_COPY) {
|
||||
if (aType == TRANSLATE_TWO_POINTS || aType == TRANSLATE_TWO_POINTS_COPY) {
|
||||
Handle(GEOM_Function) aPoint1 = TI.GetPoint1();
|
||||
Handle(GEOM_Function) aPoint2 = TI.GetPoint2();
|
||||
if(aPoint1.IsNull() || aPoint2.IsNull()) return 0;
|
||||
@ -93,10 +93,16 @@ Standard_Integer GEOMImpl_TranslateDriver::Execute(TFunction_Logbook& log) const
|
||||
aP2 = BRep_Tool::Pnt(TopoDS::Vertex(aV2));
|
||||
|
||||
aTrsf.SetTranslation(aP1, aP2);
|
||||
BRepBuilderAPI_Transform aTransformation(anOriginal, aTrsf, Standard_False);
|
||||
aShape = aTransformation.Shape();
|
||||
|
||||
} else if(aType == TRANSLATE_VECTOR || aType == TRANSLATE_VECTOR_COPY) {
|
||||
//NPAL18620: performance problem: multiple locations are accumulated
|
||||
// in shape and need a great time to process
|
||||
//BRepBuilderAPI_Transform aTransformation(anOriginal, aTrsf, Standard_False);
|
||||
//aShape = aTransformation.Shape();
|
||||
TopLoc_Location aLocOrig = anOriginal.Location();
|
||||
gp_Trsf aTrsfOrig = aLocOrig.Transformation();
|
||||
TopLoc_Location aLocRes (aTrsf * aTrsfOrig);
|
||||
aShape = anOriginal.Located(aLocRes);
|
||||
}
|
||||
else if (aType == TRANSLATE_VECTOR || aType == TRANSLATE_VECTOR_COPY) {
|
||||
Handle(GEOM_Function) aVector = TI.GetVector();
|
||||
if(aVector.IsNull()) return 0;
|
||||
TopoDS_Shape aV = aVector->GetValue();
|
||||
@ -107,19 +113,31 @@ Standard_Integer GEOMImpl_TranslateDriver::Execute(TFunction_Logbook& log) const
|
||||
aP2 = BRep_Tool::Pnt(TopExp::LastVertex(anEdge));
|
||||
|
||||
aTrsf.SetTranslation(aP1, aP2);
|
||||
BRepBuilderAPI_Transform aTransformation(anOriginal, aTrsf, Standard_False);
|
||||
aShape = aTransformation.Shape();
|
||||
//NPAL18620: performance problem: multiple locations are accumulated
|
||||
// in shape and need a great time to process
|
||||
//BRepBuilderAPI_Transform aTransformation(anOriginal, aTrsf, Standard_False);
|
||||
//aShape = aTransformation.Shape();
|
||||
TopLoc_Location aLocOrig = anOriginal.Location();
|
||||
gp_Trsf aTrsfOrig = aLocOrig.Transformation();
|
||||
TopLoc_Location aLocRes (aTrsf * aTrsfOrig);
|
||||
aShape = anOriginal.Located(aLocRes);
|
||||
}
|
||||
else if(aType == TRANSLATE_XYZ || aType == TRANSLATE_XYZ_COPY) {
|
||||
gp_Vec aVec(TI.GetDX(), TI.GetDY(), TI.GetDZ());
|
||||
else if (aType == TRANSLATE_XYZ || aType == TRANSLATE_XYZ_COPY) {
|
||||
gp_Vec aVec (TI.GetDX(), TI.GetDY(), TI.GetDZ());
|
||||
aTrsf.SetTranslation(aVec);
|
||||
BRepBuilderAPI_Transform aTransformation(anOriginal, aTrsf, Standard_False);
|
||||
aShape = aTransformation.Shape();
|
||||
//NPAL18620: performance problem: multiple locations are accumulated
|
||||
// in shape and need a great time to process
|
||||
//BRepBuilderAPI_Transform aTransformation (anOriginal, aTrsf, Standard_False);
|
||||
//aShape = aTransformation.Shape();
|
||||
TopLoc_Location aLocOrig = anOriginal.Location();
|
||||
gp_Trsf aTrsfOrig = aLocOrig.Transformation();
|
||||
TopLoc_Location aLocRes (aTrsf * aTrsfOrig);
|
||||
aShape = anOriginal.Located(aLocRes);
|
||||
}
|
||||
else if(aType == TRANSLATE_1D) {
|
||||
else if (aType == TRANSLATE_1D) {
|
||||
Standard_Real DX, DY, DZ, step = TI.GetStep1();
|
||||
Standard_Integer nbtimes = TI.GetNbIter1();
|
||||
gp_Vec myVec ;
|
||||
gp_Vec aVec;
|
||||
TopoDS_Compound aCompound;
|
||||
BRep_Builder B;
|
||||
B.MakeCompound( aCompound );
|
||||
@ -133,21 +151,28 @@ Standard_Integer GEOMImpl_TranslateDriver::Execute(TFunction_Logbook& log) const
|
||||
gp_Vec Vec(BRep_Tool::Pnt(TopExp::FirstVertex(anEdge)), BRep_Tool::Pnt(TopExp::LastVertex(anEdge)));
|
||||
Vec.Normalize();
|
||||
|
||||
for (int i = 0; i < nbtimes; i++ ) {
|
||||
DX = i * step * Vec.X() ;
|
||||
DY = i * step * Vec.Y() ;
|
||||
DZ = i * step * Vec.Z() ;
|
||||
myVec.SetCoord( DX, DY, DZ ) ;
|
||||
aTrsf.SetTranslation(myVec) ;
|
||||
BRepBuilderAPI_Transform aTransformation(anOriginal, aTrsf, Standard_False) ;
|
||||
B.Add(aCompound , aTransformation.Shape() );
|
||||
TopLoc_Location aLocOrig = anOriginal.Location();
|
||||
gp_Trsf aTrsfOrig = aLocOrig.Transformation();
|
||||
|
||||
for (int i = 0; i < nbtimes; i++) {
|
||||
DX = i * step * Vec.X();
|
||||
DY = i * step * Vec.Y();
|
||||
DZ = i * step * Vec.Z();
|
||||
aVec.SetCoord( DX, DY, DZ );
|
||||
aTrsf.SetTranslation(aVec);
|
||||
//NPAL18620: performance problem: multiple locations are accumulated
|
||||
// in shape and need a great time to process
|
||||
//BRepBuilderAPI_Transform aTransformation(anOriginal, aTrsf, Standard_False);
|
||||
//B.Add(aCompound, aTransformation.Shape());
|
||||
TopLoc_Location aLocRes (aTrsf * aTrsfOrig);
|
||||
B.Add(aCompound, anOriginal.Located(aLocRes));
|
||||
}
|
||||
aShape = aCompound;
|
||||
aShape = aCompound;
|
||||
}
|
||||
else if(aType == TRANSLATE_2D) {
|
||||
else if (aType == TRANSLATE_2D) {
|
||||
Standard_Integer nbtimes1 = TI.GetNbIter1(), nbtimes2 = TI.GetNbIter2();
|
||||
Standard_Real DX, DY, DZ, step1 = TI.GetStep1(), step2 = TI.GetStep2();
|
||||
gp_Vec myVec ;
|
||||
gp_Vec aVec;
|
||||
Handle(GEOM_Function) aVector = TI.GetVector();
|
||||
if(aVector.IsNull()) return 0;
|
||||
TopoDS_Shape aV = aVector->GetValue();
|
||||
@ -169,29 +194,35 @@ Standard_Integer GEOMImpl_TranslateDriver::Execute(TFunction_Logbook& log) const
|
||||
TopoDS_Compound aCompound;
|
||||
BRep_Builder B;
|
||||
B.MakeCompound( aCompound );
|
||||
|
||||
for (int i = 0; i < nbtimes1; i++ ) {
|
||||
for (int j = 0; j < nbtimes2; j++ ) {
|
||||
DX = i * step1 * Vec1.X() + j * step2 * Vec2.X() ;
|
||||
DY = i * step1 * Vec1.Y() + j * step2 * Vec2.Y() ;
|
||||
DZ = i * step1 * Vec1.Z() + j * step2 * Vec2.Z() ;
|
||||
myVec.SetCoord( DX, DY, DZ ) ;
|
||||
aTrsf.SetTranslation(myVec) ;
|
||||
BRepBuilderAPI_Transform myBRepTransformation(anOriginal, aTrsf, Standard_False) ;
|
||||
B.Add(aCompound , myBRepTransformation.Shape() );
|
||||
|
||||
TopLoc_Location aLocOrig = anOriginal.Location();
|
||||
gp_Trsf aTrsfOrig = aLocOrig.Transformation();
|
||||
|
||||
for (int i = 0; i < nbtimes1; i++) {
|
||||
for (int j = 0; j < nbtimes2; j++) {
|
||||
DX = i * step1 * Vec1.X() + j * step2 * Vec2.X();
|
||||
DY = i * step1 * Vec1.Y() + j * step2 * Vec2.Y();
|
||||
DZ = i * step1 * Vec1.Z() + j * step2 * Vec2.Z();
|
||||
aVec.SetCoord( DX, DY, DZ );
|
||||
aTrsf.SetTranslation(aVec);
|
||||
//NPAL18620: performance problem: multiple locations are accumulated
|
||||
// in shape and need a great time to process
|
||||
//BRepBuilderAPI_Transform aBRepTransformation(anOriginal, aTrsf, Standard_False);
|
||||
//B.Add(aCompound, aBRepTransformation.Shape());
|
||||
TopLoc_Location aLocRes (aTrsf * aTrsfOrig);
|
||||
B.Add(aCompound, anOriginal.Located(aLocRes));
|
||||
}
|
||||
}
|
||||
aShape = aCompound;
|
||||
aShape = aCompound;
|
||||
}
|
||||
else return 0;
|
||||
|
||||
|
||||
|
||||
if (aShape.IsNull()) return 0;
|
||||
|
||||
aFunction->SetValue(aShape);
|
||||
|
||||
log.SetTouched(Label());
|
||||
log.SetTouched(Label());
|
||||
|
||||
return 1;
|
||||
}
|
||||
@ -200,17 +231,16 @@ Standard_Integer GEOMImpl_TranslateDriver::Execute(TFunction_Logbook& log) const
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_TranslateDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_TranslateDriver_Type_()
|
||||
{
|
||||
|
||||
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver);
|
||||
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver);
|
||||
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
|
||||
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
|
||||
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
|
||||
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
|
||||
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
|
||||
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_TranslateDriver",
|
||||
@ -225,8 +255,7 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_TranslateDriver_Type_()
|
||||
//=======================================================================
|
||||
//function : DownCast
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
//=======================================================================
|
||||
const Handle(GEOMImpl_TranslateDriver) Handle(GEOMImpl_TranslateDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
|
||||
{
|
||||
Handle(GEOMImpl_TranslateDriver) _anOtherObject;
|
||||
@ -237,7 +266,5 @@ const Handle(GEOMImpl_TranslateDriver) Handle(GEOMImpl_TranslateDriver)::DownCas
|
||||
}
|
||||
}
|
||||
|
||||
return _anOtherObject ;
|
||||
return _anOtherObject;
|
||||
}
|
||||
|
||||
|
||||
|
@ -565,8 +565,8 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::AddInStudy(SALOMEDS::Study_ptr theStudy, GEOM:
|
||||
//============================================================================
|
||||
void GEOM_Gen_i::register_name(char * name)
|
||||
{
|
||||
GEOM::GEOM_Gen_ptr g = GEOM::GEOM_Gen::_narrow(_this());
|
||||
name_service->Register(g, CORBA::string_dup(name));
|
||||
GEOM::GEOM_Gen_var g = _this();
|
||||
name_service->Register(g, name);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
@ -599,6 +599,7 @@ GEOM::GEOM_IBasicOperations_ptr GEOM_Gen_i::GetIBasicOperations(CORBA::Long theS
|
||||
|
||||
GEOM::GEOM_Gen_ptr engine = _this();
|
||||
|
||||
//transfer reference on engine
|
||||
GEOM_IBasicOperations_i* aServant =
|
||||
new GEOM_IBasicOperations_i(_poa, engine, _impl->GetIBasicOperations(theStudyID));
|
||||
|
||||
@ -928,7 +929,8 @@ GEOM_I_EXPORT
|
||||
const char * interfaceName)
|
||||
{
|
||||
GEOM_Gen_i * myGEOM_Gen_i = new GEOM_Gen_i(orb, poa, contId, instanceName, interfaceName);
|
||||
myGEOM_Gen_i->register_name("/myGEOM_Gen"); // NRI : 11/07/2002 : Add for Supervision example
|
||||
// Don't understand the reason of this register ????
|
||||
// myGEOM_Gen_i->register_name("/myGEOM_Gen"); // NRI : 11/07/2002 : Add for Supervision example
|
||||
return myGEOM_Gen_i->getId();
|
||||
}
|
||||
}
|
||||
|
@ -247,8 +247,9 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeSpherePntR
|
||||
if (thePnt == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference point
|
||||
CORBA::String_var entry=thePnt->GetEntry();
|
||||
Handle(GEOM_Object) aPnt = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt->GetStudyID(), thePnt->GetEntry());
|
||||
(thePnt->GetStudyID(), entry);
|
||||
|
||||
if (aPnt.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
@ -566,7 +567,8 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeFilling(GEOM::GEOM_Object_pt
|
||||
CORBA::Long theMaxDeg,
|
||||
CORBA::Double theTol2D,
|
||||
CORBA::Double theTol3D,
|
||||
CORBA::Long theNbIter)
|
||||
CORBA::Long theNbIter,
|
||||
CORBA::Boolean theApprox)
|
||||
{
|
||||
GEOM::GEOM_Object_var aGEOMObject;
|
||||
|
||||
@ -582,7 +584,7 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeFilling(GEOM::GEOM_Object_pt
|
||||
if (aShape.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Create the Solid
|
||||
Handle(GEOM_Object) anObject = GetOperations()->MakeFilling(aShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter);
|
||||
Handle(GEOM_Object) anObject = GetOperations()->MakeFilling(aShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter, theApprox);
|
||||
if (!GetOperations()->IsDone() || anObject.IsNull())
|
||||
return aGEOMObject._retn();
|
||||
|
||||
|
@ -105,7 +105,7 @@ class GEOM_I_EXPORT GEOM_I3DPrimOperations_i :
|
||||
GEOM::GEOM_Object_ptr theAxis,
|
||||
CORBA::Double theAngle);
|
||||
|
||||
GEOM::GEOM_Object_ptr MakeFilling(GEOM::GEOM_Object_ptr theShape, CORBA::Long theMinDeg, CORBA::Long theMaxDeg, CORBA::Double theTol2D, CORBA::Double theTol3D, CORBA::Long theNbIter);
|
||||
GEOM::GEOM_Object_ptr MakeFilling(GEOM::GEOM_Object_ptr theShape, CORBA::Long theMinDeg, CORBA::Long theMaxDeg, CORBA::Double theTol2D, CORBA::Double theTol3D, CORBA::Long theNbIter, CORBA::Boolean theApprox);
|
||||
|
||||
GEOM::GEOM_Object_ptr MakeThruSections(const GEOM::ListOfGO& theSeqSections,
|
||||
CORBA::Boolean theModeSolid,
|
||||
|
@ -72,10 +72,12 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakeBoolean
|
||||
if (theShape1 == NULL || theShape2 == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference shapes
|
||||
CORBA::String_var entry=theShape1->GetEntry();
|
||||
Handle(GEOM_Object) aSh1 = GetOperations()->GetEngine()->GetObject
|
||||
(theShape1->GetStudyID(), theShape1->GetEntry());
|
||||
(theShape1->GetStudyID(), entry);
|
||||
entry=theShape2->GetEntry();
|
||||
Handle(GEOM_Object) aSh2 = GetOperations()->GetEngine()->GetObject
|
||||
(theShape2->GetStudyID(), theShape2->GetEntry());
|
||||
(theShape2->GetStudyID(), entry);
|
||||
|
||||
if (aSh1.IsNull() || aSh2.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
|
@ -114,7 +114,7 @@ void GEOM_IOperations_i::FinishOperation()
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* AboutOperation
|
||||
* AbortOperation
|
||||
*/
|
||||
//=============================================================================
|
||||
void GEOM_IOperations_i::AbortOperation()
|
||||
@ -132,6 +132,6 @@ GEOM::GEOM_Object_ptr GEOM_IOperations_i::GetObject(Handle(GEOM_Object) theObjec
|
||||
if(theObject.IsNull()) return NULL;
|
||||
TCollection_AsciiString anEntry;
|
||||
TDF_Tool::Entry(theObject->GetEntry(), anEntry);
|
||||
GEOM::GEOM_Object_var GO = GEOM::GEOM_Object::_duplicate(_engine->GetObject(theObject->GetDocID(), anEntry.ToCString()));
|
||||
GEOM::GEOM_Object_var GO = _engine->GetObject(theObject->GetDocID(), anEntry.ToCString());
|
||||
return GO._retn();
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ class GEOM_I_EXPORT GEOM_IOperations_i : public virtual POA_GEOM::GEOM_IOperatio
|
||||
private:
|
||||
|
||||
::GEOM_IOperations* _impl;
|
||||
GEOM::GEOM_Gen_ptr _engine;
|
||||
GEOM::GEOM_Gen_var _engine;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -61,7 +61,9 @@ GEOM_Object_i::GEOM_Object_i (PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr
|
||||
//=============================================================================
|
||||
|
||||
GEOM_Object_i::~GEOM_Object_i()
|
||||
{}
|
||||
{
|
||||
GEOM_Engine::GetEngine()->RemoveObject(_impl);
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
|
@ -85,7 +85,7 @@ class GEOM_I_EXPORT GEOM_Object_i : public virtual POA_GEOM::GEOM_Object, public
|
||||
|
||||
private:
|
||||
|
||||
GEOM::GEOM_Gen_ptr _engine;
|
||||
GEOM::GEOM_Gen_var _engine;
|
||||
Handle(GEOM_Object) _impl;
|
||||
TopoDS_Shape _geom;
|
||||
};
|
||||
|
@ -70,6 +70,12 @@ GEOM_Superv_i::GEOM_Superv_i(CORBA::ORB_ptr orb,
|
||||
GEOM_Superv_i::~GEOM_Superv_i()
|
||||
{
|
||||
MESSAGE("GEOM_Superv_i::~GEOM_Superv_i");
|
||||
if (!CORBA::is_nil(myBasicOp))
|
||||
myBasicOp->Destroy();
|
||||
if (!CORBA::is_nil(myBoolOp))
|
||||
myBoolOp->Destroy();
|
||||
if (!CORBA::is_nil(my3DPrimOp))
|
||||
my3DPrimOp->Destroy();
|
||||
delete name_service;
|
||||
}
|
||||
|
||||
@ -79,8 +85,8 @@ GEOM_Superv_i::~GEOM_Superv_i()
|
||||
//============================================================================
|
||||
void GEOM_Superv_i::register_name(char * name)
|
||||
{
|
||||
GEOM::GEOM_Superv_ptr g = GEOM::GEOM_Superv::_narrow(POA_GEOM::GEOM_Superv::_this());
|
||||
name_service->Register(g, strdup(name));
|
||||
GEOM::GEOM_Superv_var g = _this();
|
||||
name_service->Register(g, name);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -88,9 +94,17 @@ void GEOM_Superv_i::register_name(char * name)
|
||||
//=============================================================================
|
||||
void GEOM_Superv_i::setGeomEngine()
|
||||
{
|
||||
if ( !CORBA::is_nil(myGeomEngine) )
|
||||
return;
|
||||
// get GEOM_Gen engine
|
||||
/*
|
||||
SALOME_LifeCycleCORBA* lcc = new SALOME_LifeCycleCORBA( name_service );
|
||||
Engines::Component_var comp = lcc->FindOrLoad_Component( "FactoryServer", "GEOM" );
|
||||
*/
|
||||
|
||||
Engines::Container_var cont=GetContainerRef();
|
||||
cont->load_component_Library("GEOM");
|
||||
Engines::Component_var comp=cont->create_component_instance("GEOM",0);
|
||||
|
||||
myGeomEngine = GEOM::GEOM_Gen::_narrow(comp);
|
||||
}
|
||||
@ -799,7 +813,9 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSphere (CORBA::Double theX,
|
||||
MESSAGE("GEOM_Superv_i::MakeSphepe");
|
||||
getBasicOp();
|
||||
get3DPrimOp();
|
||||
GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeSpherePntR(myBasicOp->MakePointXYZ(theX, theY, theZ), theRadius);
|
||||
GEOM::GEOM_Object_var o = myBasicOp->MakePointXYZ(theX, theY, theZ);
|
||||
GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeSpherePntR(o, theRadius);
|
||||
o->Destroy();
|
||||
endService( " GEOM_Superv_i::MakeSphepe" );
|
||||
return anObj;
|
||||
}
|
||||
@ -1003,12 +1019,12 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeRevolutionAxisAngle2Ways (GEOM::GEOM_Ob
|
||||
GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilling (GEOM::GEOM_Object_ptr theShape,
|
||||
CORBA::Long theMinDeg, CORBA::Long theMaxDeg,
|
||||
CORBA::Double theTol2D, CORBA::Double theTol3D,
|
||||
CORBA::Long theNbIter)
|
||||
CORBA::Long theNbIter, CORBA::Boolean theApprox)
|
||||
{
|
||||
beginService( " GEOM_Superv_i::MakeFilling" );
|
||||
MESSAGE("GEOM_Superv_i::MakeFilling");
|
||||
get3DPrimOp();
|
||||
GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeFilling(theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter);
|
||||
GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeFilling(theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter, theApprox);
|
||||
endService( " GEOM_Superv_i::MakeFilling" );
|
||||
return anObj;
|
||||
}
|
||||
@ -2737,7 +2753,8 @@ extern "C"
|
||||
const char * interfaceName)
|
||||
{
|
||||
GEOM_Superv_i * myGEOM_Superv_i = new GEOM_Superv_i(orb, poa, contId, instanceName, interfaceName);
|
||||
myGEOM_Superv_i->register_name("/myGEOM_Superv");
|
||||
//Don't understand the reason why this component is registered ???
|
||||
// myGEOM_Superv_i->register_name("/myGEOM_Superv");
|
||||
return myGEOM_Superv_i->getId() ;
|
||||
}
|
||||
}
|
||||
|
@ -237,7 +237,7 @@ public:
|
||||
GEOM::GEOM_Object_ptr MakeFilling (GEOM::GEOM_Object_ptr theShape,
|
||||
CORBA::Long theMinDeg, CORBA::Long theMaxDeg,
|
||||
CORBA::Double theTol2D, CORBA::Double theTol3D,
|
||||
CORBA::Long theNbIter);
|
||||
CORBA::Long theNbIter, CORBA::Boolean theApprox);
|
||||
|
||||
GEOM::GEOM_Object_ptr MakeThruSections(const GEOM::ListOfGO& theSeqSections,
|
||||
CORBA::Boolean theModeSolid,
|
||||
@ -566,21 +566,21 @@ public:
|
||||
|
||||
private:
|
||||
SALOME_NamingService * name_service;
|
||||
GEOM::GEOM_Gen_ptr myGeomEngine;
|
||||
GEOM::GEOM_Gen_var myGeomEngine;
|
||||
CORBA::Long myStudyID;
|
||||
CORBA::Long myLastStudyID; // mkr : PAL10770
|
||||
PortableServer::POA_var myPOA;
|
||||
|
||||
GEOM::GEOM_IBasicOperations_ptr myBasicOp;
|
||||
GEOM::GEOM_I3DPrimOperations_ptr my3DPrimOp;
|
||||
GEOM::GEOM_IBooleanOperations_ptr myBoolOp;
|
||||
GEOM::GEOM_IInsertOperations_ptr myInsOp;
|
||||
GEOM::GEOM_ITransformOperations_ptr myTransfOp;
|
||||
GEOM::GEOM_IShapesOperations_ptr myShapesOp;
|
||||
GEOM::GEOM_IBlocksOperations_ptr myBlocksOp;
|
||||
GEOM::GEOM_ICurvesOperations_ptr myCurvesOp;
|
||||
GEOM::GEOM_ILocalOperations_ptr myLocalOp;
|
||||
GEOM::GEOM_IGroupOperations_ptr myGroupOp;
|
||||
GEOM::GEOM_IBasicOperations_var myBasicOp;
|
||||
GEOM::GEOM_I3DPrimOperations_var my3DPrimOp;
|
||||
GEOM::GEOM_IBooleanOperations_var myBoolOp;
|
||||
GEOM::GEOM_IInsertOperations_var myInsOp;
|
||||
GEOM::GEOM_ITransformOperations_var myTransfOp;
|
||||
GEOM::GEOM_IShapesOperations_var myShapesOp;
|
||||
GEOM::GEOM_IBlocksOperations_var myBlocksOp;
|
||||
GEOM::GEOM_ICurvesOperations_var myCurvesOp;
|
||||
GEOM::GEOM_ILocalOperations_var myLocalOp;
|
||||
GEOM::GEOM_IGroupOperations_var myGroupOp;
|
||||
|
||||
};
|
||||
|
||||
|
@ -700,8 +700,8 @@ def MakeCopy(aShape):
|
||||
print "MakeCopy : ", InsertOp.GetErrorCode()
|
||||
return anObj
|
||||
|
||||
def MakeFilling(aShape,mindeg,maxdeg,tol2d,tol3d,nbiter):
|
||||
anObj = PrimOp.MakeFilling(aShape,mindeg,maxdeg,tol2d,tol3d,nbiter)
|
||||
def MakeFilling(aShape,mindeg,maxdeg,tol2d,tol3d,nbiter,isApprox=0):
|
||||
anObj = PrimOp.MakeFilling(aShape,mindeg,maxdeg,tol2d,tol3d,nbiter,isApprox)
|
||||
if PrimOp.IsDone() == 0:
|
||||
print "MakeFilling : ", PrimOp.GetErrorCode()
|
||||
return anObj
|
||||
|
@ -1379,8 +1379,8 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
||||
# @return New GEOM_Object, containing the created filling surface.
|
||||
#
|
||||
# Example: see GEOM_TestAll.py
|
||||
def MakeFilling(self,theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter):
|
||||
anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
|
||||
def MakeFilling(self,theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter, isApprox=0):
|
||||
anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter, isApprox)
|
||||
RaiseIfFailed("MakeFilling", self.PrimOp)
|
||||
return anObj
|
||||
|
||||
|
@ -61,7 +61,7 @@ GenerationGUI_FillingDlg::GenerationGUI_FillingDlg( GeometryGUI* theGeometryGUI,
|
||||
mainFrame()->RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
|
||||
mainFrame()->RadioButton3->close();
|
||||
|
||||
GroupPoints = new DlgRef_1Sel5Spin( centralWidget() );
|
||||
GroupPoints = new DlgRef_1Sel5Spin1Check( centralWidget() );
|
||||
GroupPoints->GroupBox1->setTitle( tr( "GEOM_ARGUMENTS" ) );
|
||||
GroupPoints->TextLabel1->setText( tr( "GEOM_FILLING_COMPOUND" ) );
|
||||
GroupPoints->TextLabel2->setText( tr( "GEOM_FILLING_MIN_DEG" ) );
|
||||
@ -69,6 +69,7 @@ GenerationGUI_FillingDlg::GenerationGUI_FillingDlg( GeometryGUI* theGeometryGUI,
|
||||
GroupPoints->TextLabel4->setText( tr( "GEOM_FILLING_NB_ITER" ) );
|
||||
GroupPoints->TextLabel5->setText( tr( "GEOM_FILLING_MAX_DEG" ) );
|
||||
GroupPoints->TextLabel6->setText( tr( "GEOM_FILLING_TOL_3D" ) );
|
||||
GroupPoints->CheckBox1->setText( tr( "GEOM_FILLING_APPROX" ) );
|
||||
GroupPoints->PushButton1->setIcon( image1 );
|
||||
GroupPoints->LineEdit1->setReadOnly( true );
|
||||
|
||||
@ -77,7 +78,7 @@ GenerationGUI_FillingDlg::GenerationGUI_FillingDlg( GeometryGUI* theGeometryGUI,
|
||||
layout->addWidget( GroupPoints );
|
||||
/***************************************************************/
|
||||
|
||||
setHelpFileName( "creaet_filling_page.html" );
|
||||
setHelpFileName( "create_filling_page.html" );
|
||||
|
||||
/* Initialisations */
|
||||
Init();
|
||||
@ -107,6 +108,7 @@ void GenerationGUI_FillingDlg::Init()
|
||||
myTol3D = 0.0001;
|
||||
myTol2D = 0.0001;
|
||||
myNbIter = 5;
|
||||
myIsApprox = false;
|
||||
myOkCompound = false;
|
||||
|
||||
globalSelection( GEOM_COMPOUND );
|
||||
@ -139,6 +141,8 @@ void GenerationGUI_FillingDlg::Init()
|
||||
connect( GroupPoints->SpinBox4, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
||||
connect( GroupPoints->SpinBox5, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
||||
|
||||
connect( GroupPoints->CheckBox1, SIGNAL( stateChanged( int ) ), this, SLOT( ApproxChanged() ) );
|
||||
|
||||
// VSR: TODO ->>
|
||||
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox1, SLOT( SetStep( double ) ) );
|
||||
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox2, SLOT( SetStep( double ) ) );
|
||||
@ -300,6 +304,16 @@ void GenerationGUI_FillingDlg::ValueChangedInSpinBox( double newValue )
|
||||
displayPreview();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : ApproxChanged()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void GenerationGUI_FillingDlg::ApproxChanged()
|
||||
{
|
||||
myIsApprox = GroupPoints->CheckBox1->isChecked();
|
||||
displayPreview();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : createOperation
|
||||
// purpose :
|
||||
@ -327,7 +341,7 @@ bool GenerationGUI_FillingDlg::execute( ObjectList& objects )
|
||||
GEOM::GEOM_Object_var anObj;
|
||||
|
||||
anObj = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation() )->MakeFilling(
|
||||
myCompound, myMinDeg, myMaxDeg, myTol2D, myTol3D, myNbIter );
|
||||
myCompound, myMinDeg, myMaxDeg, myTol2D, myTol3D, myNbIter, myIsApprox );
|
||||
|
||||
if ( !anObj->_is_nil() )
|
||||
objects.push_back( anObj._retn() );
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
#include <GEOMBase_Skeleton.h>
|
||||
|
||||
class DlgRef_1Sel5Spin;
|
||||
class DlgRef_1Sel5Spin1Check;
|
||||
|
||||
//=================================================================================
|
||||
// class : GenerationGUI_FillingDlg
|
||||
@ -59,9 +59,10 @@ private:
|
||||
Standard_Real myTol3D;
|
||||
Standard_Real myTol2D;
|
||||
Standard_Integer myNbIter;
|
||||
bool myIsApprox;
|
||||
bool myOkCompound; /* to check when curv. compound is defined */
|
||||
|
||||
DlgRef_1Sel5Spin* GroupPoints;
|
||||
DlgRef_1Sel5Spin1Check* GroupPoints;
|
||||
|
||||
private slots:
|
||||
void ClickOnOk();
|
||||
@ -71,6 +72,7 @@ private slots:
|
||||
void SelectionIntoArgument();
|
||||
void SetEditCurrentArgument();
|
||||
void ValueChangedInSpinBox( double );
|
||||
void ApproxChanged();
|
||||
};
|
||||
|
||||
#endif // GENERATIONGUI_FILLINGDLG_H
|
||||
|
@ -279,8 +279,10 @@ bool RepairGUI_GlueDlg::ClickOnApply()
|
||||
//=================================================================================
|
||||
void RepairGUI_GlueDlg::SelectionIntoArgument()
|
||||
{
|
||||
if ( mySubShapesChk->isChecked() && getConstructorId() == 1 )
|
||||
if ( mySubShapesChk->isChecked() && getConstructorId() == 1 ) {
|
||||
updateButtonState();
|
||||
return;
|
||||
}
|
||||
|
||||
erasePreview();
|
||||
myEditCurrentArgument->setText( "" );
|
||||
@ -603,6 +605,8 @@ void RepairGUI_GlueDlg::onDetect()
|
||||
msg = tr( "THERE_ARE_NO_FACES_FOR_GLUING" );
|
||||
}
|
||||
|
||||
connect( ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
|
||||
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()) ) ;
|
||||
SUIT_MessageBox::information( this, tr( "GEOM_FREE_BOUNDS_TLT" ), msg, tr( "Close" ) );
|
||||
updateButtonState();
|
||||
activateSelection();
|
||||
@ -635,10 +639,13 @@ void RepairGUI_GlueDlg::activateSelection()
|
||||
globalSelection( GEOM_ALLSHAPES );
|
||||
else {
|
||||
displayPreview( true, false, false, 2/*line width*/, 1/*display mode*/, Quantity_NOC_RED );
|
||||
disconnect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ) ;
|
||||
globalSelection( GEOM_PREVIEW );
|
||||
}
|
||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ) ;
|
||||
}
|
||||
}
|
||||
|
||||
updateViewer();
|
||||
}
|
||||
|
||||
@ -656,9 +663,13 @@ void RepairGUI_GlueDlg::updateButtonState()
|
||||
}
|
||||
else
|
||||
{
|
||||
bool wasSelected = false;
|
||||
SALOME_ListIteratorOfListIO it ( selectedIO() );
|
||||
if (it.More() > 0)
|
||||
wasSelected = true;
|
||||
bool wasDetected = myTmpObjs.size() ? true : false;
|
||||
buttonOk()->setEnabled( hasMainObj && wasDetected );
|
||||
buttonApply()->setEnabled( hasMainObj && wasDetected );
|
||||
buttonOk()->setEnabled( hasMainObj && wasDetected && wasSelected );
|
||||
buttonApply()->setEnabled( hasMainObj && wasDetected && wasSelected );
|
||||
mySubShapesChk->setEnabled( hasMainObj && wasDetected );
|
||||
myDetectBtn->setEnabled( hasMainObj );
|
||||
if ( !hasMainObj || !wasDetected )
|
||||
|