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.

Polyhedrons?

Started by Dean, March 30, 2012, 07:32:22 AM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

MarkX

#15
Quote from: Dr PR on April 01, 2012, 04:45:48 PM
You should be able to drag the point of the triangle to the intersection (Intersect 2) of the vertical line and arc.
Oh -- I thought you meant before creating the arc.

Right, you could drag the points after you have already created the arc. But I wanted the work flow to resemble what you would do if you were, for instance, assembling the model out of cardboard.  Rotation seems to be the natural tool to use. However, given the flakiness of the rotation tool, just moving the points isn't a bad approach either.

Edit: Could have also assigned 3 handle points to the triangle and then snapped it into place.

Thanks!
Mark

dcadRob

I wrote some polyhedron programs over the weekend.
I'll post the menu program as pastable code and the others as encrypted macros. Without the menu, the programs draw polyhedrons with edge 10 units long and centered at the origin.
'PREPROCESS FOR POLYHEDRON
'PROGRAM "POLYHEDRON.BSC"
SYS(132)=400
SYS(133)=0
WINDOW 12,40
LOCATE 1,10
PRINT "POLYHEDRA"
LOCATE 3,5
PRINT"1. TETRAHEDRON"
LOCATE 4,5
PRINT "2. OCTAHEDRON"
LOCATE 5,5
PRINT "3. ICOSAHEDRON"
LOCATE 7,1
PRINT "WILL PROMPT FOR ONE POINT FOR ORIGIN"
LOCATE 8,1
PRINT "AND THEN 2 POINTS FOR EDGE LENGTH"
GETINPUT:
SYS(130)=300
SYS(131)=200
INPUT "SELECT POLYHEDRON", P$
IF SYS(999)=1 THEN END
IF P$="1" OR P$="4" OR P$="T" OR P$="t" THEN P$="T"
IF P$="2" OR P$="8" OR P$="O" OR P$="o" THEN P$="O"
IF P$="3" OR P$="20" OR P$="I" OR P$="i" THEN P$="I"
IF P$<>"T" AND P$<>"O" AND P$<>"I" THEN GOTO GETINPUT
WCLOSE
SYS(1)=0
>SETSTARTPOINT
{
}
>SETPOINTS
{
<MAXPOINTS 2
<CMDPROMPT "SET TWO POINTS FOR EDGE SIZE"
<INCOMPLETE 1
}
IF SYS(1)<2 THEN
S=0
ELSE
POINTVAL X0 Y0 Z0 1
POINTVAL X1 Y1 Z1 2
S=SQRT(SQR(X1-X0)+SQR(Y1-Y0)+SQR(Z1-Z0))
END IF

SYS(1)=0

IF P$="T" THEN CHAIN "TETRAHEDRON"
IF P$="O" THEN CHAIN "OCTAHEDRON"
IF P$="I" THEN CHAIN "ICOSAHEDRON"

Dean

dcadRob, Thanks for sharing your skills. The macro works great!
DesignCad 3D max 2021
Lenovo 17.3"Laptop Intel(R) Core(TM) i7-9750H CPU @ 2.6GHz/Turbo boost 6 cores 12 threads.16GB memory.SSD 256GB/HDD 1TB 7200 Rpm.Nvidia Graphics GeForce GTX 1660 Ti 6GB
Windows 10 Home 64 bit