mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00:49 +03:00
Compare commits
78 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
cec1ecd0c9 | ||
|
28b489581a | ||
|
f81b1b56f5 | ||
|
99559ae7d7 | ||
|
8f626dc5f2 | ||
|
8a74ae3a6c | ||
|
1691f09a2b | ||
|
14a202ac2b | ||
|
1d0a88f015 | ||
|
52cbf180cd | ||
|
77181844b8 | ||
|
7b90113083 | ||
|
c4f56862ab | ||
|
3cf0f6c033 | ||
|
c60e501bd2 | ||
|
e9cac5ffcb | ||
|
636743f90c | ||
|
e84e862fc1 | ||
|
d69c55b2e6 | ||
|
e3a803bbaf | ||
|
b6388d8b34 | ||
|
ffce0d66bb | ||
|
d055c128e7 | ||
|
c2e3775a0c | ||
|
b524286577 | ||
|
9c84112977 | ||
|
5e01cc417c | ||
|
979e95f188 | ||
|
de94621d80 | ||
|
aa9f1ba2de | ||
|
54270c2a8c | ||
|
3e1bddc4cd | ||
|
0c47974eb5 | ||
|
f0401b93a0 | ||
|
cbd3892496 | ||
|
054e18966b | ||
|
4f833b7d13 | ||
|
14b64f123d | ||
|
0ca21a9112 | ||
|
4607bd0747 | ||
|
9cd8e0b617 | ||
|
1d57bdc710 | ||
|
65824e943c | ||
|
65531f540c | ||
|
bffd568302 | ||
|
cbf6b87074 | ||
|
d462aae370 | ||
|
384d03c699 | ||
|
4d60da8c58 | ||
|
c22fee9a34 | ||
|
4ebd858084 | ||
|
f7a0b1fbc4 | ||
|
c5650474df | ||
|
4ec4f117ad | ||
|
e0b19449a6 | ||
|
c334f465ca | ||
|
674c5c809c | ||
|
546ac65cad | ||
|
f6dd26ddec | ||
|
49c4a2989c | ||
|
4e1af7df6c | ||
|
8c37cf59fa | ||
|
8466701f7e | ||
|
6241604814 | ||
|
a457daa116 | ||
|
3c8d9bbb7f | ||
|
c0bcd773c5 | ||
|
6c10d4b11a | ||
|
0913396cd3 | ||
|
a2e128b4df | ||
|
8c7a2aa65f | ||
|
1eb623f2ba | ||
|
8c49832926 | ||
|
6447aae244 | ||
|
d6b9f64152 | ||
|
27d82c622c | ||
|
d25a8fa9e9 | ||
|
eb2a1d9e3f |
@@ -725,7 +725,7 @@ Another possible problem is the order of initialization of global variables defi
|
|||||||
|
|
||||||
Avoid explicit usage of basic types (*int*, *float*, *double*, etc.), use Open CASCADE Technology types from package *Standard: Standard_Integer, Standard_Real, Standard_ShortReal, Standard_Boolean, Standard_CString* and others or a specific *typedef* instead.
|
Avoid explicit usage of basic types (*int*, *float*, *double*, etc.), use Open CASCADE Technology types from package *Standard: Standard_Integer, Standard_Real, Standard_ShortReal, Standard_Boolean, Standard_CString* and others or a specific *typedef* instead.
|
||||||
|
|
||||||
### Use *sizeof()* to calculate sizes [MANDATORY]
|
### Use sizeof() to calculate sizes [MANDATORY]
|
||||||
|
|
||||||
Do not assume sizes of types. Use *sizeof()* instead to calculate sizes.
|
Do not assume sizes of types. Use *sizeof()* instead to calculate sizes.
|
||||||
|
|
||||||
@@ -738,7 +738,7 @@ It is recommended to follow this rule for any plain text files for consistency a
|
|||||||
|
|
||||||
The rules listed in this chapter are important for stability of the programs that use Open CASCADE Technology libraries.
|
The rules listed in this chapter are important for stability of the programs that use Open CASCADE Technology libraries.
|
||||||
|
|
||||||
### Use *OSD::SetSignal()* to catch exceptions
|
### Use OSD::SetSignal() to catch exceptions
|
||||||
|
|
||||||
When using Open CASCADE Technology in an application, call *OSD::SetSignal()* function when the application is initialized.
|
When using Open CASCADE Technology in an application, call *OSD::SetSignal()* function when the application is initialized.
|
||||||
|
|
||||||
@@ -787,7 +787,7 @@ See the following example:
|
|||||||
|
|
||||||
In C++ use *new* and *delete* operators instead of *malloc()* and *free()*. Try not to mix different memory allocation techniques.
|
In C++ use *new* and *delete* operators instead of *malloc()* and *free()*. Try not to mix different memory allocation techniques.
|
||||||
|
|
||||||
### Match *new* and *delete* [MANDATORY]
|
### Match new and delete [MANDATORY]
|
||||||
|
|
||||||
Use the same form of new and delete.
|
Use the same form of new and delete.
|
||||||
|
|
||||||
@@ -812,7 +812,7 @@ Standard_Integer aTmpVar2 = 0; // OK
|
|||||||
|
|
||||||
Uninitialized variables might be kept only within performance-sensitive code blocks and only when their initialization is guaranteed by subsequent code.
|
Uninitialized variables might be kept only within performance-sensitive code blocks and only when their initialization is guaranteed by subsequent code.
|
||||||
|
|
||||||
### Do not hide global *new*
|
### Do not hide global new
|
||||||
|
|
||||||
Avoid hiding the global *new* operator.
|
Avoid hiding the global *new* operator.
|
||||||
|
|
||||||
|
@@ -780,7 +780,7 @@ restore theBox
|
|||||||
|
|
||||||
@subsubsection occt_draw_3_3_1 set
|
@subsubsection occt_draw_3_3_1 set
|
||||||
|
|
||||||
#### In *DrawTrSurf* package:
|
#### In DrawTrSurf package:
|
||||||
|
|
||||||
~~~~{.php}
|
~~~~{.php}
|
||||||
void Set(Standard_CString& Name,const gp_Pnt& G) ;
|
void Set(Standard_CString& Name,const gp_Pnt& G) ;
|
||||||
@@ -797,7 +797,7 @@ void Set(Standard_CString& Name,
|
|||||||
const Handle(Poly_Polygon2D)& P) ;
|
const Handle(Poly_Polygon2D)& P) ;
|
||||||
~~~~
|
~~~~
|
||||||
|
|
||||||
#### In *DBRep* package:
|
#### In DBRep package:
|
||||||
|
|
||||||
~~~~{.php}
|
~~~~{.php}
|
||||||
void Set(const Standard_CString Name,
|
void Set(const Standard_CString Name,
|
||||||
@@ -822,13 +822,13 @@ DBRep::Set(char*,B);
|
|||||||
|
|
||||||
@subsubsection occt_draw_3_3_2 get
|
@subsubsection occt_draw_3_3_2 get
|
||||||
|
|
||||||
#### In *DrawTrSurf* package:
|
#### In DrawTrSurf package:
|
||||||
|
|
||||||
~~~~{.php}
|
~~~~{.php}
|
||||||
Handle_Geom_Geometry Get(Standard_CString& Name) ;
|
Handle_Geom_Geometry Get(Standard_CString& Name) ;
|
||||||
~~~~
|
~~~~
|
||||||
|
|
||||||
#### In *DBRep* package:
|
#### In DBRep package:
|
||||||
|
|
||||||
~~~~{.php}
|
~~~~{.php}
|
||||||
TopoDS_Shape Get(Standard_CString& Name,
|
TopoDS_Shape Get(Standard_CString& Name,
|
||||||
|
@@ -226,269 +226,303 @@ TopoDS_Shape IGESToBRep_CurveAndSurface::TransferCurveAndSurface
|
|||||||
//function : TransferGeometry
|
//function : TransferGeometry
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
TopoDS_Shape IGESToBRep_CurveAndSurface::TransferGeometry
|
TopoDS_Shape IGESToBRep_CurveAndSurface::TransferGeometry
|
||||||
(const Handle(IGESData_IGESEntity)& theStart,
|
(const Handle(IGESData_IGESEntity)& start,
|
||||||
const Message_ProgressRange& theProgress)
|
const Message_ProgressRange& theProgress)
|
||||||
{
|
{
|
||||||
// Declaration of messages//
|
// Declaration of messages//
|
||||||
// DCE 22/12/98
|
// DCE 22/12/98
|
||||||
//Message_Msg aMsg1005("IGES_1001"); // The type of the Start is not recognized
|
//Message_Msg msg1005("IGES_1005"); // Software error : start IsNull.
|
||||||
//Message_Msg aMsg1005("IGES_1005"); // Software error : the Start IsNull.
|
//Message_Msg msg1015("IGES_1015"); // invalid type or exception raising (software error).
|
||||||
//Message_Msg aMsg1015("IGES_1015"); // invalid type or exception raising (software error).
|
//Message_Msg msg1010("IGES_1010"); // Not sameparameter.
|
||||||
//Message_Msg aMsg1010("IGES_1010"); // Not sameparameter.
|
// Message_Msg msg1015("IGES_1015");
|
||||||
//Message_Msg aMsg1015("IGES_1020"); // Associated entity IsNull
|
//Message_Msg msg210 ("XSTEP_210");
|
||||||
//Message_Msg aMsg1015("IGES_1025"); // No shape is found for the associated entity for the type 308
|
//Message_Msg msg202 ("XSTEP_202");
|
||||||
//Message_Msg aMsg1015("IGES_1030"); // No shape is found for the associated entity for the type 402
|
|
||||||
//Message_Msg aMsg1015("IGES_1035"); // The conversion of a Location is not possible
|
|
||||||
//Message_Msg aMsg210 ("XSTEP_210"); // No associated entities for the type 308
|
|
||||||
//Message_Msg aMsg202 ("XSTEP_202"); // No associated entities for the type 402
|
|
||||||
////////////////////////////
|
////////////////////////////
|
||||||
TopoDS_Shape res;
|
TopoDS_Shape res;
|
||||||
gp_Trsf T408;
|
gp_Trsf T408;
|
||||||
if (theStart.IsNull())
|
if (start.IsNull()) {
|
||||||
{
|
|
||||||
Message_Msg msg1005("IGES_1005"); // Software error : start IsNull.
|
Message_Msg msg1005("IGES_1005"); // Software error : start IsNull.
|
||||||
SendFail(theStart, msg1005);
|
SendFail(start, msg1005);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Read of the DE number and the type number of the entity
|
||||||
|
Handle(TCollection_HAsciiString) label = GetModel()->StringLabel(start);
|
||||||
|
//Standard_Integer typeNumber = start->TypeNumber();
|
||||||
|
|
||||||
// sln 13.06.2002 OCC448: Avoid transferring invisible sub entities which
|
// sln 13.06.2002 OCC448: Avoid transferring invisible sub entities which
|
||||||
// logically depend on the one
|
// logically depend on the one
|
||||||
const Standard_Integer anOnlyvisible = Interface_Static::IVal("read.iges.onlyvisible");
|
Standard_Integer onlyvisible = Interface_Static::IVal("read.iges.onlyvisible");
|
||||||
|
|
||||||
if (IGESToBRep::IsCurveAndSurface(theStart))
|
if (IGESToBRep::IsCurveAndSurface(start)) {
|
||||||
{
|
if(onlyvisible && start->BlankStatus() == 1)
|
||||||
if(anOnlyvisible && theStart->BlankStatus() == 1)
|
|
||||||
return res;
|
return res;
|
||||||
try
|
try {
|
||||||
{
|
|
||||||
OCC_CATCH_SIGNALS
|
OCC_CATCH_SIGNALS
|
||||||
res = TransferCurveAndSurface(theStart, theProgress);
|
res = TransferCurveAndSurface(start, theProgress);
|
||||||
}
|
}
|
||||||
catch(Standard_Failure const&)
|
catch(Standard_Failure const&) {
|
||||||
{
|
|
||||||
Message_Msg msg1015("IGES_1015");
|
Message_Msg msg1015("IGES_1015");
|
||||||
SendFail(theStart, msg1015);
|
SendFail(start, msg1015);
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
//408 : SingularSubfigure
|
//408 : SingularSubfigure
|
||||||
if (theStart->IsKind(STANDARD_TYPE(IGESBasic_SingularSubfigure)))
|
if (start->IsKind(STANDARD_TYPE(IGESBasic_SingularSubfigure)))
|
||||||
{
|
{
|
||||||
if(anOnlyvisible && theStart->BlankStatus() == 1)
|
if(onlyvisible && start->BlankStatus() == 1)
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
DeclareAndCast(IGESBasic_SingularSubfigure, st408, theStart);
|
DeclareAndCast(IGESBasic_SingularSubfigure, st408, start);
|
||||||
Handle (IGESBasic_SubfigureDef) stsub = st408->Subfigure();
|
Handle (IGESBasic_SubfigureDef) stsub = st408->Subfigure();
|
||||||
const gp_XYZ trans = st408->Translation();
|
gp_XYZ trans = st408->Translation();
|
||||||
gp_Vec vectr(trans);
|
gp_Vec vectr(trans);
|
||||||
const Standard_Real scunit = GetUnitFactor();
|
Standard_Real scunit = GetUnitFactor();
|
||||||
vectr.Multiply(scunit);
|
vectr.Multiply(scunit);
|
||||||
T408.SetTranslation(vectr);
|
T408.SetTranslation(vectr);
|
||||||
if (st408->HasScaleFactor())
|
if (st408->HasScaleFactor()) {
|
||||||
{
|
Standard_Real scalef = st408->ScaleFactor();
|
||||||
const Standard_Real scalef = st408->ScaleFactor();
|
T408.SetScaleFactor(scalef);
|
||||||
T408.SetScaleFactor(scalef);
|
}
|
||||||
|
if (HasShapeResult(stsub)) {
|
||||||
|
res = GetShapeResult(stsub);
|
||||||
}
|
}
|
||||||
if (HasShapeResult(stsub))
|
else {
|
||||||
{
|
try {
|
||||||
res = GetShapeResult(stsub);
|
OCC_CATCH_SIGNALS
|
||||||
}
|
res = TransferGeometry(stsub, theProgress);
|
||||||
else
|
}
|
||||||
{
|
catch(Standard_Failure const&) {
|
||||||
try
|
res.Nullify();
|
||||||
{
|
Message_Msg msg1015("IGES_1015");
|
||||||
OCC_CATCH_SIGNALS
|
SendFail( st408, msg1015);
|
||||||
res = TransferGeometry(stsub, theProgress);
|
}
|
||||||
}
|
if (!res.IsNull()) {
|
||||||
catch(Standard_Failure const&)
|
SetShapeResult(stsub,res);
|
||||||
{
|
}
|
||||||
res.Nullify();
|
|
||||||
const Message_Msg msg1015("IGES_1015");
|
|
||||||
SendFail(st408, msg1015);
|
|
||||||
}
|
|
||||||
if (!res.IsNull())
|
|
||||||
{
|
|
||||||
SetShapeResult(stsub, res);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 308 : SubfigureDefinition
|
// 308 : SubfigureDefinition
|
||||||
else if (theStart->IsKind(STANDARD_TYPE(IGESBasic_SubfigureDef)))
|
else if (start->IsKind(STANDARD_TYPE(IGESBasic_SubfigureDef))) {
|
||||||
{
|
DeclareAndCast(IGESBasic_SubfigureDef, st308, start);
|
||||||
DeclareAndCast(IGESBasic_SubfigureDef, st308, theStart);
|
TopoDS_Compound group;
|
||||||
TopoDS_Compound aGroup;
|
BRep_Builder B;
|
||||||
BRep_Builder aBuilder;
|
B.MakeCompound (group);
|
||||||
aBuilder.MakeCompound (aGroup);
|
if (st308->NbEntities() < 1) {
|
||||||
if (st308->NbEntities() < 1)
|
Message_Msg msg210 ("XSTEP_210");
|
||||||
{
|
SendFail( st308, msg210);
|
||||||
const Message_Msg msg210 ("XSTEP_210");
|
|
||||||
SendFail(st308, msg210);
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
Message_ProgressScope aPS (theProgress, "Subfigure item", st308->NbEntities());
|
Message_ProgressScope PS (theProgress, "Subfigure item", st308->NbEntities());
|
||||||
for (Standard_Integer anIndx =1; anIndx <= st308->NbEntities() && aPS.More(); anIndx++)
|
for (Standard_Integer i=1; i <= st308->NbEntities() && PS.More(); i++)
|
||||||
{
|
{
|
||||||
Message_ProgressRange aRange = aPS.Next();
|
Message_ProgressRange aRange = PS.Next();
|
||||||
TopoDS_Shape anItem;
|
TopoDS_Shape item;
|
||||||
if (st308->AssociatedEntity(anIndx).IsNull())
|
if (st308->AssociatedEntity(i).IsNull()) {
|
||||||
{
|
Message_Msg msg1020("IGES_1020");
|
||||||
Message_Msg msg1020("IGES_1020");
|
msg1020.Arg(i);
|
||||||
msg1020.Arg(anIndx);
|
SendWarning( st308, msg1020);
|
||||||
SendWarning(st308, msg1020);
|
continue;
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
if(anOnlyvisible && st308->AssociatedEntity(anIndx)->BlankStatus() == 1)
|
if(onlyvisible && st308->AssociatedEntity(i)->BlankStatus() == 1 )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (HasShapeResult(st308->AssociatedEntity(anIndx)))
|
if (HasShapeResult(st308->AssociatedEntity(i)))
|
||||||
{
|
{
|
||||||
anItem = GetShapeResult(st308->AssociatedEntity(anIndx));
|
item = GetShapeResult(st308->AssociatedEntity(i));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
try {
|
||||||
|
OCC_CATCH_SIGNALS
|
||||||
|
item = TransferGeometry (st308->AssociatedEntity(i), aRange);
|
||||||
|
}
|
||||||
|
catch(Standard_Failure const&) {
|
||||||
|
item.Nullify();
|
||||||
|
Message_Msg msg1015("IGES_1015");
|
||||||
|
SendFail( st308->AssociatedEntity(i), msg1015);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
if (item.IsNull()) {
|
||||||
{
|
Message_Msg msg1025("IGES_1025");
|
||||||
try
|
msg1025.Arg(i);
|
||||||
{
|
SendWarning (start,msg1025);
|
||||||
OCC_CATCH_SIGNALS
|
|
||||||
anItem = TransferGeometry (st308->AssociatedEntity(anIndx), aRange);
|
|
||||||
}
|
|
||||||
catch(Standard_Failure const&)
|
|
||||||
{
|
|
||||||
anItem.Nullify();
|
|
||||||
const Message_Msg msg1015("IGES_1015");
|
|
||||||
SendFail(st308->AssociatedEntity(anIndx), msg1015);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (anItem.IsNull())
|
else {
|
||||||
{
|
B.Add(group, item);
|
||||||
Message_Msg msg1025("IGES_1025");
|
SetShapeResult (st308->AssociatedEntity(i),item);
|
||||||
msg1025.Arg(anIndx);
|
|
||||||
SendWarning (theStart, msg1025);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
aBuilder.Add(aGroup, anItem);
|
|
||||||
SetShapeResult (st308->AssociatedEntity(anIndx), anItem);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
res = aGroup;
|
res = group;
|
||||||
}
|
}
|
||||||
// 402 : Group Associativity
|
else if (start->IsKind(STANDARD_TYPE(IGESBasic_Group))) {
|
||||||
else if (theStart->IsKind(STANDARD_TYPE(IGESBasic_Group)))
|
if(onlyvisible && start->BlankStatus() == 1)
|
||||||
{
|
return res;
|
||||||
if(anOnlyvisible && theStart->BlankStatus() == 1)
|
|
||||||
return res;
|
DeclareAndCast(IGESBasic_Group, st402f1, start);
|
||||||
|
TopoDS_Compound group;
|
||||||
DeclareAndCast(IGESBasic_Group, st402f1, theStart);
|
BRep_Builder B;
|
||||||
TopoDS_Compound aGroup;
|
B.MakeCompound (group);
|
||||||
BRep_Builder aBuilder;
|
if (st402f1->NbEntities() < 1) {
|
||||||
aBuilder.MakeCompound (aGroup);
|
|
||||||
const Standard_Integer aNbEnt = st402f1->NbEntities();
|
|
||||||
if (aNbEnt < 1)
|
|
||||||
{
|
|
||||||
Message_Msg msg202 ("XSTEP_202");
|
Message_Msg msg202 ("XSTEP_202");
|
||||||
msg202.Arg(st402f1->FormNumber());
|
msg202.Arg(st402f1->FormNumber());
|
||||||
SendFail(st402f1, msg202);
|
SendFail(st402f1, msg202);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
Message_ProgressScope aPS (theProgress, "Group item", aNbEnt);
|
Message_ProgressScope PS (theProgress, "Group item", st402f1->NbEntities());
|
||||||
Standard_Boolean ProblemInGroup = Standard_False;
|
Standard_Boolean ProblemInGroup = Standard_False;
|
||||||
for (Standard_Integer anIndx=1; anIndx <= aNbEnt && aPS.More(); anIndx++)
|
for (Standard_Integer i=1; i <= st402f1->NbEntities() && PS.More(); i++)
|
||||||
{
|
{
|
||||||
Message_ProgressRange aRange = aPS.Next();
|
Message_ProgressRange aRange = PS.Next();
|
||||||
TopoDS_Shape anItem;
|
TopoDS_Shape item;
|
||||||
if (st402f1->Entity(anIndx).IsNull())
|
if (st402f1->Entity(i).IsNull()) {
|
||||||
{
|
Message_Msg msg1020("IGES_1020");
|
||||||
Message_Msg msg1020("IGES_1020");
|
msg1020.Arg(i);
|
||||||
msg1020.Arg(anIndx);
|
SendFail( st402f1, msg1020);
|
||||||
SendFail(st402f1, msg1020);
|
continue;
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(anOnlyvisible && st402f1->Entity(anIndx)->BlankStatus() == 1)
|
if(onlyvisible && st402f1->Entity(i)->BlankStatus() == 1)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (HasShapeResult(st402f1->Entity(anIndx)))
|
if (HasShapeResult(st402f1->Entity(i))) {
|
||||||
{
|
item = GetShapeResult(st402f1->Entity(i));
|
||||||
anItem = GetShapeResult(st402f1->Entity(anIndx));
|
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
try {
|
||||||
try
|
OCC_CATCH_SIGNALS
|
||||||
{
|
item = TransferGeometry (st402f1->Entity(i), aRange);
|
||||||
OCC_CATCH_SIGNALS
|
}
|
||||||
anItem = TransferGeometry (st402f1->Entity(anIndx), aRange);
|
catch(Standard_Failure const&) {
|
||||||
}
|
item.Nullify();
|
||||||
catch(Standard_Failure const&)
|
Message_Msg msg1015("IGES_1015");
|
||||||
{
|
SendFail(st402f1->Entity(i),msg1015);
|
||||||
anItem.Nullify();
|
}
|
||||||
Message_Msg msg1015("IGES_1015");
|
|
||||||
SendFail(st402f1->Entity(anIndx), msg1015);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (anItem.IsNull())
|
if (item.IsNull()) {
|
||||||
{
|
//Message_Msg msg1030("IGES_1030");
|
||||||
|
//msg1030.Arg(st402f1->FormNumber());
|
||||||
|
//msg1030.Arg(i);
|
||||||
|
//SendWarning (st402f1,msg1030);
|
||||||
ProblemInGroup = Standard_True;
|
ProblemInGroup = Standard_True;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
B.Add(group, item);
|
||||||
aBuilder.Add(aGroup, anItem);
|
SetShapeResult (st402f1->Entity(i),item);
|
||||||
SetShapeResult (st402f1->Entity(anIndx), anItem);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
res = aGroup;
|
res = group;
|
||||||
if(ProblemInGroup)
|
if(ProblemInGroup) {
|
||||||
{
|
|
||||||
Message_Msg msg1030("IGES_1030");
|
Message_Msg msg1030("IGES_1030");
|
||||||
msg1030.Arg(st402f1->FormNumber());
|
msg1030.Arg(st402f1->FormNumber());
|
||||||
SendWarning (st402f1, msg1030);
|
SendWarning (st402f1,msg1030);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if (start->IsKind(STANDARD_TYPE(IGESBasic_GroupWithoutBackP))) {
|
||||||
{
|
|
||||||
|
if(onlyvisible && start->BlankStatus() == 1)
|
||||||
|
return res;
|
||||||
|
|
||||||
|
DeclareAndCast(IGESBasic_GroupWithoutBackP, st402f7, start);
|
||||||
|
TopoDS_Compound group;
|
||||||
|
//unused Handle(TCollection_HAsciiString) label = GetModel()->StringLabel(st402f7);
|
||||||
|
BRep_Builder B;
|
||||||
|
B.MakeCompound (group);
|
||||||
|
if (st402f7->NbEntities() < 1) {
|
||||||
|
Message_Msg msg202 ("XSTEP_202");
|
||||||
|
msg202.Arg(st402f7->FormNumber());
|
||||||
|
SendFail(st402f7, msg202);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
Message_ProgressScope PS (theProgress, "Group item", st402f7->NbEntities());
|
||||||
|
Standard_Boolean ProblemInGroup = Standard_False;
|
||||||
|
for (Standard_Integer i=1; i <= st402f7->NbEntities() && PS.More(); i++)
|
||||||
|
{
|
||||||
|
Message_ProgressRange aRange = PS.Next();
|
||||||
|
TopoDS_Shape item;
|
||||||
|
if (st402f7->Entity(i).IsNull()) {
|
||||||
|
Message_Msg msg1020("IGES_1020");
|
||||||
|
msg1020.Arg(i);
|
||||||
|
SendFail( st402f7, msg1020);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(onlyvisible && st402f7->Entity(i)->BlankStatus() == 1 )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (HasShapeResult(st402f7->Entity(i))) {
|
||||||
|
item = GetShapeResult(st402f7->Entity(i));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
try {
|
||||||
|
OCC_CATCH_SIGNALS
|
||||||
|
item = TransferGeometry (st402f7->Entity(i), aRange);
|
||||||
|
}
|
||||||
|
catch(Standard_Failure const&) {
|
||||||
|
item.Nullify();
|
||||||
|
Message_Msg msg1015("IGES_1015");
|
||||||
|
SendFail(st402f7->Entity(i),msg1015);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (item.IsNull()) {
|
||||||
|
//Message_Msg msg1030("IGES_1030");
|
||||||
|
//msg1030.Arg(st402f7->FormNumber());
|
||||||
|
//msg1030.Arg(i);
|
||||||
|
//SendWarning (st402f7,msg1030);
|
||||||
|
ProblemInGroup = Standard_True;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
B.Add(group, item);
|
||||||
|
SetShapeResult (st402f7->Entity(i),item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
res = group;
|
||||||
|
if(ProblemInGroup) {
|
||||||
|
Message_Msg msg1030("IGES_1030");
|
||||||
|
msg1030.Arg(st402f7->FormNumber());
|
||||||
|
SendWarning (st402f7,msg1030);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
Message_Msg msg1001("IGES_1001");
|
Message_Msg msg1001("IGES_1001");
|
||||||
msg1001.Arg(theStart->FormNumber());
|
msg1001.Arg(start->FormNumber());
|
||||||
SendFail (theStart, msg1001);
|
SendFail (start,msg1001);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (theStart->HasTransf())
|
if (start->HasTransf()) {
|
||||||
{
|
|
||||||
gp_Trsf T;
|
gp_Trsf T;
|
||||||
SetEpsilon(1.E-04);
|
SetEpsilon(1.E-04);
|
||||||
if (IGESData_ToolLocation::ConvertLocation(GetEpsilon(), theStart->CompoundLocation(),
|
if (IGESData_ToolLocation::ConvertLocation(GetEpsilon(),start->CompoundLocation(),
|
||||||
T, GetUnitFactor()))
|
T,GetUnitFactor())) {
|
||||||
{
|
if (start->IsKind(STANDARD_TYPE(IGESBasic_SingularSubfigure)))
|
||||||
if (theStart->IsKind(STANDARD_TYPE(IGESBasic_SingularSubfigure)))
|
{
|
||||||
{
|
gp_XYZ tra = T.TranslationPart();
|
||||||
gp_XYZ tra = T.TranslationPart();
|
gp_XYZ trans = T408.TranslationPart();
|
||||||
const gp_XYZ trans = T408.TranslationPart();
|
tra.Add(trans);
|
||||||
tra.Add(trans);
|
T.SetTranslationPart(tra);
|
||||||
T.SetTranslationPart(tra);
|
Standard_Real sc = T.ScaleFactor();
|
||||||
Standard_Real sc = T.ScaleFactor();
|
Standard_Real scalef = T408.ScaleFactor();
|
||||||
const Standard_Real scalef = T408.ScaleFactor();
|
sc = sc*scalef;
|
||||||
sc = sc*scalef;
|
T.SetScaleFactor(sc);
|
||||||
T.SetScaleFactor(sc);
|
}
|
||||||
}
|
|
||||||
TopLoc_Location L(T);
|
TopLoc_Location L(T);
|
||||||
res.Move(L, Standard_False);
|
res.Move(L, Standard_False);
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
Message_Msg msg1035("IGES_1035");
|
Message_Msg msg1035("IGES_1035");
|
||||||
SendWarning (theStart, msg1035);
|
SendWarning (start,msg1035);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
if (start->IsKind(STANDARD_TYPE(IGESBasic_SingularSubfigure))) {
|
||||||
if (theStart->IsKind(STANDARD_TYPE(IGESBasic_SingularSubfigure)))
|
|
||||||
{
|
|
||||||
TopLoc_Location L(T408);
|
TopLoc_Location L(T408);
|
||||||
res.Move(L);
|
res.Move(L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -34,20 +34,20 @@
|
|||||||
|
|
||||||
// Primary definitions
|
// Primary definitions
|
||||||
#define OCC_VERSION_MAJOR 7
|
#define OCC_VERSION_MAJOR 7
|
||||||
#define OCC_VERSION_MINOR 8
|
#define OCC_VERSION_MINOR 7
|
||||||
#define OCC_VERSION_MAINTENANCE 0
|
#define OCC_VERSION_MAINTENANCE 2
|
||||||
|
|
||||||
//! This macro must be commented in official release, and set to non-empty
|
//! This macro must be commented in official release, and set to non-empty
|
||||||
//! string in other situations, to identify specifics of the version, e.g.:
|
//! string in other situations, to identify specifics of the version, e.g.:
|
||||||
//! - "dev" for development version between releases
|
//! - "dev" for development version between releases
|
||||||
//! - "beta..." or "rc..." for beta releases or release candidates
|
//! - "beta..." or "rc..." for beta releases or release candidates
|
||||||
//! - "project..." for version containing project-specific fixes
|
//! - "project..." for version containing project-specific fixes
|
||||||
#define OCC_VERSION_DEVELOPMENT "dev"
|
//#define OCC_VERSION_DEVELOPMENT "dev"
|
||||||
|
|
||||||
// Derived (manually): version as real and string (major.minor)
|
// Derived (manually): version as real and string (major.minor)
|
||||||
#define OCC_VERSION 7.8
|
#define OCC_VERSION 7.7
|
||||||
#define OCC_VERSION_STRING "7.8"
|
#define OCC_VERSION_STRING "7.7"
|
||||||
#define OCC_VERSION_COMPLETE "7.8.0"
|
#define OCC_VERSION_COMPLETE "7.7.2"
|
||||||
|
|
||||||
//! Derived: extended version as string ("major.minor.maintenance.dev")
|
//! Derived: extended version as string ("major.minor.maintenance.dev")
|
||||||
#ifdef OCC_VERSION_DEVELOPMENT
|
#ifdef OCC_VERSION_DEVELOPMENT
|
||||||
|
@@ -2,8 +2,8 @@ puts "========================"
|
|||||||
puts "0033414: Modeling Algorithms - Access violation during executing BRepAlgoAPI_Section::Build()"
|
puts "0033414: Modeling Algorithms - Access violation during executing BRepAlgoAPI_Section::Build()"
|
||||||
puts "========================"
|
puts "========================"
|
||||||
|
|
||||||
set filepath1 [locate_data_file "CR33414_1.brep"]
|
set filepath1 [locate_data_file "bug33414_1.brep"]
|
||||||
set filepath2 [locate_data_file "CR33414_2.brep"]
|
set filepath2 [locate_data_file "bug33414_2.brep"]
|
||||||
restore ${filepath1} shape1
|
restore ${filepath1} shape1
|
||||||
restore ${filepath2} shape2
|
restore ${filepath2} shape2
|
||||||
bsection res shape1 shape2
|
bsection res shape1 shape2
|
||||||
|
Reference in New Issue
Block a user