Skip to content

Commit b7c4ad4

Browse files
author
plu
committed
correct example document
1 parent 985ab5c commit b7c4ad4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

examples/core/source.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def create_face(body):
115115
intensity_file_path = str(assets_data_path / IES)
116116
source2 = p.create_source(name="Luminaire.2", feature_type=SourceLuminaire)
117117
source2.intensity_file_uri = intensity_file_path
118-
source2.set_flux_radiant().value = 1.0 # select flux radiant
118+
source2.set_flux().set_radiant().value = 1.0 # select flux radiant
119119
# choose the source location [Origin, Xvector, Yvector, Zvector]
120120
source2.axis_system = [20, 50, 10, 1, 0, 0, 0, 1, 0, 0, 0, 1]
121121
source2.set_spectrum().set_blackbody() # choose blackbody with default value for the spectrum
@@ -140,7 +140,7 @@ def create_face(body):
140140
# > changes.
141141
# > If you don't, you will still only watch what is committed on the server.
142142

143-
source1.set_flux_radiant().value = 1.2 # modify radiant flux value
143+
source1.set_flux().set_radiant().value = 1.2 # modify radiant flux value
144144
source1.axis_system = [17, 10, 10, 1, 0, 0, 0, 1, 0, 0, 0, 1] # modify axis system
145145
source1.set_spectrum().set_halogen() # modify spectrum by choosing halogen
146146
source1.commit() # Push changes to the server
@@ -150,7 +150,7 @@ def create_face(body):
150150
#
151151
# Possibility to reset local values from the one available in the server.
152152

153-
source1.set_flux_luminous().value = 683.0 # modify to luminous flux BUT no commit
153+
source1.set_flux().set_luminous().value = 683.0 # modify to luminous flux BUT no commit
154154
source1.reset()
155155
# reset -> this will apply the server value to the local value the local value will be back to
156156
# halogen
@@ -184,7 +184,7 @@ def create_face(body):
184184
# -
185185

186186
# +
187-
source3.set_flux_luminous()
187+
source3.set_flux().set_luminous()
188188
source3.commit()
189189
print(source3)
190190
# -
@@ -207,7 +207,7 @@ def create_face(body):
207207
# -
208208

209209
# +
210-
source4.set_flux_luminous_intensity()
210+
source4.set_flux().set_luminous_intensity()
211211
source4.set_intensity().set_gaussian().set_axis_system(
212212
axis_system=[10, 50, 20, 1, 0, 0, 0, 1, 0, 0, 0, 1]
213213
)

0 commit comments

Comments
 (0)