return false;
}
- gp_Trsf aTrsfInv = aTrsf.Inverted();
-
// int expectedGroups = 0;
// if (shapeType == TSHAPE_BASIC)
// if (Abs(theR2+theW2-theR1-theW1) <= Precision::Approximation())
if (aGroup.IsNull())
continue;
+ gp_Trsf aTrsfInv = aTrsf.Inverted();
TopoDS_Shape aGroupShape = aGroup->GetValue();
BRepBuilderAPI_Transform aTransformationShapeInv (aGroupShape, aTrsfInv, Standard_False);
TopoDS_Shape aGroupShapeTrsfInv = aTransformationShapeInv.Shape();
gp_Pnt aP0 (0, 0, 0);
gp_Pnt aP1 (-l1, 0, 0);
- gp_Vec aVX = gp::DX(), aVY = gp::DY(), aVZ = gp::DZ();
+ gp_Vec aVX = gp::DX(), aVZ = gp::DZ();
gp_Ax2 anAxes1 (aP1, aVX, aVZ);
gp_Ax2 anAxes2 (aP0, aVZ, aVX);
for ( int i = 1, nb = aCI.GetLength(); i <= nb; ++i )
theParams[0] << aCI.GetPntOrComp( i ) << " ";
- const Standard_Integer aNbMax = aCI.GetNbMax();
- const Standard_Integer aDegMax = aCI.GetDegMax();
- const Standard_Real aDMax = aCI.GetDMax();
-
AddParam(theParams, "Max nbr of Bezier pieces", aCI.GetNbMax());
AddParam(theParams, "Max BSpline surface degree", aCI.GetDegMax());
AddParam(theParams, "3D tolerance of initial approximation", aCI.GetDMax());
TopTools_ListOfShape aClosedSubShapes;
TopTools_ListOfShape aNewShapes;
TopoDS_Shape anOuterSubShape;
- TopAbs_ShapeEnum aShapeType;
+ //TopAbs_ShapeEnum aShapeType;
TopAbs_ShapeEnum aSubShapeType;
if (theFOrSo.ShapeType() == TopAbs_FACE) {
- aShapeType = TopAbs_FACE;
+ //aShapeType = TopAbs_FACE;
aSubShapeType = TopAbs_WIRE;
anOuterSubShape = BRepTools::OuterWire(TopoDS::Face(theFOrSo));
} else {
- aShapeType = TopAbs_SOLID;
+ //aShapeType = TopAbs_SOLID;
aSubShapeType = TopAbs_SHELL;
anOuterSubShape = BRepClass3d::OuterShell(TopoDS::Solid(theFOrSo));
}
TopTools_ListOfShape aNewSubShapes;
TopTools_ListOfShape aNewOtherShapes;
TopAbs_ShapeEnum aSubShapeType;
- TopAbs_ShapeEnum aSubSubShapeType;
+ //TopAbs_ShapeEnum aSubSubShapeType;
if (theShOrCS.ShapeType() == TopAbs_SHELL) {
aSubShapeType = TopAbs_FACE;
- aSubSubShapeType = TopAbs_EDGE;
+ //aSubSubShapeType = TopAbs_EDGE;
} else { // comp-solid
aSubShapeType = TopAbs_SOLID;
- aSubSubShapeType = TopAbs_FACE;
+ //aSubSubShapeType = TopAbs_FACE;
}
for (; anIter.More(); anIter.Next()) {
getModified(theShape, aListModif, theShape.ShapeType());
Standard_Boolean isModif = !aListModif.IsEmpty();
- const TopAbs_ShapeEnum aType = theShape.ShapeType();
+ //const TopAbs_ShapeEnum aType = theShape.ShapeType();
if (isModif) {
// Add the new shapes.
void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Face& aF,
GEOMAlgo_ListOfPnt& aLP)
{
- Standard_Integer j, j1, j2, k, n[4], aNbLinks, aNx, aNb, iCnt;//, aNbMax, *pIds;
+ Standard_Integer j, j1, j2, k, n[4], aNx, aNb, iCnt;//, aNbLinks, aNbMax, *pIds;
TopLoc_Location aLoc;
Handle(Poly_Triangulation) aTRF;
TColStd_MapOfInteger aMBN;
}
//
// boundary nodes aMBN
- aNbLinks=aMPKI.Extent();
aIt.Initialize(aMPKI);
for (; aIt.More(); aIt.Next()) {
iCnt=aIt.Value();
}
// try to find in history
- TDF_Label aHistoryLabel = theWhereFunction->GetHistoryEntry(Standard_False);
+ //TDF_Label aHistoryLabel = theWhereFunction->GetHistoryEntry(Standard_False);
// search in history for all argument shapes
Standard_Boolean isFound = Standard_False;
{
Standard_Boolean bOk;
Standard_Integer iErr;
- Standard_Real aTol2;
+ //Standard_Real aTol2;
TopAbs_ShapeEnum aType1, aType2;
TopAbs_State aState;
gp_Pnt aP1, aP2;
//
iErr=0;
bOk=Standard_False;
- aTol2=myTolerance*myTolerance;
+ //aTol2=myTolerance*myTolerance;
aType1=aS1.ShapeType();
aType2=aS2.ShapeType();
//
Standard_Real aTol;
BRep_Builder aBB;
TopoDS_Edge E;
- TopAbs_Orientation anOrE;
+ //TopAbs_Orientation anOrE;
//
- anOrE=aE.Orientation();
+ //anOrE=aE.Orientation();
aTol=BRep_Tool::Tolerance(aE);
//
E=aEx;
void GEOMAlgo_Gluer2::Detect()
{
Standard_Boolean bCheckGeometry;
- Standard_Integer iErr, aNbSD;
+ Standard_Integer iErr;
TopTools_ListIteratorOfListOfShape aItLS;
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMSLS;
//GEOMAlgo_GlueDetector aDetector;
for (; aItDMSLS.More(); aItDMSLS.Next()) {
const TopoDS_Shape& aSkey=aItDMSLS.Key();
const TopTools_ListOfShape& aLSD=aItDMSLS.Value();
- aNbSD=aLSD.Extent();
myImagesDetected.Bind(aSkey, aLSD);
}
//
const gp_Cylinder& aCyl)
{
- Standard_Integer i, aNbV, aNbE, aNbCE, aNbSE;
+ Standard_Integer aNbV, aNbE, aNbCE, aNbSE;
Standard_Real aT0, aT1, aHeight;
gp_Pnt aPC[3], aPc;
TopoDS_Edge aE;
const gp_Dir& aDir=aAx1.Direction();
const gp_Pnt& aPLoc=aAx1.Location();
//
- i=0;
aNbCE=0;
aNbSE=0;
aExp.Init(aF, TopAbs_EDGE);
{
Standard_Boolean bRet, bIsAllowedType, bOnlyClosed, bIsEqual;
Standard_Integer j;
- Standard_Real aTolAng, aTol;
+ Standard_Real aTol;
Standard_Real aVolume, aVolumeS, dV, aArea, aAreaS, dA;
gp_Sphere aSphere[2];
GeomAbs_SurfaceType aST;
//
bRet=Standard_False;
aTol=Precision::Confusion();
- aTolAng=Precision::Angular();
//
aExp.Init(aSd, TopAbs_FACE);
for (j=0; aExp.More(); aExp.Next(), ++j) {
if (fabs(aRadius1 - aRadius2) <= aTol) {
// Check the deflection of the middle point.
- gp_XYZ aMidP = 0.5*(aDP1 + aDP2);
+ //gp_XYZ aMidP = 0.5*(aDP1 + aDP2);
//Standard_Real aMidRadius1 = aMidP.Modulus();
if (fabs(aRadius1 - aRadius2) <= aTol) {
//=======================================================================
void GEOMAlgo_VertexSolid::BuildResult()
{
- Standard_Integer i, iBeg, iEnd, aNbVV, aNbVE, aNbVF, j, iFound, aNbRanges;
+ Standard_Integer i, iBeg, iEnd, aNbVV, aNbVE, aNbVF, j, iFound;//, aNbRanges;
Standard_Real aTol;
TopAbs_State aSt;
TopAbs_ShapeEnum aType;
Handle(IntTools_Context) aCtx=myDSFiller->Context();
BRepClass3d_SolidClassifier& aSC=aCtx->SolidClassifier(aSolid);
//
- aNbRanges=aDS.NbRanges();
+ //aNbRanges=aDS.NbRanges();
const BOPDS_IndexRange& aRange=aDS.Range(myRank);
aRange.Indices(iBeg, iEnd);
//
for (j=0; j<aNbVV; ++j) {
BOPDS_InterfVV& aVV=aVVs(j);
if (aVV.Contains(i)) {
- myLSON.Append(aV);
- iFound=1;
- break;
+ myLSON.Append(aV);
+ iFound=1;
+ break;
}
}
if (iFound) {
for (j=0; j<aNbVE; ++j) {
BOPDS_InterfVE& aVE=aVEs(j);
if (aVE.Contains(i)) {
- myLSON.Append(aV);
- iFound=1;
- break;
+ myLSON.Append(aV);
+ iFound=1;
+ break;
}
}
if (iFound) {
for (j=0; j<aNbVF; ++j) {
BOPDS_InterfVF& aVF=aVFs(j);
if (aVF.Contains(i)) {
- myLSON.Append(aV);
- iFound=1;
- break;
+ myLSON.Append(aV);
+ iFound=1;
+ break;
}
}
if (iFound) {
aStringValues.remove("\\");
- int it = 0;
+ size_t it = 0;
for ( ; it < aPacked.size(); ++it )
{
int aNextPos = aStringValues.indexOf("(.*)");
param == QString("scalar_bar_height") ||
param == QString("scalar_bar_text_height") ||
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();
}
Handle(TColStd_HSequenceOfTransient) aConstraints = IF.GetShapes();
- for ( unsigned int ind = 1; ind <= aConstraints->Length(); ind++ ) {
+ for ( int ind = 1; ind <= aConstraints->Length(); ind++ ) {
TopoDS_Edge E;
TopoDS_Face F;
Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast( aConstraints->Value(ind) );
}
case FILLING_ON_CONSTRAINTS:
{
- theOperationName = "FACE";
+ theOperationName = "FACE";
AddParam( theParams, "Edges/Faces", aCI.GetShapes() );
break;
}
std::list<std::string>::const_iterator it;
for (it = lines.begin(); it != lines.end(); ++it) {
std::string line = *it;
- int lenline = (line.size()/8 + (line.size()%8 ? 1 : 0)) * 8;
- for (int i = 0; i < lenline/8; i++) {
+ size_t lenline = (line.size()/8 + (line.size()%8 ? 1 : 0)) * 8;
+ for (size_t i = 0; i < lenline/8; i++) {
unsigned char byte = 0;
for (int j = 0; j < 8; j++)
byte = (byte << 1) + ( i*8+j < line.size() && line[i*8+j] != '0' ? 1 : 0 );
theDoubles->Append(aP.Z());
}
break;
+ default:;
}
SetErrorCode(OK);
//=============================================================================
bool GEOMImpl_IMeasureOperations::CheckSelfIntersectionsFast
(Handle(GEOM_Object) theShape,
- float theDeflection, double theTolerance,
+ float theDeflection, double theTolerance,
Handle(TColStd_HSequenceOfInteger)& theIntersections)
{
SetErrorCode(KO);
aListOfShape.Append(s);
nbTypes[s.ShapeType()]++;
if ((sp.ShapeType() == TopAbs_COMPOUND) || (sp.ShapeType() == TopAbs_COMPSOLID)) {
- nbFlatType[s.ShapeType()]++;
+ nbFlatType[s.ShapeType()]++;
}
}
}
if ((aShape.ShapeType() == TopAbs_COMPOUND) || (aShape.ShapeType() == TopAbs_COMPSOLID)){
Astr = Astr + " --------------------- \n Flat content : \n";
if (nbFlatType[TopAbs_VERTEX] > 0)
- Astr = Astr + " VERTEX : " + TCollection_AsciiString(nbFlatType[TopAbs_VERTEX]) + "\n";
+ Astr = Astr + " VERTEX : " + TCollection_AsciiString(nbFlatType[TopAbs_VERTEX]) + "\n";
if (nbFlatType[TopAbs_EDGE] > 0)
- Astr = Astr + " EDGE : " + TCollection_AsciiString(nbFlatType[TopAbs_EDGE]) + "\n";
+ Astr = Astr + " EDGE : " + TCollection_AsciiString(nbFlatType[TopAbs_EDGE]) + "\n";
if (nbFlatType[TopAbs_WIRE] > 0)
- Astr = Astr + " WIRE : " + TCollection_AsciiString(nbFlatType[TopAbs_WIRE]) + "\n";
+ Astr = Astr + " WIRE : " + TCollection_AsciiString(nbFlatType[TopAbs_WIRE]) + "\n";
if (nbFlatType[TopAbs_FACE] > 0)
- Astr = Astr + " FACE : " + TCollection_AsciiString(nbFlatType[TopAbs_FACE]) + "\n";
+ Astr = Astr + " FACE : " + TCollection_AsciiString(nbFlatType[TopAbs_FACE]) + "\n";
if (nbFlatType[TopAbs_SHELL] > 0)
- Astr = Astr + " SHELL : " + TCollection_AsciiString(nbFlatType[TopAbs_SHELL]) + "\n";
+ Astr = Astr + " SHELL : " + TCollection_AsciiString(nbFlatType[TopAbs_SHELL]) + "\n";
if (nbFlatType[TopAbs_SOLID] > 0)
- Astr = Astr + " SOLID : " + TCollection_AsciiString(nbFlatType[TopAbs_SOLID]) + "\n";
+ Astr = Astr + " SOLID : " + TCollection_AsciiString(nbFlatType[TopAbs_SOLID]) + "\n";
}
}
catch (Standard_Failure& aFail) {
else {
TopoDS_Iterator It(S, Standard_True, Standard_True);
for (; It.More(); It.Next()) {
- TopoDS_Shape SS = It.Value();
- if (M.Add(SS))
- AddFlatSubShapes(SS, L, M);
+ TopoDS_Shape SS = It.Value();
+ if (M.Add(SS))
+ AddFlatSubShapes(SS, L, M);
}
}
}
bool isGroup = anObj->IsKind(STANDARD_TYPE(GEOM_Object)) && anObj->GetType() == GEOM_GROUP;
bool isSubShape = anObj->IsKind(STANDARD_TYPE(GEOM_Object)) && anObj->GetType() != GEOM_GROUP;
bool isField = anObj->IsKind(STANDARD_TYPE(GEOM_Field));
- if (theTypes & Groups && isGroup ||
- theTypes & SubShapes && isSubShape ||
- theTypes & Fields && isField) {
+ if ((theTypes & Groups && isGroup ) ||
+ (theTypes & SubShapes && isSubShape ) ||
+ (theTypes & Fields && isField ))
aSeq->Append(anObj);
- }
}
delete [] anEntryStr;
}
for (; It.More(); It.Next()) {
TopoDS_Shape SS = It.Value();
if (mapShape.Add(SS)) {
- if (theShapeType == TopAbs_FLAT) {
+ if (theShapeType == TopAbs_FLAT) {
AddFlatSubShapes(SS, listShape, mapShape);
- }
+ }
else if (theShapeType == TopAbs_SHAPE || theShapeType == SS.ShapeType()) {
- listShape.Append(SS);
+ listShape.Append(SS);
}
// VSR: for EXPLODE_NEW_INCLUDE_MAIN and EXPLODE_OLD_INCLUDE_MAIN:
// it seems it is necessary to add top-level shape if theShapeType == TopAbs_COMPOUND
for (; It.More(); It.Next()) {
TopoDS_Shape SS = It.Value();
if (mapShape.Add(SS)) {
- if (theShapeType == TopAbs_FLAT) {
+ if (theShapeType == TopAbs_FLAT) {
AddFlatSubShapes(SS, listShape, mapShape);
- }
+ }
else if (theShapeType == TopAbs_SHAPE || theShapeType == SS.ShapeType()) {
listShape.Append(SS);
}
for (; itSel.More(); itSel.Next()) {
const TopoDS_Shape& aSS = itSel.Value();
if (mapShape.Add(aSS) )
- aShared.Append(aSS);
+ aShared.Append(aSS);
}
}
}
if (aShapeResult.IsNull() == Standard_False) {
TopoDS_Iterator anIt(aShapeResult);
- Standard_Boolean isFirst = Standard_True;
for (; anIt.More(); anIt.Next()) {
const TopoDS_Shape &aPart = anIt.Value();
}
// Create a hollowed solid.
- BRepOffsetAPI_MakeThickSolid aMkSolid
- (aShapeBase, aFacesToRm, anOffset, aTol, BRepOffset_Skin,
- Standard_False, Standard_False, GeomAbs_Intersection);
+ BRepOffsetAPI_MakeThickSolid aMkSolid;
+ aMkSolid.MakeThickSolidByJoin (aShapeBase, aFacesToRm, anOffset, aTol, BRepOffset_Skin,
+ Standard_False, Standard_False, GeomAbs_Intersection);
if (aMkSolid.IsDone()) {
aShape = aMkSolid.Shape();
// after OCCT improvement
static bool DoGroups1(const TopoDS_Shape &theProfile,
- BRepOffsetAPI_MakePipeShell &theSweep,
- TopTools_SequenceOfShape *theGroups);
+ BRepOffsetAPI_MakePipeShell &theSweep,
+ TopTools_SequenceOfShape *theGroups);
static bool CreateGroups1(const TopoDS_Shape &theProfile,
- BRepOffsetAPI_MakePipeShell &theSweep,
- GEOMImpl_IPipe *theCI);
+ BRepOffsetAPI_MakePipeShell &theSweep,
+ GEOMImpl_IPipe *theCI);
//=======================================================================
//function : GetID
// Make groups.
TopTools_SequenceOfShape aGroups[5];
- TopoDS_Shape aProfile = aTmpSeqBases.Value(1);
+ TopoDS_Shape aProfile = aTmpSeqBases.Value(1);
if (!DoGroups1(aProfile, aBuilder, aGroups)) {
Standard_ConstructionError::Raise("Generate groups failure");
}
// Make groups.
TopTools_SequenceOfShape aGroups[5];
- TopoDS_Shape aProfile = aTmpSeqBases.Value(1);
+ TopoDS_Shape aProfile = aTmpSeqBases.Value(1);
if (!DoGroups1(aProfile, aBuilder, aGroups)) {
Standard_ConstructionError::Raise("Generate groups failure");
}
// Make groups.
TopTools_SequenceOfShape aSeqGroups[5];
- TopoDS_Shape aProfile = usedBases.Value(1);
+ TopoDS_Shape aProfile = usedBases.Value(1);
if (!DoGroups1(aProfile, aBuilder, aSeqGroups)) {
Standard_ConstructionError::Raise("Generate groups failure");
}
// Fill the groups.
- Handle(TColStd_HArray1OfInteger) aGroupIds[5];
+ //Handle(TColStd_HArray1OfInteger) aGroupIds[5];
TopTools_IndexedMapOfShape anIndices;
const TopoDS_Shape aResult = aBuilder.Shape();
//purpose : auxiliary for CreateGroups1()
//=======================================================================
bool DoGroups1 (const TopoDS_Shape &theProfile,
- BRepOffsetAPI_MakePipeShell &theSweep,
- TopTools_SequenceOfShape *theGroups)
+ BRepOffsetAPI_MakePipeShell &theSweep,
+ TopTools_SequenceOfShape *theGroups)
{
Standard_Boolean isDoSides = Standard_False;
}
} else if (aSideShape.ShapeType() == TopAbs_WIRE) {
if (aMapFence.Add(aSideShape)) {
- TopExp_Explorer anExpWE (aSideShape, TopAbs_EDGE);
- for (; anExpWE.More(); anExpWE.Next()) {
- theGroups[anIdSide].Append(anExpWE.Current());
- }
- }
+ TopExp_Explorer anExpWE (aSideShape, TopAbs_EDGE);
+ for (; anExpWE.More(); anExpWE.Next()) {
+ theGroups[anIdSide].Append(anExpWE.Current());
+ }
+ }
} else {
// Only edges can be in Side1 and Side2 groups.
return false;
}
} else if (anOtherShape.ShapeType() == TopAbs_SHELL) {
if (aMapFence.Add(anOtherShape)) {
- TopExp_Explorer anExpSHF (anOtherShape, TopAbs_FACE);
- for (; anExpSHF.More(); anExpSHF.Next()) {
- theGroups[GROUP_OTHER].Append(anExpSHF.Current());
- }
+ TopExp_Explorer anExpSHF (anOtherShape, TopAbs_FACE);
+ for (; anExpSHF.More(); anExpSHF.Next()) {
+ theGroups[GROUP_OTHER].Append(anExpSHF.Current());
+ }
}
} else {
// Only faces can be in Other group.
//purpose : auxiliary for Execute()
//=======================================================================
bool CreateGroups1 (const TopoDS_Shape &theProfile,
- BRepOffsetAPI_MakePipeShell &theSweep,
- GEOMImpl_IPipe *theCI)
+ BRepOffsetAPI_MakePipeShell &theSweep,
+ GEOMImpl_IPipe *theCI)
{
if (!theCI->GetGenerateGroups()) {
// Nothing to do.
//purpose : auxiliary for CreateGroups()
//=======================================================================
static bool DoGroups2(const TopoDS_Shape &theProfile,
- const TopoDS_Shape &thePath,
- BRepOffsetAPI_MakePipe &theSweep,
+ const TopoDS_Shape &thePath,
+ BRepOffsetAPI_MakePipe &theSweep,
TopTools_SequenceOfShape *theGroups)
{
Standard_Boolean isDoSides = Standard_False;
//purpose : auxiliary for Execute()
//=======================================================================
static bool CreateGroups2(const TopoDS_Shape &theProfile,
- const TopoDS_Shape &thePath,
- BRepOffsetAPI_MakePipe &theSweep,
- GEOMImpl_IPipe *theCI)
+ const TopoDS_Shape &thePath,
+ BRepOffsetAPI_MakePipe &theSweep,
+ GEOMImpl_IPipe *theCI)
{
if (!theCI->GetGenerateGroups()) {
// Nothing to do.
{
Handle(TColStd_HArray1OfReal) coords = aCI.GetCoordinates();
GEOM_Param& pntParam = AddParam( theParams, "Points");
- pntParam << ( coords->Length() ) / 3 << " points: ";
- for ( int i = coords->Lower(), nb = coords->Upper(); i <= nb; )
- pntParam << "( " << coords->Value( i++ )
- << ", " << coords->Value( i++ )
- << ", " << coords->Value( i++ ) << " ) ";
+ pntParam << ( coords->Length() / 3 ) << " points: ";
+ for ( int i = coords->Lower(), nb = coords->Upper(); i <= nb; i += 3 )
+ pntParam << "( " << coords->Value( i+0 )
+ << ", " << coords->Value( i+1 )
+ << ", " << coords->Value( i+2 ) << " ) ";
}
else
{
if ( theTexture.length() > 0 ) {
aTexture = new TColStd_HArray1OfByte (1, theTexture.length());
- for ( int i = 0; i < theTexture.length(); i++ )
+ for ( CORBA::ULong i = 0; i < theTexture.length(); i++ )
aTexture->SetValue( i+1, (Standard_Byte)theTexture[i] );
}
return GetOperations()->AddTexture( theWidth, theHeight, aTexture );
//Set a not done flag
GetOperations()->SetNotDone();
- unsigned int nb_points = theCoords.length()/3;
+ int nb_points = theCoords.length()/3;
GEOM::ListOfBool_var aResults = new GEOM::ListOfBool;
aResults->length(nb_points);
for (int i = 0; i < 3*nb_points; i++)
tmp[i] = theCoords[i];
std::vector<bool> res = GetOperations()->AreCoordsInside(aShape, tmp, tolerance);
- for (int i = 0; i < nb_points; i++)
- aResults[i] = i < res.size() ? res[i] : false;
+ for (int i = 0, resSize = res.size(); i < nb_points; i++)
+ aResults[i] = i < resSize ? res[i] : false;
return aResults._retn();
}
//Get the shapes
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] );
aConstraints.push_back(anObject);
}
const GEOM::ListOfLong& theIndices)
{
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
- Standard_Integer i;
//Set a not done flag
GetOperations()->SetNotDone();
if (aShape.IsNull()) return aSeq._retn();
Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger (1, theIndices.length());
- for (i = 0; i < theIndices.length(); i++)
+ for (CORBA::ULong i = 0; i < theIndices.length(); i++)
anArray->SetValue(i+1, theIndices[i]);
Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->MakeSubShapes(aShape, anArray);
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
- for (i = 0; i < aLength; i++)
+ for (int i = 0; i < aLength; i++)
aSeq[i] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i+1)));
return aSeq._retn();
beginService( " GEOM_Superv_i::OffsetShape" );
MESSAGE("GEOM_Superv_i::OffsetShape");
getTransfOp();
- GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShape(theObject, theOffset);
+ GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShape(theObject, theOffset, true);
endService( " GEOM_Superv_i::OffsetShape" );
return anObj;
}
beginService( " GEOM_Superv_i::OffsetShapeCopy" );
MESSAGE("GEOM_Superv_i::OffsetShapeCopy");
getTransfOp();
- GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShapeCopy(theObject, theOffset);
+ GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShapeCopy(theObject, theOffset, true);
endService( " GEOM_Superv_i::OffsetShapeCopy" );
return anObj;
}
getGeometryGUI()->getApp()->putInfo( tr("GEOM_PRP_COMMAND").arg( theCommandID ) );
}
- return true;
+ return true; // ?????????????
}
//=======================================================================
myShadingFaceSource(GEOM_ShadingFace::New(),true),
myHighlightActor(GEOM_DeviceActor::New(),true),
- myAppendFilter(vtkAppendPolyData::New(),true),
- // Use mapper as an instance of GEOM_PainterPolyDataMapper class
- // to prevent drawing of mappers' content (due to an empty definition
- // of GEOM_PainterPolyDataMapper::RenderPiece(...)).
- // !!! Presentation of GEOM_Actor is drawing only with help of actors
- // defined in this class !!!
- myPolyDataMapper(GEOM_PainterPolyDataMapper::New(),true),
myTextActor( vtkTextActor::New() ),
myHighlightProp(vtkProperty::New()),
myPreHighlightProp(vtkProperty::New()),
myShadingFaceProp(vtkProperty::New()),
- myShadingBackFaceProp(vtkProperty::New())
+ myShadingBackFaceProp(vtkProperty::New()),
+
+ myAppendFilter(vtkAppendPolyData::New(),true),
+ // Use mapper as an instance of GEOM_PainterPolyDataMapper class
+ // to prevent drawing of mappers' content (due to an empty definition
+ // of GEOM_PainterPolyDataMapper::RenderPiece(...)).
+ // !!! Presentation of GEOM_Actor is drawing only with help of actors
+ // defined in this class !!!
+ myPolyDataMapper(GEOM_PainterPolyDataMapper::New(),true)
{
#ifdef MYDEBUG
MESSAGE (this<< " GEOM_Actor::GEOM_Actor");
case GeomAbs_Hyperbola :
case GeomAbs_BezierCurve :
case GeomAbs_BSplineCurve :
+ case GeomAbs_OffsetCurve:
case GeomAbs_OtherCurve :
for (j = 1; j <= myDiscret/2; j++) {
void GEOM_OCCReader::TransferEdgeWData(const TopoDS_Edge& aEdge,
vtkPoints* Pts,
- vtkCellArray* Cells) {
-
-
+ vtkCellArray* Cells)
+{
Handle(Poly_PolygonOnTriangulation) aEdgePoly;
Standard_Integer i = 1;
Handle(Poly_Triangulation) T;
//=======================================================================
void GEOM_OCCReader::TransferVertexWData(const TopoDS_Vertex& aVertex,
- vtkPoints* Pts,
- vtkCellArray* Cells) {
-#define ZERO_COORD coord[0] = 0.0; coord[1] = 0.0; coord[2] = 0.0
+ vtkPoints* Pts,
+ vtkCellArray* Cells)
+{
+#define ZERO_COORD coord[0] = coord[1] = coord[2] = 0.0
- gp_Pnt P = BRep_Tool::Pnt( aVertex );
+ // gp_Pnt P = BRep_Tool::Pnt( aVertex ); ??????????????????????????
float delta = 1, coord[3];
vtkIdType pts[2];
// insert pt
getGeometryGUI()->getApp()->putInfo( tr("GEOM_PRP_COMMAND").arg( theCommandID ) );
}
- return true;
+ return true; // ?????????
}
//=======================================================================
getGeometryGUI()->getApp()->putInfo( tr("GEOM_PRP_COMMAND").arg( theCommandID ) );
}
- return true;
+ return true; // ???????????
}
//=======================================================================
double deflection = 0.;
QString fileName = VTKPlugin_ExportDlg::getFileName( io,
- tr( "VTK_FILES" ),
- tr( "EXPORT_TITLE" ),
- parent,
- deflection );
+ tr( "VTK_FILES" ),
+ tr( "EXPORT_TITLE" ),
+ parent,
+ deflection );
if ( fileName.isEmpty() )
return false;
if ( vtkOp->IsDone() )
{
- transaction.commit();
+ transaction.commit();
}
else
{
- transaction.abort();
- SUIT_MessageBox::critical( parent,
- tr( "GEOM_ERROR" ),
- tr( "GEOM_PRP_ABORT" ) + "\n" + tr( vtkOp->GetErrorCode() ) );
- return false;
+ transaction.abort();
+ SUIT_MessageBox::critical( parent,
+ tr( "GEOM_ERROR" ),
+ tr( "GEOM_PRP_ABORT" ) + "\n" + tr( vtkOp->GetErrorCode() ) );
+ return false;
}
}
catch ( const SALOME::SALOME_Exception& e )
if ( !ok )
{
SUIT_MessageBox::warning( parent,
- tr( "WRN_WARNING" ),
- tr( "GEOM_WRN_NO_APPROPRIATE_SELECTION" ) );
+ tr( "WRN_WARNING" ),
+ tr( "GEOM_WRN_NO_APPROPRIATE_SELECTION" ) );
}
return ok;
}