[Plugin] bim-tools 0.13.4(june 22, 2015)
-
@dan rathbun said:
There is a importer IFC2SKP
http://www.ohyeahcad.com/ifc2skp/index.phpthey were working on an exporter at one time... it never was released as far as I can tell.
http://ifc2skpforum.websitetoolbox.com/post?id=2515651I've tried the IFC2SKP importer some time ago. Works pretty well!
At work we are getting more and more IFC files, especially models of steel structures made in in Revit.An exporter won't be as simple as an importer I guess. Somehow you need to add "building properties" to the "empty" SketchUp geometry.
That's exactly what I want to do, not try to re-build revit/archicad in sketchup, but create simple building elements that can be translated/labeled to meaningful objects, which could be re-used(via IFC) in CAD systems.
- faces can be given thickness and labeled "wall", "floor" or "roof"
- edges can be used as paths for profiles(like my current plugin) and labeled "wall", "floor" or "beam"
I don't think there's much difference between a wall and a floor, so it could suffice to label these kinds of objects for conversion to IFC.
A tricky part is relations between objects. I think this can be done partly by keeping the base geometry as handlers. If a bounding edge of a floor plane is the same edge as the wall profile, then this edge's position/length can be the relation between floor(room/space) and wall.
-
@brewsky said:
@dan rathbun said:
Somehow you need to add "building properties" to the "empty" SketchUp geometry.
See the API on AttributeDictionaries collection and AttributeDictionary class objects.
They can be attached to almost anything, including Layers, Scenes, etc. as well as base geometry, and Groups and Components.
There was a very long discussion in the General Sketchup Forum, (no activity since Sep.) here's the link:
Could SketchUp be transformed to a BIM or PEN System?
(It might be a good idea to post a notice in there, as those people interested, may come on over to this topic and discuss the Development.) -
@dan rathbun said:
@brewsky said:
@dan rathbun said:
Somehow you need to add "building properties" to the "empty" SketchUp geometry.
See the API on AttributeDictionaries collection and AttributeDictionary class objects.
They can be attached to almost anything, including Layers, Scenes, etc. as well as base geometry, and Groups and Components.
There was a very long discussion in the General Sketchup Forum, (no activity since Sep.) here's the link:
Could SketchUp be transformed to a BIM or PEN System?
(It might be a good idea to post a notice in there, as those people interested, may come on over to this topic and discuss the Development.)@brewsky said:
Anyone interested in some more BIM discussion?
Please check out my topic:
http://forums.sketchucation.com/viewtopic.php?f=180&t=34007- jan
As I see it the intent of your plugin is to automate part of the creation of a model. This is fine but to me it is like banks providing a way to digitally write cash cheques rather than providing ATMs. The building industry hates real change and the IT industry is very happy to supply it with technology that comes with no information - i.e it requires typed input (see Dan's comment above). This is also true of word processing, spreadsheets and other digitised paperwork apps.
Your edges ... where do they come from? They are the result of design, no? Do you think it would be better to define the relationship between spaces - access, privacy, fire, sound and other such criteria - and then generate the dividers from that?
In other words would it be better to select criteria from existing know-how and get technology to search for and display possible solutions - a mashup of Sketchup, Napster and Twitter with a twist of straightforward commercial trading perhaps?
-
@brewsky said:
I know the name BIM tools sounds a bit "grand" for a simple thing as this but, who knows where it ends...
Using the name "BIM Tools" is much too generic.
It likely to clash with other plugins using that identifier.
Fortunately, Ruby has a way of separating YOUR "BIM Tools" from say, MY "BIM Tools". It's called a namespace, which is created using a module.
For example, pretend I decide to distribute all my plugins under the hypothetical 'brandname' of DanCo, and you decide to use JanInc. (Just examples, I had to come up with two 'company' names.)
All your (and my,) various IFC and BIM tools (importers, exporters, data manipulators, drawing tools, etc.) would need to 'reside' and 'operate' within our specific namespace, so as not to clash with one another.
Here's an example
module JanInc # <-- your toplevel namespace module BIM class IFC_Properties < Hash # a subclass of hash that holds # IFC data items end module SKP2IFC # exporter code end end # BIM end # JanInc
and
module DanCo # <-- my toplevel namespace module BIM class IFC_Properties < Hash # a subclass of hash that holds # IFC data items end module SKP2IFC # exporter code end end # BIM end # DanCo
In this way.. the two classes IFC_Properties would not interfere with one another because they are in different namespaces.
JanInc**::BIM::IFC_Properties as oposed to DanCo::BIM::**IFC_PropertiesSince all your code that uses or references class IFC_Properties runs within the JanInc namespace, it can be refered to as BIM**::IFC_Properties; or if your code is running within the JanInc::BIM namespace it can be refered to as just IFC_Properties. Ruby will find and use yours and not mine. Ruby does not start at the top when looking for objects, instead it begins it's search in the local namespace, if it does not find a IFC_Properties, it backs out one namespace and looks again, and so forth until it finds a class IFC_Properties (or doesn't and raises an exception error.)
Just as you can specify an absolute path for a file system, you can also do this for a namespace qualification in Ruby, by using the toplevel scope prefix "::", ie:
::JanInc::BIM::**IFC_Properties tells Ruby to go right to the toplevel (main) and use that object with the specified nesting.See my [info] topic on [info] Using Ruby Modules
*note: Ruby v1.8.0 interpreter does not recognize the toplevel scope prefix operator. (Sketchup v 6.x / 7.x on PC, would need to update their interpreter DLL.)
-
On a practical note, have you been using this tool in design? I do generally start with an outline of exterior walls in plan, but then all the walls become double lines after that. I am not sure how I would adjust my design to create all single lines then go to the model. I develop where the lines go by measuring the spaces contained and not sure I could design a plan just drawing center lines of walls. I never refer to the center line of walls in final plans.
For me BIM or parametric software would provide an interactive and changeable interface where I could move a wall in a traditional floor plan (shown in double lines, windows, door, etc.) and have the model updated and vice versa.
-
@pbacot said:
On a practical note, have you been using this tool in design?
Not yet, and I wonder if it would be really useful at this moment without the ability to simply insert doors/windows.
I started with this test case because at work we use sketchup a lot for concept-design for the exteriors of buildings. Drawing an interior is much more work, especially because you need "thick" walls, and cutting openings isn't that simple anymore. Very often a rough floor plan is drawn as single-line-drawn spaces to get an idea of dimensions.
I figured that it would be handy to be able to instantly convert this "floorplan" to interior walls to put inside the model.I wrote the script with the idea to replace the wall-height/wall-width with a profile component. In this case it would be possible to create a left or right aligned wall if that's preferred to placement on the centerline.
This plugin is for me a starting point to experiment with simple ways to create meaningful building information inside Sketchup, and get it out again!
In my next post I will outline my ideas and try to answer some of the other questions, I have to think about that a bit
- Jan
-
@dan rathbun said:
See the API on AttributeDictionaries collection and AttributeDictionary class objects.
They can be attached to almost anything, including Layers, Scenes, etc. as well as base geometry, and Groups and Components.
These attributes are indeed exactly what you need to export meaningful data. I knew something like that existed but didn't check it out jet. Sounds really useful, especially when you can also use it on layers and the like...
Here in the Netherlands we have the TNO research institute(I don't know how well known they are internationally?), and they do a lot of good work on the IFC standard.
They also make the "IFC Engine DLL", a freely(as long as the project is not commercial) usable library for IFC files.
http://www.ifcbrowser.com/ifcenginedll.html
I read something about the ability to use "Windows 32 API" functions in sketchup, AND the ability to use DLL's from ruby.
Does anyone know if this could be "do-able", or does it have a lot of implications (MAC???).
It might make exporting IFC from Sketchup a bit easier... -
@brewsky said:
Does anyone know if this could be "do-able", or does it have a lot of implications (MAC???).
It might make exporting IFC from Sketchup a bit easier...Yea.. I downloaded the TNO packages last year and looked at them. They are WIN dependant. (Both the DLL and the ActiveX control.)
Making Win32API calls from Ruby is doable, but it's a bit low level. What I would do (if I had to,) is write a Ruby wrapper library for all the functions in the TNO DLL. An alternative is to write the wrapping in C or C++ and compile a so file.
Either way, it's a major project. And that is all before you actually get to writing the actual Sketchup plugin.For Mac, the TNO would need to have an Apple Objective C guru translate the C++ source and compile it with Xcode.
I didn't think it was worth it.. as IFC is an XML data file. Ruby already has libraries to work with XML files, that are cross platform.
-
@chrisglasier said:
As I see it the intent of your plugin is to automate part of the creation of a model.
This plugin in itself is meant to automate the creation of simple wall objects. But the reason I made it is to have the ability to easily create some meaningful objects that can be used as testcase for an IFC exporter.
@chrisglasier said:
Your edges ... where do they come from?
They are indeed the result of design.
I donât think designers want a tool that generates floorplans/buildings from a set of rules/demands. Although it would be really cool to compare your design with âthe perfectâ computer generated floorplan .But they DO like the ease of drawing in sketchup! If you could just make the creation of meaningful objects really easy even the building industry should not object
I have been thinking that it would be really neat to just be able to select all the faces of a low poly concept-model representing for instance the âroofâ, and than âwith a clickâ convert these to a slab with thickness and all the necessary attributes of a âroof-objectâ. And than do the same for exterior walls etc.
But all these attributes have no use without the ability to export them.
@chrisglasier said:
In other words would it be better to select criteria from existing know-how and get technology to search for and display possible solutions
I think we will need the software that advises in all kinds of areas like fire-compartiments, sound and the like you mentioned. But shouldnât that be a different project altogether? Or even separate projects based on the area of expertise?
Isnât that the meaning of BIM, create a model out of meaningful objects so other parties or tools can read it and add the requested extra information from the area of expertise(or check it for problems)?
These tools themselves would be great projects to work on! What if this existing know-how could be made available freely using âsemantic webâ. And could have your spaces-tool(by example) search by itself for the minimum dimensions of a functional âlivingroomâ. I see a lot of possibilities. Big problem remains that a lot of the needed know-how is corporately owned and people rather pay them than use some âunofficialâ source. I donât know how it is in other countries, but over here in the Netherlands even a large part of the regulations are written in copyrighted books!!!Interesting topic to discuss!
And now to the point I was getting to!
The reason I got myself into Sketchup scripting was because I have a couple of BIM-related things on my mind on which I would like to do some research...
- Be able to just select some faces(together with cutting-components) to generate walls/floors/roofs, or lines(together with a profile-component) to generate colums/walls etc. I donât like the concept of most BIM systems that a wall has to be defined âthis wayâ and a roof âthat wayâ, and that while they are not fundamentally different. The greatest difference is the âlabelâ, and then, because of the label, the way they react to other objects.
- Why do they tell itâs not possible(or advisable) to model every part of a building including tiny details? Things you WOULD add in a 2d detail drawing... The first thing you would need than is an easy way to define whatâs visible at a given view because it would not be a workable model. But after that, allmost every detail could be is just an extrusion of a âprofile-componentâ along a path. With some basic rules to solve the corners(based on properties/materials) drawing them in 3d should not be that much more complicated than drawing them in 2d. If a window could be defined by a square drawn on a sketchup face, than the square itself could be given the properties of âglassâ, the base face could be wall, and the 4 adges of the window could be extrusion paths for the âwindow-frame+every-bit-of-detail-you-needâ. And as long it is linked (with observers) to the original profile-component it would be editable as well. Just regenerate it after the profile is edited...
- Export all...
Your opinions please
-
@dan rathbun said:
It likely to clash with other plugins using that identifier.
And Dan, thanks for your tips on namespaces, I will really need that. Especially when things get a bit more complex, with possibly separate modules. And of course names that other people might have used!
-
@brewsky said:
@dan rathbun said:
It likely to clash with other plugins using that identifier.
And Dan, thanks for your tips on namespaces, I will really need that. Especially when things get a bit more complex, with possibly separate modules.
Oh you will definately need many module and class blocks to divide up the functional code, otherwise it will become unmanagable very quickly.
@brewsky said:
And of course names that other people might have used!
This will NOT be a problem, IF you follow my advice, and invent a unique toplevel namespace identifier. (The name of the module that encapsulates ALL your submodules and classes.)
@brewsky said:
Big problem remains that a lot of the needed know-how is corporately owned and people rather pay them, than use some âunofficialâ source.
So.. would your project be a pay-for plugin, or a free open source project?
A free open source version can be used by workflow firms (such as Onuma,) that would charge customers to use it. The strange thing (which you say,) is that these customers would and do pay these firms rather than use the 'project' version. I guess they think the service firm has verified the product's quality, or ironed out all the wrinkles.
Anyway.. you'd need to decide, and look into what license you want the project to be released under. (GPL, BSD, MIT, etc.)
See: Wikipedia: Software License@brewsky said:
I donât know how it is in other countries, but over here in the Netherlands even a large part of the regulations are written in copyrighted books!!!
Not uncommon.. even here. Usually the copyright is to prevent 'scalpers' from trying to resell copies of the standards or specifications. Some organizations will sell copies for around a hundred bucks each (ANSI), others will have them freely downloadable as PDF files.
-
@brewsky said:
But the reason I made it is to have the ability to easily create some meaningful objects that can be used as testcase for an IFC exporter.
In other words your main focus is essentially on paperwork type processes. But if you thought about object oriented information technology you could develop ideas how to identify and assemble objects and still produce traditional project documentation. A bit like creating a website that has potential to do many things but just using it to display a paper-like catalogue.
@brewsky said:
I donât think designers want a tool that generates floorplans/buildings from a set of rules/demands.
You know it just might be site owners demand use of OOIT for its transparency and accountability, and designers have to comply.
@brewsky said:
Although it would be really cool to compare your design with âthe perfectâ computer generated floorplan
I think the reverse would happen; it would take a great deal of setting and resetting the criteria to reduce the options to say ten. Actually this is a way of delaying subjective judgement, providing a very high degree of accountability. Of course many designers rely on intuition, which is fine if the logical testing, which naturally follows any such lateral thinking proves it correct (which is one reason why building contracts are such a hassle).
@brewsky said:
they DO like the ease of drawing in sketchup! If you could just make the creation of meaningful objects really easy
even the building industry should not object
I suggest ... would respect, because you know buildings are not really built from drawings and specs. They are built from interpretations of them, as thumbnail sketches, setting out lines, purchase orders and so on. How much better a series of instructions: "Buy this; put it here" rather than "Need this, put it on the drawing (making sure the information is scattered over plans, sections, schedules and specification)"
@brewsky said:
Your opinions please
I am sorry I have run out of steam and time for the time being but you could have a look at my website for some examples what can be achieved. I know it is difficult to see beyond improving what already exists - e.g. evolving models from orthogonal drawings - most often the basis for competitive tendering. Toffler wrote: "Static competition may have produced the thoroughbred racehorse but it could never have produced the automobile." Competition in the building industry is static, something more dynamic is needed ... don't you think?
-
@dan rathbun said:
So.. would your project be a pay-for plugin, or a free open source project?
Currently I have put in a reference to the GPL in the header of the script(default from the Geany-editor). Seems to me to be the best licence. I want to make it open source. I didn't do a lot of research, for one I don't know if there are restrictions in the GPL for using the licence for plugins that only work wit proprietary software? I'd like to keep it open source, so MIT does not seem the best choice. I need to read some more on that!
Oh, and another question:
How do you keep class instances through multiple sketchup sessions? Is it possible to create a class "wall", fill an instance with properties, and make a sketchup object "part" of the instance(or vice versa)? And still be able to call methods from that class after restarting sketchup without recreating the class-instance from the sketchup geometry(and attributes)? -
@brewsky said:
@dan rathbun said:
So.. would your project be a pay-for plugin, or a free open source project?
Currently I have put in a reference to the GPL in the header of the script ... I want to make it open source. ..., so MIT does not seem the best choice.
There is also the Artistic License 2.0
For more: Various Licenses and Comments about Them
-
@brewsky said:
How do you keep class instances through multiple sketchup sessions?
Data files saved to disk. (It's easiest, if the data is linked to a certain model object, to save it within the SKP file, as attributes attached to the object. Trying to keep any 2 or more files in sync, has proven problematic IMHO.)
@brewsky said:
Is it possible to create a class "wall", fill an instance with properties, and make a sketchup object "part" of the instance
Sort of.. the Sketchup object would be referenced by the class instance, using an instance variable. Also the Properties would be loaded from the attribute dictionary attached to the SKP object(s), (either a component or a group,) into the class instance's properties Hash (or Ostruct.)
@brewsky said:
(or vice versa)?
NO. The SKP file's DOM, does not support creating custom Drawingelement subclasses. There are rigid methods for adding only the defined object classes into the model DOM. (see the Entities class methods.)
Afterall.. the application needs to know how to draw the model object classes. Allowing a infinate number of them would "open Pandora's box."This is why your IFC objects will really be Groups (or Components) "owning" primitives or other nested Groups (or Components.)
@brewsky said:
And still be able to call methods from that class after restarting sketchup without recreating the class-instance from the sketchup geometry (and attributes)?
NO. When restarted, even Sketchup has to recreate the Ruby Sketchup API objects after loading the Ruby Interpreter, and then it's C++ model objects (which are exposed to Ruby via the API,) by reading in a SKP file from disk.
-
@dan rathbun said:
This is why your IFC objects will really be Groups (or Components) "owning" primitives or other nested Groups (or Components.)
@dan rathbun said:
NO. When restarted, even Sketchup has to recreate the Ruby Sketchup API objects after loading the Ruby Interpreter, and then it's C++ model objects (which are exposed to Ruby via the API,) by reading in a SKP file from disk.
Ok very clear, thanks!
I thought about it because I heard Java can write full class-instances to disk... -
@dan rathbun said:
I didn't think it was worth it.. as IFC is an XML data file. Ruby already has libraries to work with XML files, that are cross platform.
Do you advise using IFC XML? I read somewhere that using the original "step" variant was faster...
-
Oh and another question pops into my mind.
it seems regular practice to host source files her on the forum.
Woudn't it be easier to use google code or sourceforge to manage all the different versions? -
@brewsky said:
Oh and another question pops into my mind.
it seems regular practice to host source files her on the forum.When it is a code snippet, or a relatively small, stand alone plugin, it's just easier to post a zip file here.
@brewsky said:
Woudn't it be easier to use google code or sourceforge to manage all the different versions?
For a project like yours... during the development, a google code site, github site, or a project site at RubyForge may be needed.
-
@brewsky said:
@dan rathbun said:
I didn't think it was worth it.. as IFC is an XML data file. Ruby already has libraries to work with XML files, that are cross platform.
Do you advise using IFC XML? I read somewhere that using the original "step" variant was faster...
Well pehaps (I didn't know of STEP, until you said this,)...
Wikipedia says that the STEP files are the most widely used, so support for them would be a good idea. Unfortunately, ISO wants 180 euros (I think,) for the a copy of 10303-21.On the other hand the IFC XML Schema was a free download.
Personally I can more easily read and understand the XML. (The Step files look like a nasty crossbreed between C and COBOL.)
Advertisement