עבודה עם פרופילים
עבודה עם פרופילים
פרופילים ב-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
- עבודה עם ישויות סצנה — צרף מוצקים מחולצים לצמתים בסצנה