Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improvement] Import more section types (UB, UC, CHS, RHS) #24

Closed
GreatApo opened this issue Jun 4, 2019 · 6 comments
Closed

[Improvement] Import more section types (UB, UC, CHS, RHS) #24

GreatApo opened this issue Jun 4, 2019 · 6 comments

Comments

@GreatApo
Copy link

GreatApo commented Jun 4, 2019

Thank you for your great work, I am still trying to play around in FreeCAD.

I would like to import sections (UC, UB, CHS) in the code however I can't find where sections are imported...

@yorikvanhavre
Copy link
Owner

Hi!

It all happens here:
https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Arch/Presets/profiles.csv
Feel free to add new categories! The more we have, the better.
One thing is important to know: the different existing profile types (C, H, R, RH o U) correspond to a specific class in https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Arch/ArchProfile.py

If you reuse any of them, there is nothing else to do than adding to profiles.csv.

If you need a new kind of profile, however, you will need 1) to make a new class for it, 2) extend the main makeProfile() function to handle your new profile type. These classes are very simple, you'll see.

If you need further help, consider posting on the forum, there is more people there to help!

@GreatApo
Copy link
Author

GreatApo commented Jun 5, 2019

Awesome, thanks for pointing it out. Hence, the profile types (C, H, R, RH o U) are related to the geometric characteristic of the section in order to create the 3D models. Importing I, H, U and hollow sections is just a matter of copy paste. Then to include angle sections I just need to make a new type (probably copy paste the U :P ).

@GreatApo GreatApo closed this as completed Jun 5, 2019
@yorikvanhavre
Copy link
Owner

Coding is 99% copy/pasting anyway 😄

@GreatApo
Copy link
Author

GreatApo commented Jun 9, 2019

Good morning,

I added all UB, UC, RHS, CHS sections (https://github.com/GreatApo/FreeCAD/blob/master/src/Mod/Arch/Presets/profiles.csv) and they work fine, however, there seems to be an orientation problem which I don't know if it is related to each section.

Screenshot from 2019-06-09 12-31-03-edit

I am following the same place method for all of them: top view -> structure member -> column -> change section -> click on somewhere. HEA sections appear correctly with UC section are placed based on their geometric center with improper length.
Mind that changing the section of the properly placed elements (HEA) shows UC sections correctly (hence it's not related to profile dimension).
The same thing happens for other sections too. For example small CHS sections appear properly while large CHS sections are again oriented wrong.

Should I make a pull request with the changes or this is related to the profiles.csv file?
Are there any other changes I should make? I did'n notice sth relative in the ArchProfile.py file (I haven't edit it at all).

@GreatApo GreatApo reopened this Jun 9, 2019
@GreatApo GreatApo changed the title [Question] Import more section types [Improvement] Import more section types (UB, UC, CHS, RHS) Jun 9, 2019
@yorikvanhavre
Copy link
Owner

Everything seems to work correctly for me, using your profiles.csv...
Screenshot from 2019-06-10 15-02-29
Are you sure you are using a recent version of FreeCAD? There have been several bugfixes to the structural objects placement recently...

@GreatApo
Copy link
Author

GreatApo commented Jun 10, 2019

Everything seems to work correctly for me, using your profiles.csv...
Are you sure you are using a recent version of FreeCAD? There have been several bugfixes to the structural objects placement recently...

Yeah, my mistake, I didn't thought of it. I run the version released in Ubuntu's store. I will see how to compile, test and then pull.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants