I'm looping through all entities in the modelspace and generating a representative set of points for each entity type and storing them in a json file. Some entities like INSERT entities have an object coordinate system different from the world coordinate system. I'm using the OCS.to_wcs() function to convert the points into world coordinates. This works almost perfectly. Unfortunately some entities apparently are mirrored about the Y-axis in a way that is not accounted for with the OCS.to_wcs() function. Is there some other transformation beyond the .to_wcs that is required?
My current code creates a set of sets of points called pointset for a particular entity. This is necessary because an entity can have two crossed lines for example. The following code is the approach I'm using to transform each point set into the world coordinates.
wpointset=[]
for piece in pointset: #go through each object in the point set
piecepts=[]
for pt in piece: #go through each point in each object
piecepts.append([ocs.to_wcs(pt)[0],ocs.to_wcs(pt)[1]])
wpointset.append(piecepts)