Forums Anyscript.org  

Go Back   Forums Anyscript.org > General Forum > Announcements

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 09-17-2009, 05:30 AM
mkjung9980's Avatar
mkjung9980 mkjung9980 is offline
Senior Member
 
Join Date: Aug 2009
Posts: 865
Default CAD2Any: Converting CAD assembly file to Anyscript file

Hello.
My name is John Jung.
I'm a user of Anybody program.
I think that Anybody is one of the most powerful biomechanical software programs in the world.
Compared to LifeMod™ in ADAMS™, I think that if there is a preprocessor for modeling in Anybody, Anybody can be easier to use.
I think that if an assembly file in CAD software can be converted to an AnyScript file easily, it can be an alternative solution for that problem.
So, using SolidWorks CAD API, I made a program that can convert a SolidWorks assembly file to an AnyScript file.

This is a beta version. And there may be a lot of bugs.

※ Environment for use
OS : Microsoft Windows XP/Vista 32bit only
CAD: Solidworks 2006 32bit only

If I can fix all bugs and add related functions, then I'll implement a new version that can work on the latest SolidWorks 2009 version.

Please test this program and send me your opinions

Sincerely,

John Jung
Attached Files
File Type: zip CAD2Any_beta1.0.zip (913.5 KB, 51 views)

Last edited by mkjung9980; 09-17-2009 at 12:53 PM.
Reply With Quote
  #2  
Old 09-17-2009, 11:49 AM
jr's Avatar
jr jr is offline
Member
 
Join Date: Mar 2009
Posts: 49
Default

Hi John,

That looks like an extremely interesting idea. I have downloaded the application and will test it out and get back to you.

Best regards,
John
Reply With Quote
  #3  
Old 09-17-2009, 03:57 PM
jr's Avatar
jr jr is offline
Member
 
Join Date: Mar 2009
Posts: 49
Default

Hi again,

I tried it out, and it works amazingly well. I used SolidWorks 2008 for the test and there was no compatibility problem. I am convinced that this application can be extremely useful to the entire AnyScript community.

I am very impressed that you managed to make the integration so complete that you get the STL files and also the mass properties included in the transfer. I think the transfer of mass properties in particular can be valuable to a lot of users; accurate mass and inertia properties are often difficult to assess for complex mechanical parts and with your application they come automatically.

I was thinking that you could make the integration even more complete if you create a sub-assembly in SolidWorks that is a simplified version of the full-body skeleton in AnyBody. This subassembly could be placed in the model by the user and represent the human model in AnyBody. Notice that this does not need to have all the complex degrees of freedom of the AnyBody repository model but just the most important ones.

When the application dumps the model to AnyScript, the skeleton sub-assembly is not dumped, except as a statement to include the full body model and as a manikin file containing the relevant joint angles from the skeleton model in SolidWorks. This will position the skeleton from the repository in the correct place with respect to the model, so the user can become even more independent of AnyScript coding.

If you can create something like this, you will effectively have made a manikin application for SolidWorks that is much more powerful than similar applications from CATIA (Human Builder) or UGS (Jack).

By the way, out of technical curiosity, could you write a few words about how the application was created in the SolidWorks development environment? It it recorded as a macro and subsequently edited in Visual Basic, or is there some other development environment that you use?

Best regards,
John
Reply With Quote
  #4  
Old 09-18-2009, 06:07 AM
mkjung9980's Avatar
mkjung9980 mkjung9980 is offline
Senior Member
 
Join Date: Aug 2009
Posts: 865
Smile

Dear Prof. John,

First, thanks for your kind evaluation about my application.
But, I think that CAD2Any should be more improved and stabilized if it would be used in public.

Quote:
Originally Posted by johnr
I was thinking that you could make the integration even more complete if you create a sub-assembly in SolidWorks that is a simplified version of the full-body skeleton in AnyBody. This subassembly could be placed in the model by the user and represent the human model in AnyBody. Notice that this does not need to have all the complex degrees of freedom of the AnyBody repository model but just the most important ones.

When the application dumps the model to AnyScript, the skeleton sub-assembly is not dumped, except as a statement to include the full body model and as a manikin file containing the relevant joint angles from the skeleton model in SolidWorks. This will position the skeleton from the repository in the correct place with respect to the model, so the user can become even more independent of AnyScript coding.
Answer1) Similar to your opinion, I’m also interested in the implementation of human-centered CAD system. In past, my advisory professor, Kunwoo Lee, had published a short paper about ‘CAD System for Human-Centered Design’. Link is as follows: http://www.cadanda.com/cad_a_3_5_09.pdf

At that time, we implemented a basic human-centered CAD system on SolidWorks. In that system we selected LifeMod in ADAMS for biomechanical analysis software. For the consistency between our system and LifeMod, the human model in our system has the same structure as that of LifeMod. For analysis in LifeMod, SolidWorks part files are converted to Parasolid format files. And human posture information is also transferred. Finally interactions between human and product model are converted as joint information.

During the development of this system, some issues were as follows: how to control posture of human model and how to classify and define the interactions between human and product model. Nowadays I’m considering how to improve these functions for better human-centered CAD system. To control posture of human model, some inverse kinematics algorithm should be adopted. And for kinematic analysis, some motion generation algorithm may be also needed.

If someone plans to integrate AnyBody to a certain CAD system, several implementation issues may arise. First, parametric human model generation function may be needed. And, if it is possible, human model structure in CAD system should be nearly same as that of AnyBody. To do that, a parser that can import human model in Anybody repository may be needed.

