mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-26 01:10:36 +05:00
Fix compilation error and some warnings
This commit is contained in:
parent
939f3cca95
commit
693e5f65fe
@ -284,8 +284,6 @@ bool AdvancedEngine_IOperations::MakeGroups(Handle(GEOM_Object) theShape, int sh
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
gp_Trsf aTrsfInv = aTrsf.Inverted();
|
|
||||||
|
|
||||||
// int expectedGroups = 0;
|
// int expectedGroups = 0;
|
||||||
// if (shapeType == TSHAPE_BASIC)
|
// if (shapeType == TSHAPE_BASIC)
|
||||||
// if (Abs(theR2+theW2-theR1-theW1) <= Precision::Approximation())
|
// if (Abs(theR2+theW2-theR1-theW1) <= Precision::Approximation())
|
||||||
@ -620,6 +618,7 @@ bool AdvancedEngine_IOperations::MakeGroups(Handle(GEOM_Object) theShape, int sh
|
|||||||
if (aGroup.IsNull())
|
if (aGroup.IsNull())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
gp_Trsf aTrsfInv = aTrsf.Inverted();
|
||||||
TopoDS_Shape aGroupShape = aGroup->GetValue();
|
TopoDS_Shape aGroupShape = aGroup->GetValue();
|
||||||
BRepBuilderAPI_Transform aTransformationShapeInv (aGroupShape, aTrsfInv, Standard_False);
|
BRepBuilderAPI_Transform aTransformationShapeInv (aGroupShape, aTrsfInv, Standard_False);
|
||||||
TopoDS_Shape aGroupShapeTrsfInv = aTransformationShapeInv.Shape();
|
TopoDS_Shape aGroupShapeTrsfInv = aTransformationShapeInv.Shape();
|
||||||
|
@ -312,7 +312,7 @@ TopoDS_Shape AdvancedEngine_PipeTShapeDriver::MakePipeTShape (const double r1, c
|
|||||||
|
|
||||||
gp_Pnt aP0 (0, 0, 0);
|
gp_Pnt aP0 (0, 0, 0);
|
||||||
gp_Pnt aP1 (-l1, 0, 0);
|
gp_Pnt aP1 (-l1, 0, 0);
|
||||||
gp_Vec aVX = gp::DX(), aVY = gp::DY(), aVZ = gp::DZ();
|
gp_Vec aVX = gp::DX(), aVZ = gp::DZ();
|
||||||
gp_Ax2 anAxes1 (aP1, aVX, aVZ);
|
gp_Ax2 anAxes1 (aP1, aVX, aVZ);
|
||||||
gp_Ax2 anAxes2 (aP0, aVZ, aVX);
|
gp_Ax2 anAxes2 (aP0, aVZ, aVX);
|
||||||
|
|
||||||
|
@ -254,10 +254,6 @@ GetCreationInformation(std::string& theOperationName,
|
|||||||
for ( int i = 1, nb = aCI.GetLength(); i <= nb; ++i )
|
for ( int i = 1, nb = aCI.GetLength(); i <= nb; ++i )
|
||||||
theParams[0] << aCI.GetPntOrComp( i ) << " ";
|
theParams[0] << aCI.GetPntOrComp( i ) << " ";
|
||||||
|
|
||||||
const Standard_Integer aNbMax = aCI.GetNbMax();
|
|
||||||
const Standard_Integer aDegMax = aCI.GetDegMax();
|
|
||||||
const Standard_Real aDMax = aCI.GetDMax();
|
|
||||||
|
|
||||||
AddParam(theParams, "Max nbr of Bezier pieces", aCI.GetNbMax());
|
AddParam(theParams, "Max nbr of Bezier pieces", aCI.GetNbMax());
|
||||||
AddParam(theParams, "Max BSpline surface degree", aCI.GetDegMax());
|
AddParam(theParams, "Max BSpline surface degree", aCI.GetDegMax());
|
||||||
AddParam(theParams, "3D tolerance of initial approximation", aCI.GetDMax());
|
AddParam(theParams, "3D tolerance of initial approximation", aCI.GetDMax());
|
||||||
|
@ -546,15 +546,15 @@ void GEOMAlgo_Extractor::processFOrSo(const TopoDS_Shape &theFOrSo)
|
|||||||
TopTools_ListOfShape aClosedSubShapes;
|
TopTools_ListOfShape aClosedSubShapes;
|
||||||
TopTools_ListOfShape aNewShapes;
|
TopTools_ListOfShape aNewShapes;
|
||||||
TopoDS_Shape anOuterSubShape;
|
TopoDS_Shape anOuterSubShape;
|
||||||
TopAbs_ShapeEnum aShapeType;
|
//TopAbs_ShapeEnum aShapeType;
|
||||||
TopAbs_ShapeEnum aSubShapeType;
|
TopAbs_ShapeEnum aSubShapeType;
|
||||||
|
|
||||||
if (theFOrSo.ShapeType() == TopAbs_FACE) {
|
if (theFOrSo.ShapeType() == TopAbs_FACE) {
|
||||||
aShapeType = TopAbs_FACE;
|
//aShapeType = TopAbs_FACE;
|
||||||
aSubShapeType = TopAbs_WIRE;
|
aSubShapeType = TopAbs_WIRE;
|
||||||
anOuterSubShape = BRepTools::OuterWire(TopoDS::Face(theFOrSo));
|
anOuterSubShape = BRepTools::OuterWire(TopoDS::Face(theFOrSo));
|
||||||
} else {
|
} else {
|
||||||
aShapeType = TopAbs_SOLID;
|
//aShapeType = TopAbs_SOLID;
|
||||||
aSubShapeType = TopAbs_SHELL;
|
aSubShapeType = TopAbs_SHELL;
|
||||||
anOuterSubShape = BRepClass3d::OuterShell(TopoDS::Solid(theFOrSo));
|
anOuterSubShape = BRepClass3d::OuterShell(TopoDS::Solid(theFOrSo));
|
||||||
}
|
}
|
||||||
@ -675,14 +675,14 @@ void GEOMAlgo_Extractor::processShOrCS(const TopoDS_Shape &theShOrCS)
|
|||||||
TopTools_ListOfShape aNewSubShapes;
|
TopTools_ListOfShape aNewSubShapes;
|
||||||
TopTools_ListOfShape aNewOtherShapes;
|
TopTools_ListOfShape aNewOtherShapes;
|
||||||
TopAbs_ShapeEnum aSubShapeType;
|
TopAbs_ShapeEnum aSubShapeType;
|
||||||
TopAbs_ShapeEnum aSubSubShapeType;
|
//TopAbs_ShapeEnum aSubSubShapeType;
|
||||||
|
|
||||||
if (theShOrCS.ShapeType() == TopAbs_SHELL) {
|
if (theShOrCS.ShapeType() == TopAbs_SHELL) {
|
||||||
aSubShapeType = TopAbs_FACE;
|
aSubShapeType = TopAbs_FACE;
|
||||||
aSubSubShapeType = TopAbs_EDGE;
|
//aSubSubShapeType = TopAbs_EDGE;
|
||||||
} else { // comp-solid
|
} else { // comp-solid
|
||||||
aSubShapeType = TopAbs_SOLID;
|
aSubShapeType = TopAbs_SOLID;
|
||||||
aSubSubShapeType = TopAbs_FACE;
|
//aSubSubShapeType = TopAbs_FACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (; anIter.More(); anIter.Next()) {
|
for (; anIter.More(); anIter.Next()) {
|
||||||
@ -1098,7 +1098,7 @@ void GEOMAlgo_Extractor::makeHistory(const TopoDS_Shape &theShape,
|
|||||||
getModified(theShape, aListModif, theShape.ShapeType());
|
getModified(theShape, aListModif, theShape.ShapeType());
|
||||||
|
|
||||||
Standard_Boolean isModif = !aListModif.IsEmpty();
|
Standard_Boolean isModif = !aListModif.IsEmpty();
|
||||||
const TopAbs_ShapeEnum aType = theShape.ShapeType();
|
//const TopAbs_ShapeEnum aType = theShape.ShapeType();
|
||||||
|
|
||||||
if (isModif) {
|
if (isModif) {
|
||||||
// Add the new shapes.
|
// Add the new shapes.
|
||||||
|
@ -594,7 +594,7 @@ void GEOMAlgo_FinderShapeOn2::ProcessSolids()
|
|||||||
void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Face& aF,
|
void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Face& aF,
|
||||||
GEOMAlgo_ListOfPnt& aLP)
|
GEOMAlgo_ListOfPnt& aLP)
|
||||||
{
|
{
|
||||||
Standard_Integer j, j1, j2, k, n[4], aNbLinks, aNx, aNb, iCnt;//, aNbMax, *pIds;
|
Standard_Integer j, j1, j2, k, n[4], aNx, aNb, iCnt;//, aNbLinks, aNbMax, *pIds;
|
||||||
TopLoc_Location aLoc;
|
TopLoc_Location aLoc;
|
||||||
Handle(Poly_Triangulation) aTRF;
|
Handle(Poly_Triangulation) aTRF;
|
||||||
TColStd_MapOfInteger aMBN;
|
TColStd_MapOfInteger aMBN;
|
||||||
@ -641,7 +641,6 @@ void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Face& aF,
|
|||||||
}
|
}
|
||||||
//
|
//
|
||||||
// boundary nodes aMBN
|
// boundary nodes aMBN
|
||||||
aNbLinks=aMPKI.Extent();
|
|
||||||
aIt.Initialize(aMPKI);
|
aIt.Initialize(aMPKI);
|
||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
iCnt=aIt.Value();
|
iCnt=aIt.Value();
|
||||||
|
@ -321,7 +321,7 @@ Standard_Boolean GEOMAlgo_GetInPlaceAPI::GetInPlaceByHistory
|
|||||||
}
|
}
|
||||||
|
|
||||||
// try to find in history
|
// try to find in history
|
||||||
TDF_Label aHistoryLabel = theWhereFunction->GetHistoryEntry(Standard_False);
|
//TDF_Label aHistoryLabel = theWhereFunction->GetHistoryEntry(Standard_False);
|
||||||
|
|
||||||
// search in history for all argument shapes
|
// search in history for all argument shapes
|
||||||
Standard_Boolean isFound = Standard_False;
|
Standard_Boolean isFound = Standard_False;
|
||||||
|
@ -92,7 +92,7 @@ Standard_Boolean GEOMAlgo_GetInPlace::CheckCoincidence(const TopoDS_Shape& aS1,
|
|||||||
{
|
{
|
||||||
Standard_Boolean bOk;
|
Standard_Boolean bOk;
|
||||||
Standard_Integer iErr;
|
Standard_Integer iErr;
|
||||||
Standard_Real aTol2;
|
//Standard_Real aTol2;
|
||||||
TopAbs_ShapeEnum aType1, aType2;
|
TopAbs_ShapeEnum aType1, aType2;
|
||||||
TopAbs_State aState;
|
TopAbs_State aState;
|
||||||
gp_Pnt aP1, aP2;
|
gp_Pnt aP1, aP2;
|
||||||
@ -101,7 +101,7 @@ Standard_Boolean GEOMAlgo_GetInPlace::CheckCoincidence(const TopoDS_Shape& aS1,
|
|||||||
//
|
//
|
||||||
iErr=0;
|
iErr=0;
|
||||||
bOk=Standard_False;
|
bOk=Standard_False;
|
||||||
aTol2=myTolerance*myTolerance;
|
//aTol2=myTolerance*myTolerance;
|
||||||
aType1=aS1.ShapeType();
|
aType1=aS1.ShapeType();
|
||||||
aType2=aS2.ShapeType();
|
aType2=aS2.ShapeType();
|
||||||
//
|
//
|
||||||
|
@ -908,9 +908,9 @@ void GEOMAlgo_Gluer::MakeEdge(const TopoDS_Edge& aE,
|
|||||||
Standard_Real aTol;
|
Standard_Real aTol;
|
||||||
BRep_Builder aBB;
|
BRep_Builder aBB;
|
||||||
TopoDS_Edge E;
|
TopoDS_Edge E;
|
||||||
TopAbs_Orientation anOrE;
|
//TopAbs_Orientation anOrE;
|
||||||
//
|
//
|
||||||
anOrE=aE.Orientation();
|
//anOrE=aE.Orientation();
|
||||||
aTol=BRep_Tool::Tolerance(aE);
|
aTol=BRep_Tool::Tolerance(aE);
|
||||||
//
|
//
|
||||||
E=aEx;
|
E=aEx;
|
||||||
|
@ -65,7 +65,7 @@ static
|
|||||||
void GEOMAlgo_Gluer2::Detect()
|
void GEOMAlgo_Gluer2::Detect()
|
||||||
{
|
{
|
||||||
Standard_Boolean bCheckGeometry;
|
Standard_Boolean bCheckGeometry;
|
||||||
Standard_Integer iErr, aNbSD;
|
Standard_Integer iErr;
|
||||||
TopTools_ListIteratorOfListOfShape aItLS;
|
TopTools_ListIteratorOfListOfShape aItLS;
|
||||||
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMSLS;
|
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMSLS;
|
||||||
//GEOMAlgo_GlueDetector aDetector;
|
//GEOMAlgo_GlueDetector aDetector;
|
||||||
@ -106,7 +106,6 @@ void GEOMAlgo_Gluer2::Detect()
|
|||||||
for (; aItDMSLS.More(); aItDMSLS.Next()) {
|
for (; aItDMSLS.More(); aItDMSLS.Next()) {
|
||||||
const TopoDS_Shape& aSkey=aItDMSLS.Key();
|
const TopoDS_Shape& aSkey=aItDMSLS.Key();
|
||||||
const TopTools_ListOfShape& aLSD=aItDMSLS.Value();
|
const TopTools_ListOfShape& aLSD=aItDMSLS.Value();
|
||||||
aNbSD=aLSD.Extent();
|
|
||||||
myImagesDetected.Bind(aSkey, aLSD);
|
myImagesDetected.Bind(aSkey, aLSD);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
@ -559,7 +559,7 @@ void GEOMAlgo_ShapeInfoFiller::FillDetails(const TopoDS_Face& aF,
|
|||||||
const gp_Cylinder& aCyl)
|
const gp_Cylinder& aCyl)
|
||||||
|
|
||||||
{
|
{
|
||||||
Standard_Integer i, aNbV, aNbE, aNbCE, aNbSE;
|
Standard_Integer aNbV, aNbE, aNbCE, aNbSE;
|
||||||
Standard_Real aT0, aT1, aHeight;
|
Standard_Real aT0, aT1, aHeight;
|
||||||
gp_Pnt aPC[3], aPc;
|
gp_Pnt aPC[3], aPc;
|
||||||
TopoDS_Edge aE;
|
TopoDS_Edge aE;
|
||||||
@ -578,7 +578,6 @@ void GEOMAlgo_ShapeInfoFiller::FillDetails(const TopoDS_Face& aF,
|
|||||||
const gp_Dir& aDir=aAx1.Direction();
|
const gp_Dir& aDir=aAx1.Direction();
|
||||||
const gp_Pnt& aPLoc=aAx1.Location();
|
const gp_Pnt& aPLoc=aAx1.Location();
|
||||||
//
|
//
|
||||||
i=0;
|
|
||||||
aNbCE=0;
|
aNbCE=0;
|
||||||
aNbSE=0;
|
aNbSE=0;
|
||||||
aExp.Init(aF, TopAbs_EDGE);
|
aExp.Init(aF, TopAbs_EDGE);
|
||||||
@ -795,7 +794,7 @@ Standard_Boolean GEOMAlgo_ShapeInfoFiller::TreatStepSphere
|
|||||||
{
|
{
|
||||||
Standard_Boolean bRet, bIsAllowedType, bOnlyClosed, bIsEqual;
|
Standard_Boolean bRet, bIsAllowedType, bOnlyClosed, bIsEqual;
|
||||||
Standard_Integer j;
|
Standard_Integer j;
|
||||||
Standard_Real aTolAng, aTol;
|
Standard_Real aTol;
|
||||||
Standard_Real aVolume, aVolumeS, dV, aArea, aAreaS, dA;
|
Standard_Real aVolume, aVolumeS, dV, aArea, aAreaS, dA;
|
||||||
gp_Sphere aSphere[2];
|
gp_Sphere aSphere[2];
|
||||||
GeomAbs_SurfaceType aST;
|
GeomAbs_SurfaceType aST;
|
||||||
@ -805,7 +804,6 @@ Standard_Boolean GEOMAlgo_ShapeInfoFiller::TreatStepSphere
|
|||||||
//
|
//
|
||||||
bRet=Standard_False;
|
bRet=Standard_False;
|
||||||
aTol=Precision::Confusion();
|
aTol=Precision::Confusion();
|
||||||
aTolAng=Precision::Angular();
|
|
||||||
//
|
//
|
||||||
aExp.Init(aSd, TopAbs_FACE);
|
aExp.Init(aSd, TopAbs_FACE);
|
||||||
for (j=0; aExp.More(); aExp.Next(), ++j) {
|
for (j=0; aExp.More(); aExp.Next(), ++j) {
|
||||||
|
@ -163,7 +163,7 @@ Standard_Boolean GEOMAlgo_SurfaceTools::IsCoaxial
|
|||||||
|
|
||||||
if (fabs(aRadius1 - aRadius2) <= aTol) {
|
if (fabs(aRadius1 - aRadius2) <= aTol) {
|
||||||
// Check the deflection of the middle point.
|
// Check the deflection of the middle point.
|
||||||
gp_XYZ aMidP = 0.5*(aDP1 + aDP2);
|
//gp_XYZ aMidP = 0.5*(aDP1 + aDP2);
|
||||||
//Standard_Real aMidRadius1 = aMidP.Modulus();
|
//Standard_Real aMidRadius1 = aMidP.Modulus();
|
||||||
|
|
||||||
if (fabs(aRadius1 - aRadius2) <= aTol) {
|
if (fabs(aRadius1 - aRadius2) <= aTol) {
|
||||||
|
@ -119,7 +119,7 @@ void GEOMAlgo_VertexSolid::Perform()
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_VertexSolid::BuildResult()
|
void GEOMAlgo_VertexSolid::BuildResult()
|
||||||
{
|
{
|
||||||
Standard_Integer i, iBeg, iEnd, aNbVV, aNbVE, aNbVF, j, iFound, aNbRanges;
|
Standard_Integer i, iBeg, iEnd, aNbVV, aNbVE, aNbVF, j, iFound;//, aNbRanges;
|
||||||
Standard_Real aTol;
|
Standard_Real aTol;
|
||||||
TopAbs_State aSt;
|
TopAbs_State aSt;
|
||||||
TopAbs_ShapeEnum aType;
|
TopAbs_ShapeEnum aType;
|
||||||
@ -145,7 +145,7 @@ void GEOMAlgo_VertexSolid::BuildResult()
|
|||||||
Handle(IntTools_Context) aCtx=myDSFiller->Context();
|
Handle(IntTools_Context) aCtx=myDSFiller->Context();
|
||||||
BRepClass3d_SolidClassifier& aSC=aCtx->SolidClassifier(aSolid);
|
BRepClass3d_SolidClassifier& aSC=aCtx->SolidClassifier(aSolid);
|
||||||
//
|
//
|
||||||
aNbRanges=aDS.NbRanges();
|
//aNbRanges=aDS.NbRanges();
|
||||||
const BOPDS_IndexRange& aRange=aDS.Range(myRank);
|
const BOPDS_IndexRange& aRange=aDS.Range(myRank);
|
||||||
aRange.Indices(iBeg, iEnd);
|
aRange.Indices(iBeg, iEnd);
|
||||||
//
|
//
|
||||||
@ -165,9 +165,9 @@ void GEOMAlgo_VertexSolid::BuildResult()
|
|||||||
for (j=0; j<aNbVV; ++j) {
|
for (j=0; j<aNbVV; ++j) {
|
||||||
BOPDS_InterfVV& aVV=aVVs(j);
|
BOPDS_InterfVV& aVV=aVVs(j);
|
||||||
if (aVV.Contains(i)) {
|
if (aVV.Contains(i)) {
|
||||||
myLSON.Append(aV);
|
myLSON.Append(aV);
|
||||||
iFound=1;
|
iFound=1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (iFound) {
|
if (iFound) {
|
||||||
@ -178,9 +178,9 @@ void GEOMAlgo_VertexSolid::BuildResult()
|
|||||||
for (j=0; j<aNbVE; ++j) {
|
for (j=0; j<aNbVE; ++j) {
|
||||||
BOPDS_InterfVE& aVE=aVEs(j);
|
BOPDS_InterfVE& aVE=aVEs(j);
|
||||||
if (aVE.Contains(i)) {
|
if (aVE.Contains(i)) {
|
||||||
myLSON.Append(aV);
|
myLSON.Append(aV);
|
||||||
iFound=1;
|
iFound=1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (iFound) {
|
if (iFound) {
|
||||||
@ -191,9 +191,9 @@ void GEOMAlgo_VertexSolid::BuildResult()
|
|||||||
for (j=0; j<aNbVF; ++j) {
|
for (j=0; j<aNbVF; ++j) {
|
||||||
BOPDS_InterfVF& aVF=aVFs(j);
|
BOPDS_InterfVF& aVF=aVFs(j);
|
||||||
if (aVF.Contains(i)) {
|
if (aVF.Contains(i)) {
|
||||||
myLSON.Append(aV);
|
myLSON.Append(aV);
|
||||||
iFound=1;
|
iFound=1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (iFound) {
|
if (iFound) {
|
||||||
|
@ -727,7 +727,7 @@ GEOMGUI_DimensionProperty::operator QString() const
|
|||||||
|
|
||||||
aStringValues.remove("\\");
|
aStringValues.remove("\\");
|
||||||
|
|
||||||
int it = 0;
|
size_t it = 0;
|
||||||
for ( ; it < aPacked.size(); ++it )
|
for ( ; it < aPacked.size(); ++it )
|
||||||
{
|
{
|
||||||
int aNextPos = aStringValues.indexOf("(.*)");
|
int aNextPos = aStringValues.indexOf("(.*)");
|
||||||
|
@ -2815,7 +2815,7 @@ void GeometryGUI::preferencesChanged( const QString& section, const QString& par
|
|||||||
param == QString("scalar_bar_height") ||
|
param == QString("scalar_bar_height") ||
|
||||||
param == QString("scalar_bar_text_height") ||
|
param == QString("scalar_bar_text_height") ||
|
||||||
param == QString("scalar_bar_nb_intervals")) {
|
param == QString("scalar_bar_nb_intervals")) {
|
||||||
if( SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( getApp()->activeStudy() ) )
|
if( /*SalomeApp_Study* aStudy = */dynamic_cast<SalomeApp_Study*>( getApp()->activeStudy() ) )
|
||||||
{
|
{
|
||||||
updateFieldColorScale();
|
updateFieldColorScale();
|
||||||
}
|
}
|
||||||
|
@ -317,7 +317,7 @@ Standard_Integer GEOMImpl_FillingDriver::Execute(Handle(TFunction_Logbook)& log)
|
|||||||
|
|
||||||
Handle(TColStd_HSequenceOfTransient) aConstraints = IF.GetShapes();
|
Handle(TColStd_HSequenceOfTransient) aConstraints = IF.GetShapes();
|
||||||
|
|
||||||
for ( unsigned int ind = 1; ind <= aConstraints->Length(); ind++ ) {
|
for ( int ind = 1; ind <= aConstraints->Length(); ind++ ) {
|
||||||
TopoDS_Edge E;
|
TopoDS_Edge E;
|
||||||
TopoDS_Face F;
|
TopoDS_Face F;
|
||||||
Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast( aConstraints->Value(ind) );
|
Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast( aConstraints->Value(ind) );
|
||||||
@ -396,7 +396,7 @@ GetCreationInformation(std::string& theOperationName,
|
|||||||
}
|
}
|
||||||
case FILLING_ON_CONSTRAINTS:
|
case FILLING_ON_CONSTRAINTS:
|
||||||
{
|
{
|
||||||
theOperationName = "FACE";
|
theOperationName = "FACE";
|
||||||
AddParam( theParams, "Edges/Faces", aCI.GetShapes() );
|
AddParam( theParams, "Edges/Faces", aCI.GetShapes() );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -281,8 +281,8 @@ int GEOMImpl_IInsertOperations::LoadTexture(const TCollection_AsciiString& theTe
|
|||||||
std::list<std::string>::const_iterator it;
|
std::list<std::string>::const_iterator it;
|
||||||
for (it = lines.begin(); it != lines.end(); ++it) {
|
for (it = lines.begin(); it != lines.end(); ++it) {
|
||||||
std::string line = *it;
|
std::string line = *it;
|
||||||
int lenline = (line.size()/8 + (line.size()%8 ? 1 : 0)) * 8;
|
size_t lenline = (line.size()/8 + (line.size()%8 ? 1 : 0)) * 8;
|
||||||
for (int i = 0; i < lenline/8; i++) {
|
for (size_t i = 0; i < lenline/8; i++) {
|
||||||
unsigned char byte = 0;
|
unsigned char byte = 0;
|
||||||
for (int j = 0; j < 8; j++)
|
for (int j = 0; j < 8; j++)
|
||||||
byte = (byte << 1) + ( i*8+j < line.size() && line[i*8+j] != '0' ? 1 : 0 );
|
byte = (byte << 1) + ( i*8+j < line.size() && line[i*8+j] != '0' ? 1 : 0 );
|
||||||
|
@ -736,6 +736,7 @@ GEOMImpl_IMeasureOperations::ShapeKind GEOMImpl_IMeasureOperations::KindOfShape
|
|||||||
theDoubles->Append(aP.Z());
|
theDoubles->Append(aP.Z());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetErrorCode(OK);
|
SetErrorCode(OK);
|
||||||
@ -1600,7 +1601,7 @@ bool GEOMImpl_IMeasureOperations::CheckSelfIntersections
|
|||||||
//=============================================================================
|
//=============================================================================
|
||||||
bool GEOMImpl_IMeasureOperations::CheckSelfIntersectionsFast
|
bool GEOMImpl_IMeasureOperations::CheckSelfIntersectionsFast
|
||||||
(Handle(GEOM_Object) theShape,
|
(Handle(GEOM_Object) theShape,
|
||||||
float theDeflection, double theTolerance,
|
float theDeflection, double theTolerance,
|
||||||
Handle(TColStd_HSequenceOfInteger)& theIntersections)
|
Handle(TColStd_HSequenceOfInteger)& theIntersections)
|
||||||
{
|
{
|
||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
@ -1881,7 +1882,7 @@ TCollection_AsciiString GEOMImpl_IMeasureOperations::WhatIs (Handle(GEOM_Object)
|
|||||||
aListOfShape.Append(s);
|
aListOfShape.Append(s);
|
||||||
nbTypes[s.ShapeType()]++;
|
nbTypes[s.ShapeType()]++;
|
||||||
if ((sp.ShapeType() == TopAbs_COMPOUND) || (sp.ShapeType() == TopAbs_COMPSOLID)) {
|
if ((sp.ShapeType() == TopAbs_COMPOUND) || (sp.ShapeType() == TopAbs_COMPSOLID)) {
|
||||||
nbFlatType[s.ShapeType()]++;
|
nbFlatType[s.ShapeType()]++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1900,17 +1901,17 @@ TCollection_AsciiString GEOMImpl_IMeasureOperations::WhatIs (Handle(GEOM_Object)
|
|||||||
if ((aShape.ShapeType() == TopAbs_COMPOUND) || (aShape.ShapeType() == TopAbs_COMPSOLID)){
|
if ((aShape.ShapeType() == TopAbs_COMPOUND) || (aShape.ShapeType() == TopAbs_COMPSOLID)){
|
||||||
Astr = Astr + " --------------------- \n Flat content : \n";
|
Astr = Astr + " --------------------- \n Flat content : \n";
|
||||||
if (nbFlatType[TopAbs_VERTEX] > 0)
|
if (nbFlatType[TopAbs_VERTEX] > 0)
|
||||||
Astr = Astr + " VERTEX : " + TCollection_AsciiString(nbFlatType[TopAbs_VERTEX]) + "\n";
|
Astr = Astr + " VERTEX : " + TCollection_AsciiString(nbFlatType[TopAbs_VERTEX]) + "\n";
|
||||||
if (nbFlatType[TopAbs_EDGE] > 0)
|
if (nbFlatType[TopAbs_EDGE] > 0)
|
||||||
Astr = Astr + " EDGE : " + TCollection_AsciiString(nbFlatType[TopAbs_EDGE]) + "\n";
|
Astr = Astr + " EDGE : " + TCollection_AsciiString(nbFlatType[TopAbs_EDGE]) + "\n";
|
||||||
if (nbFlatType[TopAbs_WIRE] > 0)
|
if (nbFlatType[TopAbs_WIRE] > 0)
|
||||||
Astr = Astr + " WIRE : " + TCollection_AsciiString(nbFlatType[TopAbs_WIRE]) + "\n";
|
Astr = Astr + " WIRE : " + TCollection_AsciiString(nbFlatType[TopAbs_WIRE]) + "\n";
|
||||||
if (nbFlatType[TopAbs_FACE] > 0)
|
if (nbFlatType[TopAbs_FACE] > 0)
|
||||||
Astr = Astr + " FACE : " + TCollection_AsciiString(nbFlatType[TopAbs_FACE]) + "\n";
|
Astr = Astr + " FACE : " + TCollection_AsciiString(nbFlatType[TopAbs_FACE]) + "\n";
|
||||||
if (nbFlatType[TopAbs_SHELL] > 0)
|
if (nbFlatType[TopAbs_SHELL] > 0)
|
||||||
Astr = Astr + " SHELL : " + TCollection_AsciiString(nbFlatType[TopAbs_SHELL]) + "\n";
|
Astr = Astr + " SHELL : " + TCollection_AsciiString(nbFlatType[TopAbs_SHELL]) + "\n";
|
||||||
if (nbFlatType[TopAbs_SOLID] > 0)
|
if (nbFlatType[TopAbs_SOLID] > 0)
|
||||||
Astr = Astr + " SOLID : " + TCollection_AsciiString(nbFlatType[TopAbs_SOLID]) + "\n";
|
Astr = Astr + " SOLID : " + TCollection_AsciiString(nbFlatType[TopAbs_SOLID]) + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Standard_Failure& aFail) {
|
catch (Standard_Failure& aFail) {
|
||||||
|
@ -123,9 +123,9 @@ namespace {
|
|||||||
else {
|
else {
|
||||||
TopoDS_Iterator It(S, Standard_True, Standard_True);
|
TopoDS_Iterator It(S, Standard_True, Standard_True);
|
||||||
for (; It.More(); It.Next()) {
|
for (; It.More(); It.Next()) {
|
||||||
TopoDS_Shape SS = It.Value();
|
TopoDS_Shape SS = It.Value();
|
||||||
if (M.Add(SS))
|
if (M.Add(SS))
|
||||||
AddFlatSubShapes(SS, L, M);
|
AddFlatSubShapes(SS, L, M);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1451,11 +1451,10 @@ GEOMImpl_IShapesOperations::GetExistingSubObjects(Handle(GEOM_Object) theShap
|
|||||||
bool isGroup = anObj->IsKind(STANDARD_TYPE(GEOM_Object)) && anObj->GetType() == GEOM_GROUP;
|
bool isGroup = anObj->IsKind(STANDARD_TYPE(GEOM_Object)) && anObj->GetType() == GEOM_GROUP;
|
||||||
bool isSubShape = anObj->IsKind(STANDARD_TYPE(GEOM_Object)) && anObj->GetType() != GEOM_GROUP;
|
bool isSubShape = anObj->IsKind(STANDARD_TYPE(GEOM_Object)) && anObj->GetType() != GEOM_GROUP;
|
||||||
bool isField = anObj->IsKind(STANDARD_TYPE(GEOM_Field));
|
bool isField = anObj->IsKind(STANDARD_TYPE(GEOM_Field));
|
||||||
if (theTypes & Groups && isGroup ||
|
if ((theTypes & Groups && isGroup ) ||
|
||||||
theTypes & SubShapes && isSubShape ||
|
(theTypes & SubShapes && isSubShape ) ||
|
||||||
theTypes & Fields && isField) {
|
(theTypes & Fields && isField ))
|
||||||
aSeq->Append(anObj);
|
aSeq->Append(anObj);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
delete [] anEntryStr;
|
delete [] anEntryStr;
|
||||||
}
|
}
|
||||||
@ -1501,11 +1500,11 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::MakeExplode
|
|||||||
for (; It.More(); It.Next()) {
|
for (; It.More(); It.Next()) {
|
||||||
TopoDS_Shape SS = It.Value();
|
TopoDS_Shape SS = It.Value();
|
||||||
if (mapShape.Add(SS)) {
|
if (mapShape.Add(SS)) {
|
||||||
if (theShapeType == TopAbs_FLAT) {
|
if (theShapeType == TopAbs_FLAT) {
|
||||||
AddFlatSubShapes(SS, listShape, mapShape);
|
AddFlatSubShapes(SS, listShape, mapShape);
|
||||||
}
|
}
|
||||||
else if (theShapeType == TopAbs_SHAPE || theShapeType == SS.ShapeType()) {
|
else if (theShapeType == TopAbs_SHAPE || theShapeType == SS.ShapeType()) {
|
||||||
listShape.Append(SS);
|
listShape.Append(SS);
|
||||||
}
|
}
|
||||||
// VSR: for EXPLODE_NEW_INCLUDE_MAIN and EXPLODE_OLD_INCLUDE_MAIN:
|
// VSR: for EXPLODE_NEW_INCLUDE_MAIN and EXPLODE_OLD_INCLUDE_MAIN:
|
||||||
// it seems it is necessary to add top-level shape if theShapeType == TopAbs_COMPOUND
|
// it seems it is necessary to add top-level shape if theShapeType == TopAbs_COMPOUND
|
||||||
@ -1627,9 +1626,9 @@ Handle(TColStd_HSequenceOfInteger) GEOMImpl_IShapesOperations::SubShapeAllIDs
|
|||||||
for (; It.More(); It.Next()) {
|
for (; It.More(); It.Next()) {
|
||||||
TopoDS_Shape SS = It.Value();
|
TopoDS_Shape SS = It.Value();
|
||||||
if (mapShape.Add(SS)) {
|
if (mapShape.Add(SS)) {
|
||||||
if (theShapeType == TopAbs_FLAT) {
|
if (theShapeType == TopAbs_FLAT) {
|
||||||
AddFlatSubShapes(SS, listShape, mapShape);
|
AddFlatSubShapes(SS, listShape, mapShape);
|
||||||
}
|
}
|
||||||
else if (theShapeType == TopAbs_SHAPE || theShapeType == SS.ShapeType()) {
|
else if (theShapeType == TopAbs_SHAPE || theShapeType == SS.ShapeType()) {
|
||||||
listShape.Append(SS);
|
listShape.Append(SS);
|
||||||
}
|
}
|
||||||
@ -2436,7 +2435,7 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetSharedShapes
|
|||||||
for (; itSel.More(); itSel.Next()) {
|
for (; itSel.More(); itSel.Next()) {
|
||||||
const TopoDS_Shape& aSS = itSel.Value();
|
const TopoDS_Shape& aSS = itSel.Value();
|
||||||
if (mapShape.Add(aSS) )
|
if (mapShape.Add(aSS) )
|
||||||
aShared.Append(aSS);
|
aShared.Append(aSS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4464,7 +4463,6 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetInPlace (Handle(GEOM_Object)
|
|||||||
|
|
||||||
if (aShapeResult.IsNull() == Standard_False) {
|
if (aShapeResult.IsNull() == Standard_False) {
|
||||||
TopoDS_Iterator anIt(aShapeResult);
|
TopoDS_Iterator anIt(aShapeResult);
|
||||||
Standard_Boolean isFirst = Standard_True;
|
|
||||||
|
|
||||||
for (; anIt.More(); anIt.Next()) {
|
for (; anIt.More(); anIt.Next()) {
|
||||||
const TopoDS_Shape &aPart = anIt.Value();
|
const TopoDS_Shape &aPart = anIt.Value();
|
||||||
|
@ -175,9 +175,9 @@ Standard_Integer GEOMImpl_OffsetDriver::Execute(Handle(TFunction_Logbook)& log)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create a hollowed solid.
|
// Create a hollowed solid.
|
||||||
BRepOffsetAPI_MakeThickSolid aMkSolid
|
BRepOffsetAPI_MakeThickSolid aMkSolid;
|
||||||
(aShapeBase, aFacesToRm, anOffset, aTol, BRepOffset_Skin,
|
aMkSolid.MakeThickSolidByJoin (aShapeBase, aFacesToRm, anOffset, aTol, BRepOffset_Skin,
|
||||||
Standard_False, Standard_False, GeomAbs_Intersection);
|
Standard_False, Standard_False, GeomAbs_Intersection);
|
||||||
|
|
||||||
if (aMkSolid.IsDone()) {
|
if (aMkSolid.IsDone()) {
|
||||||
aShape = aMkSolid.Shape();
|
aShape = aMkSolid.Shape();
|
||||||
|
@ -119,12 +119,12 @@ static void StoreGroups(GEOMImpl_IPipe *theCI,
|
|||||||
|
|
||||||
// after OCCT improvement
|
// after OCCT improvement
|
||||||
static bool DoGroups1(const TopoDS_Shape &theProfile,
|
static bool DoGroups1(const TopoDS_Shape &theProfile,
|
||||||
BRepOffsetAPI_MakePipeShell &theSweep,
|
BRepOffsetAPI_MakePipeShell &theSweep,
|
||||||
TopTools_SequenceOfShape *theGroups);
|
TopTools_SequenceOfShape *theGroups);
|
||||||
|
|
||||||
static bool CreateGroups1(const TopoDS_Shape &theProfile,
|
static bool CreateGroups1(const TopoDS_Shape &theProfile,
|
||||||
BRepOffsetAPI_MakePipeShell &theSweep,
|
BRepOffsetAPI_MakePipeShell &theSweep,
|
||||||
GEOMImpl_IPipe *theCI);
|
GEOMImpl_IPipe *theCI);
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : GetID
|
//function : GetID
|
||||||
@ -1071,7 +1071,7 @@ TopoDS_Shape GEOMImpl_PipeDriver::CreatePipeWithDifferentSections
|
|||||||
// Make groups.
|
// Make groups.
|
||||||
TopTools_SequenceOfShape aGroups[5];
|
TopTools_SequenceOfShape aGroups[5];
|
||||||
|
|
||||||
TopoDS_Shape aProfile = aTmpSeqBases.Value(1);
|
TopoDS_Shape aProfile = aTmpSeqBases.Value(1);
|
||||||
if (!DoGroups1(aProfile, aBuilder, aGroups)) {
|
if (!DoGroups1(aProfile, aBuilder, aGroups)) {
|
||||||
Standard_ConstructionError::Raise("Generate groups failure");
|
Standard_ConstructionError::Raise("Generate groups failure");
|
||||||
}
|
}
|
||||||
@ -1134,7 +1134,7 @@ TopoDS_Shape GEOMImpl_PipeDriver::CreatePipeWithDifferentSections
|
|||||||
// Make groups.
|
// Make groups.
|
||||||
TopTools_SequenceOfShape aGroups[5];
|
TopTools_SequenceOfShape aGroups[5];
|
||||||
|
|
||||||
TopoDS_Shape aProfile = aTmpSeqBases.Value(1);
|
TopoDS_Shape aProfile = aTmpSeqBases.Value(1);
|
||||||
if (!DoGroups1(aProfile, aBuilder, aGroups)) {
|
if (!DoGroups1(aProfile, aBuilder, aGroups)) {
|
||||||
Standard_ConstructionError::Raise("Generate groups failure");
|
Standard_ConstructionError::Raise("Generate groups failure");
|
||||||
}
|
}
|
||||||
@ -1282,13 +1282,13 @@ TopoDS_Shape GEOMImpl_PipeDriver::CreatePipeWithDifferentSections
|
|||||||
// Make groups.
|
// Make groups.
|
||||||
TopTools_SequenceOfShape aSeqGroups[5];
|
TopTools_SequenceOfShape aSeqGroups[5];
|
||||||
|
|
||||||
TopoDS_Shape aProfile = usedBases.Value(1);
|
TopoDS_Shape aProfile = usedBases.Value(1);
|
||||||
if (!DoGroups1(aProfile, aBuilder, aSeqGroups)) {
|
if (!DoGroups1(aProfile, aBuilder, aSeqGroups)) {
|
||||||
Standard_ConstructionError::Raise("Generate groups failure");
|
Standard_ConstructionError::Raise("Generate groups failure");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fill the groups.
|
// Fill the groups.
|
||||||
Handle(TColStd_HArray1OfInteger) aGroupIds[5];
|
//Handle(TColStd_HArray1OfInteger) aGroupIds[5];
|
||||||
TopTools_IndexedMapOfShape anIndices;
|
TopTools_IndexedMapOfShape anIndices;
|
||||||
const TopoDS_Shape aResult = aBuilder.Shape();
|
const TopoDS_Shape aResult = aBuilder.Shape();
|
||||||
|
|
||||||
@ -2748,8 +2748,8 @@ static bool CreateDownUpGroups(BRepPrimAPI_MakeSweep *theSweep,
|
|||||||
//purpose : auxiliary for CreateGroups1()
|
//purpose : auxiliary for CreateGroups1()
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
bool DoGroups1 (const TopoDS_Shape &theProfile,
|
bool DoGroups1 (const TopoDS_Shape &theProfile,
|
||||||
BRepOffsetAPI_MakePipeShell &theSweep,
|
BRepOffsetAPI_MakePipeShell &theSweep,
|
||||||
TopTools_SequenceOfShape *theGroups)
|
TopTools_SequenceOfShape *theGroups)
|
||||||
{
|
{
|
||||||
Standard_Boolean isDoSides = Standard_False;
|
Standard_Boolean isDoSides = Standard_False;
|
||||||
|
|
||||||
@ -2792,11 +2792,11 @@ bool DoGroups1 (const TopoDS_Shape &theProfile,
|
|||||||
}
|
}
|
||||||
} else if (aSideShape.ShapeType() == TopAbs_WIRE) {
|
} else if (aSideShape.ShapeType() == TopAbs_WIRE) {
|
||||||
if (aMapFence.Add(aSideShape)) {
|
if (aMapFence.Add(aSideShape)) {
|
||||||
TopExp_Explorer anExpWE (aSideShape, TopAbs_EDGE);
|
TopExp_Explorer anExpWE (aSideShape, TopAbs_EDGE);
|
||||||
for (; anExpWE.More(); anExpWE.Next()) {
|
for (; anExpWE.More(); anExpWE.Next()) {
|
||||||
theGroups[anIdSide].Append(anExpWE.Current());
|
theGroups[anIdSide].Append(anExpWE.Current());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Only edges can be in Side1 and Side2 groups.
|
// Only edges can be in Side1 and Side2 groups.
|
||||||
return false;
|
return false;
|
||||||
@ -2837,10 +2837,10 @@ bool DoGroups1 (const TopoDS_Shape &theProfile,
|
|||||||
}
|
}
|
||||||
} else if (anOtherShape.ShapeType() == TopAbs_SHELL) {
|
} else if (anOtherShape.ShapeType() == TopAbs_SHELL) {
|
||||||
if (aMapFence.Add(anOtherShape)) {
|
if (aMapFence.Add(anOtherShape)) {
|
||||||
TopExp_Explorer anExpSHF (anOtherShape, TopAbs_FACE);
|
TopExp_Explorer anExpSHF (anOtherShape, TopAbs_FACE);
|
||||||
for (; anExpSHF.More(); anExpSHF.Next()) {
|
for (; anExpSHF.More(); anExpSHF.Next()) {
|
||||||
theGroups[GROUP_OTHER].Append(anExpSHF.Current());
|
theGroups[GROUP_OTHER].Append(anExpSHF.Current());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Only faces can be in Other group.
|
// Only faces can be in Other group.
|
||||||
@ -2859,8 +2859,8 @@ bool DoGroups1 (const TopoDS_Shape &theProfile,
|
|||||||
//purpose : auxiliary for Execute()
|
//purpose : auxiliary for Execute()
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
bool CreateGroups1 (const TopoDS_Shape &theProfile,
|
bool CreateGroups1 (const TopoDS_Shape &theProfile,
|
||||||
BRepOffsetAPI_MakePipeShell &theSweep,
|
BRepOffsetAPI_MakePipeShell &theSweep,
|
||||||
GEOMImpl_IPipe *theCI)
|
GEOMImpl_IPipe *theCI)
|
||||||
{
|
{
|
||||||
if (!theCI->GetGenerateGroups()) {
|
if (!theCI->GetGenerateGroups()) {
|
||||||
// Nothing to do.
|
// Nothing to do.
|
||||||
@ -2896,8 +2896,8 @@ bool CreateGroups1 (const TopoDS_Shape &theProfile,
|
|||||||
//purpose : auxiliary for CreateGroups()
|
//purpose : auxiliary for CreateGroups()
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
static bool DoGroups2(const TopoDS_Shape &theProfile,
|
static bool DoGroups2(const TopoDS_Shape &theProfile,
|
||||||
const TopoDS_Shape &thePath,
|
const TopoDS_Shape &thePath,
|
||||||
BRepOffsetAPI_MakePipe &theSweep,
|
BRepOffsetAPI_MakePipe &theSweep,
|
||||||
TopTools_SequenceOfShape *theGroups)
|
TopTools_SequenceOfShape *theGroups)
|
||||||
{
|
{
|
||||||
Standard_Boolean isDoSides = Standard_False;
|
Standard_Boolean isDoSides = Standard_False;
|
||||||
@ -2984,9 +2984,9 @@ static bool DoGroups2(const TopoDS_Shape &theProfile,
|
|||||||
//purpose : auxiliary for Execute()
|
//purpose : auxiliary for Execute()
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
static bool CreateGroups2(const TopoDS_Shape &theProfile,
|
static bool CreateGroups2(const TopoDS_Shape &theProfile,
|
||||||
const TopoDS_Shape &thePath,
|
const TopoDS_Shape &thePath,
|
||||||
BRepOffsetAPI_MakePipe &theSweep,
|
BRepOffsetAPI_MakePipe &theSweep,
|
||||||
GEOMImpl_IPipe *theCI)
|
GEOMImpl_IPipe *theCI)
|
||||||
{
|
{
|
||||||
if (!theCI->GetGenerateGroups()) {
|
if (!theCI->GetGenerateGroups()) {
|
||||||
// Nothing to do.
|
// Nothing to do.
|
||||||
|
@ -374,11 +374,11 @@ GetCreationInformation(std::string& theOperationName,
|
|||||||
{
|
{
|
||||||
Handle(TColStd_HArray1OfReal) coords = aCI.GetCoordinates();
|
Handle(TColStd_HArray1OfReal) coords = aCI.GetCoordinates();
|
||||||
GEOM_Param& pntParam = AddParam( theParams, "Points");
|
GEOM_Param& pntParam = AddParam( theParams, "Points");
|
||||||
pntParam << ( coords->Length() ) / 3 << " points: ";
|
pntParam << ( coords->Length() / 3 ) << " points: ";
|
||||||
for ( int i = coords->Lower(), nb = coords->Upper(); i <= nb; )
|
for ( int i = coords->Lower(), nb = coords->Upper(); i <= nb; i += 3 )
|
||||||
pntParam << "( " << coords->Value( i++ )
|
pntParam << "( " << coords->Value( i+0 )
|
||||||
<< ", " << coords->Value( i++ )
|
<< ", " << coords->Value( i+1 )
|
||||||
<< ", " << coords->Value( i++ ) << " ) ";
|
<< ", " << coords->Value( i+2 ) << " ) ";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -210,7 +210,7 @@ CORBA::Long GEOM_IInsertOperations_i::AddTexture(CORBA::Long theWidth, CORBA::Lo
|
|||||||
if ( theTexture.length() > 0 ) {
|
if ( theTexture.length() > 0 ) {
|
||||||
aTexture = new TColStd_HArray1OfByte (1, theTexture.length());
|
aTexture = new TColStd_HArray1OfByte (1, theTexture.length());
|
||||||
|
|
||||||
for ( int i = 0; i < theTexture.length(); i++ )
|
for ( CORBA::ULong i = 0; i < theTexture.length(); i++ )
|
||||||
aTexture->SetValue( i+1, (Standard_Byte)theTexture[i] );
|
aTexture->SetValue( i+1, (Standard_Byte)theTexture[i] );
|
||||||
}
|
}
|
||||||
return GetOperations()->AddTexture( theWidth, theHeight, aTexture );
|
return GetOperations()->AddTexture( theWidth, theHeight, aTexture );
|
||||||
|
@ -936,7 +936,7 @@ GEOM::ListOfBool* GEOM_IMeasureOperations_i::AreCoordsInside (GEOM::GEOM_Object_
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
unsigned int nb_points = theCoords.length()/3;
|
int nb_points = theCoords.length()/3;
|
||||||
|
|
||||||
GEOM::ListOfBool_var aResults = new GEOM::ListOfBool;
|
GEOM::ListOfBool_var aResults = new GEOM::ListOfBool;
|
||||||
aResults->length(nb_points);
|
aResults->length(nb_points);
|
||||||
@ -947,8 +947,8 @@ GEOM::ListOfBool* GEOM_IMeasureOperations_i::AreCoordsInside (GEOM::GEOM_Object_
|
|||||||
for (int i = 0; i < 3*nb_points; i++)
|
for (int i = 0; i < 3*nb_points; i++)
|
||||||
tmp[i] = theCoords[i];
|
tmp[i] = theCoords[i];
|
||||||
std::vector<bool> res = GetOperations()->AreCoordsInside(aShape, tmp, tolerance);
|
std::vector<bool> res = GetOperations()->AreCoordsInside(aShape, tmp, tolerance);
|
||||||
for (int i = 0; i < nb_points; i++)
|
for (int i = 0, resSize = res.size(); i < nb_points; i++)
|
||||||
aResults[i] = i < res.size() ? res[i] : false;
|
aResults[i] = i < resSize ? res[i] : false;
|
||||||
return aResults._retn();
|
return aResults._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -323,7 +323,7 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeFaceWithConstraints
|
|||||||
|
|
||||||
//Get the shapes
|
//Get the shapes
|
||||||
std::list<Handle(::GEOM_Object)> aConstraints;
|
std::list<Handle(::GEOM_Object)> aConstraints;
|
||||||
for( int ind = 0; ind < theConstraints.length(); ind++ ) {
|
for( CORBA::ULong ind = 0; ind < theConstraints.length(); ind++ ) {
|
||||||
Handle(::GEOM_Object) anObject = GetObjectImpl( theConstraints[ind] );
|
Handle(::GEOM_Object) anObject = GetObjectImpl( theConstraints[ind] );
|
||||||
aConstraints.push_back(anObject);
|
aConstraints.push_back(anObject);
|
||||||
}
|
}
|
||||||
@ -906,7 +906,6 @@ GEOM::ListOfGO* GEOM_IShapesOperations_i::MakeSubShapes (GEOM::GEOM_Object_ptr t
|
|||||||
const GEOM::ListOfLong& theIndices)
|
const GEOM::ListOfLong& theIndices)
|
||||||
{
|
{
|
||||||
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
|
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
|
||||||
Standard_Integer i;
|
|
||||||
|
|
||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
@ -918,7 +917,7 @@ GEOM::ListOfGO* GEOM_IShapesOperations_i::MakeSubShapes (GEOM::GEOM_Object_ptr t
|
|||||||
if (aShape.IsNull()) return aSeq._retn();
|
if (aShape.IsNull()) return aSeq._retn();
|
||||||
|
|
||||||
Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger (1, theIndices.length());
|
Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger (1, theIndices.length());
|
||||||
for (i = 0; i < theIndices.length(); i++)
|
for (CORBA::ULong i = 0; i < theIndices.length(); i++)
|
||||||
anArray->SetValue(i+1, theIndices[i]);
|
anArray->SetValue(i+1, theIndices[i]);
|
||||||
|
|
||||||
Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->MakeSubShapes(aShape, anArray);
|
Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->MakeSubShapes(aShape, anArray);
|
||||||
@ -927,7 +926,7 @@ GEOM::ListOfGO* GEOM_IShapesOperations_i::MakeSubShapes (GEOM::GEOM_Object_ptr t
|
|||||||
|
|
||||||
Standard_Integer aLength = aHSeq->Length();
|
Standard_Integer aLength = aHSeq->Length();
|
||||||
aSeq->length(aLength);
|
aSeq->length(aLength);
|
||||||
for (i = 0; i < aLength; i++)
|
for (int i = 0; i < aLength; i++)
|
||||||
aSeq[i] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i+1)));
|
aSeq[i] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i+1)));
|
||||||
|
|
||||||
return aSeq._retn();
|
return aSeq._retn();
|
||||||
|
@ -2064,7 +2064,7 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShape (GEOM::GEOM_Object_ptr theObjec
|
|||||||
beginService( " GEOM_Superv_i::OffsetShape" );
|
beginService( " GEOM_Superv_i::OffsetShape" );
|
||||||
MESSAGE("GEOM_Superv_i::OffsetShape");
|
MESSAGE("GEOM_Superv_i::OffsetShape");
|
||||||
getTransfOp();
|
getTransfOp();
|
||||||
GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShape(theObject, theOffset);
|
GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShape(theObject, theOffset, true);
|
||||||
endService( " GEOM_Superv_i::OffsetShape" );
|
endService( " GEOM_Superv_i::OffsetShape" );
|
||||||
return anObj;
|
return anObj;
|
||||||
}
|
}
|
||||||
@ -2078,7 +2078,7 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShapeCopy (GEOM::GEOM_Object_ptr theO
|
|||||||
beginService( " GEOM_Superv_i::OffsetShapeCopy" );
|
beginService( " GEOM_Superv_i::OffsetShapeCopy" );
|
||||||
MESSAGE("GEOM_Superv_i::OffsetShapeCopy");
|
MESSAGE("GEOM_Superv_i::OffsetShapeCopy");
|
||||||
getTransfOp();
|
getTransfOp();
|
||||||
GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShapeCopy(theObject, theOffset);
|
GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShapeCopy(theObject, theOffset, true);
|
||||||
endService( " GEOM_Superv_i::OffsetShapeCopy" );
|
endService( " GEOM_Superv_i::OffsetShapeCopy" );
|
||||||
return anObj;
|
return anObj;
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@ bool IGESPlugin_GUI::OnGUIEvent( const QString& theCommandID, SUIT_Desktop* pare
|
|||||||
getGeometryGUI()->getApp()->putInfo( tr("GEOM_PRP_COMMAND").arg( theCommandID ) );
|
getGeometryGUI()->getApp()->putInfo( tr("GEOM_PRP_COMMAND").arg( theCommandID ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true; // ?????????????
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
@ -111,20 +111,21 @@ GEOM_Actor::GEOM_Actor():
|
|||||||
myShadingFaceSource(GEOM_ShadingFace::New(),true),
|
myShadingFaceSource(GEOM_ShadingFace::New(),true),
|
||||||
|
|
||||||
myHighlightActor(GEOM_DeviceActor::New(),true),
|
myHighlightActor(GEOM_DeviceActor::New(),true),
|
||||||
myAppendFilter(vtkAppendPolyData::New(),true),
|
|
||||||
// Use mapper as an instance of GEOM_PainterPolyDataMapper class
|
|
||||||
// to prevent drawing of mappers' content (due to an empty definition
|
|
||||||
// of GEOM_PainterPolyDataMapper::RenderPiece(...)).
|
|
||||||
// !!! Presentation of GEOM_Actor is drawing only with help of actors
|
|
||||||
// defined in this class !!!
|
|
||||||
myPolyDataMapper(GEOM_PainterPolyDataMapper::New(),true),
|
|
||||||
|
|
||||||
myTextActor( vtkTextActor::New() ),
|
myTextActor( vtkTextActor::New() ),
|
||||||
|
|
||||||
myHighlightProp(vtkProperty::New()),
|
myHighlightProp(vtkProperty::New()),
|
||||||
myPreHighlightProp(vtkProperty::New()),
|
myPreHighlightProp(vtkProperty::New()),
|
||||||
myShadingFaceProp(vtkProperty::New()),
|
myShadingFaceProp(vtkProperty::New()),
|
||||||
myShadingBackFaceProp(vtkProperty::New())
|
myShadingBackFaceProp(vtkProperty::New()),
|
||||||
|
|
||||||
|
myAppendFilter(vtkAppendPolyData::New(),true),
|
||||||
|
// Use mapper as an instance of GEOM_PainterPolyDataMapper class
|
||||||
|
// to prevent drawing of mappers' content (due to an empty definition
|
||||||
|
// of GEOM_PainterPolyDataMapper::RenderPiece(...)).
|
||||||
|
// !!! Presentation of GEOM_Actor is drawing only with help of actors
|
||||||
|
// defined in this class !!!
|
||||||
|
myPolyDataMapper(GEOM_PainterPolyDataMapper::New(),true)
|
||||||
{
|
{
|
||||||
#ifdef MYDEBUG
|
#ifdef MYDEBUG
|
||||||
MESSAGE (this<< " GEOM_Actor::GEOM_Actor");
|
MESSAGE (this<< " GEOM_Actor::GEOM_Actor");
|
||||||
|
@ -484,6 +484,7 @@ void GEOM_OCCReader::DrawIso(GeomAbs_IsoType T,
|
|||||||
case GeomAbs_Hyperbola :
|
case GeomAbs_Hyperbola :
|
||||||
case GeomAbs_BezierCurve :
|
case GeomAbs_BezierCurve :
|
||||||
case GeomAbs_BSplineCurve :
|
case GeomAbs_BSplineCurve :
|
||||||
|
case GeomAbs_OffsetCurve:
|
||||||
case GeomAbs_OtherCurve :
|
case GeomAbs_OtherCurve :
|
||||||
for (j = 1; j <= myDiscret/2; j++) {
|
for (j = 1; j <= myDiscret/2; j++) {
|
||||||
|
|
||||||
@ -558,9 +559,8 @@ void GEOM_OCCReader::PlotIso (BRepAdaptor_Surface& S,
|
|||||||
|
|
||||||
void GEOM_OCCReader::TransferEdgeWData(const TopoDS_Edge& aEdge,
|
void GEOM_OCCReader::TransferEdgeWData(const TopoDS_Edge& aEdge,
|
||||||
vtkPoints* Pts,
|
vtkPoints* Pts,
|
||||||
vtkCellArray* Cells) {
|
vtkCellArray* Cells)
|
||||||
|
{
|
||||||
|
|
||||||
Handle(Poly_PolygonOnTriangulation) aEdgePoly;
|
Handle(Poly_PolygonOnTriangulation) aEdgePoly;
|
||||||
Standard_Integer i = 1;
|
Standard_Integer i = 1;
|
||||||
Handle(Poly_Triangulation) T;
|
Handle(Poly_Triangulation) T;
|
||||||
@ -786,11 +786,12 @@ void GEOM_OCCReader::TransferEdgeWData(const TopoDS_Edge& aEdge,
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
void GEOM_OCCReader::TransferVertexWData(const TopoDS_Vertex& aVertex,
|
void GEOM_OCCReader::TransferVertexWData(const TopoDS_Vertex& aVertex,
|
||||||
vtkPoints* Pts,
|
vtkPoints* Pts,
|
||||||
vtkCellArray* Cells) {
|
vtkCellArray* Cells)
|
||||||
#define ZERO_COORD coord[0] = 0.0; coord[1] = 0.0; coord[2] = 0.0
|
{
|
||||||
|
#define ZERO_COORD coord[0] = coord[1] = coord[2] = 0.0
|
||||||
|
|
||||||
gp_Pnt P = BRep_Tool::Pnt( aVertex );
|
// gp_Pnt P = BRep_Tool::Pnt( aVertex ); ??????????????????????????
|
||||||
float delta = 1, coord[3];
|
float delta = 1, coord[3];
|
||||||
vtkIdType pts[2];
|
vtkIdType pts[2];
|
||||||
// insert pt
|
// insert pt
|
||||||
|
@ -96,7 +96,7 @@ bool STLPlugin_GUI::OnGUIEvent( const QString& theCommandID, SUIT_Desktop* paren
|
|||||||
getGeometryGUI()->getApp()->putInfo( tr("GEOM_PRP_COMMAND").arg( theCommandID ) );
|
getGeometryGUI()->getApp()->putInfo( tr("GEOM_PRP_COMMAND").arg( theCommandID ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true; // ?????????
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
@ -89,7 +89,7 @@ bool VTKPlugin_GUI::OnGUIEvent( const QString& theCommandID, SUIT_Desktop* paren
|
|||||||
getGeometryGUI()->getApp()->putInfo( tr("GEOM_PRP_COMMAND").arg( theCommandID ) );
|
getGeometryGUI()->getApp()->putInfo( tr("GEOM_PRP_COMMAND").arg( theCommandID ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true; // ???????????
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -125,10 +125,10 @@ bool VTKPlugin_GUI::exportVTK( SUIT_Desktop* parent )
|
|||||||
|
|
||||||
double deflection = 0.;
|
double deflection = 0.;
|
||||||
QString fileName = VTKPlugin_ExportDlg::getFileName( io,
|
QString fileName = VTKPlugin_ExportDlg::getFileName( io,
|
||||||
tr( "VTK_FILES" ),
|
tr( "VTK_FILES" ),
|
||||||
tr( "EXPORT_TITLE" ),
|
tr( "EXPORT_TITLE" ),
|
||||||
parent,
|
parent,
|
||||||
deflection );
|
deflection );
|
||||||
|
|
||||||
if ( fileName.isEmpty() )
|
if ( fileName.isEmpty() )
|
||||||
return false;
|
return false;
|
||||||
@ -146,15 +146,15 @@ bool VTKPlugin_GUI::exportVTK( SUIT_Desktop* parent )
|
|||||||
|
|
||||||
if ( vtkOp->IsDone() )
|
if ( vtkOp->IsDone() )
|
||||||
{
|
{
|
||||||
transaction.commit();
|
transaction.commit();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
transaction.abort();
|
transaction.abort();
|
||||||
SUIT_MessageBox::critical( parent,
|
SUIT_MessageBox::critical( parent,
|
||||||
tr( "GEOM_ERROR" ),
|
tr( "GEOM_ERROR" ),
|
||||||
tr( "GEOM_PRP_ABORT" ) + "\n" + tr( vtkOp->GetErrorCode() ) );
|
tr( "GEOM_PRP_ABORT" ) + "\n" + tr( vtkOp->GetErrorCode() ) );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch ( const SALOME::SALOME_Exception& e )
|
catch ( const SALOME::SALOME_Exception& e )
|
||||||
@ -168,8 +168,8 @@ bool VTKPlugin_GUI::exportVTK( SUIT_Desktop* parent )
|
|||||||
if ( !ok )
|
if ( !ok )
|
||||||
{
|
{
|
||||||
SUIT_MessageBox::warning( parent,
|
SUIT_MessageBox::warning( parent,
|
||||||
tr( "WRN_WARNING" ),
|
tr( "WRN_WARNING" ),
|
||||||
tr( "GEOM_WRN_NO_APPROPRIATE_SELECTION" ) );
|
tr( "GEOM_WRN_NO_APPROPRIATE_SELECTION" ) );
|
||||||
}
|
}
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user