View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0023247 | Community | OCCT:Modeling Algorithms | public | 2012-07-05 18:00 | 2012-07-05 18:01 |
Reporter | Jerome Monaco | Assigned To | |||
Priority | normal | Severity | minor | ||
Status | new | Resolution | open | ||
Platform | Windows | OS | VC++ 2010 | ||
Product Version | 6.5.2 | ||||
Summary | 0023247: Wrong value for StaticMoments in GProp_GProps | ||||
Description | The StaticMoments function does not compute the static moments correctly, and wrong values are returned. | ||||
Steps To Reproduce | /// Build rectangle face //---------------------- double dx( 10.0 ); double dy( 5.0 ); BRepBuilderAPI_MakePolygon MP; MP.Add( gp::Origin() ); MP.Add( gp_Pnt( dx, 0.0, 0.0 ) ); MP.Add( gp_Pnt( dx, dy, 0.0 ) ); MP.Add( gp_Pnt( 0.0, dy, 0.0 ) ); MP.Close(); MP.Build(); TopoDS_Face f = BRepBuilderAPI_MakeFace( MP.Wire() ); /// Compute face properties //------------------------- GProp_GProps sp( gp::Origin() ); BRepGProp::SurfaceProperties( f, sp ); double SMx, SMy, SMz; sp.StaticMoments( SMx, SMy, SMz ); /// Rectangle center of gravity //----------------------------- double xG( dx / 2.0 ); double yG( dy / 2.0 ); /// Rectangle area //---------------- double a( dx * dy ); /// Correct values for Ix, Iy and Iz //---------------------------------- double SMxGood( a * yG ); double SMGood( a * xG ); double SMzGood( a * 0.0 ); | ||||
Tags | No tags attached. | ||||
Test case number | |||||
Date Modified | Username | Field | Change |
---|---|---|---|
2012-07-05 18:00 | Jerome Monaco | New Issue | |
2012-07-05 18:00 | Jerome Monaco | Assigned To | => jgv |