Archived issue #0033907
Computed volume is not the same as the one given by CADAssistant
Description
Hello,
With the attached brep, I get a volume of 329.6, but with CADAssistant I get a volume of 334.6.
Why is there a difference please ?
With the attached brep, I get a volume of 329.6, but with CADAssistant I get a volume of 334.6.
Why is there a difference please ?
Steps to reproduce
TopoDS_Shape lShape ;
BRep_Builder lBuilder ;
GProp_GProps lProperties ;
BRepTools::Read(lShape, "Attachment 1 (BREP)", lBuilder) ;
BRepGProp::VolumeProperties(lShape, lProperties) ;
double lVolume = lProperties.Mass() ;
BRep_Builder lBuilder ;
GProp_GProps lProperties ;
BRepTools::Read(lShape, "Attachment 1 (BREP)", lBuilder) ;
BRepGProp::VolumeProperties(lShape, lProperties) ;
double lVolume = lProperties.Mass() ;
Public activity
2 archived notes
Participants are labeled by their role within this record.
Input BRep
Attachment 1 (BREP) (710,775 bytes)
There are two approaches of volume computation, using algorithms on BRep and on Mesh. Obviously, the second one depends on mesh quality and results can differ. CADAsssitant uses only the Mesh algorithm, while OCCT can use both, and by default uses BRep.
If you want to receive the similar results you can repeat your experiment with the mesh-only model. If you will use BRep+Mesh, CADAssistant will remesh it for Volume properties calculation with its internal parameters, so the experiment will fail.
To use algorithm on triangulation in OCCT the model should have triangulation and UseTriangulation = true parameter should be used in a method call.
If you want to receive the similar results you can repeat your experiment with the mesh-only model. If you will use BRep+Mesh, CADAssistant will remesh it for Volume properties calculation with its internal parameters, so the experiment will fail.
To use algorithm on triangulation in OCCT the model should have triangulation and UseTriangulation = true parameter should be used in a method call.