Anonymous | Login | 2021-01-16 05:19 MSK | ![]() |
My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
0023247 | Community | [OCCT] OCCT:Modeling Algorithms | public | 2012-07-05 18:00 | 2012-07-05 18:01 | ||||||||
Reporter | Jerome Monaco | ||||||||||||
Assigned To | jgv | ||||||||||||
Priority | normal | Severity | minor | ||||||||||
Status | new | Resolution | open | ||||||||||
Platform | Windows | OS | VC++ 2010 | OS Version | 32 bit | ||||||||
Product Version | [OCCT] 6.5.2 | ||||||||||||
Target Version | Fixed in Version | ||||||||||||
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 | |||||||||||||
Attached Files | |||||||||||||
![]() |
|||
Date Modified | Username | Field | Change |
2012-07-05 18:00 | Jerome Monaco | New Issue | |
2012-07-05 18:00 | Jerome Monaco | Assigned To | => jgv |
Copyright © 2000 - 2021 MantisBT Team |