15 Reputation

3 Badges

8 years, 21 days

MaplePrimes Activity

These are replies submitted by andmail

Thank you.

Hope Maple will fix the bug.

Press right mouse button inside narrow window to get a normal size of code-edit window

@Rouben Rostamian  Thank you for your help!

I created 2 functions to get the input list of lists from the detail() function:



b := 2

h := 1

square(sq1, [point(A, 0, 0), point(B, b, 0), point(C, b, h), point(D, 0, h)])

polygonArea := proc (L) local i, n; n := nops(L); add(-L[i+1][1]*L[i][2]+L[i+1][2]*L[i][1], i = 1 .. n-1)+L[n][1]*L[1][2]-L[n][2]*L[1][1]; return %*(1/2) end proc; polygonVertices := proc (obj) local t, f, attr; global `geom2d/given`; attr := [attributes(obj)]; if 0 < nops(attr) then attr := attr[1] else return FAIL end if; if type(attr, 'table') then t := attr[`geom2d/form`]; f := attr[`geom2d/given`]; if member(t, {'polygon2d', 'square2d', 'triangle2d', 'RegularPolygon2d', 'RegularStarPolygon2d'}) then f else FAIL end if else FAIL end if end proc; polygonPoints := proc (obj) local i, f; if type(obj, 'list') then for i to nops(obj) do f[i] := [geometry:-HorizontalCoord(obj[i]), geometry:-VerticalCoord(obj[i])] end do; convert(f, list) else FAIL end if end proc





draw([sq1, A(printtext = true), B(printtext = true), C(printtext = true), D(printtext = true)])








@Kitonum thank you for your reply.

I use the centroid() function for my rectangular squares in my work. It returns the correct result. It would be great if Maple will upgrade the squares to rectangles (I mean the area() function) :)


My libname path should look like this: 

libname := ( libname,

libname := "C:\Program Files\Maple 2015\lib", ".", "D:/Temp/MTest/libTest2.mla"

Now there is no errors any more. Thank you once again!


You're absolutly right!

I was using with(Units[Standard]) in startup code.

In Maple Help I found this: 

The with(Units[Standard]) command does not allow the use of the short form of the Units package commands that customize the dimensions, units, and systems of units. It is necessary to enter the with(Units) command. For a list of the commands in the Units package, see Units.

Perhaps it is a mistake?

Using with(Units) does not cause this error, but another error appeares


# Reset the libname variable to include the library
# created earlier. Obviously OP will have to change
# file path/name to correspond to that supplied above
  libname :=  "D:\\TEMP\\MTest\\libTest2.mla";



# Check that variables now exist and can be used in sums
# Everything seems to be working!!











Error, (in Units:-Unit) unrecognized conversion




Thank you for quick reply


Maple 17 x64. Very strange, isn't it?

Thank you for quick reply


Maple 17 x64. Very strange, isn't it?

Page 1 of 1