1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

Compare commits

...

2 Commits

Author SHA1 Message Date
apn
e22217108b Added test case bugs/modalg_5/bug24397 2013-12-12 19:09:41 +04:00
ifv
7527d6d020 0024397: BRepBuilderAPI_Copy works not correct 2013-12-12 18:13:18 +04:00
2 changed files with 32 additions and 1 deletions

View File

@@ -55,7 +55,12 @@ void BRepGProp::LinearProperties(const TopoDS_Shape& S, GProp_GProps& SProps){
// Standard_Integer n,i; // Standard_Integer n,i;
TopExp_Explorer ex; TopExp_Explorer ex;
for (ex.Init(S,TopAbs_EDGE); ex.More(); ex.Next()) { for (ex.Init(S,TopAbs_EDGE); ex.More(); ex.Next()) {
BAC.Initialize(TopoDS::Edge(ex.Current())); const TopoDS_Edge& aE = TopoDS::Edge(ex.Current());
if(!BRep_Tool::IsGeometric(aE))
{
continue;
}
BAC.Initialize(aE);
BRepGProp_Cinert CG(BAC,P); BRepGProp_Cinert CG(BAC,P);
SProps.Add(CG); SProps.Add(CG);
} }

View File

@@ -0,0 +1,26 @@
puts "============"
puts "OCC24397"
puts "============"
puts ""
#############################################
# BRepBuilderAPI_Copy works not correct
#############################################
restore [locate_data_file case_1_wire3.brep] result
regexp {Mass +: +([-0-9.+eE]+)} [lprops result] full lp1
tcopy result result1
regexp {Mass +: +([-0-9.+eE]+)} [lprops result1] full lp2
if { $lp1 != $lp2 } {
puts "Error: lengths of original and copy shapes are not equal"
} else {
puts "OK: lengths of original and copy shapes are equal"
}
set length 942.478
set 2dviewer 0