[Frage] Special modification of Smartparts


Goodmorning,
does anyone know how to make (with Handle 3d) the modification indicated in the attached sketch?
Below you can find the script
Thank you for your information. Goodbye.
P.S. The dimension of f_r is 10.

Master-------
ang = ATAN ( alz / ped )
f_v = f_r / COS ( ang )
dent_x = ( alz + f_v - s_pian ) / TAN ( ang )
dent_y = ( alz + f_v - s_pian )

Parameter-------

PARAMETERS f_v=f_v
PARAMETERS ang=ang

3D-------

ROTX 90

PRISM 6 , larg ,
0 , 0 ,
0 , alz + f_v ,
l1 , alz + f_v ,
l1 , dent_y ,
dent_x , dent_y ,
0 , 0

Anhänge (1)

img
20201001_180735.jpg
Typ: image/jpeg
38-mal heruntergeladen
Größe: 499,58 KiB
1 - 9 (9)
  • 1

If the creation of the body is to start at a "movable" point, you should first set this insertion point with a TRANS command!
e.g. TRANSX l-l1 ! l...whole length
Then create the body with l1.

In reality it is not the point on the stairs that moves, but the end point of the landing!

It would also be possible to create the body from the "end" (in negative X direction). Then the starting point would not be "movable" anymore.

Anhänge (3)

img
extension_at_end.png
Typ: image/png
21-mal heruntergeladen
Größe: 35,88 KiB
img
extension_at_end1.png
Typ: image/png
21-mal heruntergeladen
Größe: 6,72 KiB
Typ: text/xml
18-mal heruntergeladen
Größe: 16,70 KiB

Zitiert von: Nemo
If the creation of the body is to start at a "movable" point, you should first set this insertion point with a TRANS command!
e.g. TRANSX l-l1 ! l...whole length

Then create the body with l1.
In reality it is not the point on the stairs that moves, but the end point of the landing!
It would also be possible to create the body from the "end" (in negative X direction). Then the starting point would not be "movable" anymore.


Thank you Nemo for informations and clarifications. I don't understand very well what you mean in the first sentence.
Do you mean that I have to create first the body with l1 and then the body of the steps?

Zitiert von: Nemo
If the creation of the body is to start at a "movable" point, you should first set this insertion point with a TRANS command!
e.g. TRANSX l-l1 ! l...whole length

Then create the body with l1.
In reality it is not the point on the stairs that moves, but the end point of the landing!
It would also be possible to create the body from the "end" (in negative X direction). Then the starting point would not be "movable" anymore.


I have tried the solution (in negative X direction) and I have seen that is Ok (like my sketch). So I'll have to create the scale in negative X direction! Thank you for help Nemo. Goodbye.

Zitiert von: Nemo
If the creation of the body is to start at a "movable" point, you should first set this insertion point with a TRANS command!
e.g. TRANSX l-l1 ! l...whole length

Then create the body with l1.
In reality it is not the point on the stairs that moves, but the end point of the landing!
It would also be possible to create the body from the "end" (in negative X direction). Then the starting point would not be "movable" anymore.


I Nemo, I tried to make union of the 3 group of the your smartpart "Stair" changing the part of the code you see below but I think it's not correct why the groups it's not assembled. Know you if it's possible this union and how? Thank you.

!IF unn THEN
!res=""
!res=GROUP_UNION("carrier_steps","carrier")
!GROUP_PLACE res
!ENDIF

IF unn THEN
res=""
res=GROUP_UNION("carrier_steps","carrier")
res=GROUP_UNION(res,"ext_end")
GROUP_PLACE res
ENDIF

If the first GROUP_UNION statement is calculated correctly, there must be a failure with the group "ext_end".
Without knowlegde of this code and/or screenshot, I cannot help you!

Zitiert von: Nemo
Se la prima istruzione GROUP_UNION viene calcolata correttamente, deve esserci un errore con il gruppo "ext_end".

Senza conoscere questo codice e / o screenshot, non posso aiutarti!


Here you are all the code 3D

id=0
ROTX 90

SECT_FACESTYLE fcs_crr
GOSUB "carrier"
GOSUB "ext_end"

