コード例 #1
0
int convert_to_ifc(const gp_Ax2& a, IfcSchema::IfcAxis2Placement3D*& ax, bool advanced) {
	IfcSchema::IfcCartesianPoint* p;
	IfcSchema::IfcDirection *x, *z;
	if (!(convert_to_ifc(a.Location(), p, advanced) && convert_to_ifc(a.Direction(), z, advanced) && convert_to_ifc(a.XDirection(), x, advanced))) {
        ax = 0;
		return 0;
	}
	ax = new IfcSchema::IfcAxis2Placement3D(p, z, x);
	return 1;
}
コード例 #2
0
ファイル: Cylinder.cpp プロジェクト: CarlosGS/heekscad
static TopoDS_Solid MakeCylinder(const gp_Ax2& pos, double radius, double height)
{
	gp_Ax2 pos2 = pos;
	if(height<0)
	{
		pos2 = gp_Ax2(pos.Location(), -(pos.Direction()));
		height = fabs(height);
	}

	return BRepPrimAPI_MakeCylinder(pos2, radius, height);
}
コード例 #3
0
ファイル: Cuboid.cpp プロジェクト: CarlosGS/heekscad
CCuboid::CCuboid(const gp_Ax2& pos, double x, double y, double z, const wxChar* title, const HeeksColor& col, float opacity)
:CSolid(BRepPrimAPI_MakeBox(gp_Ax2(pos.Location().XYZ() + gp_XYZ((x < 0) ? x:0.0, (y < 0) ? y:0.0, (z < 0) ? z:0.0), pos.Direction(), pos.XDirection()), fabs(x), fabs(y), fabs(z)), title, col, opacity)
, m_pos(pos), m_x(x), m_y(y), m_z(z)
{
}