# Geom2dHatch_Hatcher: How to understand the Domains?

Hello! I test this code:

``````Standard_Real IntersectorConfusion = 1.e-8;
Standard_Real IntersectorTangency = 1.e-8;
Standard_Real HatcherConfusion2d = 1.e-8;
Standard_Real HatcherConfusion3d = 1.e-8;
Geom2dHatch_Hatcher aHatcher = Geom2dHatch_Hatcher(Geom2dHatch_Intersector(IntersectorConfusion,
IntersectorTangency),
HatcherConfusion2d,
HatcherConfusion3d,
Standard_True,
Standard_False);
Standard_Real df, dl;
//
aHatcher.ClrHatchings();
Standard_Boolean bIsDone, bHasFirstPoint, bHasSecondPoint;
Standard_Integer iErr, aIH, aNbDomains;
Standard_Real aVx, aV1, aV2;
int num = 0;
Handle(Geom2d_TrimmedCurve) C1 = GCE2d_MakeSegment({ 0,0 }, { 100,0 });

Handle(Geom2d_TrimmedCurve) C2 = GCE2d_MakeSegment({ 20,10 }, { 20,-10 });
Handle(Geom2d_TrimmedCurve) C3 = GCE2d_MakeSegment({ 80,10 }, { 80,-10 });

aHatcher.Trim(aIH);
aHatcher.ComputeDomains(aIH);
bIsDone = aHatcher.IsDone(aIH);
aNbDomains = aHatcher.NbDomains(aIH);
gp_Pnt2d p1, p2;
for (int i = 1; i <= aNbDomains; i++)
{
const HatchGen_Domain& aDomain = aHatcher.Domain(aIH, i);
if (bHasFirstPoint) {