SECT_FACESTYLE fcs_stp
GOSUB "steps"
GOSUB "step_end"
END

"carrier":
IF unn THEN
GROUP "carrier"
ENDIF
PRISM 5 , wdt ,
0 , -thk ,
0 , 0 ,
stp*stps , rsr*stps ,
stp*stps , rsr*stps - thk ,
0 , -thk
IF unn THEN
GROUP_END
!GROUP_PLACE "carrier"
ENDIF

IF unn THEN
GROUP "carrier_steps"
ENDIF
FOR n = 1 TO stps
GOSUB "step_carrier"
TRANS stp , rsr , 0
NEXT
RESTORE stps
IF unn THEN
GROUP_END
!GROUP_PLACE "carrier_steps"
ENDIF

!IF unn THEN
!res=""
!res=GROUP_UNION("carrier_steps","carrier")
!GROUP_PLACE res
!ENDIF

IF unn THEN
res=""
res=GROUP_UNION("carrier_steps","carrier")
res=GROUP_UNION(res,"ext_end")
GROUP_PLACE res
ENDIF

RETURN

"ext_end":
ang = ATAN ( rsr / stp )
dx = ( thk - end_thk ) / TAN ( ang )
dy = ( thk - end_thk )

TRANS stps * stp,stps * rsr,0

HANDLE 0,0,0,id,"ext_end",1
HANDLE ext_end,0,0,id,"ext_end",2
HANDLE -1,0,0,id,"ext_end",3
id=id+1

PRISM 4 , wdt ,
0 , 0 ,
ext_end , 0 ,
ext_end , -end_thk ,
dx , -end_thk,
0 , -end_thk - dy,
0 , 0
RESTORE 1
RETURN

"steps":
IF unn THEN
GROUP "steps"
ENDIF
FOR n = 1 TO stps
GOSUB "step"
TRANS stp , rsr , 0
NEXT
RESTORE stps
IF unn THEN
GROUP_END
!GROUP_PLACE "steps"
ENDIF

IF unn THEN
GROUP "risers"
ENDIF
FOR n = 1 TO stps
GOSUB "riser"
TRANS stp , rsr , 0
NEXT
RESTORE stps
IF unn THEN
GROUP_END
!GROUP_PLACE "risers"
ENDIF

IF unn THEN
res=""
res=GROUP_UNION("steps","risers")
GROUP_PLACE res
ENDIF

RETURN

"step_carrier":

PRISM 4 , wdt ,
0 , 0 ,
0 , rsr ,
stp , rsr ,
0 , 0
RETURN

"step":
PRISM 5 , wdt ,
-rst-nos,rsr ,
-rst-nos,rsr+stt ,
stp,rsr+stt ,
stp,rsr ,
-rst-nos,rsr
RETURN

"riser":
PRISM 5 , wdt ,
-rst , stt ,
-rst , rsr ,
0 , rsr ,
0 , stt,
-rst , stt
RETURN

"step_end":
TRANS stps * stp,stps * rsr,0
PRISM 5 , wdt ,
0,0,
ext_end,0,
ext_end,stt,
0,stt,
0,0
RESTORE 1
RETURN

You want to UNION a group "ext_end" , that is not existing at this point!
This you want to do inside GOSUB "carrier"!
GOSUB "ext_end" comes after this call!
And inside subroutine "ext_end" no GROUP "ext_end" is constructed!

All your failures has to to with not understanding runnig order and work of subroutines of the script!

Zitiert von: Nemo
You want to UNION a group "ext_end" , that is not existing at this point!

This you want to do inside GOSUB "carrier"!
GOSUB "ext_end" comes after this call!

And inside subroutine "ext_end" no GROUP "ext_end" is constructed!
All your failures has to to with not understanding runnig order and work of subroutines of the script!


Sorry Nemo but I'm not expert (like you) of script.

1 - 9 (9)
  • 1

Verwendung von Cookies:
Um die Webseite optimal gestalten und fortlaufend verbessern zu können, verwendet Allplan Cookies.
Durch die weitere Nutzung der Webseite erklären Sie sich mit der Verwendung von Cookies einverstanden.  -  Mehr Informationen

Schließen