View Issue Details

IDProjectCategoryView StatusLast Update
0023247CommunityOCCT:Modeling Algorithmspublic2012-07-05 18:01
ReporterJerome Monaco Assigned Tojgv 
PrioritynormalSeverityminor 
Status newResolutionopen 
PlatformWindowsOSVC++ 2010 
Product Version6.5.2 
Summary0023247: Wrong value for StaticMoments in GProp_GProps
DescriptionThe 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 );
 
TagsNo tags attached.
Test case number

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2012-07-05 18:00 Jerome Monaco New Issue
2012-07-05 18:00 Jerome Monaco Assigned To => jgv