July 29, 2011 at 1:37 pm #3545
With the release of version 2.0, the most important functionality is already in place. However, much of it has been developed in a rush which has resulted in unstructured and sometimes duplicated code. While we could refactor individual classes I think we will be better off reorganizing the whole architecture. I therefore suggest that we split the development and create a new architecture for what will eventually become BoardCAD version 3.0 in a parallel svn path, while at the same time fixing bugs and implementing new functionality for version 2.x in the existing trunk.
/JonasJuly 29, 2011 at 1:38 pm #4178
For BoardCAD v2.x I think we can set a tentative date and decide on which bugs we need to fix and which features to include. We should release version 2.1 before the end of the year.
I’m planning to solve the following bugs:
3366734 – STEP compatibility
3366731 – Translate 3D does nothing with non integer
1806014 – 3D conversion is inaccurate
and implement the following functionality:
3165801 – Nurbs undo
3165807 – Create Bezier patches from curves
/JonasJuly 29, 2011 at 1:40 pm #4179
For BoardCAD 3.0, before deciding on the architecture, we should review the main goals of the project. For me the main goals are that BoardCAD should be:
1. Platform independent
2. Compatible with CAD/CAM standards
3. Capable of modeling any type of board
Some personal thoughts about these:
In future, supporting Windows/Mac/Linux may not be enough. Android, iPads, Google OS, and cloud computing are getting a lot of attention. Future versions of BoardCAD should run on those or at least be easy to port. Currently my main concern is Java3D. It seems to be an almost a dead project and I doubt that it will be ported to these new platforms. Open-GL may be supported and should be used when possible as it offers hardware acceleration, but preferable BoardCAD should not depend on open-gl either.
For CAD standards, STEP compatibility is still the most important. Future versions should not only be able to export CAD-models, but also import them even if we will not be able to edit all parts. For CAM g-code seems to remain the main alternative even if we may want to include support for step-nc.
For modeling boards the current version does not allow asymmetric boards. It should be possible to trigger if we want the left and right side to be symmetrical or not, and also if we want the nose and tail to be symmetrical (typically the case for twin tip kiteboards).
/JonasAugust 3, 2011 at 11:29 am #4180
The easiest way to port BoardCAD to other platforms is probably to create a web application using GWT. They offer open-gl support through GwtGL (http://code.google.com/p/gwtgl/). It will require us to rewrite the gui and the file handling, so these part should be placed in separate components in the new architecture.
/JonasAugust 5, 2011 at 1:18 pm #4181
I want to help…I really do, but I see a lot of problems with this project.
The first thing I notice is not much activity in the SVN trunk. So either no development is actively taking place or developers are hoarding their updates locally. I haven’t been here long enough to know but I also only see Jonas doing anything.
The 2D design of this app is strong but as soon as it goes to 3D this app is super confusing for the user and developer and the CAM seems like it was thrown in at the last minute.
If you want new developers (like me) to help out your biggest issue is commenting your code so others can understand it. Classes like myPoint with uncommented members u,v,i,j are making me want to abandon you. Hours of time wasted and I still don’t really understand what u and v are…
Anyways, any CAD/CAM app is highly specialized and this is a specialized form of that. The users of this app are pretty hardcore and my point is I don’t thing portability is really your #1 issue here. I’d focus more on code cleanup/documentation and code reuse/refactoring. If a function runs for pages maybe it’s time for another function. Same applies to classes.
Sorry for the rant…I couldn’t sleep last night.August 7, 2011 at 3:00 am #4182
I like your vision. I think you are damn right. The project has all the potential in the world but it needs a bit of a stir up, so it grows more and more organized.
Since the times when the Bezier interface was added to the BoardCAD project by Haavard (correct me if i am wrong), I always had this feeling that there was an uncompetitive competition going on, between beziers and nurbs CAD/CAM. Jonas always worked more in the Nurbs “side” and Haavard the Bezier “side”.
I don’t want to take sides right now.
I just think that the program would be more mature if the programmers all had a closer common target. It’s as if they were working in parallel towards the same goal but they never really joined efforts 100%, to form one strong stream of common interest.
M.August 16, 2011 at 3:01 pm #4183
I agree, and the rationale behind creating a new architecture is exactly this. While we can spend time on cleaning up and documenting the existing classes, it will not solve the main issue which is the lack of structure at system level.
To create a new architecture it is important to review the goals of the project, and clearly define the requirements. I didn’t mean that portability is more important than anything else, but it is something I would like to keep in mind when defining the new architecture. Things like Java3D, swing, and file handling are not available on all platforms and should preferable be isolated in separate components.
I would really like to get the goals and requirements down before anything else, but below is an idea of what could be the main components in the new architecture.
* The CAD-core should contain the geometric model (points, curves, surfaces, etc) and general CAD functionality such as adding and removing control points, calculating curvature/area/volume. Should preferable also implement more advanced functionality such as surface trimming and boolean operations which are currently not included in BoardCAD (maybe by using jgeom). The CAD-core should be general enough to be useful also for other CAD applications outside boardcad, or to design other things than boards, such as fins, within BoardCAD. The geometric model could be an implementation of STEP AP42 along with some parts from AP203 to make it easier to import and export CAD-models. The core could possibly be released with a less strict license such as lgpl. One of the problems with our current model is that units are hard coded (cm for Bezier and mm for nurbs). The CAD-core should work with any unit.
* The Board is a higher level product model. It contains rules that are specific for surfboards, such as how to generate the surface from the curves. Maybe import/export of board specific file formats such as brd, 3ds and srf also should be placed here. Currently functionality at this level is distributed between board and brd.
* The machine module will contain models for the machine and tool and will be used to create g-code and to do simulations. This is probably the most confusing part at the moment as there are three different ways to generate gcode: from the nurbs model, from the bezier model, and through a script. Currently each alternative demands a different machine description. At the same time this is probably the part that most people are interested in customizing so it really needs to be well documented and easy to change. If possible I would like the machine module to work directly on the geometric model rather than on the board model so that it can work with any type of geometry and not only for surfboards.
* BoardCAD is the main module that creates the user interface and communicates with the other modules.
* The GUI is put in a separate module in order to make it easier to substitute the interface and make BoardCAD work on different platforms.August 17, 2011 at 3:52 am #4184
Should the focus be more on Beziers or Nurbs curves? Or both?
M.August 17, 2011 at 5:45 am #4185
If possible I would like the machine module to work directly on the geometric model rather than on the board model so that it can work with any type of geometry and not only for surfboards.
It sounds like jonas wants to use nurbs…
I’m not really sure what to say other that I think the #1 goals for the CAM should be simplicity and precision.
Flexibility ultimately leads to complexity which is why I think I disagree with the above comment. I think what I like so much about the 2D CAD design of BoardCAD is that it has all the board specific details are built in and abstracted away from the user. I believe the CAM needs the same thing. Board specific CAM is already present with stringer, outline cuts and the general lengthwise toolpath strategy.
I think I like beziers better because I feel they will be simpler and more precise. I’m not really sure, but going to nurbs reminds me of lossy compression algorithms that lose data to approximation.
I do know my gcode from nurbs seemed awfully jagged. As a user I’d like some feedback of the precision obtained by the software before sending the gcode off to the machine. It could be separated into ‘ModelingPrecision’ and ‘ToolPathPrecision’ that would combine to the ‘OverallPrecision’ which is the max error from the original board design (assuming a perfect machine of course).
If using nurbs, maybe the nurbs parameters could instead be in terms of target ‘ModelingPrecision’. This hides nurbs details from the user and presents a possibly more meaningful number.
Likewise a target ‘ToolpathPrecision’ defines the amount of acceptable error introduced due to CAM or tool/toolpath related. This relates to scallop/step heights due to the tool, number of cuts and gcode approximation. An option to use radius instead of linear gcode may help improve this accuracy.
Btw, how do I generate gcode from beziers? I’d love to try that out…
-SteveAugust 17, 2011 at 9:00 am #4186
I like Bezier curves better as it is so far, the best way (easy & effective) to design a surfboards, surfcraft.
With Nurbs, and Splines Its just not as design friendly as Beziers. I can pretty much guarantee that most people/shapers won’t use that unless some very good improvement is done.
Just my thoughts as of 2011.
ps.: Haavard where are you?August 17, 2011 at 11:53 am #4187
I think the current focus should be on integration. We need both a simple way to design the boards (Bezier) and a well defined 3D model (nurbs).
The Bezier curves do not define a full 3D model by themselves. Currently BoardCAD has no less than five different methods to interpolate between the cross sections, three direct methods written by Håvard and two methods written by me that first create a nurbs surface and then use the surface model to calculate intermediate points. This means that even if you send your 2D model to someone with BoardCAD there are five different ways that the curves can be interpreted, and if you send them to someone with a different program (e.g. Akushaper or Shape3D) you have no idea at all of how the 3D model will look. If you instead send the nurbs model it will look the same anywhere. Ola (one of the original BoardCAD developers) does not have a machine but sends his step-files to different CNC machines in Sweden, Portugal, Hawaii, Thailand, and China (he has previously designed windsurf boards for Starboards and is currently designing for Simmer Styles upcoming board range).
I think the main problem at the moment is that the nurbs surfaces do not exactly match the Bezier curves. When I first implemented the Bezier->nurbs approximation this was a delibarate choice since I wanted the final surface to have few points in order to facilitate further editing. However, I’m aware that most people are not interested in editing the surfaces directly. I therefore started to work on a Bezier->nurbs interpolation using Bezier patches that are a special case of nurbs surfaces. It worked well when all cross sections had the same number of control points, but some work on the Bezier side is needed in order to ensure that. This is one place where I think we need some combined effort.
Another place where we need to cooperate is the machine interface. Håvard is working on a very fancy machine interface. I think it is available in the trunk by choosing Bezier to g-code under the file menu. I haven’t looked at it for a while, but last time I tried I couldn’t figure out how to use it.
/JonasAugust 17, 2011 at 7:26 pm #4188
I did some refactoring today and removed the gcode generation from the Board class and put it in a separate BoardMachine class. I will try to do the same with the drawing methods tomorrow…
/JonasAugust 17, 2011 at 8:14 pm #4189
The Bezier curves do not define a full 3D model by themselves. Currently BoardCAD has no less than five different methods to interpolate between the cross sections, three direct methods written by Håvard and two methods written by me that first create a nurbs surface and then use the surface model to calculate intermediate points. This means that even if you send your 2D model to someone with BoardCAD there are five different ways that the curves can be interpreted, and if you send them to someone with a different program (e.g. Akushaper or Shape3D) you have no idea at all of how the 3D model will look. If you instead send the nurbs model it will look the same anywhere. Ola (one of the original BoardCAD developers) does not have a machine but sends his step-files to different CNC machines in Sweden, Portugal, Hawaii, Thailand, and China (he has previously designed windsurf boards for Starboards and is currently designing for Simmer Styles upcoming board range). /Jonas
This is a valid point, but it sounds like these board shops are generating their own gcode from a 3D model. Therefore, this comment applies only to the ‘Export’ feature and is completely separate from boardCAD’s internal CAM features.August 18, 2011 at 10:46 am #4190
Therefore, this comment applies only to the ‘Export’ feature and is completely separate from boardCAD’s internal CAM features.
Why should they be completely separate? When I export a board I want it to be identical to the one I designed.
For me, having an open board model is as central for the project as being open source. Without an open model users are stuck with whatever functionality we currently provide.
If we restrict the project to the Bezier part that means users would currently be limited to printing 2D templates. In order to cut the boards they would need to either buy a machine from Akushaper or a $4000 Shape3D license. By finishing the Bezier->gcode we would make the owners of a 3-axis CNC machine happy. With some more effort from our side (and some more waiting for the users) we can of course offer 4 and 5 axis support and make them happy as well. Now someone wants a swallow tail. This will be harder. Another one wants to add fin plugs. A third user wants to do FEA in order to know where to put reinforcements, and a forth user wants to use CFD to compare different bottom curves…
Bottom line is that we will never be able to satisfy everyones need within BoardCAD, and by having an open model we don’t need to.
As I see it the Bezier curves and the nurbs surfaces complement each other, with the 2D Bezier curves offering an easier way to manipulate the underlying 3D model. I know the current approximation is not perfect and that the gcode is not super smooth, but even so I would guess that at least 20% of the boards here in Portugal are currently being produced from this code. Even Tiago Pires, currently world nr 11, had one of his boards made using BoardCAD and Shapebot and he was very happy with the result so it cannot be all bad and with a little closer cooperation I think we can actually make something really good…
/JonasAugust 18, 2011 at 12:13 pm #4191
nice, now i start to see whats on the other side of the “wall” so to speak. I like your visions Jonas.
– Use Beziers to do most of the designing process, for its simplicity and effectiveness;
-Nurbs for real 3d surfaces that match the bezier views; And export of full 3d board for CAE or whatever else, for those that want to take it to the next level.
– Bezier cam;
– Nurbs cam;
Do we really need 2 CAM modules?
The only thing I am thinking now is, sounds like an awful lot of work to be done…
I wish I was as smart as you guys, then I could too code, it would be a pleasure… snif.
Haavard where are you!! Hope you are well!
- You must be logged in to reply to this topic.