ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unexpected hatch boundary segment order

5 REPLIES 5
Reply
Message 1 of 6
reganproulx
537 Views, 5 Replies

Unexpected hatch boundary segment order

Hello,

 

I am working with RealDWG 2014, and I am attempting to read hatch entities, but this data sample is puzzling. It renders fine in AutoCAD, but the visual representation does not seem to match the data as RealDWG reads it via loop and segment iteration. So I have questions:

 

1) The documentation states this.. "A loop must be simple, closed, and continuous, intersecting itself only at its endpoints." However, the loop type enumeration has values like 'kNotClosed' and 'kSelfIntersecting' which seem to conflict the description of a loop. Is one of these incorrect, or is there some other explanation?

 

2) If the 2d line segments are extracted from the boundary, they are in the following order, which is not contiguous. Note that the third segment appears to be connected to the first segment, and to start tracing the boundary CCW. However, the fourth segment seems to do the same going CW, and the second segement is connected to none of the other first three. If this is bad data, why does AutoCAD draw it fine? If it is not bad data, then why do the segments appear to be misordered, and non-continguous?

 

+ segStart {x=2272530.2660325523 y=279129.62573117577 } OdGePoint2d

+ segEnd {x=2272543.1093851663 y=279130.51145843614 } OdGePoint2d

 

+ segStart {x=2272510.3438156056 y=279315.11513382773 } OdGePoint2d

+ segEnd {x=2272521.2943289811 y=279156.32889017346 } OdGePoint2d

 

+ segStart {x=2272543.1093851663 y=279130.51145843614 } OdGePoint2d

+ segEnd {x=2272546.4222541070 y=279102.94302486541 } OdGePoint2d

 

+ segStart {x=2272530.2660325523 y=279129.62573117577 } OdGePoint2d

+ segEnd {x=2272521.8174989638 y=279112.79958923423 } OdGePoint2d

 

Thanks,

Regan

 

Tags (1)
5 REPLIES 5
Message 2 of 6
reganproulx
in reply to: reganproulx

I was hoping for a quick clarification of my understanding of hatches.

 

Does no one know what should be expected for hatch loop segments being contiguous, and if they are not, how they are rendered in AutoCAD?

 

Message 3 of 6
reganproulx
in reply to: reganproulx

Still looking for clarification here. Autodesk employees? 

 

Message 4 of 6
reganproulx
in reply to: reganproulx

Hello again. This issue is nearly two months old without an answer here. If no one will ansser it, does anyone at least have a recommendation on where or how to find the answer about hatch storage and rendering?

 

Message 5 of 6
reganproulx
in reply to: reganproulx

Still hoping ofr a reply with any relevant information on hatch boundaries, as mentioned.

 

 

Message 6 of 6
Balaji_Ram
in reply to: reganproulx

Hi Regan,

 

Sorry for the long delay.

 

About your first query : Closed and self-intersecting are not valid loops. The "closed" and "self-intersecting" are provided as loop type enumeration values to provide information on what is wrong with a loop information when the "loopTypeAt" API is used on hatches containing such boundaries.

 

About your second query : I do not find a valid display of the hatch in AutoCAD 2015. I have attached a screenshot of the hatch when the drawing is opened in AutoCAD 2015. Also, using the loopTypeAt API, it returns AcDbHatch::HatchLoopType::kNotClosed.

 

Also, please note that AutoCAD could be doing several other operations on the data read using RealDWG before it gets displayed such as ordering of the data or to find loops from unordered vertex information. RealDWG will provide what is stored in the drawing and it is the host application that makes use of the data and if needed by doing additional processing on it.

 

Regards,

Balaji

 

 

 



Balaji
Developer Technical Services
Autodesk Developer Network

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost