mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
0033100: Modeling Algorithms - XCAFDoc_Editor::RescaleGeometry does not rescale triangulations
Make XCAFDoc_Editor::RescaleGeometry to pass the flag theCopyMesh==true in call to BRepBuilderAPI_Transform::Perform. Correct the help of the command XRescaleGeometry.
This commit is contained in:
parent
f74f684b16
commit
fd5c113a03
@ -515,7 +515,7 @@ static void rescaleDimensionRefLabels(const TDF_LabelSequence& theRefLabels,
|
||||
if (aL.FindAttribute(TNaming_NamedShape::GetID(), aNS))
|
||||
{
|
||||
TopoDS_Shape aShape = aNS->Get();
|
||||
theBRepTrsf.Perform(aShape, Standard_True);
|
||||
theBRepTrsf.Perform(aShape, Standard_True, Standard_True);
|
||||
if (!theBRepTrsf.IsDone())
|
||||
{
|
||||
Standard_SStream aSS;
|
||||
@ -664,7 +664,7 @@ Standard_Boolean XCAFDoc_Editor::RescaleGeometry(const TDF_Label& theLabel,
|
||||
if (aNodeType == XCAFDoc_AssemblyGraph::NodeType_Part)
|
||||
{
|
||||
const TopoDS_Shape aShape = aShapeTool->GetShape(aLabel);
|
||||
aBRepTrsf.Perform(aShape, Standard_True);
|
||||
aBRepTrsf.Perform(aShape, Standard_True, Standard_True);
|
||||
if (!aBRepTrsf.IsDone())
|
||||
{
|
||||
Standard_SStream aSS;
|
||||
|
@ -1836,7 +1836,7 @@ void XDEDRAW::Init(Draw_Interpretor& di)
|
||||
"Doc [-names]: Prints number of assembly instances",
|
||||
__FILE__, XDumpNomenclature, g);
|
||||
di.Add("XRescaleGeometry",
|
||||
"Doc -scale factor [-root label]: Applies geometrical scale to assembly",
|
||||
"Doc factor [-root label] [-force]: Applies geometrical scale to assembly",
|
||||
__FILE__, XRescaleGeometry, g);
|
||||
|
||||
// Specialized commands
|
||||
|
15
tests/bugs/xde/bug33100
Normal file
15
tests/bugs/xde/bug33100
Normal file
@ -0,0 +1,15 @@
|
||||
puts "0033100: Modeling Algorithms - XCAFDoc_Editor::RescaleGeometry does not rescale triangulations"
|
||||
|
||||
pload DCAF
|
||||
Close d -silent
|
||||
ReadStep d [locate_data_file "bug33100_window.step"]
|
||||
|
||||
XGetOneShape a d
|
||||
set ref_diag [eval distpp [bounding a]]
|
||||
|
||||
XRescaleGeometry d 1000
|
||||
|
||||
XGetOneShape a d
|
||||
set diag [eval distpp [bounding a]]
|
||||
|
||||
checkreal "bounding box diagonal" $diag [expr $ref_diag * 1000] 0 0.001
|
Loading…
x
Reference in New Issue
Block a user