Itoo Software Forum

Author Topic: Windows  (Read 2202 times)

IM1808

  • Newbie
  • *
  • Posts: 11
Windows
« on: October 18, 2018, 12:39:47 PM »
Hello,

Sorry my english is not very good I use the Google translator.

I've been using Railclone for a few months now, I'm developing a system that saves time for placing windows, curtains with parametric and random openings.

I found the solution for this, but I think that my method can be improved with aritmetic (too bad that there is not a manual with concrete examples to make copy-paste formulas).

for explanation:

each ID represents a window model composed of two objects (frame 1a and opening 1b) + a model of curtain or blind 2.





- ID from 10 to 99 for white joinery and 110 to 199 for black joinery or vice versa.

- I have to manually add each new type of window with a conditional and the same conditional for the curtains if I want variables. (picture 2)



- I separate the curtains from the windows to be able to vary.

- The size "X" curtains side opening is a numerical parameter.

- The size "X" curtains fixed side is is a parameter "Xsplinelenght-input1" (picture 3)



two questions :

- Is it possible to define a conditionnell with several IDs on which to associate the object? because curtains apply to all windows defined by a unique ID

- Is it possible with arrhythmectic to read the "X" size of an object (the openable part of the window) by line section to replace the numeric parameter? so that if I have different sizes of openings the curtains automatically adapt.





thanks in advance

Thomas

Rokas

  • Hero Member
  • *****
  • Posts: 3324
Re: Windows
« Reply #1 on: October 18, 2018, 01:59:26 PM »
Seems like a nice window setup You are creating.

Regarding Your two questions :

Q Is it possible to define a conditionnell with several IDs on which to associate the object? because curtains apply to all windows defined by a unique ID
A: yes it is. you can use "or" condition which is written in expression editor as "|"
Example: if(XSplineMatID = 1 | XSplineMatID = 2 | XSplineMatID = 6 | XSplineMatID = 7,1,0)

Q: Is it possible with arrhythmectic to read the "X" size of an object (the openable part of the window) by line section to replace the numeric parameter? so that if I have different sizes of openings the curtains automatically adapt.
A: You can export segment's X attribute for this reason:
https://i.imgur.com/4mt3ANb.png

Hope that helps.
Rokas

IM1808

  • Newbie
  • *
  • Posts: 11
Re: Windows
« Reply #2 on: October 18, 2018, 02:39:50 PM »
I tried and I have an error message in the expression window as often elsewhere



What I would like to understand the semantics of this window but it is discouraging because I am sorely lacking an example to understand the logic.

I tried with (return -;) and without

Rokas

  • Hero Member
  • *****
  • Posts: 3324
Re: Windows
« Reply #3 on: October 18, 2018, 02:51:29 PM »
Your expression lacks some key part of the if statement.
if is constructed like this:
if(condition,return if true, return if false)

so Your if statement can be written
return if(XSplineMatID==12,1,0);

You need double "==" so it makes comparison, not tries to assign value.

as mentioned before, You can add multiple IDs with OR logical operations:
return if(XSplineMatID==12 | XSplineMatID==112 | XSplineMatID==45 ,1,2);

I am not sure what it should output so I added "1" or "2"

You can read more about expressions here.
Rokas

IM1808

  • Newbie
  • *
  • Posts: 11
Re: Windows
« Reply #4 on: October 18, 2018, 03:47:30 PM »
thank you,

I understand the syntax better and actually there is no error.

however, in my case I want one and the same object to apply to more than one ID segment through a single conditional to avoid nodes.

In your explanation if I understand well it means:

return if (XSplineMatID == 12 | XSplineMatID == 112 | XSplineMatID == 22 | XSplineMatID == 122, 12,0);

If Xspline = 12 or 112 or 22 or 122
If true = 12
If false = 0



In my case I wish that the object applies on all these segments (12,22,112,122) and not that it causes its implementation only on segments "12", this is an example.

Rokas

  • Hero Member
  • *****
  • Posts: 3324
Re: Windows
« Reply #5 on: October 18, 2018, 04:04:06 PM »
I see what You mean.

You should use Selector operator instead of Conditional (it only accepts one material ID) where selector selects Item Your describe in arithmetic conditions.


Use this modified expression:
Code: [Select]
return if (XSplineMatID == 12 | XSplineMatID == 112 | XSplineMatID == 22 | XSplineMatID == 122, 1,2);I have modified outputs- 1st or 2nd item from Selectors input instead a material ID You were outputting before.

Hope this helps.
Rokas

IM1808

  • Newbie
  • *
  • Posts: 11
Re: Windows
« Reply #6 on: October 18, 2018, 07:27:48 PM »
perfect !

It works nickel, thank you!

Good in my system I have to model the windows in advance but in the end once I would have to explore 5 or 6 projects it will not be redone. Still classic curtains to add

After that and the cladding, I'm going to focus now on automating the balconies and the interiors of the rooms. Even if I saw the populate building of forest I wonder if it is not more precise with railclone for habitat ...

I imagine that by recovering the splines of interior dwg it is possible to generate a total interior RC with ID (table, photos, furniture, floors, etc ..) only problem is the multi-material that will explode ^ ^

At least he will have the advantage of being mastered.

For what it interests some RC screen of this window ...





Again thank you for the info and this plugin is excellent.