cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
Patrick M
Ace

CPRISM_ question

I feel like a total idiot for asking, but I'm trying to script a shape that is basically a rectangle with rounded ends. Using the CPRISM_ (or PRISM_) command, I have the following:


CPRISM_ materialAttribute_1, materialAttribute_1, materialAttribute_1,
7,.393701",
0,0,15,
1.73228",0,15,
1.73228",.433071",900,
1.73228",.866142",3015,
0,.866142",15,
0,.433071",900,
0,0,3015

what I am getting is a convex end on one side and a concave end on the other. It's showing as: (_(   instead of  (_)   
I'm sure it has something to do with the second 900 status code, but can't figure out what that needs to be to be orientated correctly.

I am also getting a warning:"Undefined arc at line 50 of the 3d script"
Line 50 is the CPRISM_ materialAttri... line; what needs to be defined there to eliminate this warning?

Again, sorry for the basic stupid scripting question. Hoping someone can see this and correct my (probably obvious) error soon. THANKS!

BIM solutions and trouble shooting (self proclaimed) expert. Using Archicad 26 5002 US on Mac OS 11.5.2
1 Solution

Accepted Solutions
julienK
Advocate

looks like a rounding error, since you doing a 180deg arc  gdl gets confused as to whicj direction to go. you have 2 options:

1: you add a slight gap on the  end of the second arc to be less that 180deg 

 

CPRISM_ materialAttribute_1, materialAttribute_1, materialAttribute_1,
7,.393701,
0,0,15,
1.73228,0,15,
1.73228,.433071,900,
1.73228,.866142,3015,
0,.866142,15,
0,.433071,900,
-.0001,0,3015

 

 

2:  (Better solution) you use  the tangential arc by radius and angle which will ensure that the arc is always in the right direction

CPRISM_ materialAttribute_1, materialAttribute_1, materialAttribute_1,
6,.393701,
0,0,15,
1.73228,0,15,
1.73228,.433071,900,
1.73228,.866142,3015,
0,.866142,15,
.433071,180,2015

 

 

 

you also have some quotes at the end of some coordinates that you should remove (probably the reason for the undefined arc error)

 

also,  not necessary but you should use variables instead of hard coded  values when doing gdl.  Allows to adjust the object later and make it reusable.

Go to post

4 Replies 4
julienK
Advocate

looks like a rounding error, since you doing a 180deg arc  gdl gets confused as to whicj direction to go. you have 2 options:

1: you add a slight gap on the  end of the second arc to be less that 180deg 

 

CPRISM_ materialAttribute_1, materialAttribute_1, materialAttribute_1,
7,.393701,
0,0,15,
1.73228,0,15,
1.73228,.433071,900,
1.73228,.866142,3015,
0,.866142,15,
0,.433071,900,
-.0001,0,3015

 

 

2:  (Better solution) you use  the tangential arc by radius and angle which will ensure that the arc is always in the right direction

CPRISM_ materialAttribute_1, materialAttribute_1, materialAttribute_1,
6,.393701,
0,0,15,
1.73228,0,15,
1.73228,.433071,900,
1.73228,.866142,3015,
0,.866142,15,
.433071,180,2015

 

 

 

you also have some quotes at the end of some coordinates that you should remove (probably the reason for the undefined arc error)

 

also,  not necessary but you should use variables instead of hard coded  values when doing gdl.  Allows to adjust the object later and make it reusable.

Patrick M
Ace

That got me what I needed! thanks!

the hard coded parameters are only because this is a manufacturers object. Typically I'd allow for it to be adjustable... well, technically, I would typically just model it with a morph and save as object for somethign stupid simple like this...

BIM solutions and trouble shooting (self proclaimed) expert. Using Archicad 26 5002 US on Mac OS 11.5.2
Karl Ottenstein
Moderator Emeritus

@julienK wrote:

 

you also have some quotes at the end of some coordinates that you should remove (probably the reason for the undefined arc error)

The double quotes are likely because those values are in inches (imperial), vs default/internal meters (no quotes) since 4dProof is a USA user.  The GDL interpreter does convert inch quantities to the corresponding metric value within scripts.

Vote for Wish: Copy/Paste in 3D

AC 29 USA and earlier   •   hardware key   •   macOS Taho 26.1 MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
julienK
Advocate

I didn"t know that.  Explains why i got weird results when trying to fix it. 

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!