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);

1562309721.png

左边的一个将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);

1562309747.png

左侧圆柱体具有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);

1562309767.png

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


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

转载于:https://my.oschina.net/u/4087915/blog/3070115

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值