用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/hebackus/c3d-api-plugin --skill c3d-mass-haul命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | c3d-mass-haul |
| description | Mass haul diagrams, free haul, overhaul, borrow/waste, balance lines |
Use this skill when working with mass haul diagrams, earthwork balance lines, free haul and overhaul distances, or borrow/waste site management.
Mass haul diagrams visualize cumulative earthwork volumes along an alignment, showing where material must be moved from cut zones to fill zones. The diagram plots cumulative volume (y-axis) against station (x-axis), producing a curve whose slope indicates cut (rising) or fill (falling) regions.
Key relationships:
Mass haul diagrams are primarily created through the Mass Haul Diagram wizard (command CreateMassHaulDiagram). The managed .NET API does not provide a MassHaulDiagram.Create() method. The API surface for reading existing mass haul data is also limited compared to other Civil 3D objects. Many operations require the wizard UI or report generation commands.
Note: The
MassHaulViewandMassHaulDiagramclasses may have limited property exposure depending on your Civil 3D version. Verify available members against the Object Browser for your target version.
Mass haul views are graphical entities in model space. Find them by iterating the block table record:
using (Transaction ts = db.TransactionManager.StartTransaction())
{
BlockTableRecord btr = (BlockTableRecord)ts.GetObject(
SymbolUtilityServices.GetBlockModelSpaceId(db), OpenMode.ForRead);
foreach (ObjectId id in btr)
{
Entity ent = (Entity)ts.GetObject(id, OpenMode.ForRead);
if (ent is MassHaulView mhView)
{
ed.WriteMessage($"\nMass Haul View: {mhView.Name}");
}
}
ts.Commit();
}
Creation is wizard-driven only:
// Trigger the built-in mass haul creation wizard
Application.DocumentManager.MdiActiveDocument.SendStringToExecute(
"CreateMassHaulDiagram ", true, false, false);
The wizard requires:
There is no silent/automated creation path through the managed .NET API.
Balance lines on a mass haul diagram indicate stations where cumulative cut equals cumulative fill. They define segments where material can be balanced internally:
Overhaul is computed from the mass haul diagram:
When a project cannot balance cut and fill internally:
These are configured in the mass haul wizard with station location, capacity, and description. The .NET API does not expose creation or modification of borrow/waste sites.
The mass haul curve plots cumulative volume vs. station:
Material lists define the cut and fill surfaces and are essential inputs to mass haul computation.
A material list references:
using (Transaction ts = db.TransactionManager.StartTransaction())
{
SampleLineGroup slg = (SampleLineGroup)ts.GetObject(
sampleLineGroupId, OpenMode.ForRead);
// Access material lists through the sample line group
// See c3d-quantity-takeoff skill for detailed material list access
ed.WriteMessage($"\nSample line group: {slg.Name}");
ts.Commit();
}
Swell and shrinkage factors directly impact the mass haul curve:
Adjusted Cut Volume = Raw Cut Volume x Swell Factor
Adjusted Fill Volume = Raw Fill Volume x Shrinkage Factor
These factors are set in the material list definition. The c3d-quantity-takeoff skill documents FillFactor as a multiplier.
using (Transaction ts = db.TransactionManager.StartTransaction())
{
SampleLineGroup slg = (SampleLineGroup)ts.GetObject(
sampleLineGroupId, OpenMode.ForRead);
ObjectIdCollection sampleLineIds = slg.GetSampleLineIds();
foreach (ObjectId slId in sampleLineIds)
{
SampleLine sl = (SampleLine)ts.GetObject(slId, OpenMode.ForRead);
ed.WriteMessage($"\nStation: {sl.Station:F2}");
// Volume data is computed via quantity takeoff at each station
// The mass haul diagram aggregates these into a cumulative curve
}
ts.Commit();
}
For detailed per-station volume data, use built-in reporting:
Application.DocumentManager.MdiActiveDocument.SendStringToExecute(
"GenerateQuantitiesReport ", true, false, false);
CreateMassHaulDiagram wizard command.MassHaulView is the graphical container in the drawing. The MassHaulDiagram is the data object. A view can display multiple diagrams.GenerateQuantitiesReport or XML reports rather than extracting through the object model.c3d-surfaces — existing ground and design surfaces for volume computationc3d-profiles — profiles that define cut/fill relationships along alignmentsc3d-corridors — corridors that generate the earthwork volumes feeding mass haulc3d-sample-lines — sample line groups that provide cross-section stationsc3d-quantity-takeoff — quantity takeoff for material volumes and material listsc3d-root-objects — CivilDocument access and transaction patterns