Mon, 12/24/2018 - 08:47
Hello! I am Anna and I am a student of Novosibirsk State University. I'm coding a project on C++ with MFC and I can't understand next thing:
1) I load STEP project (It is a room) with the help of MFC sample
2)Then I want to add a box into this STEP project. I've already found how I can add size and point of box.
3) But How can I convert my real box size to internal geometry? Where is the scale?
I want to read the real Box size and real Box coordinates from the Edit control, convert them with the scale of all STEP project. So I need to know where STEP scale in OCCS classes stores and how it is used to convert into OCCS geometry. Please, help me!
Mon, 12/24/2018 - 09:30
Hello Anna,
OCCT internally converts model into millimeters by default. If your step file has other units or you want use other scale you need to set static variable. Here is the example:
Interface_Static::SetIVal("xstep.cascade.unit", value);
Also, documentation contains some information:
https://www.opencascade.com/doc/occt-7.0.0/overview/html/occt_user_guide...
Programmatically, you can get size of your model using BRepBndLib class.
qaqa
Mon, 12/24/2018 - 09:45
Thanks a lot! I'll try it and ask if I get some new questions!
Mon, 12/24/2018 - 15:50
Hi,
I am using following command
"Interface_Static::SetIVal("xstep.cascade.unit", value);"
but values of step files element don't changed.
is there any way to change default unit system to write step file ..?
thanks
Mon, 12/24/2018 - 16:02
Hi, for step file you can use "write.step.unit" variable.
qaqa
Mon, 12/24/2018 - 16:28
yes we have used that command
Interface_Static::SetCVal("write.step.unit", "FT"
but actual value of element wont changed.
for example if we have element with height of 10 feet , then we need default unit system as Foot or "MM with conversion(304.8 * 10 = 3048."