Hi,
Is there a way to
import an Autocad drawing (a .dwg file) into Visualworks and display it on a
graphics context?
Regards,
Ron
Dobbelstein The information contained in this communication is confidential and may be legally privileged. It is intended solely for the use of the individual or entity to whom it is addressed and others authorised to receive it. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this information is strictly prohibited and may be unlawful. Vialis is neither liable for the proper and complete transmission of the information contained in this communication nor for any delay in its receipt.
_______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Dear Ron,
That query seems right across two tech areas I have worked spanning a decade each... I have tried working with the dxf output.. and rendering it to a graphics context on VW. Currently there is only the Jun DXF viewer I know of.. http://www.sra.co.jp/smalltalk/jun/Topics/DXF/index.html Someone else was probably trying the openCascade interface with VW.. probably A S Koh, if they can respond, would be ideal... StCAD from http://www.askoh.com/assemblies/index.html, I have not tried this.. but should be another good possibility.. ObjectStudio should be able to use the COM interfaces that currently can be called in from VW. Will try and give it a look in again, as its been more than 5 years back I have dealt with CAD drawings interfaces.. but would be interested in digging out something relevant.. Would be interested in the nature and volume, criticality of this work.. skrish
On Mon, Jun 30, 2008 at 2:52 PM, Ron Dobbelstein <[hidden email]> wrote:
_______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Ron Dobbelstein
If you use Jun you probably have to go down to DXF version 11. > Message du 30/06/08 14:15 |
In reply to this post by Ron Dobbelstein
Well its been a while I have toyed with CAD files, and I dont mind getting my hands a little dirty over the weekend..
Jun I will run through and see what blocks it from reading the other versions of DXF upto 2000 as as other interfaces from Smalltalk... A quick run does indicate that there is no worthwhile solution of the shelf for possible immediate use, but I believe if the use is limited to minimal set of elements viz: line, arc, polyline, circle etc.. it should not be hard to put in something usable in couple of days.. but if you wish to integrate blocks, hatches or any other complicated elements it may be tough going in a timeline sense.. nothing being impossible. Just give me a heads up on the DXF content in the sense of what elements it contains or if you send me the file that would be ideal, or atleast the version of ACAD producing it.. skrish
On Mon, Jun 30, 2008 at 7:57 PM, Ron Dobbelstein <[hidden email]> wrote:
_______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
And ofcourse the platforms you wish to support Windows only or others too..?
On Tue, Jul 1, 2008 at 4:26 PM, Sudhakar Krishnamachari <[hidden email]> wrote: Well its been a while I have toyed with CAD files, and I dont mind getting my hands a little dirty over the weekend.. _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Maarten Mostert-2
If anyone is interested..in the DXF reader,
I realize it can do with lots of update for reading in the latest DXF spec, display capability on a normal screen too can be worked on for plain geometry etc... Anyways very basic stuff.. Enclosing a st file that should allow any DXF version to be read in and displayed on the openGL window.., though seems to omit some more entities than a ACAD 11 dxf. Simply a case of skipping the non-essential sections of:
1. Accurately read in all entities of graphical type, to get as close to the real dwg display as possible 2. The coordinates mapping, I guess it is not accurate.. 3. Aliasing should not be an issue at zoomed in state.. but can be defaulted to that display that best obtains aliasing, to give a more appropriate feel 4. Using a standard view component GC to display the openGL graphics.. so that one can superimpose other elements on it if reqd.. skrish <?xml version="1.0"?> <st-source> <methods> <class-id>Jun.JunDXFParser</class-id> <category>parsing</category> <body package="Jun-DXF-Support" selector="parseObjects">parseObjects self debug: 'parseObjects'. source upTo: 'ENDSEC'. ^true</body> <body package="Jun-DXF-Support" selector="parseThumbnailImage">parseThumbnailImage self debug: 'parseThumbnailImage'. source upTo: 'ENDSEC'. ^true</body> <body package="Jun-DXF-Support" selector="parse">parse | blocks rc | blocks := Dictionary new: 5. blocks at: 'HEADER' put: #parseHeader. blocks at: 'TABLES' put: #parseTables. blocks at: 'BLOCKS' put: #parseBlocks. blocks at: 'CLASSES' put: #parseClasses. blocks at: 'ENTITIES' put: #parseEntities. blocks at: 'OBJECTS' put: #parseObjects. blocks at: 'THUMBNAILIMAGE' put: #parseThumbnailImages. happy := false. [self nextPair. dataString = 'EOF'] whileFalse: [self debug: 'parse: ' , dataKey , '->' , dataString. groupCode = 0 ifFalse: [^failBlock value: 'invalid groupcode (not 0)']. dataString = 'SECTION' ifFalse: [^failBlock value: 'invalid section string (not SECTION)']. self nextPair. groupCode = 2 ifFalse: [^failBlock value: 'invalid section groupcode (not 2)']. rc := self perform: (blocks at: dataString ifAbsent: [#yourself]). rc = true ifTrue: [self count: #sections]]. self showCounts. self setLayerNames. self updateLayerColors. happy := true. ^self</body> </methods> <methods> <class-id>Jun.JunDXFParser</class-id> <category>graphics</category> <body package="Jun-DXF-Support" selector="addLayeredItem:">addLayeredItem: anItem | layerName layerItem | self debug: 'addLayeredItem ' , anItem key , '->' , anItem value printString. layerName := anItem key. layerItem := anItem value. (layerItem isCompound and: [layerItem components isEmpty]) ifTrue: ["self halt"]. (layers includesKey: layerName) ifFalse: [layers at: layerName put: JunOpenGL3dCompoundObject new]. (self contained: layerItem) ifTrue: [(layers at: layerName) add: layerItem] ifFalse: [self outside add: layerItem. self count: #outside.]</body> </methods> </st-source>
On Mon, Jun 30, 2008 at 8:49 PM, Maarten MOSTERT <[hidden email]> wrote:
_______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
I would not so much care about DXF where the first font on a cotation will bring you into serious problems as I would over IGES. Something that knows how to knit together all the diferent C-Spline, B-Spline and Nurb surfaces into closed volumes without creating thousends of extra points and then displaying it all using Michaels brand new OpenGL package I think could open up some serious possibilities. @+Maarten, Sudhakar Krishnamachari a écrit : If anyone is interested..in the DXF reader, _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Free forum by Nabble | Edit this page |