MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0023247Community[OCCT] OCCT:Modeling Algorithmspublic2012-07-05 18:002012-07-05 18:01
ReporterJerome Monaco 
Assigned Tojgv 
PrioritynormalSeverityminor 
StatusnewResolutionopen 
PlatformWindowsOSVC++ 2010OS Version32 bit
Product Version[OCCT] 6.5.2 
Target VersionFixed in Version 
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
Attached Files

- Relationships

-  Notes
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


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker