소스 정보
- 저장소
- hebackus/c3d-api-plugin
- 최근 소스 활동
- 2026년 4월 9일 01:53
- 감지된 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 acad-hatches명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
| name | acad-hatches |
| description | Hatch patterns, gradient fills, boundary loops, associativity, hatch styles |
Use this skill when creating or modifying hatch patterns, solid fills, or gradient fills in drawings.
using (Transaction tr = db.TransactionManager.StartTransaction())
{
BlockTableRecord btr = (BlockTableRecord)tr.GetObject(
db.CurrentSpaceId, OpenMode.ForWrite);
Hatch hatch = new Hatch();
hatch.SetDatabaseDefaults();
hatch.Normal = Vector3d.ZAxis;
hatch.Elevation = 0.0;
// Step 1: Add to database FIRST (required before SetHatchPattern and AppendLoop)
btr.AppendEntity(hatch);
tr.AddNewlyCreatedDBObject(hatch, true);
// Step 2: Set pattern AFTER AppendEntity, BEFORE AppendLoop
hatch.SetHatchPattern(HatchPatternType.PreDefined, "ANSI31");
hatch.PatternScale = 1.0;
hatch.PatternAngle = 0.0;
// Step 3: Set Associative BEFORE AppendLoop
hatch.Associative = true;
// Step 4: Add boundary loop
ObjectIdCollection boundaryIds = new ObjectIdCollection();
boundaryIds.Add(polylineId); // closed polyline as boundary
hatch.AppendLoop(HatchLoopTypes.External, boundaryIds);
// Evaluate to generate hatch lines
hatch.EvaluateHatch(true);
tr.Commit();
}
ObjectIdCollection outerBoundary = new ObjectIdCollection();
outerBoundary.Add(outerPolylineId);
hatch.AppendLoop(HatchLoopTypes.External, outerBoundary);
// Add island (inner boundary)
ObjectIdCollection innerBoundary = new ObjectIdCollection();
innerBoundary.Add(innerCircleId);
hatch.AppendLoop(HatchLoopTypes.Default, innerBoundary);
Point2dCollection vertices = new Point2dCollection();
vertices.Add(new Point2d(0, 0));
vertices.Add(new Point2d(100, 0));
vertices.Add(new Point2d(100, 100));
vertices.Add(new Point2d(0, 100));
DoubleCollection bulges = new DoubleCollection();
bulges.Add(0); bulges.Add(0); bulges.Add(0); bulges.Add(0);
hatch.AppendLoop(HatchLoopTypes.External | HatchLoopTypes.Polyline,
vertices, bulges);
Curve2dCollection edges = new Curve2dCollection();
IntegerCollection edgeTypes = new IntegerCollection();
edges.Add(new LineSegment2d(new Point2d(0, 0), new Point2d(100, 0)));
edgeTypes.Add((int)HatchEdgeType.Line); // 1
edges.Add(new CircularArc2d(
new Point2d(100, 0), new Point2d(100, 50), new Point2d(100, 100)));
edgeTypes.Add((int)HatchEdgeType.CircularArc); // 2
edges.Add(new LineSegment2d(new Point2d(100, 100), new Point2d(0, 0)));
edgeTypes.Add((int)HatchEdgeType.Line);
hatch.AppendLoop(HatchLoopTypes.External, edges, edgeTypes);
HatchLoop loop = new HatchLoop(HatchLoopTypes.External);
// loop is read-only after construction; use for inspection:
// loop.Curves, loop.Polyline, loop.LoopType, loop.IsPolyline
hatch.AppendLoop(loop);
int loopCount = hatch.NumberOfLoops;
HatchLoopTypes loopType = hatch.LoopTypeAt(0);
HatchLoop loop = hatch.GetLoopAt(0);
// Insert loop at specific position
hatch.InsertLoopAt(1, HatchLoopTypes.Default, boundaryIds);
hatch.InsertLoopAt(1, hatchLoop);
// Remove loop
hatch.RemoveLoopAt(0);
// Get associated objects for a loop
ObjectIdCollection assocIds = hatch.GetAssociatedObjectIdsAt(0);
ObjectIdCollection allAssocIds = hatch.GetAssociatedObjectIds();
hatch.RemoveAssociatedObjectIds();
Hatch hatch = new Hatch();
hatch.SetDatabaseDefaults();
hatch.Normal = Vector3d.ZAxis;
hatch.SetHatchPattern(HatchPatternType.PreDefined, "SOLID");
// IsSolidFill will be true
Hatch gradient = new Hatch();
gradient.SetDatabaseDefaults();
gradient.Normal = Vector3d.ZAxis;
gradient.HatchObjectType = HatchObjectType.GradientObject;
// Set gradient type
gradient.SetGradient(GradientPatternType.PreDefinedGradient, "LINEAR");
// Other names: "CYLINDER", "INVCYLINDER", "SPHERICAL", "INVSPHERICAL",
// "HEMISPHERICAL", "INVHEMISPHERICAL", "CURVED", "INVCURVED"
gradient.GradientAngle = Math.PI / 4; // 45 degrees
// Two-color gradient
gradient.GradientOneColorMode = false;
GradientColor[] colors = new GradientColor[2];
colors[0] = new GradientColor(Color.FromRgb(255, 0, 0), 0.0f); // start
colors[1] = new GradientColor(Color.FromRgb(0, 0, 255), 1.0f); // end
gradient.SetGradientColors(colors);
// One-color gradient (single color with tint)
gradient.GradientOneColorMode = true;
gradient.ShadeTintValue = 0.5f; // 0 = dark, 1 = light
gradient.GradientShift = 0.0f;
// Add boundary and evaluate
btr.AppendEntity(gradient);
tr.AddNewlyCreatedDBObject(gradient, true);
gradient.AppendLoop(HatchLoopTypes.External, boundaryIds);
gradient.EvaluateHatch(true);
Gradient methods:
SetGradient(GradientPatternType type, string name) - set gradient patternGetGradientColors() -> GradientColor[] - get color stopsSetGradientColors(GradientColor[] colors) - set color stopsEvaluateGradientColorAt(float value) -> Color - sample color at position (0-1)HatchLoopTypes (flags): Default=0x0, External=0x1, Polyline=0x2, Derived=0x4, Textbox=0x8, Outermost=0x10, NotClosed=0x20, SelfIntersecting=0x40, TextIsland=0x80, Duplicate=0x100
HatchEdgeType: Line=1, CircularArc=2, EllipticalArc=3, Spline=4
HatchStyle: Normal=0 (fills between nested boundaries), Outer=1 (outermost boundary only), Ignore=2 (ignores internal boundaries)
HatchPatternType: UserDefined=0, PreDefined=1, CustomDefined=2
HatchObjectType: HatchObject=0, GradientObject=1
GradientPatternType: PreDefinedGradient=0, UserDefinedGradient=1
EvaluateHatchAppendLoop must be called AFTER AppendEntity and AddNewlyCreatedDBObject - the hatch must be in the database firstEvaluateHatch(true) underestimates line count (faster); EvaluateHatch(false) is accurate but slowerPatternSpace instead of PatternScale; set PatternDouble = true for crosshatchAssociative must be set to true BEFORE adding boundary loops for associativity to workEvaluateHatch to fail silentlyHatchLoopTypes.External; inner islands should use HatchLoopTypes.DefaultHatchStyle.Normal alternates fill between nested boundaries; Outer fills only the outermost; Ignore fills everythingHatchObjectType = HatchObjectType.GradientObject before calling SetGradientPatternName and PatternType are read-only - use SetHatchPattern() to change themPatternScale, PatternAngle, or PatternSpace, you must re-call SetHatchPattern(type, name) before calling EvaluateHatch() — otherwise the change has no visual effectBulge value: 0 = straight segment, positive = counterclockwise arc, negative = clockwise arc; tan(includedAngle/4)acad-polylines — polylines as hatch boundaries; vertex+bulge loop constructionacad-layers — layer assignment for hatch entitiesSOC 직업 분류 기준