mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0023132: Suspicious code snippets
1) Warning in Aspect.cxx couldn't be reproduced 2) Description of changes: added 'return' statements into ReadStep(...) functions of RWStepBasic_* classes. 3) BRepFill_OffsetWire.cxx - removed dead code; 4) IFSelect_WorkSession.cxx - swapped arguments; 5) TopOpeBRep_ShapeIntersector2d.cxx - removed 'brake' statement and changed loop to if-statement because of void TopOpeBRep_ShapeIntersector2d::FindFFIntersection() function's call features. 6) V2d_RectangularGraphicGrid.cxx - left constants instead of functions beacuse of faster perfomance. 7) Commented unreachable code in files GeomFill_LocationGuide.cxx and TopOpeBRepTool_mkTondgE.cxx
This commit is contained in:
parent
49f38e37fc
commit
4e76d93bf1
@ -1619,35 +1619,6 @@ Standard_Integer CutEdge (const TopoDS_Edge& E,
|
|||||||
if (CT2d->BasisCurve()->IsKind(STANDARD_TYPE(Geom2d_Circle)) &&
|
if (CT2d->BasisCurve()->IsKind(STANDARD_TYPE(Geom2d_Circle)) &&
|
||||||
( Abs(f-l) >= M_PI) ) {
|
( Abs(f-l) >= M_PI) ) {
|
||||||
return 0;
|
return 0;
|
||||||
//---------------------------
|
|
||||||
// Cut closed circle.
|
|
||||||
//---------------------------
|
|
||||||
Standard_Real m = (f + l)*0.5;
|
|
||||||
// Modified by Sergey KHROMOV - Wed Mar 6 17:37:28 2002 Begin
|
|
||||||
gp_Pnt P = aC->Value(m);
|
|
||||||
|
|
||||||
VL = BRepLib_MakeVertex(P);
|
|
||||||
B.UpdateVertex(VL, aTol);
|
|
||||||
// Modified by Sergey KHROMOV - Wed Mar 6 17:37:30 2002 End
|
|
||||||
TopoDS_Shape aLocalShape = E.EmptyCopied();
|
|
||||||
TopoDS_Edge FE = TopoDS::Edge(aLocalShape);
|
|
||||||
TopoDS_Edge LE = TopoDS::Edge(aLocalShape);
|
|
||||||
// TopoDS_Edge FE = TopoDS::Edge(E.EmptyCopied());
|
|
||||||
// TopoDS_Edge LE = TopoDS::Edge(E.EmptyCopied());
|
|
||||||
FE.Orientation(TopAbs_FORWARD);
|
|
||||||
LE.Orientation(TopAbs_FORWARD);
|
|
||||||
B.Add (FE,V1);
|
|
||||||
B.Add (FE,VL.Oriented(TopAbs_REVERSED));
|
|
||||||
B.Range(FE, f, m);
|
|
||||||
B.Add (LE,V2);
|
|
||||||
B.Add (LE,VL.Oriented(TopAbs_FORWARD));
|
|
||||||
B.Range(LE, m, l);
|
|
||||||
Cuts.Append(FE.Oriented(E.Orientation()));
|
|
||||||
Cuts.Append(LE.Oriented(E.Orientation()));
|
|
||||||
//--------
|
|
||||||
// Return.
|
|
||||||
//--------
|
|
||||||
return 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------
|
//-------------------------
|
||||||
|
@ -743,7 +743,7 @@ static void InGoodPeriod(const Standard_Real Prec,
|
|||||||
|
|
||||||
if (rotation) {
|
if (rotation) {
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
|
/*
|
||||||
#ifdef DEB
|
#ifdef DEB
|
||||||
Standard_Real U = myFirstS + ratio*(Param-myCurve->FirstParameter());
|
Standard_Real U = myFirstS + ratio*(Param-myCurve->FirstParameter());
|
||||||
#else
|
#else
|
||||||
@ -862,7 +862,7 @@ static void InGoodPeriod(const Standard_Real Prec,
|
|||||||
myStatus = GeomFill_ImpossibleContact;
|
myStatus = GeomFill_ImpossibleContact;
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}//if_rotation
|
}//if_rotation
|
||||||
|
|
||||||
|
|
||||||
|
@ -2822,7 +2822,7 @@ void IFSelect_WorkSession::QueryCheckList (const Interface_CheckIterator& chl)
|
|||||||
{
|
{
|
||||||
if (!IsLoaded()) return;
|
if (!IsLoaded()) return;
|
||||||
Standard_Integer i,nb = themodel->NbEntities();
|
Standard_Integer i,nb = themodel->NbEntities();
|
||||||
thecheckana = TCollection_AsciiString (' ',nb+1);
|
thecheckana = TCollection_AsciiString (nb+1,' ');
|
||||||
for (chl.Start(); chl.More(); chl.Next()) {
|
for (chl.Start(); chl.More(); chl.Next()) {
|
||||||
Standard_Integer num = chl.Number();
|
Standard_Integer num = chl.Number();
|
||||||
const Handle(Interface_Check) ach = chl.Value();
|
const Handle(Interface_Check) ach = chl.Value();
|
||||||
|
@ -898,10 +898,10 @@ void IntTools_EdgeFace::CheckData()
|
|||||||
aCommonPrt.SetVertexParameter1(tm);
|
aCommonPrt.SetVertexParameter1(tm);
|
||||||
aCommonPrt.SetRange1 (af1, al1);
|
aCommonPrt.SetRange1 (af1, al1);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
/*
|
||||||
dt=al1-af1;
|
dt=al1-af1;
|
||||||
if (dt<1.e-5) {
|
if (dt<1.e-5) {
|
||||||
gp_Pnt aPF, aPL;
|
gp_Pnt aPF, aPL;
|
||||||
@ -940,6 +940,7 @@ void IntTools_EdgeFace::CheckData()
|
|||||||
aCommonPrt.SetType(TopAbs_EDGE);
|
aCommonPrt.SetType(TopAbs_EDGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,19 +54,29 @@ void RWStepBasic_RWSiUnitAndAreaUnit::ReadStep(const Handle(StepData_StepReaderD
|
|||||||
if (data->ParamType(num,1) == Interface_ParamEnum) {
|
if (data->ParamType(num,1) == Interface_ParamEnum) {
|
||||||
Standard_CString text = data->ParamCValue(num,1);
|
Standard_CString text = data->ParamCValue(num,1);
|
||||||
hasAprefix = reader.DecodePrefix(aPrefix,text);
|
hasAprefix = reader.DecodePrefix(aPrefix,text);
|
||||||
if(!hasAprefix)
|
if(!hasAprefix){
|
||||||
ach->AddFail("Enumeration si_prefix has not an allowed value");
|
ach->AddFail("Enumeration si_prefix has not an allowed value");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
ach->AddFail("Parameter #2 (prefix) is not an enumeration");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else ach->AddFail("Parameter #2 (prefix) is not an enumeration");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
StepBasic_SiUnitName aName;
|
StepBasic_SiUnitName aName;
|
||||||
if (data->ParamType(num,2) == Interface_ParamEnum) {
|
if (data->ParamType(num,2) == Interface_ParamEnum) {
|
||||||
Standard_CString text = data->ParamCValue(num,2);
|
Standard_CString text = data->ParamCValue(num,2);
|
||||||
if(!reader.DecodeName(aName,text))
|
if(!reader.DecodeName(aName,text)){
|
||||||
ach->AddFail("Enumeration si_unit_name has not an allowed value");
|
ach->AddFail("Enumeration si_unit_name has not an allowed value");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
ach->AddFail("Parameter #3 (name) is not an enumeration");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else ach->AddFail("Parameter #3 (name) is not an enumeration");
|
|
||||||
|
|
||||||
ent->Init(hasAprefix,aPrefix,aName);
|
ent->Init(hasAprefix,aPrefix,aName);
|
||||||
ent->SetDimensions(aDimensions);
|
ent->SetDimensions(aDimensions);
|
||||||
|
@ -66,20 +66,30 @@ void RWStepBasic_RWSiUnitAndLengthUnit::ReadStep(const Handle(StepData_StepReade
|
|||||||
if (data->ParamType(num,1) == Interface_ParamEnum) {
|
if (data->ParamType(num,1) == Interface_ParamEnum) {
|
||||||
Standard_CString text = data->ParamCValue(num,1);
|
Standard_CString text = data->ParamCValue(num,1);
|
||||||
hasAprefix = reader.DecodePrefix(aPrefix,text);
|
hasAprefix = reader.DecodePrefix(aPrefix,text);
|
||||||
if(!hasAprefix)
|
if(!hasAprefix){
|
||||||
ach->AddFail("Enumeration si_prefix has not an allowed value");
|
ach->AddFail("Enumeration si_prefix has not an allowed value");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
ach->AddFail("Parameter #2 (prefix) is not an enumeration");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else ach->AddFail("Parameter #2 (prefix) is not an enumeration");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- field : name ---
|
// --- field : name ---
|
||||||
StepBasic_SiUnitName aName;
|
StepBasic_SiUnitName aName;
|
||||||
if (data->ParamType(num,2) == Interface_ParamEnum) {
|
if (data->ParamType(num,2) == Interface_ParamEnum) {
|
||||||
Standard_CString text = data->ParamCValue(num,2);
|
Standard_CString text = data->ParamCValue(num,2);
|
||||||
if(!reader.DecodeName(aName,text))
|
if(!reader.DecodeName(aName,text)){
|
||||||
ach->AddFail("Enumeration si_unit_name has not an allowed value");
|
ach->AddFail("Enumeration si_unit_name has not an allowed value");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
ach->AddFail("Parameter #2 (name) is not an enumeration");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else ach->AddFail("Parameter #2 (name) is not an enumeration");
|
|
||||||
|
|
||||||
//--- Initialisation of the red entity ---
|
//--- Initialisation of the red entity ---
|
||||||
ent->Init(hasAprefix,aPrefix,aName);
|
ent->Init(hasAprefix,aPrefix,aName);
|
||||||
|
@ -75,20 +75,30 @@ void RWStepBasic_RWSiUnitAndMassUnit::ReadStep(const Handle(StepData_StepReaderD
|
|||||||
if (data->ParamType(num,1) == Interface_ParamEnum) {
|
if (data->ParamType(num,1) == Interface_ParamEnum) {
|
||||||
Standard_CString text = data->ParamCValue(num,1);
|
Standard_CString text = data->ParamCValue(num,1);
|
||||||
hasAprefix = reader.DecodePrefix(aPrefix,text);
|
hasAprefix = reader.DecodePrefix(aPrefix,text);
|
||||||
if(!hasAprefix)
|
if(!hasAprefix){
|
||||||
ach->AddFail("Enumeration si_prefix has not an allowed value");
|
ach->AddFail("Enumeration si_prefix has not an allowed value");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
ach->AddFail("Parameter #2 (prefix) is not an enumeration");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else ach->AddFail("Parameter #2 (prefix) is not an enumeration");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- field : name ---
|
// --- field : name ---
|
||||||
StepBasic_SiUnitName aName;
|
StepBasic_SiUnitName aName;
|
||||||
if (data->ParamType(num,2) == Interface_ParamEnum) {
|
if (data->ParamType(num,2) == Interface_ParamEnum) {
|
||||||
Standard_CString text = data->ParamCValue(num,2);
|
Standard_CString text = data->ParamCValue(num,2);
|
||||||
if(!reader.DecodeName(aName,text))
|
if(!reader.DecodeName(aName,text)){
|
||||||
ach->AddFail("Enumeration si_unit_name has not an allowed value");
|
ach->AddFail("Enumeration si_unit_name has not an allowed value");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
ach->AddFail("Parameter #2 (name) is not an enumeration");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else ach->AddFail("Parameter #2 (name) is not an enumeration");
|
|
||||||
|
|
||||||
//--- Initialisation of the red entity ---
|
//--- Initialisation of the red entity ---
|
||||||
ent->Init(hasAprefix,aPrefix,aName);
|
ent->Init(hasAprefix,aPrefix,aName);
|
||||||
|
@ -59,20 +59,30 @@ void RWStepBasic_RWSiUnitAndPlaneAngleUnit::ReadStep(const Handle(StepData_StepR
|
|||||||
if (data->ParamType(num,1) == Interface_ParamEnum) {
|
if (data->ParamType(num,1) == Interface_ParamEnum) {
|
||||||
Standard_CString text = data->ParamCValue(num,1);
|
Standard_CString text = data->ParamCValue(num,1);
|
||||||
hasAprefix = reader.DecodePrefix(aPrefix,text);
|
hasAprefix = reader.DecodePrefix(aPrefix,text);
|
||||||
if(!hasAprefix)
|
if(!hasAprefix){
|
||||||
ach->AddFail("Enumeration si_prefix has not an allowed value");
|
ach->AddFail("Enumeration si_prefix has not an allowed value");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
ach->AddFail("Parameter #2 (prefix) is not an enumeration");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else ach->AddFail("Parameter #2 (prefix) is not an enumeration");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- field : name ---
|
// --- field : name ---
|
||||||
StepBasic_SiUnitName aName;
|
StepBasic_SiUnitName aName;
|
||||||
if (data->ParamType(num,2) == Interface_ParamEnum) {
|
if (data->ParamType(num,2) == Interface_ParamEnum) {
|
||||||
Standard_CString text = data->ParamCValue(num,2);
|
Standard_CString text = data->ParamCValue(num,2);
|
||||||
if(!reader.DecodeName(aName,text))
|
if(!reader.DecodeName(aName,text)){
|
||||||
ach->AddFail("Enumeration si_unit_name has not an allowed value");
|
ach->AddFail("Enumeration si_unit_name has not an allowed value");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
ach->AddFail("Parameter #2 (name) is not an enumeration");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else ach->AddFail("Parameter #2 (name) is not an enumeration");
|
|
||||||
|
|
||||||
//--- Initialisation of the red entity ---
|
//--- Initialisation of the red entity ---
|
||||||
ent->Init(hasAprefix,aPrefix,aName);
|
ent->Init(hasAprefix,aPrefix,aName);
|
||||||
|
@ -58,20 +58,30 @@ void RWStepBasic_RWSiUnitAndRatioUnit::ReadStep (const Handle(StepData_StepReade
|
|||||||
if (data->ParamType(num,1) == Interface_ParamEnum) {
|
if (data->ParamType(num,1) == Interface_ParamEnum) {
|
||||||
Standard_CString text = data->ParamCValue(num,1);
|
Standard_CString text = data->ParamCValue(num,1);
|
||||||
hasAprefix = reader.DecodePrefix(aPrefix,text);
|
hasAprefix = reader.DecodePrefix(aPrefix,text);
|
||||||
if(!hasAprefix)
|
if(!hasAprefix){
|
||||||
ach->AddFail("Enumeration si_prefix has not an allowed value");
|
ach->AddFail("Enumeration si_prefix has not an allowed value");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
ach->AddFail("Parameter #1 (prefix) is not an enumeration");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else ach->AddFail("Parameter #1 (prefix) is not an enumeration");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- field : name ---
|
// --- field : name ---
|
||||||
StepBasic_SiUnitName aName;
|
StepBasic_SiUnitName aName;
|
||||||
if (data->ParamType(num,2) == Interface_ParamEnum) {
|
if (data->ParamType(num,2) == Interface_ParamEnum) {
|
||||||
Standard_CString text = data->ParamCValue(num,2);
|
Standard_CString text = data->ParamCValue(num,2);
|
||||||
if(!reader.DecodeName(aName,text))
|
if(!reader.DecodeName(aName,text)){
|
||||||
ach->AddFail("Enumeration si_unit_name has not an allowed value");
|
ach->AddFail("Enumeration si_unit_name has not an allowed value");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
ach->AddFail("Parameter #2 (name) is not an enumeration");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else ach->AddFail("Parameter #2 (name) is not an enumeration");
|
|
||||||
|
|
||||||
//--- Initialisation of the red entity ---
|
//--- Initialisation of the red entity ---
|
||||||
ent->Init(hasAprefix,aPrefix,aName);
|
ent->Init(hasAprefix,aPrefix,aName);
|
||||||
|
@ -55,20 +55,30 @@ void RWStepBasic_RWSiUnitAndSolidAngleUnit::ReadStep (const Handle(StepData_Step
|
|||||||
if (data->ParamType(num,1) == Interface_ParamEnum) {
|
if (data->ParamType(num,1) == Interface_ParamEnum) {
|
||||||
Standard_CString text = data->ParamCValue(num,1);
|
Standard_CString text = data->ParamCValue(num,1);
|
||||||
hasAprefix = reader.DecodePrefix(aPrefix,text);
|
hasAprefix = reader.DecodePrefix(aPrefix,text);
|
||||||
if(!hasAprefix)
|
if(!hasAprefix){
|
||||||
ach->AddFail("Enumeration si_prefix has not an allowed value");
|
ach->AddFail("Enumeration si_prefix has not an allowed value");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
ach->AddFail("Parameter #1 (prefix) is not an enumeration");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else ach->AddFail("Parameter #1 (prefix) is not an enumeration");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- field : name ---
|
// --- field : name ---
|
||||||
StepBasic_SiUnitName aName;
|
StepBasic_SiUnitName aName;
|
||||||
if (data->ParamType(num,2) == Interface_ParamEnum) {
|
if (data->ParamType(num,2) == Interface_ParamEnum) {
|
||||||
Standard_CString text = data->ParamCValue(num,2);
|
Standard_CString text = data->ParamCValue(num,2);
|
||||||
if(!reader.DecodeName(aName,text))
|
if(!reader.DecodeName(aName,text)){
|
||||||
ach->AddFail("Enumeration si_unit_name has not an allowed value");
|
ach->AddFail("Enumeration si_unit_name has not an allowed value");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
ach->AddFail("Parameter #2 (name) is not an enumeration");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else ach->AddFail("Parameter #2 (name) is not an enumeration");
|
|
||||||
|
|
||||||
// --- Instance of plex componant SolidAngleUnit ---
|
// --- Instance of plex componant SolidAngleUnit ---
|
||||||
num = data->NextForComplex(num);
|
num = data->NextForComplex(num);
|
||||||
|
@ -67,20 +67,30 @@ void RWStepBasic_RWSiUnitAndThermodynamicTemperatureUnit::ReadStep
|
|||||||
if (data->ParamType(num,1) == Interface_ParamEnum) {
|
if (data->ParamType(num,1) == Interface_ParamEnum) {
|
||||||
Standard_CString text = data->ParamCValue(num,1);
|
Standard_CString text = data->ParamCValue(num,1);
|
||||||
hasAprefix = reader.DecodePrefix(aPrefix,text);
|
hasAprefix = reader.DecodePrefix(aPrefix,text);
|
||||||
if(!hasAprefix)
|
if(!hasAprefix){
|
||||||
ach->AddFail("Enumeration si_prefix has not an allowed value");
|
ach->AddFail("Enumeration si_prefix has not an allowed value");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
ach->AddFail("Parameter #1 (prefix) is not an enumeration");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else ach->AddFail("Parameter #1 (prefix) is not an enumeration");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- field : name ---
|
// --- field : name ---
|
||||||
StepBasic_SiUnitName aName;
|
StepBasic_SiUnitName aName;
|
||||||
if (data->ParamType(num,2) == Interface_ParamEnum) {
|
if (data->ParamType(num,2) == Interface_ParamEnum) {
|
||||||
Standard_CString text = data->ParamCValue(num,2);
|
Standard_CString text = data->ParamCValue(num,2);
|
||||||
if(!reader.DecodeName(aName,text))
|
if(!reader.DecodeName(aName,text)){
|
||||||
ach->AddFail("Enumeration si_unit_name has not an allowed value");
|
ach->AddFail("Enumeration si_unit_name has not an allowed value");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
ach->AddFail("Parameter #2 (name) is not an enumeration");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else ach->AddFail("Parameter #2 (name) is not an enumeration");
|
|
||||||
|
|
||||||
// --- Instance of plex componant SolidAngleUnit ---
|
// --- Instance of plex componant SolidAngleUnit ---
|
||||||
num = data->NextForComplex(num);
|
num = data->NextForComplex(num);
|
||||||
|
@ -66,20 +66,30 @@ void RWStepBasic_RWSiUnitAndTimeUnit::ReadStep (const Handle(StepData_StepReader
|
|||||||
if (data->ParamType(num,1) == Interface_ParamEnum) {
|
if (data->ParamType(num,1) == Interface_ParamEnum) {
|
||||||
Standard_CString text = data->ParamCValue(num,1);
|
Standard_CString text = data->ParamCValue(num,1);
|
||||||
hasAprefix = reader.DecodePrefix(aPrefix,text);
|
hasAprefix = reader.DecodePrefix(aPrefix,text);
|
||||||
if(!hasAprefix)
|
if(!hasAprefix){
|
||||||
ach->AddFail("Enumeration si_prefix has not an allowed value");
|
ach->AddFail("Enumeration si_prefix has not an allowed value");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
ach->AddFail("Parameter #1 (prefix) is not an enumeration");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else ach->AddFail("Parameter #1 (prefix) is not an enumeration");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- field : name ---
|
// --- field : name ---
|
||||||
StepBasic_SiUnitName aName;
|
StepBasic_SiUnitName aName;
|
||||||
if (data->ParamType(num,2) == Interface_ParamEnum) {
|
if (data->ParamType(num,2) == Interface_ParamEnum) {
|
||||||
Standard_CString text = data->ParamCValue(num,2);
|
Standard_CString text = data->ParamCValue(num,2);
|
||||||
if(!reader.DecodeName(aName,text))
|
if(!reader.DecodeName(aName,text)){
|
||||||
ach->AddFail("Enumeration si_unit_name has not an allowed value");
|
ach->AddFail("Enumeration si_unit_name has not an allowed value");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
ach->AddFail("Parameter #2 (name) is not an enumeration");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else ach->AddFail("Parameter #2 (name) is not an enumeration");
|
|
||||||
|
|
||||||
// --- Instance of plex componant TimeUnit ---
|
// --- Instance of plex componant TimeUnit ---
|
||||||
num = data->NextForComplex(num);
|
num = data->NextForComplex(num);
|
||||||
|
@ -49,19 +49,29 @@ void RWStepBasic_RWSiUnitAndVolumeUnit::ReadStep(const Handle(StepData_StepReade
|
|||||||
if (data->ParamType(num,1) == Interface_ParamEnum) {
|
if (data->ParamType(num,1) == Interface_ParamEnum) {
|
||||||
Standard_CString text = data->ParamCValue(num,1);
|
Standard_CString text = data->ParamCValue(num,1);
|
||||||
hasAprefix = reader.DecodePrefix(aPrefix,text);
|
hasAprefix = reader.DecodePrefix(aPrefix,text);
|
||||||
if(!hasAprefix)
|
if(!hasAprefix){
|
||||||
ach->AddFail("Enumeration si_prefix has not an allowed value");
|
ach->AddFail("Enumeration si_prefix has not an allowed value");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
ach->AddFail("Parameter #2 (prefix) is not an enumeration");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else ach->AddFail("Parameter #2 (prefix) is not an enumeration");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
StepBasic_SiUnitName aName;
|
StepBasic_SiUnitName aName;
|
||||||
if (data->ParamType(num,2) == Interface_ParamEnum) {
|
if (data->ParamType(num,2) == Interface_ParamEnum) {
|
||||||
Standard_CString text = data->ParamCValue(num,2);
|
Standard_CString text = data->ParamCValue(num,2);
|
||||||
if(!reader.DecodeName(aName,text))
|
if(!reader.DecodeName(aName,text)){
|
||||||
ach->AddFail("Enumeration si_unit_name has not an allowed value");
|
ach->AddFail("Enumeration si_unit_name has not an allowed value");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
ach->AddFail("Parameter #3 (name) is not an enumeration");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else ach->AddFail("Parameter #3 (name) is not an enumeration");
|
|
||||||
|
|
||||||
data->NamedForComplex("VOLUME_UNIT",num0,num,ach);
|
data->NamedForComplex("VOLUME_UNIT",num0,num,ach);
|
||||||
if (!data->CheckNbParams(num,0,ach,"volume_unit")) return;
|
if (!data->CheckNbParams(num,0,ach,"volume_unit")) return;
|
||||||
|
@ -258,7 +258,7 @@ void TopOpeBRep_ShapeIntersector2d::FindFFIntersection()
|
|||||||
myFFDone = Standard_False;
|
myFFDone = Standard_False;
|
||||||
// myFFSameDomain = Standard_False;
|
// myFFSameDomain = Standard_False;
|
||||||
|
|
||||||
while ( MoreFFCouple() ) {
|
if ( MoreFFCouple() ) {
|
||||||
|
|
||||||
// The two candidate intersecting GeomShapes GS1,GS2 and their types t1,t2
|
// The two candidate intersecting GeomShapes GS1,GS2 and their types t1,t2
|
||||||
const TopoDS_Shape& GS1 = myFaceScanner.Current();
|
const TopoDS_Shape& GS1 = myFaceScanner.Current();
|
||||||
@ -277,8 +277,6 @@ void TopOpeBRep_ShapeIntersector2d::FindFFIntersection()
|
|||||||
BS.Box(GS1);
|
BS.Box(GS1);
|
||||||
BS.Box(GS2);
|
BS.Box(GS2);
|
||||||
myFFDone = Standard_True;
|
myFFDone = Standard_True;
|
||||||
break;
|
|
||||||
NextFFCouple();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SetIntersectionDone();
|
SetIntersectionDone();
|
||||||
|
@ -366,7 +366,7 @@ Standard_Boolean TopOpeBRepTool_mkTondgE::MkTonE(const TopoDS_Edge& ei, Standard
|
|||||||
else mkT = outin ? MKI2 : MKI1;
|
else mkT = outin ? MKI2 : MKI1;
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
////////////////////////////////////////////////
|
////////////////////////////////////////////////
|
||||||
|
/*
|
||||||
// xxri :
|
// xxri :
|
||||||
Standard_Real ddot = tgin1di.Dot(faxis);
|
Standard_Real ddot = tgin1di.Dot(faxis);
|
||||||
Standard_Boolean tgaxis = Abs(1-(Abs(ddot))) < FUN_tola(); //=true : edge is tangent to sphere's axis
|
Standard_Boolean tgaxis = Abs(1-(Abs(ddot))) < FUN_tola(); //=true : edge is tangent to sphere's axis
|
||||||
@ -378,7 +378,7 @@ Standard_Boolean TopOpeBRepTool_mkTondgE::MkTonE(const TopoDS_Edge& ei, Standard
|
|||||||
if ((!onfi) && (!onli)) {mkT = MKI12; return Standard_True;} // @190499
|
if ((!onfi) && (!onli)) {mkT = MKI12; return Standard_True;} // @190499
|
||||||
if (closedi) {mkT = MKI12; return Standard_True;}// onfi || onli @190499
|
if (closedi) {mkT = MKI12; return Standard_True;}// onfi || onli @190499
|
||||||
xxri = tgin1di;
|
xxri = tgin1di;
|
||||||
}
|
}*/
|
||||||
}//!isT2d
|
}//!isT2d
|
||||||
|
|
||||||
mkT = MKI12; // without restrictions.
|
mkT = MKI12; // without restrictions.
|
||||||
@ -387,5 +387,7 @@ Standard_Boolean TopOpeBRepTool_mkTondgE::MkTonE(const TopoDS_Edge& ei, Standard
|
|||||||
Standard_Boolean keepang = (dot > 0);
|
Standard_Boolean keepang = (dot > 0);
|
||||||
if (keepang) mkT = outin ? MKI1 : MKI2;
|
if (keepang) mkT = outin ? MKI1 : MKI2;
|
||||||
else mkT = outin ? MKI2 : MKI1;
|
else mkT = outin ? MKI2 : MKI1;
|
||||||
|
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user