DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Program "workplane and unworkplane"

Started by Pearlitic, February 25, 2015, 07:31:32 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Pearlitic

I have several macros that used to work but now get an error after 20 cycles of "workplane" and "workunplane".   I draw multifrequency octahedrals and I like to get them as complex as I can.
With an error after 20 cycles, I can't draw many triangles.  Because of this problem I have resorted to doing my math in space which is infinitely more difficult.

I have re-thought the problem and have decided to use cylinders for my struts, but now I want to break my struts at midpoint.   This is no problem on a drawing, I get that I can use "midpoint".  The problem is that I don't really want to have to draw anything.  I want to program it.  What is the programming correct syntax to find the midpoint of a line created by two points in space?

I used to have a list of commands, I think in an old Design Cad3D book, but I can't find it.  Is there a list of commands somewhere?

I have attached a simple 50 frequency quarter panel. 

So really I have 3 issues,

Workplane, Unworkplane
Midpoint macro
List of commands

prl

#1
Hi Pearlitic,

Not sure what the issue is with the macro you are using.  You can if you wish attach the *.d3m file and I'll scan it for obvious errors.

As for midpoint, for a line segment defined by (x1,y1,z1) and (x2,y2,z2), the math looks like this:

.
.
.
xmp=(x2-x1)/2.0+x1
ymp=(y2-y1)/2.0+y1
zmp=(z2-z1)/2.0+z1
.
.
.

As for list of (BasicCAD?) commands, if you are looking for BasicCAD info, see here: http://forum.designcad.com/index.php?topic=5.msg7#msg7

Edit:  Had to chuckle at Dt's post below this one.   I'll deduct 10 points from my answers since I forgot to simplify. Doah! Had my head in the clouds.

DrollTroll

alternative, simpler midpoint math:
xmp = (x1+x2)/2
ymp = (y1+y2)/2
zmp = (z1+z2)/2
25 years with DesignCAD

DrollTroll

Also: Is the error message coming from the macro, or is DesignCAD crashing?

If it's a macro error, use Sys(800) to trace the macro's steps.
Sys(800) = 1 turns on the Trace Mode window,
Sys(800) = 2 also saves the Trace info in a log file,
and
Sys(800) = 0 turns Trace Mode off again.
25 years with DesignCAD

DrollTroll

If you're running Windows 8.x, one of the fairly recent updates broke the WinHelp viewer.
Look in installed Windows updates, and if Update KB3000850 is installed, uninstall it.

I had to do that to view the Help file on my laptop.
25 years with DesignCAD

Pearlitic

Thanks everyone..  I've been able to download the manuals and the midpoint formula worked great.