Re: [Dxfreader-info] entity reading process
Status: Beta
Brought to you by:
allandaly
|
From: Allan D. <al...@br...> - 2009-02-28 16:51:50
|
Also to answer your question about Header objects -- no I have not put anything in there yet to read data out of the Header section. Do you want to tackle that? -Allan On Feb 28, 2009, at 7:45 AM, Michael Caron wrote: > Hi list! > > Just wanted to make sure that I'm going about loading entities > correctly. Seems that when I draw them into a DKDrawingLayer, I get > incorrect directions and line widths (not sure if line widths are > part of the DXF line entity though). > > Process for reading in the DXF File: > BBDXFModel* model = [[BBDXFModel alloc] init]; > [model loadDXFString:dxfFileContents]; > [model getDXFFileStructure]; > [model processEntities]; > > Process for translating LINE entities into DK lines: > > BBDXFEntityLine* line = (BBDXFEntityLine*) entity; > > // Ignoring z coordinates for the moment > NSPoint sp; > sp.x = [[line startPoint] x]; > sp.y = [[line startPoint] y]; > NSPoint ep; > ep.x = [[line endPoint] x]; > ep.y = [[line endPoint] y]; > > DKDrawablePath* dkline = > [[DKDrawablePath alloc] initWithStartingCoordinate:sp > endingCoordinate:ep > grid: > [self gridLayer]]; > return [dkline autorelease]; > > Like I said, it seems that when I render this way, I'm getting weird > directions, though the lines seem to be spatially correct, that is, > they are in the right places relative to each other, just sort of > rotated or something differently. It might be due to an error in > scaling it to microns, however. I haven't looked too far into it. > > I also didn't see anything yet for getting the array of Header > objects. Am I missing something? I will add it if it's not there. It > was late... maybe I just totally overlooked it. Important to get > measurement data from the Header for SonoDraw. > > Cheers. > > Michael > ------------------------------------------------ > mic...@gm... > http://techrad.wordpress.com > http://mrcaron.wordpress.com > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San > Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the > Enterprise > -Strategies to boost innovation and cut costs with open source > participation > -Receive a $600 discount off the registration fee with the source > code: SFAD > http://p.sf.net/sfu/XcvMzF8H_______________________________________________ > Dxfreader-info mailing list > Dxf...@li... > https://lists.sourceforge.net/lists/listinfo/dxfreader-info |