ds-blue-logo
Preview  |  SOLIDWORKS USER FORUM
Use your SOLIDWORKS ID or 3DEXPERIENCE ID to log in.
FPFilipe Pinto04/11/2008
Hi there,


Introduction

- First of all, I would like to say that is the 1st time I post in a forum and that I'm a newbie in SolidWorks! (what a combination to start...). BUT I think i'm a medium programer in VB (VB6 and a little of VB2005).

- Second, I never felt the need to post questions because the answers are always on InterNet (read Foruns, execute little examples...) or in the help files and its just a question of time and patient till finding the answer. Well i'm working in this project almost for a month (10 hours/day sometimes) and i'm starting to feel that solidworks is to especific for a type of aplication and it doesn't make what i want.

- Third, I need in this forum to understand if it is possible to execute some actions so I can boost my confidence and finish my program... or quit and move to another to CAD tool.

- Fourth, I will explain things as a 4 year old because that was the way I tried to aproach the solution and probably there is a easier way.

Well lets cut to the chase:

-» I have to develop a program (a macro !!!) that permits marking the "point" of intersection between 2 solids.
For example I have a CUBE and a SPHERE 5 units apart of each other. Starting to getting them closer i want to identify the first POINT of intersection.
Yes I want a POINT... not a VOLUME (Ei... to me, a volume of 0,0001m^3 could be considered a POINT!).
The complexity of the program rises because the SPHERE should continue to MOVE around the cube so i can get other points that permits drawing a line, that represents every possibilities of intersection. Over that line the face of the cube, should be painted with another colour.

Let me now translate in solidworks language:

As far as I Know and could perform "hand" made... (Without macros) with a CUBE and a SPHERE (two diferents parts assembled in a Assembly type of project), i started moving the SPHERE towards the CUBE using the MOVE comand (inserting the DELTA x displacement), and started to aplly the "FIND INTERFERENCE" comand. When I got a Low Volume of interference (3m^3), I used the
Tools-> SKetch Tools-> Interference Curve. That intersection curve between the two solids, is a circle... and the center is the point I wanted to know. Next i found in the same way another point of intersection and finaly draw the line.

When i finished this by hand, i thought it would be "easy game" to start building a macro using the RECORD method (that everyone uses to startup the constrution of program), right??? WRONG... First of all calling object in SolidWorks to me is everything but a simple process. But Worse of all is when I RECORDED the move actions and all i got was nothing but simple:

boolstatus = part.Extension.SelectByID2(" (...) ") (only the selection of a SPHERE procedure right ???)

But of course... examples in "Help API of Solidworks". I understood that I had to use the comands, like "MoveCopyBodyFeatureData" and "TransformX"... but it still doesn't work (not 100% sure of the code).

Finaly, after i've show you what troubles me, what i want to know is:

Is it possible with a macro make the "SPHERE" move?
Is it possible to test the interference until a maximum VOLUME?
Is it possible to PAINT, directly in the assembly, the INTERFERENCE between the 2 pieces and making it a part of the assembly? (It Would Spare the work of making lines)
Is this the right path to the solution ?
Aproching the problem from SolidWorks COSMOS could it become easier???

OR in another words...
Can SolidWorks make my project ???

To anyone that can enlighten me, freeing me from the darkness of ignorance... THANKS


Filipe Pinto, woking in
SOLIDWORKS Ver. Education Edition 2007 SP3.1

PS: PLEASE HELP!!! And sorry if along the post ive broken any rule