3D文档管理控件Aspose.3D v19.6发布上线!加强气缸的创建!

Aspose.3D for .NET是一个功能丰富的游戏软件和计算机辅助设计(CAD)API,用于处理3D文档格式,无需任何3D建模和渲染软件依赖。支持Discreet3DS、WavefrontOBJ、FBX(ASCII,二进制)、STL(ASCII,二进制)、Universal3D、Collada、glTF、GLB、PLY、DirectX、Google Draco文件格式等。

Aspose.3D for .NET更新至v19.6,加强了对气缸的创建!>>下载Aspose.3D for .NET最新试用版

具体更新内容
key 概述 类别
THREEDNET-511 增强圆筒的创造 新功能
THREEDNET-507 打开RVM文件时丢失一些材料 Bug
THREEDNET-508 系统可能无法在Vulkan渲染器中分配描述符集 Bug


Aspose.3D v19.6中的公共API更改


▲在类Aspose.ThreeD.Entities.Cylinder中添加了新的属性OffsetTop
// Gets or sets the vertices transformation offset of the top side.
///public Vector3 OffsetTop
{
    get;
    set;
}
▲在类Aspose.ThreeD.Entities.Cylinder中添加新属性OffsetBottom
// Gets or sets the vertices transformation offset of the bottom side.
///public Vector3 OffsetBottom
{
    get;
    set;
}

生成带有自定义偏移量的圆柱体的示例代码:

Scene scene = new Scene();
var fan = new Cylinder(2, 2, 10, 20, 1, false);
fan.OffsetTop = new Vector3(5, 3, 0);
scene.RootNode.CreateChildNode(fan).Transform.Translation = new Vector3(10, 0, 0);
var nonfan = new Cylinder(2, 2, 10, 20, 1, false);
scene.RootNode.CreateChildNode(nonfan);
scene.Save("test.obj", FileFormat.WavefrontOBJ);

左边的一个将OffsetTop设置为(5,3,0),很容易看到顶盖已经移动,整个躯干也受到影响。

▲在Aspose.ThreeD.Entities.Cylinder类中添加了新属性GenerateFanCylinder
// Gets or sets whether to generate the fan-style cylinder when the ThetaLength is less than 2*PI, otherwise the model will not be cut.
///public bool GenerateFanCylinder
{
    get;set;
}

用于生成风扇式气缸和非风扇式气缸的示例代码:

Scene scene = new Scene();
var fan = new Cylinder(2, 2, 10, 20, 1, false);
fan.GenerateFanCylinder = true;
fan.ThetaLength = MathUtils.ToRadian(270);
scene.RootNode.CreateChildNode(fan).Transform.Translation = new Vector3(10, 0, 0);
var nonfan = new Cylinder(2, 2, 10, 20, 1, false);
nonfan.GenerateFanCylinder = false;
nonfan.ThetaLength = MathUtils.ToRadian(270);
scene.RootNode.CreateChildNode(nonfan);
scene.Save("test.obj", FileFormat.WavefrontOBJ);

左侧圆柱体具有GenerateFanCylinder = false,右侧圆柱体具有GenerateFanCylinder = true。

▲在类Aspose.ThreeD.Entities.Cylinder中添加了新的属性ShearTop
// Gets or sets of the shear transform of the top side, vector stores the (x-axis, z-axis) shear value that measured in radian, default value is (0, 0)
///public Vector2 ShearTop
{
    get;
    set;
}
▲在类Aspose.ThreeD.Entities.Cylinder中添加了新的属性ShearBottom
// Gets or sets of the shear transform of the bottom side, vector stores the (x-axis, z-axis) shear value that measured in radian, default value is (0, 0)
///public Vector2 ShearBottom
{
    get;
    set;
}

显示ShearBottom(ShearTop)用法的示例代码:

Scene scene = new Scene();
var cylinder1 = new Cylinder(2, 2, 10, 20, 1, false);
cylinder1.ShearBottom = new Vector2(0, 0.83);// shear 47.5deg in xy plane(z-axis)
scene.RootNode.CreateChildNode(cylinder1).Transform.Translation = new Vector3(10, 0, 0);
var cylinder2 = new Cylinder(2, 2, 10, 20, 1, false);
scene.RootNode.CreateChildNode(cylinder2);
scene.Save("test.obj", FileFormat.WavefrontOBJ);

左边的圆柱体为剪切底部到(0,0.83),而右边的圆柱体为序数圆柱体。


欢迎加入ASPOSE技术交流QQ群(642018183),各类资源及时分享,欢迎交流讨论!

你可能感兴趣的:(文档管理,文档格式转换,aspose,文档管理,文档格式转换,3D文档)