العمل مع الملفات الشخصية
العمل مع المقاطع
المقاطع في Aspose.3D لـ .NET تُعرّف أشكال المقطع العرضي ثنائية الأبعاد المستخدمة كمدخلات لعمليات البثق والدوران الصلب. LinearExtrusion يمرّر مقطعاً على طول مسار و RevolvedAreaSolid يدورّه حول محور.
المقاطع المعلمة
ParameterizedProfile يوفر أشكالًا هندسية قياسية — مستطيل، دائرة، إهليلج، شبه منحرف، وغيرها — مُعرفة بواسطة معلمات رقمية بدلاً من رؤوس مضلع صريحة.
using Aspose.ThreeD;
using Aspose.ThreeD.Entities;
using Aspose.ThreeD.Profiles;
var scene = new Scene();
// Rectangle profile: 2 units wide, 1 unit tall
var rectProfile = new RectangleShape();
rectProfile.XDim = 2.0;
rectProfile.YDim = 1.0;
// Extrude the rectangle 5 units along Z
var extrusion = new LinearExtrusion(rectProfile, 5.0);
extrusion.Slices = 10;
scene.RootNode.CreateChildNode("beam", extrusion);
scene.Save("beam.gltf", FileFormat.GLTF2);أشكال أخرى في ParameterizedProfile:
| الفئة | المعلمات |
|---|---|
RectangleShape | XDim, YDim, RoundingRadius |
CircleShape | Radius |
LShape | Width, Depth, Thickness, FilletRadius |
TShape | Depth, FlangeWidth, WebThickness, FlangeThickness |
المقاطع على شكل L المعلمة
LShape هو مقطع معلمة ينتج شعاعًا هيكليًا على شكل L من الخصائص البُعدية:
using Aspose.ThreeD.Profiles;
// L-shaped cross-section structural beam
var lProfile = new LShape();
lProfile.Width = 0.1;
lProfile.Depth = 0.2;
lProfile.Thickness = 0.01;
var extrusion = new LinearExtrusion(lProfile, 4.0);
scene.RootNode.CreateChildNode("l_beam", extrusion);ملفات تعريف معكوسة
MirroredProfile ينشئ مقطعًا عرضيًا متماثلًا عن طريق عكس ملف تعريف أساسي. مرّر أي Profile إلى المُنشئ؛ المكتبة تُولِّد الشكل المعكوس تلقائيًا.
using Aspose.ThreeD.Profiles;
// Base profile to mirror
var baseProfile = new RectangleShape();
baseProfile.XDim = 0.5;
baseProfile.YDim = 1.0;
// Mirror the base profile to get a symmetric shape
var mirrored = new MirroredProfile(baseProfile);
var extrusion = new LinearExtrusion(mirrored, 3.0);
scene.RootNode.CreateChildNode("symmetric_beam", extrusion);ملفات تعريف خط الوسط
CenterLineProfile يلف Curve وسمك الجدار لإنتاج مقطع عرضي مجوف (مثلاً جدار أنبوب). مرّر منحنى خط الوسط والسمك إلى المُنشئ.
using Aspose.ThreeD.Profiles;
using Aspose.ThreeD.Entities;
var circle = new Circle { Radius = 0.5 };
var tube = new CenterLineProfile(circle, 0.05); // 5 cm wall
var extrusion = new LinearExtrusion(tube, 10.0);
scene.RootNode.CreateChildNode("pipe", extrusion);API Quick Reference
| Member | وصف |
|---|---|
new RectangleShape() | ملف مستطيل مُعَلَّم (XDim, YDim, RoundingRadius) |
new CircleShape() | ملف دائري مُعَلَّم (Radius) |
new LShape() | ملف عارضة هيكلية على شكل L |
new TShape() | ملف عارضة هيكلية على شكل T |
new MirroredProfile(base) | ملف متماثل مُعكّس من ملف أساسي |
new CenterLineProfile(curve, thickness) | ملف مجوف بسماكة جدار محددة |
new LinearExtrusion(profile, height) | اسحب ملفًا على طول محور Z |
extrusion.Slices | عدد أقسام التقسيم على طول السحب |
new RevolvedAreaSolid() | لف ملفًا حول محور؛ اضبط خصائص Shape و AngleEnd |
انظر أيضاً
- Aspose.3D for .NET — Enterprise Documentation
- العمل مع كيانات المشهد — إرفاق مجسمات مبثوقة إلى عقد المشهد