コード例 #1
0
gp_Pnt IfcGeom::point_above_plane(const gp_Pln& pln, bool agree) {
	if ( agree ) {
		return pln.Location().Translated(pln.Axis().Direction());
	} else {
		return pln.Location().Translated(-pln.Axis().Direction());
	}
}
コード例 #2
0
ファイル: Face.cpp プロジェクト: Blokkendoos/heekscad
void CFace::GetPlaneParams(gp_Pln &p)
{
	// returns a plane for the underlying surface
	BRepAdaptor_Surface surface(m_topods_face, Standard_True);
	GeomAbs_SurfaceType surface_type = surface.GetType();
	if(surface_type == GeomAbs_Plane)
	{
		p = surface.Plane();
	}
	else
	{
		IsAPlane(&p);
		if(	m_topods_face.Orientation()== TopAbs_REVERSED )
		{
			p = gp_Pln(p.Axis().Location(), -p.Axis().Direction());
			
		}
	}
}