stifan Fri, 05/23/2008 - 01:27 Forums: Other usage issueshow i can determinate the length of Geom_Curve? and i'have a Curve in 2d space how to convert this curve in 3d space with a tolerance (of convert). thank you for your help Marco Matt Thu, 05/29/2008 - 17:15 I think you can get only the length of a topological curve, not a geometric curve (which should be infinite) const Standard_Real MyAlgo::getLength(const TopoDS_Shape & shape) { Q_ASSERT( shape.ShapeType() == TopAbs_WIRE || shape.ShapeType() == TopAbs_EDGE ); GProp_GProps system; BRepGProp::LinearProperties(shape, system); return system.Mass(); } Log in to post comments
Thu, 05/29/2008 - 17:15
I think you can get only the length of a topological curve, not a geometric curve (which should be infinite)
const Standard_Real MyAlgo::getLength(const TopoDS_Shape & shape)
{
Q_ASSERT( shape.ShapeType() == TopAbs_WIRE || shape.ShapeType() == TopAbs_EDGE );
GProp_GProps system;
BRepGProp::LinearProperties(shape, system);
return system.Mass();
}