Quote:
Originally Posted by johnr
By the way, out of technical curiosity, could you write a few words about how the application was created in the SolidWorks development environment? It it recorded as a macro and subsequently edited in Visual Basic, or is there some other development environment that you use?
Answer2) As you know, there are several ways in SolidWorks API programming. The easiest way is to use SolidWorks macros with Microsoft VBA. Other ways are to make standalone applications or to make add-in applications using various programming languages.
The method I used was to make a SolidWorks COM add-in application in form of DLL using Visual C++. The reason why I adopted C++ is that I wanted to combine my own object classes with native SolidWorks API functions. For instance, the classes for human model structure were written in C++.
My development environment is Microsoft Visual Studio 2005. Additionally, I adopted MFC support in an ATL COM add-in.

Best regards,
__________________

Moon Ki Jung, Ph.D, Application Engineer, AnyBody Technology A/S.

※ AnyScript™ Reference Manual is the bible.
※ AnyScript™ wiki page is the best supplementary information(http://wiki.anyscript.org).
※ When you would upload your models, please write information about your AMS and AMMR versions.
※ If you want to get more intensive support, please update your information(profile, organization and signature).

Last edited by mkjung9980; 09-18-2009 at 06:19 AM.
Reply With Quote
  #5  
Old 09-18-2009, 08:39 AM
jr's Avatar
jr jr is offline
Member
 
Join Date: Mar 2009
Posts: 49
Default

Hello John,

Quote:
Originally Posted by mkjung9980 View Post
Answer1) Similar to your opinion, I’m also interested in the implementation of human-centered CAD system. In past, my advisory professor, Kunwoo Lee, had published a short paper about ‘CAD System for Human-Centered Design’. Link is as follows: http://www.cadanda.com/cad_a_3_5_09.pdf
Thanks. That is actually a very good overview of different types of human models.

Quote:
Originally Posted by mkjung9980 View Post
If someone plans to integrate AnyBody to a certain CAD system, several implementation issues may arise. First, parametric human model generation function may be needed. And, if it is possible, human model structure in CAD system should be nearly same as that of AnyBody. To do that, a parser that can import human model in Anybody repository may be needed.
Parsing AnyScript models into SolidWorks might be a difficult task because we use a lot of rather advanced kinematic features in the body models that are not available in SolidWorks. However, I think a simplified model in SolidWorks wight function. For instance, in AnyBody we have a very detailed spine, and even if this is preplaced by a simple spine in the SolidWorks model, the connection between the two models can still be driven simply by a rotational measure between the thorax and the pelvis.

The next version (4.1) of AnyBody will contain the ability to handle redundant kinematic constraints. It means that the model will acceps moreconstraints than it has degrees of freedom, and this makes it much less sensitive to having an exact minimal set of constrains in every posture. This might make it much easier to maintain a connection between the CAD model and the musculoskeletal model.

Will you be posting new versions of CAD2Any as they become available?

Best regards,
John
Reply With Quote
  #6  
Old 09-18-2009, 10:02 AM
mkjung9980's Avatar
mkjung9980 mkjung9980 is offline
Senior Member
 
Join Date: Aug 2009
Posts: 865
Smile

Dear Prof. John,

Quote:
Originally Posted by johnr View Post
Parsing AnyScript models into SolidWorks might be a difficult task because we use a lot of rather advanced kinematic features in the body models that are not available in SolidWorks. However, I think a simplified model in SolidWorks wight function. For instance, in AnyBody we have a very detailed spine, and even if this is preplaced by a simple spine in the SolidWorks model, the connection between the two models can still be driven simply by a rotational measure between the thorax and the pelvis.
Human model in SolidWorks don't need to be 'SolidWorks' objects like parts. And I think it is not an appropriate approach. Using SolidWorks API, API programmer can control OpenGL context of SolidWorks View. So in my former CAD system with LifeMod, human models is created by my own c++ code and it is not a SolidWorks object. But API programmer can render human model in SolidWorks View.
According to your opinion, a simplified version of AnyBody human model can be generated in SolidWorks CAD system, that is relatively easier to control.

Of course, I'd like to upgrade CAD2Any. What I want to add to CAD2Any are:
1) Support more joints that are defined in Anybody: AnyStdJoint(For fix joint), AnyTransSphericalJoint, AnyUniversalJoint

2) Support more mate condition types in SolidWorks: Parallel, Perpendicular, Tangent mate types

3) Support code generation for 'drivers': 'Simulation' objects in SolidWorks can be converted to linear and angular drivers in AnyBody

4) Some user interface functions: Transparency adjustment, Coordinates view on/off, etc,.

But I can't tell until when I can post new version of CAD2Any. But I'll try my best as soon as possible.

P.S1) I got an idea for CAD2Any from Simmechanics CAD translator:
http://www.mathworks.com/products/si...cription4.html

Best regards,
__________________

Moon Ki Jung, Ph.D, Application Engineer, AnyBody Technology A/S.

※ AnyScript™ Reference Manual is the bible.
※ AnyScript™ wiki page is the best supplementary information(http://wiki.anyscript.org).
※ When you would upload your models, please write information about your AMS and AMMR versions.
※ If you want to get more intensive support, please update your information(profile, organization and signature).

Last edited by mkjung9980; 09-18-2009 at 10:09 AM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:27 PM.