double my_u_min=1e6,my_v_min=1e6,my_u_max=-1e6,my_v_max=-1e6;
typedef struct {
- gp_XY uv;
- gp_XYZ xyz;
+ gp_XY uv;
+ gp_XYZ xyz;
} projectionPoint;
/////////////////////////////////////////////////////////
projectionPoint getProjectionPoint(const TopoDS_Face& face, const gp_XYZ& point)
}
}
}
-
+
if (GeomType == TopAbs_FACE){
HasSizeMapOnFace = true;
createAttractorOnFace(GeomShape, atIt->second);
status_t curv_fun(real t, real *uv, real *dt, real *dtt, void *user_data);
status_t surf_fun(real *uv, real *xyz, real*du, real *dv,
- real *duu, real *duv, real *dvv, void *user_data);
+ real *duu, real *duv, real *dvv, void *user_data);
status_t message_callback(message_t *msg, void *user_data);
//=============================================================================
Standard_Real p0 = 0.0;
Standard_Real p1 = 1.0;
- Handle(Geom_Curve) curve = BRep_Tool::Curve(edge, p0, p1);
+ TopLoc_Location loc;
+ Handle(Geom_Curve) curve = BRep_Tool::Curve(edge, loc, p0, p1);
- GeomAPI_ProjectPointOnCurve proj(pnt, curve);
+ if ( !loc.IsIdentity() ) pnt.Transform( loc.Transformation().Inverted() );
+ GeomAPI_ProjectPointOnCurve proj(pnt, curve, p0, p1);
- double pa = (double)proj.Parameter(1);
+ double pa = 0.;
+ if ( proj.NbPoints() > 0 )
+ pa = (double)proj.LowerDistanceParameter();
- GProp_GProps LProps;
- BRepGProp::LinearProperties(ed, LProps);
- double lg = (double)LProps.Mass();
+// GProp_GProps LProps;
+// BRepGProp::LinearProperties(ed, LProps);
+// double lg = (double)LProps.Mass();
meshDS->SetNodeOnEdge(node, edge, pa);
}
}
status_t surf_fun(real *uv, real *xyz, real*du, real *dv,
- real *duu, real *duv, real *dvv, void *user_data)
+ real *duu, real *duv, real *dvv, void *user_data)
{
const Geom_Surface* geometry = (const Geom_Surface*) user_data;
*/
//=============================================================================
bool BLSURFPlugin_BLSURF::Evaluate(SMESH_Mesh& aMesh,
- const TopoDS_Shape& aShape,
- MapShapeNbElems& aResMap)
+ const TopoDS_Shape& aShape,
+ MapShapeNbElems& aResMap)
{
int _physicalMesh = BLSURFPlugin_Hypothesis::GetDefaultPhysicalMesh();
double _phySize = BLSURFPlugin_Hypothesis::GetDefaultPhySize();
C->D0(f+dp,P2);
gp_Vec V1(P1,P2);
for(int j=2; j<=200; j++) {
- C->D0(f+dp*j,P3);
- gp_Vec V2(P2,P3);
- fullAng += fabs(V1.Angle(V2));
- V1 = V2;
- P2 = P3;
+ C->D0(f+dp*j,P3);
+ gp_Vec V2(P2,P3);
+ fullAng += fabs(V1.Angle(V2));
+ V1 = V2;
+ P2 = P3;
}
nb1d = (int)( fullAng/_angleMeshC + 1 );
}
BRepGProp::VolumeProperties(aShape,G);
double aVolume = G.Mass();
double tetrVol = 0.1179*ELen*ELen*ELen;
- int nbVols = (int)aVolume/tetrVol;
- int nb1d_in = (int) ( ( nbVols*6 - fullNbSeg ) / 6 );
+ int nbVols = int(aVolume/tetrVol);
+ int nb1d_in = int(( nbVols*6 - fullNbSeg ) / 6 );
std::vector<int> aVec(SMDSEntity_Last);
for(int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aVec[i]=0;
if( IsQuadratic ) {