소스 정보
- 저장소
- hebackus/c3d-api-plugin
- 최근 소스 활동
- 2026년 7월 11일 03:49
- 감지된 SKILL.md 언어
- 영어
- 스타
- 3
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/hebackus/c3d-api-plugin --skill c3d-superelevation명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
| name | c3d-superelevation |
| description | Superelevation design, attainment, cross slope, pivot points, lane config |
Use this skill when reading superelevation data, querying cross slopes at stations, working with critical stations, or understanding superelevation's relationship to corridors and subassemblies.
Superelevation is the banking of a roadway through horizontal curves to counteract centrifugal force. In Civil 3D, superelevation data is attached to an Alignment and consumed by a Corridor to shape cross sections through curves.
The workflow is:
Key relationships:
API Change Note (Civil 3D 2013+): The SuperelevationData property and SuperElevationAtStation() method were removed. Use SuperelevationCurves and SuperelevationCriticalStations instead.
Superelevation data lives on the Alignment object, organized as a collection of SuperelevationCurve objects, each containing critical stations.
Alignment align = ts.GetObject(alignmentId, OpenMode.ForRead) as Alignment;
// Check if superelevation has been calculated
if (align.SuperelevationCurves.Count < 1)
{
ed.WriteMessage("Must calculate superelevation data first.\n");
return;
}
// Iterate superelevation curves
foreach (SuperelevationCurve sec in align.SuperelevationCurves)
{
ed.WriteMessage("Curve: {0}, Start: {1:F2}, End: {2:F2}\n",
sec.Name, sec.StartStation, sec.EndStation);
// Each curve has its own critical stations
foreach (SuperelevationCriticalStation sest in sec.CriticalStations)
{
ed.WriteMessage(" Station: {0:F2}, Type: {1}, Region: {2}\n",
sest.Station, sest.StationType, sest.TransitionRegionType);
// Get slope for each cross segment type
foreach (int i in Enum.GetValues(typeof(SuperelevationCrossSegmentType)))
{
try
{
double slope = sest.GetSlope((SuperelevationCrossSegmentType)i);
ed.WriteMessage(" {0}: {1:F4}\n",
Enum.GetName(typeof(SuperelevationCrossSegmentType), i), slope);
}
catch (InvalidOperationException) { } // Invalid segment for this station
}
}
}
Alignment.SuperelevationCurves — collection of SuperelevationCurve objectsAlignment.SuperelevationCriticalStations — all critical stations across all curves (flat collection)SuperelevationCriticalStationCollection.GetCriticalStationAt() — access individual stationsThe Alignment.GetCrossSlopeAtStation() method returns the slope for a specific cross segment type at any station.
Alignment align = ts.GetObject(alignmentId, OpenMode.ForRead) as Alignment;
double station = 500.0;
// SuperelevationCrossSegmentType values:
// LeftOutShoulderCrossSlope, LeftOutLaneCrossSlope,
// LeftInShoulderCrossSlope, LeftInLaneCrossSlope,
// RightInLaneCrossSlope, RightInShoulderCrossSlope,
// RightOutLaneCrossSlope, RightOutShoulderCrossSlope
double leftInLane = align.GetCrossSlopeAtStation(
station, SuperelevationCrossSegmentType.LeftInLaneCrossSlope, true);
double rightInLane = align.GetCrossSlopeAtStation(
station, SuperelevationCrossSegmentType.RightInLaneCrossSlope, true);
ed.WriteMessage($"\nAt sta {station:F2}: Left={leftInLane:F4}, Right={rightInLane:F4}");
double station = 500.0;
foreach (int i in Enum.GetValues(typeof(SuperelevationCrossSegmentType)))
{
try
{
var segType = (SuperelevationCrossSegmentType)i;
double slope = align.GetCrossSlopeAtStation(station, segType, true);
ed.WriteMessage($"\n {segType}: {slope:F4}");
}
catch (InvalidOperationException) { }
}
Critical stations mark key points in the superelevation transition. Each curve generates a set of these stations.
The StationType property identifies where in the transition this station falls:
Typical sequence for a right curve:
BeginNormalCrown → LevelCrown → EndNormalCrown →
BeginFullSuper → [through curve] → EndFullSuper →
EndNormalCrown(return) → LevelCrown(return) → BeginNormalCrownReturn
// Flat collection across all curves
foreach (SuperelevationCriticalStation sest in align.SuperelevationCriticalStations)
{
ed.WriteMessage($"\n Sta {sest.Station,10:F2} Type: {sest.StationType,-25}");
}
These are derived from the critical station positions:
// Calculate from station differences between critical station types
double runoutLength = endNormalCrownStation - beginNormalCrownStation;
double runoffLength = beginFullSuperStation - endNormalCrownStation;
Attainment methods control how the roadway transitions from normal crown to full superelevation. These are configured through the superelevation wizard UI.
Note: Attainment method, eMax, design speed, pivot method, lane counts, and lane widths are all configured through the superelevation wizard. The .NET API does not expose these as writable properties. They are embedded in the computed critical station data.
The pivot point determines which element remains fixed while lanes rotate:
The superelevation wizard uses transition tables mapping design speed + curve radius + eMax to required superelevation rate, runoff length, and runout length. These tables are based on AASHTO or agency-specific criteria.
The .NET API reads the computed results but does not expose the lookup tables. Custom tables are configured through:
Settings > Alignment > Superelevation > Attainment in Civil 3D settingsCorridors consume superelevation data automatically when they reference an alignment that has superelevation defined. The key is using superelevation-aware subassemblies.
Common built-in subassemblies that read superelevation:
LaneSuperelevationAOR — lane with superelevation axis of rotationLaneOutsideSuperAOR — outside lane during superelevationLaneInsideSuper — inside lane during superelevationShoulderExtendAll — shoulder that follows superelevationShoulderSubbase — shoulder subbase with superelevation supportThese subassemblies have target parameters that read slope values from the alignment's superelevation data at each corridor station. In corridor properties, set the target to "Superelevation" for these parameters.
// After changing superelevation on the alignment, rebuild the corridor
Corridor corridor = ts.GetObject(corridorId, OpenMode.ForWrite) as Corridor;
corridor.Rebuild();
Corridor corridor = ts.GetObject(corridorId, OpenMode.ForRead) as Corridor;
foreach (Baseline bl in corridor.Baselines)
{
Alignment blAlign = ts.GetObject(bl.AlignmentId, OpenMode.ForRead) as Alignment;
bool hasSE = blAlign.SuperelevationCurves.Count > 0;
ed.WriteMessage($"\nBaseline '{bl.Name}' has superelevation: {hasSE}");
}
// Export superelevation data for reporting
var report = new System.Text.StringBuilder();
report.AppendLine("Station,Type,Region");
foreach (SuperelevationCriticalStation sest in align.SuperelevationCriticalStations)
{
var line = $"{sest.Station:F2},{sest.StationType},{sest.TransitionRegionType}";
// Append all available slopes
foreach (int i in Enum.GetValues(typeof(SuperelevationCrossSegmentType)))
{
try
{
double slope = sest.GetSlope((SuperelevationCrossSegmentType)i);
line += $",{slope:F4}";
}
catch (InvalidOperationException)
{
line += ",";
}
}
report.AppendLine(line);
}
ed.WriteMessage($"\n{report}");
Superelevation creation is a UI wizard operation. The .NET API does not expose creation methods. Use SendStringToExecute to invoke the wizard:
Document acadDoc = Application.DocumentManager.MdiActiveDocument;
// Opens the interactive superelevation wizard — not fully automatable
acadDoc.SendStringToExecute("SUPERELEVATION ", true, false, false);
SuperelevationData was removed in Civil 3D 2013. Use SuperelevationCurves and SuperelevationCriticalStations instead. Code referencing the old API will not compile.-0.02. Format with :P or multiply by 100 for display.GetSlope() throws InvalidOperationException for invalid segment types. Not all cross segment types are valid at every critical station. Always wrap in try/catch.GetCrossSlopeAtStation() third parameter is adjustForSide. Pass true to automatically adjust the sign based on which side of the alignment the segment is on.corridor.Rebuild() for the corridor to reflect changes.BasicLane ignore superelevation data. Use LaneSuperelevationAOR or similar.c3d-alignments — alignments that host superelevation data (includes superelevation code examples)c3d-corridors — corridors that consume superelevation for cross-section shapingc3d-profiles — profile relationship with superelevation designc3d-custom-subassemblies — subassemblies that read superelevation parametersc3d-subassembly-patterns — SE axis-of-rotation recipe and stock-subassembly patternsc3d-root-objects — CivilDocument access and transaction patternsSOC 직업 분류 기준